Skip to content

Commit 229ce64

Browse files
jsvisas1na
andauthored
eth/tracers: fill the creationMethod in flatCall (#30539)
`flatCallTracer` will now specify the type of a create in the action via the `creationMethod` field. --------- Signed-off-by: jsvisa <[email protected]> Co-authored-by: Sina Mahmoodi <[email protected]>
1 parent da17f2d commit 229ce64

16 files changed

+28
-6
lines changed

eth/tracers/internal/tracetest/testdata/call_tracer_flat/big_slow.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"result": [
4545
{
4646
"action": {
47+
"creationMethod": "create",
4748
"from": "0xf8bda96b67036ee48107f2a0695ea673479dda56",
4849
"gas": "0x231860",
4950
"init": "0x5b620186a05a131560135760016020526000565b600080601f600039601f565b6000f3",

eth/tracers/internal/tracetest/testdata/call_tracer_flat/callcode_precompiled_fail_hide.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
{
5252
"type": "create",
5353
"action": {
54+
"creationMethod": "create",
5455
"from": "0x877bd459c9b7d8576b44e59e09d076c25946f443",
5556
"value": "0x0",
5657
"gas": "0x19f78",

eth/tracers/internal/tracetest/testdata/call_tracer_flat/callcode_precompiled_oog.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
{
5252
"type": "create",
5353
"action": {
54+
"creationMethod": "create",
5455
"from": "0x877bd459c9b7d8576b44e59e09d076c25946f443",
5556
"value": "0x0",
5657
"gas": "0x1a758",

eth/tracers/internal/tracetest/testdata/call_tracer_flat/callcode_precompiled_throw.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
{
5252
"type": "create",
5353
"action": {
54+
"creationMethod": "create",
5455
"from": "0x877bd459c9b7d8576b44e59e09d076c25946f443",
5556
"value": "0x0",
5657
"gas": "0x1a034",

eth/tracers/internal/tracetest/testdata/call_tracer_flat/create.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"result": [
4848
{
4949
"action": {
50+
"creationMethod": "create",
5051
"from": "0x13e4acefe6a6700604929946e70e6443e4e73447",
5152
"gas": "0x897be",
5253
"init": "0x606060405260405160208061077c83398101604052808051906020019091905050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415151561007d57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600460006101000a81548160ff02191690831515021790555050610653806101296000396000f300606060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305e4382a146100855780631c02708d146100ae5780632e1a7d4d146100c35780635114cb52146100e6578063a37dda2c146100fe578063ae200e7914610153578063b5769f70146101a8575b005b341561009057600080fd5b6100986101d1565b6040518082815260200191505060405180910390f35b34156100b957600080fd5b6100c16101d7565b005b34156100ce57600080fd5b6100e460048080359060200190919050506102eb565b005b6100fc6004808035906020019091905050610513565b005b341561010957600080fd5b6101116105d6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561015e57600080fd5b6101666105fc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101b357600080fd5b6101bb610621565b6040518082815260200191505060405180910390f35b60025481565b60011515600460009054906101000a900460ff1615151415156101f957600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102a15750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b15156102ac57600080fd5b6000600460006101000a81548160ff0219169083151502179055506003543073ffffffffffffffffffffffffffffffffffffffff163103600281905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806103935750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561039e57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561048357600060025411801561040757506002548111155b151561041257600080fd5b80600254036002819055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561047e57600080fd5b610510565b600060035411801561049757506003548111155b15156104a257600080fd5b8060035403600381905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561050f57600080fd5b5b50565b60011515600460009054906101000a900460ff16151514151561053557600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561059657506003548160035401115b80156105bd575080600354013073ffffffffffffffffffffffffffffffffffffffff163110155b15156105c857600080fd5b806003540160038190555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600354815600a165627a7a72305820c3b849e8440987ce43eae3097b77672a69234d516351368b03fe5b7de03807910029000000000000000000000000c65e620a3a55451316168d57e268f5702ef56a11",

eth/tracers/internal/tracetest/testdata/call_tracer_flat/create_oog_parity.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@
5858
"from": "0x877bd459c9b7d8576b44e59e09d076c25946f443",
5959
"value": "0x0",
6060
"gas": "0x19ee4",
61-
"init": "0x5a600055600060006000f0505a60015500"
61+
"init": "0x5a600055600060006000f0505a60015500",
62+
"creationMethod": "create"
6263
},
6364
"error": "Out of gas",
6465
"traceAddress": [],
@@ -74,7 +75,8 @@
7475
"from": "0x9c5cfe45b15eaff4ad617af4250189e26024a4f8",
7576
"value": "0x0",
7677
"gas": "0x3cb",
77-
"init": "0x"
78+
"init": "0x",
79+
"creationMethod": "create"
7880
},
7981
"result": {
8082
"gasUsed": "0x0",

eth/tracers/internal/tracetest/testdata/call_tracer_flat/gas.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
{
5252
"type": "create",
5353
"action": {
54+
"creationMethod": "create",
5455
"from": "0x877bd459c9b7d8576b44e59e09d076c25946f443",
5556
"value": "0x0",
5657
"gas": "0x1a9c8",

eth/tracers/internal/tracetest/testdata/call_tracer_flat/inner_create_oog_outer_throw.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

eth/tracers/internal/tracetest/testdata/call_tracer_flat/nested_create.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
{
5252
"type": "create",
5353
"action": {
54+
"creationMethod": "create",
5455
"from": "0x877bd459c9b7d8576b44e59e09d076c25946f443",
5556
"value": "0x0",
5657
"gas": "0x53e90",
@@ -71,6 +72,7 @@
7172
{
7273
"type": "create",
7374
"action": {
75+
"creationMethod": "create",
7476
"from": "0x9db7a1baf185a865ffee3824946ccd8958191e5e",
7577
"value": "0x0",
7678
"gas": "0x30b34",

eth/tracers/internal/tracetest/testdata/call_tracer_flat/nested_create2_action_gas.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
{
5252
"type": "create",
5353
"action": {
54+
"creationMethod": "create",
5455
"from": "0x877bd459c9b7d8576b44e59e09d076c25946f443",
5556
"value": "0x0",
5657
"gas": "0x19ed8",
@@ -71,6 +72,7 @@
7172
{
7273
"type": "create",
7374
"action": {
75+
"creationMethod": "create2",
7476
"from": "0x2e8eded627eead210cb6143eb39ef7a3e44e4f00",
7577
"value": "0x0",
7678
"gas": "0x5117",

0 commit comments

Comments
 (0)