This repository has been archived by the owner on Jul 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 857
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge Transfer and TransferWithGas gadget (#1777)
### Description - Transfer and TransferWithGas gadgets are mostly the same. We can merge them and duplicate them. - There are duplicated logics for creating the receiver account (writing empty hash). We remove the duplicated one. - The update balance gadget is vague, it is hard to understand whether we want to add or subtract balance. We extract a helpful method for that. - deduplicate the transfer_to logic in busmapping. - Fix the receiver creation condition on busmapping. - Fix the order of the sender account read-write in begin tx assignment. Thank @curryrasul for initializing this conversation. ### Issue Link ### Type of change Refactor (no updates to logic) ### Content ### Test ``` cargo test -p zkevm-circuits create cargo test -p zkevm-circuits begin_tx cargo test -p zkevm-circuits end_tx ```
- Loading branch information
1 parent
3bbc757
commit 41e3408
Showing
10 changed files
with
171 additions
and
361 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
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
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
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
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
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
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
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
Oops, something went wrong.