Solidity API
ERC1155Handler
EMPTY_BYTES
bytes EMPTY_BYTES
constructor
constructor(address bridgeAddress) public
Name | Type | Description |
---|---|---|
bridgeAddress | address | Contract address of previously deployed Bridge. |
deposit
function deposit(bytes32 resourceID, address depositer, bytes data) external payable returns (bytes)
A deposit is initiatied by making a deposit in the Bridge contract.
Requirements:
- It must be called by only bridge.
Name | Type | Description |
---|---|---|
resourceID | bytes32 | ResourceID used to find address of token to be used for deposit. |
depositer | address | Address of account making the deposit in the Bridge contract. |
data | bytes | Consists of ABI-encoded arrays of tokenIDs and amounts. |
executeProposal
function executeProposal(bytes32 resourceID, bytes data) external
Proposal execution should be initiated when a proposal is finalized in the Bridge contract. by a relayer on the deposit's destination chain.
Requirements:
- It must be called by only bridge.
Name | Type | Description |
---|---|---|
resourceID | bytes32 | |
data | bytes | Consists of ABI-encoded {tokenIDs}, {amounts}, {recipient}, and {transferData} of types uint[], uint[], bytes, bytes. |
withdraw
function withdraw(bytes data) external
Used to manually release ERC1155 tokens from ERC1155Safe.
Requirements:
- It must be called by only bridge.
Name | Type | Description |
---|---|---|
data | bytes | Consists of ABI-encoded {tokenAddress}, {recipient}, {tokenIDs}, {amounts}, and {transferData} of types address, address, uint[], uint[], bytes. |