-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide implementation of ERC777 #1159
Comments
I am working on this and will submit a pull request once @jacquesd grants permission to release a modified version of his implementation under the MIT license |
This implementation conforms to the current EIP
I just pushed in my branch an implementation of ERC777 with all unit tests. This is not perfect and the unit tests need some refactorization to be in line with the code style of other tests. This is my first approach of javascript, so be nice with me. Note that the constructor may call an external contract, which may be an issue because the calling contract is not finalized. Maybe a function initialize() should be added to do this external call. Also I used web3js 1.0 in the tests to get rid of the collision of send() with truffle's own send(), so I can use the interface introspection functionality of web3js 1.0. |
@catageek - I tried to implement your branch but was not able to deploy the contract using truffle or my unit tests. I keep getting a revert. Could you pull this truffle project and try it out?
|
@cipherzzz This contract needs that an ERC820 contract is previously deployed in the test chain. Try to execute |
Guys, @catageek, I actually started implementing ERC777 from scratch, following the specs, in order to let it be published under MIT licence, instead of trying to re-licence the reference implementation. I believe, if @jacquesd wanted his code MIT-licenced, he'd do it from the start. For the sake of integrity I didn't even read the reference code thoroughly (maybe that's a mistake), and definitely never copied any of it. Anyway, that code requires a whole bunch of new unit tests to be compliant with OpenZeppelin's repo style. How do you feel about cooperating on re-implementing the specs following the local guidelines? |
Hi @utgarda, my implementation is already from scratch without looking at the reference code, so, according to me, the issue with the license is not in the implementation, but with the interface. This file was copied from the reference implementation because it is the reference interface that we can not modify. It is in the EIP under Creative Commons license, and in the ref implementation under Mozilla Public license. |
@nventuro my implementation is complete with all unit tests. I need to udpate ERC820 registry to use ERC1820. I also need to run linter to conform to OpenZeppelin PR rules, so that's why it's not a PR yet. |
@nventuro Done! But it's coming with its own ERC1820 deploy script... Feel free to add your modification/suggestion. Any help to break the big test script into small files is appreciated also. |
* IERC777 from specs, constants returned, up to defaultOperators. (#1159) * IERC777 oprarator approvals (#1159) * ERC777 oprarator approvals fixes and tests * IERC777 send and receive with ERC820 (#1159) * ERC777 Add burn functions and fix send functions (#1159) * ERC777 Make expectEvent compatible with web3.js 1.0 (#1159) * ERC777 Add ERC820 deploy script (#1159) * ERC777 Complete implementation of ERC777 (#1159) This implementation conforms to the current EIP * ERC777 Update ERC820 Registry contract to final version (#1159) * ERC777 Move contracts to 'drafts' folder (#1159) * ERC777: Update to ERC1820 registry and linter error fix (#1159) * ERC777: implement recent changes of EIP777 (#1159) * ERC777 Fix formatting (#1159) * ERC777 Update to solc 0.5.2 (#1159) * ERC777 Fix travis CI errors (#1159) * ERC777 Fix linter errors again... (#1159) * ERC777 Fix unit test (#1159) * ERC777 Fix unit test again (#1159) * Remove extra newlines. * Rename ERC777Base to ERC777. * Remove 'Token' from contract names. * Replace ops for operators. * Move operator check out of _send. * Remove ERC777Burnable. * Remove ERC1820Client, now using the interface directly. * Minor internal refactors in contracts. * Delete extra test helpers. * Simplified tests. * Add basic 777 tests. * Add granularity send test. * Add first operator send tests. * Add burn tests. * Refactor send and burn tests. * Improve send burn refactor. * Greatly improve test module. * Burn instead of send removed tokens. * Add operator tests. * Improve send tests under changing operators. * Refactor and merge send and burn tests. * Add missing and not-implemented tests. * Make _burn private. * Fix typo. * Greatly improve tokensToSend tests. * Refactor hook tests. * Fix hook tests. * Update openzeppelin-test-helpers and ERC1820 address. * Fix natspec indentation. * Make interface functions external. * Remove redundant private revoke and authorize functions. * Improved readability of if statement. * Remove unnecessary asserts. * Add non-one granularity test. * Fix hook call order in _mint. * Fix _mint not reverting on failure to implement tokensReceived. * Remove special case in operatorFn when from is 0. * Refactor ERC777SenderMock. * Add tokensReceived tests. * switch to updated ganache-cli-coverage fork * Fix linter errors. * Add mint tests. * Fix linter errors. * Fix tests. * Update test/drafts/ERC777/ERC777.test.js Co-Authored-By: nventuro <nicolas.venturo@gmail.com> * Add changelog entry.
ERC777 is a proposal for a token standard with advanced features that seems to be well received and may gain some adoption.
We would like to provide an implementation of it. There is a reference implementation that is licensed under MPL so we would likely have to write our own.
The text was updated successfully, but these errors were encountered: