mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 09:53:48 +00:00
cmd/evm: add 7702 test for t8n
This commit is contained in:
parent
7a4bafac39
commit
8a49fd8ac0
6 changed files with 160 additions and 0 deletions
|
|
@ -287,6 +287,14 @@ func TestT8n(t *testing.T) {
|
|||
output: t8nOutput{alloc: true, result: true},
|
||||
expOut: "exp.json",
|
||||
},
|
||||
{ // Prague test, EIP-7702 transaction
|
||||
base: "./testdata/33",
|
||||
input: t8nInput{
|
||||
"alloc.json", "txs.json", "env.json", "Prague", "",
|
||||
},
|
||||
output: t8nOutput{alloc: true, result: true},
|
||||
expOut: "exp.json",
|
||||
},
|
||||
} {
|
||||
args := []string{"t8n"}
|
||||
args = append(args, tc.output.get()...)
|
||||
|
|
|
|||
1
cmd/evm/testdata/33/README.md
vendored
Normal file
1
cmd/evm/testdata/33/README.md
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
This test sets some EIP-7702 delegations and calls them.
|
||||
30
cmd/evm/testdata/33/alloc.json
vendored
Normal file
30
cmd/evm/testdata/33/alloc.json
vendored
Normal file
|
|
@ -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": {}
|
||||
}
|
||||
}
|
||||
14
cmd/evm/testdata/33/env.json
vendored
Normal file
14
cmd/evm/testdata/33/env.json
vendored
Normal file
|
|
@ -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"
|
||||
}
|
||||
70
cmd/evm/testdata/33/exp.json
vendored
Normal file
70
cmd/evm/testdata/33/exp.json
vendored
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
"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": "0x6036c41849da9c076ed79654d434017387a88fb833c2856b32e18218b3341c5f",
|
||||
"requests": [
|
||||
"0x",
|
||||
"0x",
|
||||
"0x"
|
||||
]
|
||||
}
|
||||
}
|
||||
37
cmd/evm/testdata/33/txs.json
vendored
Normal file
37
cmd/evm/testdata/33/txs.json
vendored
Normal file
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
Loading…
Reference in a new issue