-
Notifications
You must be signed in to change notification settings - Fork 20.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
all: implement eip-7702 set code tx (#30078)
This PR implements EIP-7702: "Set EOA account code". Specification: https://eips.ethereum.org/EIPS/eip-7702 > Add a new transaction type that adds a list of `[chain_id, address, nonce, y_parity, r, s]` authorization tuples. For each tuple, write a delegation designator `(0xef0100 ++ address)` to the signing account’s code. All code reading operations must load the code pointed to by the designator. --------- Co-authored-by: Mario Vega <[email protected]> Co-authored-by: Martin Holst Swende <[email protected]> Co-authored-by: Felix Lange <[email protected]>
- Loading branch information
1 parent
804d45c
commit f808d73
Showing
66 changed files
with
1,606 additions
and
115 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -40,6 +40,7 @@ | |
} | ||
], | ||
"currentDifficulty": "0x20000", | ||
"gasUsed": "0x5208" | ||
"gasUsed": "0x5208", | ||
"requests": null | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
{ | ||
"result": { | ||
"stateRoot": "0x6f058887ca01549716789c380ede95aecc510e6d1fdc4dbf67d053c7c07f4bdc", | ||
"txRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", | ||
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", | ||
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", | ||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", | ||
"receipts": [], | ||
"currentDifficulty": "0x2000000004000", | ||
"gasUsed": "0x0", | ||
"currentBaseFee": "0x500" | ||
} | ||
} | ||
"result": { | ||
"stateRoot": "0x6f058887ca01549716789c380ede95aecc510e6d1fdc4dbf67d053c7c07f4bdc", | ||
"txRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", | ||
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", | ||
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", | ||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", | ||
"receipts": [], | ||
"currentDifficulty": "0x2000000004000", | ||
"gasUsed": "0x0", | ||
"currentBaseFee": "0x500", | ||
"requests": null | ||
} | ||
} |
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 |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
} | ||
], | ||
"currentDifficulty": "0x20000", | ||
"gasUsed": "0x520b" | ||
"gasUsed": "0x520b", | ||
"requests": null | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ | |
} | ||
], | ||
"currentDifficulty": "0x20000", | ||
"gasUsed": "0x521f" | ||
"gasUsed": "0x521f", | ||
"requests": null | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
This test sets some EIP-7702 delegations and calls them. |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"0x8a0a19589531694250d570040a0c4b74576919b8": { | ||
"nonce": "0x00", | ||
"balance": "0x0de0b6b3a7640000", | ||
"code": "0x600060006000600060007310000000000000000000000000000000000000015af1600155600060006000600060007310000000000000000000000000000000000000025af16002553d600060003e600051600355", | ||
"storage": { | ||
"0x01": "0x0100", | ||
"0x02": "0x0100", | ||
"0x03": "0x0100" | ||
} | ||
}, | ||
"0x000000000000000000000000000000000000aaaa": { | ||
"nonce": "0x00", | ||
"balance": "0x4563918244f40000", | ||
"code": "0x58808080600173703c4b2bd70c169f5717101caee543299fc946c75af100", | ||
"storage": {} | ||
}, | ||
"0x000000000000000000000000000000000000bbbb": { | ||
"nonce": "0x00", | ||
"balance": "0x29a2241af62c0000", | ||
"code": "0x6042805500", | ||
"storage": {} | ||
}, | ||
"0x71562b71999873DB5b286dF957af199Ec94617F7": { | ||
"nonce": "0x00", | ||
"balance": "0x6124fee993bc0000", | ||
"code": "0x", | ||
"storage": {} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"currentCoinbase": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", | ||
"currentGasLimit": "71794957647893862", | ||
"currentNumber": "1", | ||
"currentTimestamp": "1000", | ||
"currentRandom": "0", | ||
"currentDifficulty": "0", | ||
"blockHashes": {}, | ||
"ommers": [], | ||
"currentBaseFee": "7", | ||
"parentUncleHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"withdrawals": [], | ||
"parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"alloc": { | ||
"0x000000000000000000000000000000000000aaaa": { | ||
"code": "0x58808080600173703c4b2bd70c169f5717101caee543299fc946c75af100", | ||
"balance": "0x4563918244f40000" | ||
}, | ||
"0x000000000000000000000000000000000000bbbb": { | ||
"code": "0x6042805500", | ||
"balance": "0x29a2241af62c0000" | ||
}, | ||
"0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": { | ||
"balance": "0x2bf52" | ||
}, | ||
"0x703c4b2bd70c169f5717101caee543299fc946c7": { | ||
"code": "0xef0100000000000000000000000000000000000000bbbb", | ||
"storage": { | ||
"0x0000000000000000000000000000000000000000000000000000000000000042": "0x0000000000000000000000000000000000000000000000000000000000000042" | ||
}, | ||
"balance": "0x1", | ||
"nonce": "0x1" | ||
}, | ||
"0x71562b71999873db5b286df957af199ec94617f7": { | ||
"code": "0xef0100000000000000000000000000000000000000aaaa", | ||
"balance": "0x6124fee993afa30e", | ||
"nonce": "0x2" | ||
}, | ||
"0x8a0a19589531694250d570040a0c4b74576919b8": { | ||
"code": "0x600060006000600060007310000000000000000000000000000000000000015af1600155600060006000600060007310000000000000000000000000000000000000025af16002553d600060003e600051600355", | ||
"storage": { | ||
"0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000000100", | ||
"0x0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000000100", | ||
"0x0000000000000000000000000000000000000000000000000000000000000003": "0x0000000000000000000000000000000000000000000000000000000000000100" | ||
}, | ||
"balance": "0xde0b6b3a7640000" | ||
} | ||
}, | ||
"result": { | ||
"stateRoot": "0x9fdcacd4510e93c4488e537dc51578b5c6d505771db64a2610036eeb4be7b26f", | ||
"txRoot": "0x5d13a0b074e80388dc754da92b22922313a63417b3e25a10f324935e09697a53", | ||
"receiptsRoot": "0x504c5d86c34391f70d210e6c482615b391db4bdb9f43479366399d9c5599850a", | ||
"logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", | ||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","receipts": [{ | ||
"type": "0x4", | ||
"root": "0x", | ||
"status": "0x1", | ||
"cumulativeGasUsed": "0x15fa9", | ||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","logs": null,"transactionHash": "0x0417aab7c1d8a3989190c3167c132876ce9b8afd99262c5a0f9d06802de3d7ef", | ||
"contractAddress": "0x0000000000000000000000000000000000000000", | ||
"gasUsed": "0x15fa9", | ||
"effectiveGasPrice": null, | ||
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"transactionIndex": "0x0" | ||
} | ||
], | ||
"currentDifficulty": null, | ||
"gasUsed": "0x15fa9", | ||
"currentBaseFee": "0x7", | ||
"withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", | ||
"requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", | ||
"requests": [] | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[ | ||
{ | ||
"type": "0x4", | ||
"chainId": "0x1", | ||
"nonce": "0x0", | ||
"to": "0x71562b71999873db5b286df957af199ec94617f7", | ||
"gas": "0x7a120", | ||
"gasPrice": null, | ||
"maxPriorityFeePerGas": "0x2", | ||
"maxFeePerGas": "0x12a05f200", | ||
"value": "0x0", | ||
"input": "0x", | ||
"accessList": [], | ||
"authorizationList": [ | ||
{ | ||
"chainId": "0x1", | ||
"address": "0x000000000000000000000000000000000000aaaa", | ||
"nonce": "0x1", | ||
"v": "0x1", | ||
"r": "0xf7e3e597fc097e71ed6c26b14b25e5395bc8510d58b9136af439e12715f2d721", | ||
"s": "0x6cf7c3d7939bfdb784373effc0ebb0bd7549691a513f395e3cdabf8602724987" | ||
}, | ||
{ | ||
"chainId": "0x0", | ||
"address": "0x000000000000000000000000000000000000bbbb", | ||
"nonce": "0x0", | ||
"v": "0x1", | ||
"r": "0x5011890f198f0356a887b0779bde5afa1ed04e6acb1e3f37f8f18c7b6f521b98", | ||
"s": "0x56c3fa3456b103f3ef4a0acb4b647b9cab9ec4bc68fbcdf1e10b49fb2bcbcf61" | ||
} | ||
], | ||
"secretKey": "0xb71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291", | ||
"v": "0x0", | ||
"r": "0x0", | ||
"s": "0x0" | ||
} | ||
] |
Oops, something went wrong.