DepositBoxEth

receive receive() external

deposit deposit(string schainName) external

Allows msg.sender to send ETH from mainnet to schain.

Requirements:

  • Schain name must not be Mainnet.

  • Receiver contract should be added as twin contract on schain.

  • Schain that receives tokens should not be killed.

postMessage postMessage(bytes32 schainHash, address sender, bytes data) external

Allows MessageProxyForMainnet contract to execute transferring ERC20 token from schain to mainnet.

Requirements:

  • Schain from which the eth came should not be killed.

  • Sender contract should be defined and schain name cannot be Mainnet.

  • Amount of eth on DepositBoxEth should be equal or more than transferred amount.

getMyEth getMyEth() external

Transfers a user’s ETH.

Requirements:

  • DepositBoxETh must have sufficient ETH.

  • User must be approved for ETH transfer.

getFunds getFunds(string schainName, address payable receiver, uint256 amount) external

Allows Schain owner to return each user their ETH.

Requirements:

  • Amount of ETH on schain should be equal or more than transferred amount.

  • Receiver address must not be null.

  • msg.sender should be an owner of schain

  • IMA transfers Mainnet <→ schain should be killed

enableActiveEthTransfers enableActiveEthTransfers(string schainName) external

Allows Schain owner to switch on or switch off active eth transfers.

Requirements:

  • msg.sender should be an owner of schain

  • IMA transfers Mainnet <→ schain should be killed

disableActiveEthTransfers disableActiveEthTransfers(string schainName) external

Allows Schain owner to switch on or switch off active eth transfers.

Requirements:

  • msg.sender should be an owner of schain

  • IMA transfers Mainnet <→ schain should be killed

gasPayer gasPayer(bytes32 schainHash, address sender, bytes data) → address external

Returns receiver of message.

Requirements:

  • Sender contract should be defined and schain name cannot be Mainnet.

initialize initialize(contract IContractManager contractManagerOfSkaleManagerValue, contract ILinker linkerValue, contract IMessageProxyForMainnet messageProxyValue) public

Creates a new DepositBoxEth contract.

depositDirect depositDirect(string schainName, address receiver) public

Allows msg.sender to send ETH from mainnet to schain to specified receiver.

Requirements:

  • Schain name must not be Mainnet.

  • Receiver contract should be added as twin contract on schain.

  • Schain that receives tokens should not be killed.

ActiveEthTransfers ActiveEthTransfers(bytes32 schainHash, bool active) event