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

ETH Bridge Logic Interface (IETH_Bridge_Logic.sol)

View Source: contracts/IETH_Bridge_Logic.sol

↘ Derived Contracts: ETH_Bridge_Logic

IETH_Bridge_Logic

Implementations of this interface are used by Vega network users to deposit and withdraw ETH to/from Vega.

ETH_Withdrawn

Parameters

NameTypeDescription
user_addressaddress
amountuint256
nonceuint256

ETH_Deposited

Parameters

NameTypeDescription
user_addressaddress
amountuint256
vega_public_keybytes32

ETH_Deposit_Minimum_Set

Parameters

NameTypeDescription
new_minimumuint256
nonceuint256

ETH_Deposit_Maximum_Set

Parameters

NameTypeDescription
new_maximumuint256
nonceuint256

Functions

set_deposit_minimum

This function sets the minimum allowable deposit for ETHMUST emit Asset_Deposit_Minimum_Set if successful

function set_deposit_minimum(uint256 minimum_amount, uint256 nonce, bytes signatures) public nonpayable

Arguments

NameTypeDescription
minimum_amountuint256Minimum deposit amount
nonceuint256Vega-assigned single-use number that provides replay attack protection
signaturesbytesVega-supplied signature bundle of a validator-signed order

set_deposit_maximum

This function sets the maximum allowable deposit for ETHMUST emit Asset_Deposit_Maximum_Set if successful

function set_deposit_maximum(uint256 maximum_amount, uint256 nonce, bytes signatures) public nonpayable

Arguments

NameTypeDescription
maximum_amountuint256Maximum deposit amount
nonceuint256Vega-assigned single-use number that provides replay attack protection
signaturesbytesVega-supplied signature bundle of a validator-signed order

withdraw_asset

This function withdraws assets to the target Ethereum addressMUST emit Asset_Withdrawn if successful

function withdraw_asset(uint256 amount, uint256 expiry, address payable target, uint256 nonce, bytes signatures) public nonpayable

Arguments

NameTypeDescription
amountuint256Amount of ETH to withdraw
expiryuint256Vega-assigned timestamp of withdrawal order expiration
targetaddress payableTarget Ethereum address to receive withdrawn ETH
nonceuint256Vega-assigned single-use number that provides replay attack protection
signaturesbytesVega-supplied signature bundle of a validator-signed order

deposit_asset

This function allows a user to deposit ETH into VegaMUST emit Asset_Deposited if successful

function deposit_asset(bytes32 vega_public_key) public payable

Arguments

NameTypeDescription
vega_public_keybytes32Target vega public key to be credited with this deposit

get_deposit_minimum

This view returns minimum valid deposit

function get_deposit_minimum() public view
returns(uint256)

Returns

Minimum valid deposit of ETH

Arguments

NameTypeDescription

get_deposit_maximum

This view returns maximum valid deposit

function get_deposit_maximum() public view
returns(uint256)

Returns

Maximum valid deposit of ETH

Arguments

NameTypeDescription

get_multisig_control_address

function get_multisig_control_address() public view
returns(address)

Returns

current multisig_control_address

Arguments

NameTypeDescription

get_vega_asset_id

function get_vega_asset_id() public view
returns(bytes32)

Returns

The assigned Vega Asset Id for ETH

Arguments

NameTypeDescription