Skip to content

Commit a89f110

Browse files
holimanzzyalbert
authored andcommitted
cmd/evm: make t9n intrinsicGas output hex, fixes #23883 (#23889)
1 parent 66e0efe commit a89f110

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

cmd/evm/internal/t8ntool/transaction.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (r *result) MarshalJSON() ([]byte, error) {
4848
Error string `json:"error,omitempty"`
4949
Address *common.Address `json:"address,omitempty"`
5050
Hash *common.Hash `json:"hash,omitempty"`
51-
IntrinsicGas uint64 `json:"intrinsicGas,omitempty"`
51+
IntrinsicGas hexutil.Uint64 `json:"intrinsicGas,omitempty"`
5252
}
5353
var out xx
5454
if r.Error != nil {
@@ -60,7 +60,7 @@ func (r *result) MarshalJSON() ([]byte, error) {
6060
if r.Hash != (common.Hash{}) {
6161
out.Hash = &r.Hash
6262
}
63-
out.IntrinsicGas = r.IntrinsicGas
63+
out.IntrinsicGas = hexutil.Uint64(r.IntrinsicGas)
6464
return json.Marshal(out)
6565
}
6666

cmd/evm/testdata/15/exp2.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
{
33
"address": "0xd02d72e067e77158444ef2020ff2d325f929b363",
44
"hash": "0xa98a24882ea90916c6a86da650fbc6b14238e46f0af04a131ce92be897507476",
5-
"intrinsicGas": 21000
5+
"intrinsicGas": "0x5208"
66
},
77
{
88
"address": "0xd02d72e067e77158444ef2020ff2d325f929b363",
99
"hash": "0x36bad80acce7040c45fd32764b5c2b2d2e6f778669fb41791f73f546d56e739a",
10-
"intrinsicGas": 21000
10+
"intrinsicGas": "0x5208"
1111
}
1212
]

cmd/evm/testdata/16/exp.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
{
33
"address": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
44
"hash": "0x7cc3d1a8540a44736750f03bb4d85c0113be4b3472a71bf82241a3b261b479e6",
5-
"intrinsicGas": 21000
5+
"intrinsicGas": "0x5208"
66
},
77
{
88
"error": "intrinsic gas too low: have 82, want 21000",
99
"address": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
1010
"hash": "0x3b2d2609e4361562edb9169314f4c05afc6dbf5d706bf9dda5abe242ab76a22b",
11-
"intrinsicGas": 21000
11+
"intrinsicGas": "0x5208"
1212
}
1313
]

cmd/evm/testdata/17/exp.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"error": "value exceeds 256 bits",
44
"address": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
55
"hash": "0xfbd91685dcbf8172f0e8c53e2ddbb4d26707840da6b51a74371f62a33868fd82",
6-
"intrinsicGas": 21000
6+
"intrinsicGas": "0x5208"
77
},
88
{
99
"error": "gasPrice exceeds 256 bits",
1010
"address": "0x1b57ccef1fe5fb73f1e64530fb4ebd9cf1655964",
1111
"hash": "0x45dc05035cada83748e4c1fe617220106b331eca054f44c2304d5654a9fb29d5",
12-
"intrinsicGas": 21000
12+
"intrinsicGas": "0x5208"
1313
},
1414
{
1515
"error": "invalid transaction v, r, s values",

0 commit comments

Comments
 (0)