Skip to content

IERC6909.sol

Read code on GitHub

Methods

allowance

Spender allowance of an id.

Solidity
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.

approve

Approves an amount of an id to a spender.

Solidity
function approve(address spender, uint256 id, uint256 amount) external nonpayable returns (bool)

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.

Returns

Name Type Description
_0 bool undefined

balanceOf

Owner balance of an id.

Solidity
function balanceOf(address owner, uint256 id) external view returns (uint256 amount)

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.

isOperator

Checks if a spender is approved by an owner as an operator

Solidity
function isOperator(address owner, address spender) external view returns (bool approved)

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.

setOperator

Sets or removes a spender as an operator for the caller.

Solidity
function setOperator(address spender, bool approved) external nonpayable returns (bool)

Parameters

Name Type Description
spender address The address of the spender.
approved bool The approval status.

Returns

Name Type Description
_0 bool undefined

transfer

Transfers an amount of an id from the caller to a receiver.

Solidity
function transfer(address receiver, uint256 id, uint256 amount) external nonpayable returns (bool)

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.

Returns

Name Type Description
_0 bool undefined

transferFrom

Transfers an amount of an id from a sender to a receiver.

Solidity
function transferFrom(address sender, address receiver, uint256 id, uint256 amount) external nonpayable 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.

Returns

Name Type Description
_0 bool undefined

Events

Approval

The event emitted when an approval occurs.

Solidity
event Approval(address indexed owner, address indexed spender, uint256 indexed id, uint256 amount)

Parameters

Name Type Description
owner indexed address The address of the owner.
spender indexed address The address of the spender.
id indexed uint256 The id of the token.
amount uint256 The amount of the token.

OperatorSet

The event emitted when an operator is set.

Solidity
event OperatorSet(address indexed owner, address indexed spender, bool approved)

Parameters

Name Type Description
owner indexed address The address of the owner.
spender indexed address The address of the spender.
approved bool The approval status.

Transfer

The event emitted when a transfer occurs.

Solidity
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 indexed address The address of the sender.
receiver indexed address The address of the receiver.
id indexed uint256 The id of the token.
amount uint256 The amount of the token.