ILiquid1155
Inherits: IERC165
Author: 0xvv @ Kiln
This contract allows users to stake in any of the vPools with any amount of ETH and track their position. Users are given transferable shares to track their stake, shares of different pools are not equivalent. Users can interact with the contract using the ERC-1155 interface.
Functions
setApprovalForAll
Give the right to an operator to transfer all tokens of the sender.
function setApprovalForAll(address operator, bool approved) external;
Parameters
| Name | Type | Description |
|---|---|---|
operator | address | The address of the operator. |
approved | bool | The status of the operator. |
isApprovedForAll
Returns the operator status of an operator for a given owner.
function isApprovedForAll(address account, address operator) external view returns (bool);
Parameters
| Name | Type | Description |
|---|---|---|
account | address | The address of the owner. |
operator | address | The address of the operator. |
safeTransferFrom
Transfers amount tokens of token type id from from to to with extra data.
The caller must be operator of 'from' or 'from' & 'from' must have a balance of at least amount.
function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;
Parameters
| Name | Type | Description |
|---|---|---|
from | address | The address of the sender. |
to | address | The address of the receiver. |
id | uint256 | The id of the token. |
amount | uint256 | The token amount. |
data | bytes | The data passed to the receiver. |
safeBatchTransferFrom
Batched version of safeTransferFrom.
function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data)
external;
Parameters
| Name | Type | Description |
|---|---|---|
from | address | The address of the sender. |
to | address | The address of the receiver. |
ids | uint256[] | The ids of the tokens. |
amounts | uint256[] | The token amounts. |
data | bytes | The data passed to the receiver. |
Events
ApprovalForAll
Emitted when the status of an operator is changed.
event ApprovalForAll(address indexed account, address indexed operator, bool approved);
Parameters
| Name | Type | Description |
|---|---|---|
account | address | The account of the owner. |
operator | address | The operator whose status is being updated. |
approved | bool | The new status of the operator. |
Errors
ApprovalForSelf
Emitted when a user trier to approve themselves.
error ApprovalForSelf();
ReceiverRejected
Emitted when a the ERC-1155 receiver rejects the transfer.
error ReceiverRejected(address receiver, uint256 id, uint256 amount, bytes data);
Parameters
| Name | Type | Description |
|---|---|---|
receiver | address | The address of the receiver. |
id | uint256 | The id of the token. |
amount | uint256 | The token amount. |
data | bytes | The data passed to the receiver. |
ReceiverRejectedBatch
Emitted when a the ERC-1155 receiver rejects a batch of transfers.
error ReceiverRejectedBatch(address receiver, uint256[] ids, uint256[] amounts, bytes data);
Parameters
| Name | Type | Description |
|---|---|---|
receiver | address | The address of the receiver. |
ids | uint256[] | The ids of the tokens. |
amounts | uint256[] | The token amounts. |
data | bytes | The data passed to the receiver. |
NotAnERC1155Receiver
Emitted when a transfer is attempted but the sender is not a receiver.
error NotAnERC1155Receiver(address receiver);
Parameters
| Name | Type | Description |
|---|---|---|
receiver | address | The address of the receiver. |