ERC 6909
Functions¶
balanceOf¶
Owner balance of an id.
Parameters
Name | Type | Description |
---|---|---|
owner |
address |
The address of the owner. |
id |
uint256 |
The id of the token. |
Returns
Name | Type | Description |
---|---|---|
amount |
uint256 |
The balance of the token. |
allowance¶
Spender allowance of an id.
function allowance(address owner, address spender, uint256 id) external view returns (uint256 amount);
Parameters
Name | Type | Description |
---|---|---|
owner |
address |
The address of the owner. |
spender |
address |
The address of the spender. |
id |
uint256 |
The id of the token. |
Returns
Name | Type | Description |
---|---|---|
amount |
uint256 |
The allowance of the token. |
isOperator¶
Checks if a spender is approved by an owner as an operator
Parameters
Name | Type | Description |
---|---|---|
owner |
address |
The address of the owner. |
spender |
address |
The address of the spender. |
Returns
Name | Type | Description |
---|---|---|
approved |
bool |
The approval status. |
transfer¶
Transfers an amount of an id from the caller to a receiver.
Parameters
Name | Type | Description |
---|---|---|
receiver |
address |
The address of the receiver. |
id |
uint256 |
The id of the token. |
amount |
uint256 |
The amount of the token. |
transferFrom¶
Transfers an amount of an id from a sender to a receiver.
function transferFrom(address sender, address receiver, uint256 id, uint256 amount) external returns (bool);
Parameters
Name | Type | Description |
---|---|---|
sender |
address |
The address of the sender. |
receiver |
address |
The address of the receiver. |
id |
uint256 |
The id of the token. |
amount |
uint256 |
The amount of the token. |
approve¶
Approves an amount of an id to a spender.
Parameters
Name | Type | Description |
---|---|---|
spender |
address |
The address of the spender. |
id |
uint256 |
The id of the token. |
amount |
uint256 |
The amount of the token. |
setOperator¶
Sets or removes a spender as an operator for the caller.
Parameters
Name | Type | Description |
---|---|---|
spender |
address |
The address of the spender. |
approved |
bool |
The approval status. |
Events¶
Transfer¶
The event emitted when a transfer occurs.
event Transfer(address caller, address indexed sender, address indexed receiver, uint256 indexed id, uint256 amount);
Parameters
Name | Type | Description |
---|---|---|
caller |
address |
The caller of the transfer. |
sender |
address |
The address of the sender. |
receiver |
address |
The address of the receiver. |
id |
uint256 |
The id of the token. |
amount |
uint256 |
The amount of the token. |
OperatorSet¶
The event emitted when an operator is set.
Parameters
Name | Type | Description |
---|---|---|
owner |
address |
The address of the owner. |
spender |
address |
The address of the spender. |
approved |
bool |
The approval status. |
Approval¶
The event emitted when an approval occurs.
Parameters
Name | Type | Description |
---|---|---|
owner |
address |
The address of the owner. |
spender |
address |
The address of the spender. |
id |
uint256 |
The id of the token. |
amount |
uint256 |
The amount of the token. |