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

ETH Asset Pool (ETH_Asset_Pool.sol)

View Source: contracts/ETH_Asset_Pool.sol

ETH_Asset_Pool

This contract is the target for all deposits to the ETH Bridge via ETH_Bridge_Logic

Contract Members

Constants & Variables

address public multisig_control_address;

address public ETH_bridge_address;

Multisig_Control_Set

Parameters

NameTypeDescription
new_addressaddress

Bridge_Address_Set

Parameters

NameTypeDescription
new_addressaddress

Received

Parameters

NameTypeDescription
senderaddress
amountuint256

Functions

Emits Multisig_Control_Set event

function (address multisig_control) public nonpayable

Arguments

NameTypeDescription
multisig_controladdressThe initial MultisigControl contract address

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 ETH_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 eth to the targetamount is in wei, 1 wei == 0.000000000000000001 ETH

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

Arguments

NameTypeDescription
targetaddress payableTarget Ethereum address that the ETH will be sent to
amountuint256Amount of ETH to withdraw

A contract can have at most one receive function, declared using receive() external payable { ... } (without the function keyword). This function cannot have arguments, cannot return anything and must have external visibility and payable state mutability. It is executed on a call to the contract with empty calldata. This is the function that is executed on plain Ether transfers (e.g. via .send() or .transfer()). If no such function exists, but a payable fallback function exists, the fallback function will be called on a plain Ether transfer. If neither a receive Ether nor a payable fallback function is present, the contract cannot receive Ether through regular transactions and throws an exception.

function () external payable

Arguments

NameTypeDescription