erc20bridge

package
v0.74.10 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeployERC20Bridge

func DeployERC20Bridge(
	version ERC20BridgeVersion,
	auth *bind.TransactOpts,
	backend bind.ContractBackend,
	multisigControlAddress common.Address,
	erc20AssetPoolAddress common.Address,
) (address common.Address, tx *ethTypes.Transaction, err error)

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