IAssetHolder.sol

View Source: contracts/interfaces/IAssetHolder.sol

โ†˜ Derived Contracts: AssetHolder

The IAssetHolder interface calls for functions that allow assets to be transferred from one channel to other channel and/or external destinations, as well as for guarantees to be claimed.


Events

event Deposited(bytes32 indexed destination, uint256 amountDeposited, uint256 destinationHoldings);
event AllocationUpdated(bytes32 indexed channelId, uint256 initialHoldings);

Functions


transfer

Transfers as many funds escrowed against channelId as can be afforded for a specific destination. Assumes no repeated entries.

function transfer(bytes32 fromChannelId, bytes allocationBytes, uint256[] indices) external nonpayable

Arguments

NameTypeDescription
fromChannelIdbytes32Unique identifier for state channel to transfer funds from.
allocationBytesbytesThe abi.encode of AssetOutcome.Allocation
indicesuint256[]Array with each entry denoting the index of a destination to transfer funds to.

claim

Transfers as many funds escrowed against guarantorChannelId as can be afforded for a specific destination in the beneficiaries of the target of that channel. Checks against the storage in this contract.

function claim(bytes32 guarantorChannelId, bytes guaranteeBytes, bytes allocationBytes, uint256[] indices) external nonpayable

Arguments

NameTypeDescription
guarantorChannelIdbytes32Unique identifier for a guarantor state channel.
guaranteeBytesbytesThe abi.encode of Outcome.Guarantee
allocationBytesbytesThe abi.encode of AssetOutcome.Allocation for the target
indicesuint256[]Array with each entry denoting the index of a destination (in the target channel) to transfer funds to. Should be in increasing order. An empty array indicates "all".
Last updated on by geoknee