IERC 777 Upgradeable
Interface of the ERC777Token standard as defined in the EIP. This contract uses the https://eips.ethereum.org/EIPS/eip-1820[ERC1820 registry standard] to let token holders and recipients react to token movements by using setting implementers for the associated interfaces in said registry. See {IERC1820Registry} and {ERC1820Implementer}.
Methods
authorizeOperator
Make an account an operator of the caller. See {isOperatorFor}. Emits an {AuthorizedOperator} event. Requirements - operator
cannot be calling address.
Parameters
Name | Type | Description |
---|---|---|
operator | address | undefined |
balanceOf
Returns the amount of tokens owned by an account (owner
).
Parameters
Name | Type | Description |
---|---|---|
owner | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
burn
Destroys amount
tokens from the caller's account, reducing the total supply. If a send hook is registered for the caller, the corresponding function will be called with data
and empty operatorData
. See {IERC777Sender}. Emits a {Burned} event. Requirements - the caller must have at least amount
tokens.
Parameters
Name | Type | Description |
---|---|---|
amount | uint256 | undefined |
data | bytes | undefined |
defaultOperators
Returns the list of default operators. These accounts are operators for all token holders, even if {authorizeOperator} was never called on them. This list is immutable, but individual holders may revoke these via {revokeOperator}, in which case {isOperatorFor} will return false.
Returns
Name | Type | Description |
---|---|---|
_0 | address[] | undefined |
granularity
Returns the smallest part of the token that is not divisible. This means all token operations (creation, movement and destruction) must have amounts that are a multiple of this number. For most token contracts, this value will equal 1.
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
isOperatorFor
Returns true if an account is an operator of tokenHolder
. Operators can send and burn tokens on behalf of their owners. All accounts are their own operator. See {operatorSend} and {operatorBurn}.
Parameters
Name | Type | Description |
---|---|---|
operator | address | undefined |
tokenHolder | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
name
Returns the name of the token.
Returns
Name | Type | Description |
---|---|---|
_0 | string | undefined |
operatorBurn
Destroys amount
tokens from account
, reducing the total supply. The caller must be an operator of account
. If a send hook is registered for account
, the corresponding function will be called with data
and operatorData
. See {IERC777Sender}. Emits a {Burned} event. Requirements - account
cannot be the zero address. - account
must have at least amount
tokens. - the caller must be an operator for account
.
Parameters
Name | Type | Description |
---|---|---|
account | address | undefined |
amount | uint256 | undefined |
data | bytes | undefined |
operatorData | bytes | undefined |
operatorSend
Moves amount
tokens from sender
to recipient
. The caller must be an operator of sender
. If send or receive hooks are registered for sender
and recipient
, the corresponding functions will be called with data
and operatorData
. See {IERC777Sender} and {IERC777Recipient}. Emits a {Sent} event. Requirements - sender
cannot be the zero address. - sender
must have at least amount
tokens. - the caller must be an operator for sender
. - recipient
cannot be the zero address. - if recipient
is a contract, it must implement the {IERC777Recipient} interface.
Parameters
Name | Type | Description |
---|---|---|
sender | address | undefined |
recipient | address | undefined |
amount | uint256 | undefined |
data | bytes | undefined |
operatorData | bytes | undefined |
revokeOperator
Revoke an account's operator status for the caller. See {isOperatorFor} and {defaultOperators}. Emits a {RevokedOperator} event. Requirements - operator
cannot be calling address.
Parameters
Name | Type | Description |
---|---|---|
operator | address | undefined |
send
Moves amount
tokens from the caller's account to recipient
. If send or receive hooks are registered for the caller and recipient
, the corresponding functions will be called with data
and empty operatorData
. See {IERC777Sender} and {IERC777Recipient}. Emits a {Sent} event. Requirements - the caller must have at least amount
tokens. - recipient
cannot be the zero address. - if recipient
is a contract, it must implement the {IERC777Recipient} interface.
Parameters
Name | Type | Description |
---|---|---|
recipient | address | undefined |
amount | uint256 | undefined |
data | bytes | undefined |
symbol
Returns the symbol of the token, usually a shorter version of the name.
Returns
Name | Type | Description |
---|---|---|
_0 | string | undefined |
totalSupply
Returns the amount of tokens in existence.
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
Events
AuthorizedOperator
Parameters
Name | Type | Description |
---|---|---|
operator | address | undefined |
tokenHolder | address | undefined |
Burned
Parameters
Name | Type | Description |
---|---|---|
operator | address | undefined |
from | address | undefined |
amount | uint256 | undefined |
data | bytes | undefined |
operatorData | bytes | undefined |
Minted
Parameters
Name | Type | Description |
---|---|---|
operator | address | undefined |
to | address | undefined |
amount | uint256 | undefined |
data | bytes | undefined |
operatorData | bytes | undefined |
RevokedOperator
Parameters
Name | Type | Description |
---|---|---|
operator | address | undefined |
tokenHolder | address | undefined |
Sent
Parameters
Name | Type | Description |
---|---|---|
operator | address | undefined |
from | address | undefined |
to | address | undefined |
amount | uint256 | undefined |
data | bytes | undefined |
operatorData | bytes | undefined |
Last updated