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
Name | Type | Description |
---|---|---|
new_address | address |
Bridge_Address_Set
Parameters
Name | Type | Description |
---|---|---|
new_address | address |
Functions
Emits Multisig_Control_Set event
function (address multisig_control) public nonpayable
Arguments
Name | Type | Description |
---|---|---|
multisig_control | address | The initial MultisigControl contract address |
this contract is not intended to accept ether directly
function () external payable
Arguments
Name | Type | Description |
---|
set_multisig_control
See MultisigControl for more about signatures
function set_multisig_control(address new_address, uint256 nonce, bytes signatures) public nonpayable
Arguments
Name | Type | Description |
---|---|---|
new_address | address | The new MultisigControl contract address. |
nonce | uint256 | Vega-assigned single-use number that provides replay attack protection |
signatures | bytes | Vega-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
Name | Type | Description |
---|---|---|
new_address | address | The new ERC20_Bridge_Logic contract address. |
nonce | uint256 | Vega-assigned single-use number that provides replay attack protection |
signatures | bytes | Vega-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
Name | Type | Description |
---|---|---|
token_address | address | Contract address of the ERC20 token to be withdrawn |
target | address | Target Ethereum address that the ERC20 tokens will be sent to |
amount | uint256 | Amount of ERC20 tokens to withdraw |