erc20bridge

package
v0.75.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ERC20Bridge

type ERC20Bridge struct {
	ERC20BridgeCommon
	ERC20BridgeNewInV2
	Address common.Address
	Version ERC20BridgeVersion
	// contains filtered or unexported fields
}

func NewERC20Bridge

func NewERC20Bridge(
	ethClient *ethclient.Client,
	hexAddress string,
	version ERC20BridgeVersion,
) (*ERC20Bridge, error)

type ERC20BridgeCommon

type ERC20BridgeCommon interface {
	GetAssetSource(opts *bind.CallOpts, vega_asset_id [32]byte) (common.Address, error)
	// GetDepositMaximum(opts *bind.CallOpts, asset_source common.Address) (*big.Int, error) // removed in v2
	// GetDepositMinimum(opts *bind.CallOpts, asset_source common.Address) (*big.Int, error) // removed in v2
	GetMultisigControlAddress(opts *bind.CallOpts) (common.Address, error)
	GetVegaAssetId(opts *bind.CallOpts, asset_source common.Address) ([32]byte, error)
	IsAssetListed(opts *bind.CallOpts, asset_source common.Address) (bool, error)

	DepositAsset(opts *bind.TransactOpts, asset_source common.Address, amount *big.Int, vega_public_key [32]byte) (*types.Transaction, error)
	// ListAsset(opts *bind.TransactOpts, asset_source common.Address, vega_asset_id [32]byte, nonce *big.Int, signatures []byte) (*types.Transaction, error) // changed in v2
	RemoveAsset(opts *bind.TransactOpts, asset_source common.Address, nonce *big.Int, signatures []byte) (*types.Transaction, error)
}

type ERC20BridgeNewInV2

type ERC20BridgeNewInV2 interface {
	DefaultWithdrawDelay(opts *bind.CallOpts) (*big.Int, error)
	Erc20AssetPoolAddress(opts *bind.CallOpts) (common.Address, error)
	GetAssetDepositLifetimeLimit(opts *bind.CallOpts, asset_source common.Address) (*big.Int, error)
	GetWithdrawThreshold(opts *bind.CallOpts, asset_source common.Address) (*big.Int, error)
	IsExemptDepositor(opts *bind.CallOpts, depositor common.Address) (bool, error)
	IsStopped(opts *bind.CallOpts) (bool, error)

	ExemptDepositor(opts *bind.TransactOpts) (*types.Transaction, error)
	GlobalResume(opts *bind.TransactOpts, nonce *big.Int, signatures []byte) (*types.Transaction, error)
	GlobalStop(opts *bind.TransactOpts, nonce *big.Int, signatures []byte) (*types.Transaction, error)
	ListAsset(opts *bind.TransactOpts, asset_source common.Address, vega_asset_id [32]byte, lifetime_limit *big.Int, withdraw_threshold *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error)
	RevokeExemptDepositor(opts *bind.TransactOpts) (*types.Transaction, error)
	SetAssetLimits(opts *bind.TransactOpts, asset_source common.Address, lifetime_limit *big.Int, threshold *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error)
	SetWithdrawDelay(opts *bind.TransactOpts, delay *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error)
	WithdrawAsset(opts *bind.TransactOpts, asset_source common.Address, amount *big.Int, target common.Address, creation *big.Int, nonce *big.Int, signatures []byte) (*types.Transaction, error)
}

type ERC20BridgeVersion

type ERC20BridgeVersion string
const (
	ERC20BridgeV1 ERC20BridgeVersion = "v1"
	ERC20BridgeV2 ERC20BridgeVersion = "v2"
)

func (ERC20BridgeVersion) IsValid

func (n ERC20BridgeVersion) IsValid() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL