mirror of https://github.com/status-im/EIPs.git
Automatically merged updates to draft EIP(s) 777
Hi, I'm a bot! This change was automatically merged because: - It only modifies existing Draft or Last Call EIP(s) - The PR was approved or written by at least one author of each modified EIP - The build is passing
This commit is contained in:
parent
f26347110c
commit
de6663563e
|
@ -40,22 +40,22 @@ This standard tries to improve the widely used [ERC20] token standard. The main
|
||||||
|
|
||||||
``` solidity
|
``` solidity
|
||||||
interface ERC777Token {
|
interface ERC777Token {
|
||||||
function name() public view returns (string);
|
function name() external view returns (string);
|
||||||
function symbol() public view returns (string);
|
function symbol() external view returns (string);
|
||||||
function totalSupply() public view returns (uint256);
|
function totalSupply() external view returns (uint256);
|
||||||
function balanceOf(address owner) public view returns (uint256);
|
function balanceOf(address owner) external view returns (uint256);
|
||||||
function granularity() public view returns (uint256);
|
function granularity() external view returns (uint256);
|
||||||
|
|
||||||
function defaultOperators() public view returns (address[]);
|
function defaultOperators() external view returns (address[]);
|
||||||
function authorizeOperator(address operator) public;
|
function authorizeOperator(address operator) external;
|
||||||
function revokeOperator(address operator) public;
|
function revokeOperator(address operator) external;
|
||||||
function isOperatorFor(address operator, address tokenHolder) public view returns (bool);
|
function isOperatorFor(address operator, address tokenHolder) external view returns (bool);
|
||||||
|
|
||||||
function send(address to, uint256 amount, bytes data) public;
|
function send(address to, uint256 amount, bytes data) external;
|
||||||
function operatorSend(address from, address to, uint256 amount, bytes data, bytes operatorData) public;
|
function operatorSend(address from, address to, uint256 amount, bytes data, bytes operatorData) external;
|
||||||
|
|
||||||
function burn(uint256 amount, bytes data) public;
|
function burn(uint256 amount, bytes data) external;
|
||||||
function operatorBurn(address from, uint256 amount, bytes data, bytes operatorData) public;
|
function operatorBurn(address from, uint256 amount, bytes data, bytes operatorData) external;
|
||||||
|
|
||||||
event Sent(
|
event Sent(
|
||||||
address indexed operator,
|
address indexed operator,
|
||||||
|
@ -86,7 +86,7 @@ The `view` functions detailed below MUST be implemented.
|
||||||
**`name` function**
|
**`name` function**
|
||||||
|
|
||||||
``` solidity
|
``` solidity
|
||||||
function name() public view returns (string)
|
function name() external view returns (string)
|
||||||
```
|
```
|
||||||
|
|
||||||
Returns the name of the token, e.g., `"MyToken"`.
|
Returns the name of the token, e.g., `"MyToken"`.
|
||||||
|
@ -96,7 +96,7 @@ Returns the name of the token, e.g., `"MyToken"`.
|
||||||
**`symbol` function**
|
**`symbol` function**
|
||||||
|
|
||||||
``` solidity
|
``` solidity
|
||||||
function symbol() public view returns (string)
|
function symbol() external view returns (string)
|
||||||
```
|
```
|
||||||
|
|
||||||
Returns the symbol of the token, e.g., `"MYT"`.
|
Returns the symbol of the token, e.g., `"MYT"`.
|
||||||
|
@ -106,7 +106,7 @@ Returns the symbol of the token, e.g., `"MYT"`.
|
||||||
**`totalSupply` function**
|
**`totalSupply` function**
|
||||||
|
|
||||||
``` solidity
|
``` solidity
|
||||||
function totalSupply() public view returns (uint256)
|
function totalSupply() external view returns (uint256)
|
||||||
```
|
```
|
||||||
|
|
||||||
Get the total number of minted tokens.
|
Get the total number of minted tokens.
|
||||||
|
@ -121,7 +121,7 @@ Get the total number of minted tokens.
|
||||||
**`balanceOf` function**
|
**`balanceOf` function**
|
||||||
|
|
||||||
``` solidity
|
``` solidity
|
||||||
function balanceOf(address tokenHolder) public view returns (uint256)
|
function balanceOf(address tokenHolder) external view returns (uint256)
|
||||||
```
|
```
|
||||||
|
|
||||||
Get the balance of the account with address `tokenHolder`.
|
Get the balance of the account with address `tokenHolder`.
|
||||||
|
@ -136,7 +136,7 @@ The balance MUST be zero (`0`) or higher.
|
||||||
**`granularity` function**
|
**`granularity` function**
|
||||||
|
|
||||||
``` solidity
|
``` solidity
|
||||||
function granularity() public view returns (uint256)
|
function granularity() external view returns (uint256)
|
||||||
```
|
```
|
||||||
|
|
||||||
Get the smallest part of the token that's not divisible.
|
Get the smallest part of the token that's not divisible.
|
||||||
|
@ -231,7 +231,7 @@ Token contracts MAY implement other functions to manage *operators*.
|
||||||
**`defaultOperators` function** <a id="defaultOperators"></a>
|
**`defaultOperators` function** <a id="defaultOperators"></a>
|
||||||
|
|
||||||
``` solidity
|
``` solidity
|
||||||
function defaultOperators() public view returns (address[])
|
function defaultOperators() external view returns (address[])
|
||||||
```
|
```
|
||||||
|
|
||||||
Get the list of *default operators* as defined by the token contract.
|
Get the list of *default operators* as defined by the token contract.
|
||||||
|
@ -243,7 +243,7 @@ Get the list of *default operators* as defined by the token contract.
|
||||||
**`authorizeOperator` function**
|
**`authorizeOperator` function**
|
||||||
|
|
||||||
``` solidity
|
``` solidity
|
||||||
function authorizeOperator(address operator) public
|
function authorizeOperator(address operator) external
|
||||||
```
|
```
|
||||||
|
|
||||||
Set a third party `operator` address as an *operator* of `msg.sender` to send and burn tokens on its behalf.
|
Set a third party `operator` address as an *operator* of `msg.sender` to send and burn tokens on its behalf.
|
||||||
|
@ -256,7 +256,7 @@ Set a third party `operator` address as an *operator* of `msg.sender` to send an
|
||||||
**`revokeOperator` function**
|
**`revokeOperator` function**
|
||||||
|
|
||||||
``` solidity
|
``` solidity
|
||||||
function revokeOperator(address operator) public
|
function revokeOperator(address operator) external
|
||||||
```
|
```
|
||||||
|
|
||||||
Remove the right of the `operator` address to be an *operator* for `msg.sender` and to send and burn tokens on its behalf.
|
Remove the right of the `operator` address to be an *operator* for `msg.sender` and to send and burn tokens on its behalf.
|
||||||
|
@ -269,7 +269,7 @@ Remove the right of the `operator` address to be an *operator* for `msg.sender`
|
||||||
**`isOperatorFor` function** <a id="isOperatorFor"></a>
|
**`isOperatorFor` function** <a id="isOperatorFor"></a>
|
||||||
|
|
||||||
``` solidity
|
``` solidity
|
||||||
function isOperatorFor(address operator, address tokenHolder) public view returns (bool)
|
function isOperatorFor(address operator, address tokenHolder) external view returns (bool)
|
||||||
```
|
```
|
||||||
|
|
||||||
Indicate whether the `operator` address is an *operator* of the `tokenHolder` address.
|
Indicate whether the `operator` address is an *operator* of the `tokenHolder` address.
|
||||||
|
@ -357,7 +357,7 @@ Token contracts MAY implement other functions to send tokens.
|
||||||
**`send` function**
|
**`send` function**
|
||||||
|
|
||||||
``` solidity
|
``` solidity
|
||||||
function send(address to, uint256 amount, bytes data) public
|
function send(address to, uint256 amount, bytes data) external
|
||||||
```
|
```
|
||||||
|
|
||||||
Send the `amount` of tokens from the address `msg.sender` to the address `to`.
|
Send the `amount` of tokens from the address `msg.sender` to the address `to`.
|
||||||
|
@ -372,7 +372,7 @@ The *operator* and the *token holder* MUST both be the `msg.sender`.
|
||||||
**`operatorSend` function**
|
**`operatorSend` function**
|
||||||
|
|
||||||
``` solidity
|
``` solidity
|
||||||
function operatorSend(address from, address to, uint256 amount, bytes data, bytes operatorData) public
|
function operatorSend(address from, address to, uint256 amount, bytes data, bytes operatorData) external
|
||||||
```
|
```
|
||||||
|
|
||||||
Send the `amount` of tokens on behalf of the address `from` to the address `to`.
|
Send the `amount` of tokens on behalf of the address `from` to the address `to`.
|
||||||
|
@ -511,7 +511,7 @@ Token contracts MAY implement other functions to burn tokens.
|
||||||
**`burn` function**
|
**`burn` function**
|
||||||
|
|
||||||
``` solidity
|
``` solidity
|
||||||
function burn(uint256 amount, bytes data) public;
|
function burn(uint256 amount, bytes data) external;
|
||||||
```
|
```
|
||||||
|
|
||||||
Burn the `amount` of tokens from the address `msg.sender`.
|
Burn the `amount` of tokens from the address `msg.sender`.
|
||||||
|
@ -525,7 +525,7 @@ The *operator* and the *token holder* MUST both be the `msg.sender`.
|
||||||
**`operatorBurn` function**
|
**`operatorBurn` function**
|
||||||
|
|
||||||
``` solidity
|
``` solidity
|
||||||
function operatorBurn(address from, uint256 amount, bytes data, bytes operatorData) public;
|
function operatorBurn(address from, uint256 amount, bytes data, bytes operatorData) external;
|
||||||
```
|
```
|
||||||
|
|
||||||
Burn the `amount` of tokens on behalf of the address `from`.
|
Burn the `amount` of tokens on behalf of the address `from`.
|
||||||
|
|
Loading…
Reference in New Issue