-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement EIP-6780 (new SELFDESTRUCT) (#1327)
* Implement EIP-6780 (new SELFDESTRUCT) * Fix balance transfer logic * Apply comment
- Loading branch information
1 parent
a67c057
commit 1d8a841
Showing
7 changed files
with
116 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
// struct AccountCreated { address } | ||
// struct AccountCreated { account_type, address } | ||
// account_type is 0 for an EOA, 1 for a contract. | ||
|
||
%macro journal_add_account_created | ||
%journal_add_1(@JOURNAL_ENTRY_ACCOUNT_CREATED) | ||
%journal_add_2(@JOURNAL_ENTRY_ACCOUNT_CREATED) | ||
%endmacro | ||
|
||
global revert_account_created: | ||
// stack: entry_type, ptr, retdest | ||
POP | ||
%journal_load_1 | ||
// stack: address, retdest | ||
%journal_load_2 | ||
// stack: account_type, address, retdest | ||
%jumpi(decrement_created_contracts_len) | ||
|
||
revert_account_finish: | ||
%delete_account | ||
JUMP | ||
|
||
decrement_created_contracts_len: | ||
%mload_global_metadata(@GLOBAL_METADATA_CREATED_CONTRACTS_LEN) | ||
%decrement | ||
%mstore_global_metadata(@GLOBAL_METADATA_CREATED_CONTRACTS_LEN) | ||
%jump(revert_account_finish) |
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