ETHAssetHolder.sol

View Source: contracts/ETHAssetHolder.sol

โ†— Extends: AssetHolder โ†˜ Derived Contracts: TestEthAssetHolder

Ther ETHAssetHolder contract extends the AssetHolder contract, and adds the following functionality: it allows ETH to be escrowed against a state channelId and to be transferred to external destinations.


Functions


constructor

Constructor function storing the AdjudicatorAddress.

constructor(address _AdjudicatorAddress) public nonpayable

Arguments

NameTypeDescription
_AdjudicatorAddressaddressAddress of an Adjudicator contract, supplied at deploy-time.

deposit

Deposit ETH against a given destination.

function deposit(bytes32 destination, uint256 expectedHeld, uint256 amount) public payable

Arguments

NameTypeDescription
destinationbytes32ChannelId to be credited.
expectedHelduint256The number of wei the depositor believes are already escrowed against the channelId.
amountuint256The intended number of wei to be deposited.

_transferAsset

Transfers the given number of wei to a supplied ethereum address.

function _transferAsset(address payable destination, uint256 amount) internal nonpayable

Arguments

NameTypeDescription
destinationaddress payableEthereum address to be credited.
amountuint256Quantity of wei to be transferred.
Last updated on by geoknee