Skip to main content
Version: mainnet (v0.77)

ERC20 Asset Pool (ERC20_Asset_Pool.sol)

View Source: contracts/ERC20_Asset_Pool.sol

ERC20_Asset_Pool

This contract is the target for all deposits to the ERC20 Bridge via ERC20_Bridge_Logic

Contract Members

Constants & Variables

address public multisig_control_address;

address public erc20_bridge_address;

Multisig_Control_Set

Parameters

NameTypeDescription
new_addressaddress

Bridge_Address_Set

Parameters

NameTypeDescription
new_addressaddress

Functions

Emits Multisig_Control_Set event

function (address multisig_control) public nonpayable

Arguments

NameTypeDescription
multisig_controladdressThe initial MultisigControl contract address

this contract is not intended to accept ether directly

function () external payable

Arguments

NameTypeDescription

set_multisig_control

See MultisigControl for more about signatures

function set_multisig_control(address new_address, uint256 nonce, bytes signatures) public nonpayable

Arguments

NameTypeDescription
new_addressaddressThe new MultisigControl contract address.
nonceuint256Vega-assigned single-use number that provides replay attack protection
signaturesbytesVega-supplied signature bundle of a validator-signed set_multisig_control order

set_bridge_address

See MultisigControl for more about signatures

function set_bridge_address(address new_address, uint256 nonce, bytes signatures) public nonpayable

Arguments

NameTypeDescription
new_addressaddressThe new ERC20_Bridge_Logic contract address.
nonceuint256Vega-assigned single-use number that provides replay attack protection
signaturesbytesVega-supplied signature bundle of a validator-signed set_bridge_address order

withdraw

This function can only be run by the current "multisig_control_address" and, if available, will send the target tokens to the targetamount is in whatever the lowest decimal value the ERC20 token has. For instance, an 18 decimal ERC20 token, 1 "amount" == 0.000000000000000001

function withdraw(address token_address, address target, uint256 amount) public nonpayable

Arguments

NameTypeDescription
token_addressaddressContract address of the ERC20 token to be withdrawn
targetaddressTarget Ethereum address that the ERC20 tokens will be sent to
amountuint256Amount of ERC20 tokens to withdraw