-
Notifications
You must be signed in to change notification settings - Fork 809
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
Add OpenZeppelin ERC20 transfers integration test #408
Conversation
8f8f45d
to
35e9fec
Compare
great job! Btw I finished end2end contract call proving using Greeter.sol ( set_value & retrieve ). ( bus-mapping of sstore & sload / is_zero / shr / calldataload are needed and implemented there) . I am going to test & debug ERC20 contracts here next week!!! |
Here's a summary of the output from running the tests:
|
That's great! 🎉 Looking forward to incorporate the changes in your PR as well :) |
35e9fec
to
3d81525
Compare
3d81525
to
776d748
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good!
I maybe would have all of the contract stuff as a git sub-tree or sub-module (Highly encourage sub-tree) so that we are always in sync with these files and are easy to update.
WDYT @ed255 ??
Aside from that (which is not mandatory, just a quuestion) LGTM!!
Nice work!!!! 🥳
if we disable SHA3 & LOG3 ( I use dummy op which have no real constraints), multi ERC20 transfer including both success and failure can be proved now in my draft branch. scroll-tech#127 |
Thanks for the suggestion! I originally thought about using git submodule, but then I just copied the files we needed. But I think it's cleaner if we keep the original structure, so I just added the |
bde86ea
to
0e92b9b
Compare
I would maybe add a README with some instructions/info about the fact that this is a sub-tree, how to update it (in case needed) etc.. WDYT @ed255 ? |
Thanks for the suggestion! I've added a README in 7a0c1d3 |
@CPerezz @ed255 I think that it will be better if we use gitmodules, mainly because in #382 also needs to import a repo that is really big https://github.com/ethereum/tests, and will be nice to have a unique way to import other sources. I've been using submodules and works for me, but maybe git sub-tree has some kind of property that makes better to use in this project. |
I would also prefer to switch to submodules. I think it's much cleaner because we're not introducing so many files into our repository, and we just add a pointer to an external repository. |
@ed255 @adria0 Makes sense to go on the sub-module way if we don't need to edit any of the files that we will have in the sub-module. Also, take into account that any changes done in the sub-module will always follow |
7a0c1d3
to
558141a
Compare
I've replaced the subtree by a submodule!
Yeah we don't need to edit any file from the external repository. And even if we had to touch some files in there, I'd prefer forking the external repo, doing the edit in the fork, and having a submodule pointing to our fork, just to keep things clean and separated.
I think that's not the case! When adding a submodule the commit id is stored, so everyone gets the same revision. Updates are manual. See 558141a where the commit id for the |
558141a
to
e4d1da0
Compare
- Add a test contract of a basic ERC20 Token using the OpenZeppelin implementation. - Add WETH9 base contract (not used yet in the integration tests) - Introduce three integration testing blocks: - 1 tx: failed ERC20 transfer - 1 tx: successful ERC20 transfer - 4 txs: interleaved successful and failed ERC20 transfers - Add macros in circuit_input_builder and circuits integration tests to define tests of each testing block easily.
e4d1da0
to
b46e76a
Compare
implementation.
define tests of each testing block easily.
Resolve #404
NOTE: The folder
integration-tests/contracts/vendor/openzeppelin-contracts/
is a subtree repository from https://github.com/OpenZeppelin/openzeppelin-contracts.git and so there's no need to review any file from that folder.