|
1 | 1 | # ERC777
|
2 | 2 |
|
3 |
| -The [ERC777 Token Standard](https://eips.ethereum.org/EIPS/eip-777) improves on the popular [ERC20](https://contracts.vyperhub.io/contracts/erc20) standard. |
| 3 | +The [ERC777 Token Standard](https://eips.ethereum.org/EIPS/eip-777) improves upon the popular [ERC20](https://contracts.vyperhub.io/contracts/erc20) standard. |
4 | 4 |
|
5 |
| -It's most defining feature is the use of the new [ERC1820](http://eips.ethereum.org/EIPS/eip-1820) interface standard which it uses in such a way, that each time tokens are sent two things happen: |
6 |
| -1. The ERC777 contract It checks wether the sender of the transaction is a contract and wether that contract implements a `tokensToSend(_operator, _from, _to, _amount, _data, _operatorData)` function. |
7 |
| -2. It checks wether the receiver of the transaction is a contract and wether that contract implements a `tokensToSend(_operator, _from, _to, _amount, _data, _operatorData)` function. |
| 5 | +Its most defining feature is the use of the new [ERC1820](http://eips.ethereum.org/EIPS/eip-1820) interface standard which it uses in such a way, that each time tokens are sent two things happen: |
| 6 | +1. The ERC777 contract It checks whether the sender of the transaction is a contract and whether that contract implements a `tokensToSend(_operator, _from, _to, _amount, _data, _operatorData)` function. |
| 7 | +2. It checks whether the receiver of the transaction is a contract and whether that contract implements a `tokensToSend(_operator, _from, _to, _amount, _data, _operatorData)` function. |
8 | 8 |
|
9 | 9 | If the functions exist, then the code inside of both functions is executed.
|
10 |
| -The exiting thing is, that there are no restrictions on what the code inside of the two functions looks like or what it does. |
| 10 | +The exciting part is, that there are no restrictions on what the code inside of the two functions looks like or what it does. |
11 | 11 |
|
12 | 12 | ## Tests
|
13 | 13 | ### Run local tests
|
14 | 14 | ```bash
|
15 | 15 | $ truffle test --network ganache
|
16 | 16 | ```
|
17 | 17 | ### More tests
|
18 |
| -Further tests for this implementation can be found [here](https://github.com/0xjac/ERC777/tree/master/test). |
| 18 | +Further tests for this implementation may be found [here](https://github.com/0xjac/ERC777/tree/master/test). |
0 commit comments