-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from CryptoUnico/patch-1
Update README.md
- Loading branch information
Showing
1 changed file
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
# ERC777 | ||
|
||
The [ERC777 Token Standard](https://eips.ethereum.org/EIPS/eip-777) improves on the popular [ERC20](https://contracts.vyperhub.io/contracts/erc20) standard. | ||
The [ERC777 Token Standard](https://eips.ethereum.org/EIPS/eip-777) improves upon the popular [ERC20](https://contracts.vyperhub.io/contracts/erc20) standard. | ||
|
||
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: | ||
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. | ||
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. | ||
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: | ||
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. | ||
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. | ||
|
||
If the functions exist, then the code inside of both functions is executed. | ||
The exiting thing is, that there are no restrictions on what the code inside of the two functions looks like or what it does. | ||
The exciting part is, that there are no restrictions on what the code inside of the two functions looks like or what it does. | ||
|
||
## Tests | ||
### Run local tests | ||
```bash | ||
$ truffle test --network ganache | ||
``` | ||
### More tests | ||
Further tests for this implementation can be found [here](https://github.com/0xjac/ERC777/tree/master/test). | ||
Further tests for this implementation may be found [here](https://github.com/0xjac/ERC777/tree/master/test). |