This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
dido:public:ra:xapend:xapend.b_stds:defact:ethereum:eip:erc_0777 [2020/05/07 18:56] nick ↷ Page moved from dido:public:xapend.stds:defact:ethereum:eip:erc_0777 to dido:public:ra:xapend.stds:defact:ethereum:eip:erc_0777 |
dido:public:ra:xapend:xapend.b_stds:defact:ethereum:eip:erc_0777 [2021/08/18 11:18] (current) murphy |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ======== EIP 777: ERC-777 Token Standard ========= | + | ==== EIP 777: ERC-777 Token Standard ==== |
| - | [[dido:public:xapend.stds:defact:ethereum| Return to Ethereum ERCs ]] | + | [[dido:public:ra:xapend:xapend.b_stds:defact:ethereum:eip| Return to Ethereum ERCs ]] |
| - | : **Note**: The following is an excerpt from the official Ethereum site. It is provided here as a connivence and is not authoritative. Refer to the original document as the authoritative reference. | + | : **Note**: The following is an excerpt from the official Ethereum site. It is provided here as a convenience and is not authoritative. Refer to the original document as the authoritative reference. |
| <table> | <table> | ||
| Line 13: | Line 13: | ||
| | Specification | [[http://eips.ethereum.org/EIPS/eip-777#Specification]] | | | Specification | [[http://eips.ethereum.org/EIPS/eip-777#Specification]] | | ||
| | Category | ERC | | | Category | ERC | | ||
| - | | Requires | [[dido:public:xapend.stds:defact:ethereum:eip:erc_1820| 1820 ]] | | + | | Requires | [[dido:public:ra:xapend:xapend.b_stds:defact:ethereum:eip:erc_1820|1820]] | |
| </table> | </table> | ||
| + | === Abstract === | ||
| + | //This standard defines a new way to interact with a token contract while remaining backward compatible with ERC20.// | ||
| - | ====== Abstract ====== | + | //It defines advanced features to interact with tokens. Namely, operators to send tokens on behalf of another address—contract or regular account—and send/receive hooks to offer token holders more control over their tokens.// |
| - | : //This standard defines a new way to interact with a token contract while remaining backward compatible with ERC20.// | + | |
| - | : //It defines advanced features to interact with tokens. Namely, operators to send tokens on behalf of another address—contract or regular account—and send/receive hooks to offer token holders more control over their tokens.// | + | //It takes advantage of [[dido:public:ra:xapend:xapend.b_stds:defact:ethereum:eip:erc_1820|ERC1820]] to find out whether and where to notify contracts and regular addresses when they receive tokens as well as to allow compatibility with already-deployed contracts.// |
| - | : //It takes advantage of [[dido:public:xapend.stds:defact:ethereum:eip:erc_0020| ERC1820]] to find out whether and where to notify contracts and regular addresses when they receive tokens as well as to allow compatibility with already-deployed contracts.// | + | === Motivation === |
| + | //This standard tries to improve upon the widely used ERC20 token standard. The main advantages of this standard are:// | ||
| - | ====== Motivation ====== | + | * //Uses the same philosophy as [[dido:public:ra:xapend:xapend.a_glossary:e:ether|Ether]] in that [[dido:public:ra:xapend:xapend.a_glossary:t:tokens|tokens]] are sent with send(dest, value, data).// |
| - | : //This standard tries to improve upon the widely used ERC20 token standard. The main advantages of this standard are:// | + | |
| - | - //Uses the same philosophy as Ether in that tokens are sent with send(dest, value, data).// | + | * //Both contracts and regular addresses can control and reject which token they send by registering a ''tokensToSend'' hook. (Rejection is done by ''revert''ing in the hook function.)// |
| - | - //Both contracts and regular addresses can control and reject which token they send by registering a ''tokensToSend'' hook. (Rejection is done by ''revert''ing in the hook function.)// | + | * //Both contracts and regular addresses can control and reject which token they receive by registering a ''tokensReceived'' hook. (Rejection is done by ''revert''ing in the hook function.)// |
| - | - //Both contracts and regular addresses can control and reject which token they receive by registering a ''tokensReceived'' hook. (Rejection is done by ''revert''ing in the hook function.)// | + | * //The tokensReceived hook allows to send tokens to a contract and notify it in a single transaction, unlike ERC20 which requires a double call (''approve''/''transferFrom'') to achieve this.// |
| - | - //The tokensReceived hook allows to send tokens to a contract and notify it in a single transaction, unlike ERC20 which requires a double call (''approve''/''transferFrom'') to achieve this.// | + | * //The holder can “authorize” and “revoke” operators which can send tokens on their behalf. These operators are intended to be verified contracts such as an exchange, a cheque [[dido:public:ra:xapend:xapend.a_glossary:p:start|processor]] or an automatic charging system.// |
| - | - //The holder can “authorize” and “revoke” operators which can send tokens on their behalf. These operators are intended to be verified contracts such as an exchange, a cheque processor or an automatic charging system.// | + | * //Every token transaction contains ''data'' and ''operatorData'' bytes fields to be used freely to pass data from the holder and the operator, respectively.// |
| - | - //Every token transaction contains ''data'' and ''operatorData'' bytes fields to be used freely to pass data from the holder and the operator, respectively.// | + | It is backward compatible with [[dido:public:ra:xapend:xapend.a_glossary:w:wallet|wallets]] that do not contain the ''tokensReceived'' hook function by deploying a proxy contract implementing the ''tokensReceived'' hook for the wallet. |
| - | + | ||
| - | It is backward compatible with wallets that do not contain the ''tokensReceived'' hook function by deploying a proxy contract implementing the ''tokensReceived'' hook for the wallet. | + | |