OmnichainERC1155Transfers
Abstract contract that provides Omnichain ERC1155 transfer functions of the Omnichain ERC1155 Data Manager
Based on OpenZeppelin ERC1155 implementation
safeTransferFrom
Transfers value
amount of an id
from from
to to
in another chain
The caller must have allowance for from
's tokens of at least value
or be from
Caller may receive native coin refund, so if it's a contract it MUST have receive() or payable fallback()
Parameters
Name | Type | Description |
---|---|---|
from | address | Source address |
to | OmnichainAddress | Destination omnichain address |
id | uint256 | Token ID |
value | uint256 | Amount of tokens to transfer |
data | bytes | Additional data with no specified format |
safeTransferFrom
Transfers value
amount of an id
from from
to to
in another chain
The caller must have allowance for from
's tokens of at least value
or be from
Parameters
Name | Type | Description |
---|---|---|
from | address | Source address |
to | OmnichainAddress | Destination omnichain address |
id | uint256 | Token ID |
value | uint256 | Amount of tokens to transfer |
data | bytes | Additional data with no specified format |
refundAddress | address payable | Address to send native coin refund to |
safeBatchTransferFrom
Transfers values
amount of multiple ids
from from
to to
in another chain
The caller must have allowance for from
's tokens of at least value
for each id
or be from
Caller may receive native coin refund, so if it's a contract it MUST have receive() or payable fallback()
Parameters
Name | Type | Description |
---|---|---|
from | address | Source address |
to | OmnichainAddress | Destination omnichain address |
ids | uint256[] | Array of token IDs |
values | uint256[] | Array of amounts of tokens to transfer |
data | bytes | Additional data with no specified format |
safeBatchTransferFrom
Transfers values
amount of multiple ids
from from
to to
in another chain
The caller must have allowance for from
's tokens of at least value
for each id
or be from
Parameters
Name | Type | Description |
---|---|---|
from | address | Source address |
to | OmnichainAddress | Destination omnichain address |
ids | uint256[] | Array of token IDs |
values | uint256[] | Array of amounts of tokens to transfer |
data | bytes | Additional data with no specified format |
refundAddress | address payable | Address to send native coin refund to |