Skip to content

Latest commit

 

History

History
11 lines (7 loc) · 1.55 KB

erc777.md

File metadata and controls

11 lines (7 loc) · 1.55 KB

ERC777

ERC777 defines all the functions required to send tokens on behalf of another address, contract or regular account. For this purpose, it uses the ERC820 standard. The use of ER820 enables the registration of metadata in smart contracts in order to allow backwards compatibility with previous versions of token implementations. ERC777 includes functions for authorization, revocation, transfer and checks.

  • authorizeOperator(address operator) authorizes a third-party to send tokens on behalf of the owner of the token, i.e.msg.sender. If this function is successful, an AuthorizedOperator(address operator, address tokenHolder) event is sent, where tokenHolder is the address of the user maintaining and managing the tokens.
  • revokeOperator(address operator) removes the token transfer authorization from a third-party. Thus, the operator won’t be able to transfer tokens on behalf of its owner anymore.
  • isOperatorFor(address operator, address tokenHolder) checks if the address of the operator is allowed for the transfer of tokens retained by tokenHolder.
  • operatorSend(address from, address to, uint256 amount, bytes userData, bytes operatorData) sends an amount of tokens from one address to another one. If the transaction is successful a Sent() event is triggered.

Source: https://medium.com/coinmonks/anatomy-of-an-erc-an-exhaustive-survey-8bc1a323b541 Reference: ethereum/EIPs#777