|
|
|
@@ -9,6 +9,7 @@ import (
|
|
|
|
|
"github.com/ethereum/go-ethereum/common/hexutil"
|
|
|
|
|
"github.com/ethereum/go-ethereum/core/vm"
|
|
|
|
|
"github.com/ethereum/go-ethereum/crypto"
|
|
|
|
|
ethlogger "github.com/ethereum/go-ethereum/eth/tracers/logger"
|
|
|
|
|
ethparams "github.com/ethereum/go-ethereum/params"
|
|
|
|
|
"github.com/evmos/ethermint/x/evm/statedb"
|
|
|
|
|
|
|
|
|
@@ -613,7 +614,7 @@ func (suite *KeeperTestSuite) TestTraceTx() {
|
|
|
|
|
msg string
|
|
|
|
|
malleate func()
|
|
|
|
|
expPass bool
|
|
|
|
|
traceResponse []byte
|
|
|
|
|
traceResponse string
|
|
|
|
|
enableFeemarket bool
|
|
|
|
|
}{
|
|
|
|
|
{
|
|
|
|
@@ -623,7 +624,7 @@ func (suite *KeeperTestSuite) TestTraceTx() {
|
|
|
|
|
predecessors = []*types.MsgEthereumTx{}
|
|
|
|
|
},
|
|
|
|
|
expPass: true,
|
|
|
|
|
traceResponse: []byte{0x7b, 0x22, 0x67, 0x61, 0x73, 0x22, 0x3a, 0x30, 0x2c, 0x22, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x22, 0x3a, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x22, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x70, 0x63, 0x22, 0x3a, 0x30, 0x2c, 0x22, 0x6f, 0x70, 0x22, 0x3a, 0x22, 0x50, 0x55, 0x53, 0x48, 0x31, 0x22, 0x2c, 0x22, 0x67, 0x61, 0x73, 0x22, 0x3a, 0x33, 0x30, 0x32, 0x39},
|
|
|
|
|
traceResponse: "{\"gas\":34828,\"failed\":false,\"returnValue\":\"0000000000000000000000000000000000000000000000000000000000000001\",\"structLogs\":[{\"pc\":0,\"op\":\"PUSH1\",\"gas\":",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
msg: "default trace with filtered response",
|
|
|
|
@@ -636,7 +637,7 @@ func (suite *KeeperTestSuite) TestTraceTx() {
|
|
|
|
|
predecessors = []*types.MsgEthereumTx{}
|
|
|
|
|
},
|
|
|
|
|
expPass: true,
|
|
|
|
|
traceResponse: []byte{0x7b, 0x22, 0x67, 0x61, 0x73, 0x22, 0x3a, 0x30, 0x2c, 0x22, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x22, 0x3a, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x22, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x70, 0x63, 0x22, 0x3a, 0x30, 0x2c, 0x22, 0x6f, 0x70, 0x22, 0x3a, 0x22, 0x50, 0x55, 0x53, 0x48, 0x31, 0x22, 0x2c, 0x22, 0x67, 0x61, 0x73, 0x22, 0x3a, 0x33, 0x30, 0x32, 0x39},
|
|
|
|
|
traceResponse: "{\"gas\":34828,\"failed\":false,\"returnValue\":\"0000000000000000000000000000000000000000000000000000000000000001\",\"structLogs\":[{\"pc\":0,\"op\":\"PUSH1\",\"gas\":",
|
|
|
|
|
enableFeemarket: false,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@@ -648,7 +649,7 @@ func (suite *KeeperTestSuite) TestTraceTx() {
|
|
|
|
|
predecessors = []*types.MsgEthereumTx{}
|
|
|
|
|
},
|
|
|
|
|
expPass: true,
|
|
|
|
|
traceResponse: []byte{0x5b, 0x5d},
|
|
|
|
|
traceResponse: "[]",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
msg: "default trace with enableFeemarket",
|
|
|
|
@@ -661,7 +662,7 @@ func (suite *KeeperTestSuite) TestTraceTx() {
|
|
|
|
|
predecessors = []*types.MsgEthereumTx{}
|
|
|
|
|
},
|
|
|
|
|
expPass: true,
|
|
|
|
|
traceResponse: []byte{0x7b, 0x22, 0x67, 0x61, 0x73, 0x22, 0x3a, 0x30, 0x2c, 0x22, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x22, 0x3a, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x22, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x70, 0x63, 0x22, 0x3a, 0x30, 0x2c, 0x22, 0x6f, 0x70, 0x22, 0x3a, 0x22, 0x50, 0x55, 0x53, 0x48, 0x31, 0x22, 0x2c, 0x22, 0x67, 0x61, 0x73, 0x22, 0x3a, 0x33, 0x30, 0x32, 0x39},
|
|
|
|
|
traceResponse: "{\"gas\":34828,\"failed\":false,\"returnValue\":\"0000000000000000000000000000000000000000000000000000000000000001\",\"structLogs\":[{\"pc\":0,\"op\":\"PUSH1\",\"gas\":",
|
|
|
|
|
enableFeemarket: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@@ -673,7 +674,7 @@ func (suite *KeeperTestSuite) TestTraceTx() {
|
|
|
|
|
predecessors = []*types.MsgEthereumTx{}
|
|
|
|
|
},
|
|
|
|
|
expPass: true,
|
|
|
|
|
traceResponse: []byte{0x5b, 0x5d},
|
|
|
|
|
traceResponse: "[]",
|
|
|
|
|
enableFeemarket: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@@ -696,7 +697,7 @@ func (suite *KeeperTestSuite) TestTraceTx() {
|
|
|
|
|
predecessors = append(predecessors, firstTx)
|
|
|
|
|
},
|
|
|
|
|
expPass: true,
|
|
|
|
|
traceResponse: []byte{0x7b, 0x22, 0x67, 0x61, 0x73, 0x22, 0x3a, 0x30, 0x2c, 0x22, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x22, 0x3a, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x22, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x70, 0x63, 0x22, 0x3a, 0x30, 0x2c, 0x22, 0x6f, 0x70, 0x22, 0x3a, 0x22, 0x50, 0x55, 0x53, 0x48, 0x31, 0x22, 0x2c, 0x22, 0x67, 0x61, 0x73, 0x22, 0x3a, 0x31, 0x33, 0x31, 0x39},
|
|
|
|
|
traceResponse: "{\"gas\":34828,\"failed\":false,\"returnValue\":\"0000000000000000000000000000000000000000000000000000000000000001\",\"structLogs\":[{\"pc\":0,\"op\":\"PUSH1\",\"gas\":",
|
|
|
|
|
enableFeemarket: false,
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
@@ -725,9 +726,14 @@ func (suite *KeeperTestSuite) TestTraceTx() {
|
|
|
|
|
suite.Require().NoError(err)
|
|
|
|
|
// if data is to big, slice the result
|
|
|
|
|
if len(res.Data) > 150 {
|
|
|
|
|
suite.Require().Equal(tc.traceResponse, res.Data[:150])
|
|
|
|
|
suite.Require().Equal(tc.traceResponse, string(res.Data[:150]))
|
|
|
|
|
} else {
|
|
|
|
|
suite.Require().Equal(tc.traceResponse, res.Data)
|
|
|
|
|
suite.Require().Equal(tc.traceResponse, string(res.Data))
|
|
|
|
|
}
|
|
|
|
|
if traceConfig == nil || traceConfig.Tracer == "" {
|
|
|
|
|
var result ethlogger.ExecutionResult
|
|
|
|
|
suite.Require().NoError(json.Unmarshal(res.Data, &result))
|
|
|
|
|
suite.Require().Positive(result.Gas)
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
suite.Require().Error(err)
|
|
|
|
@@ -748,7 +754,7 @@ func (suite *KeeperTestSuite) TestTraceBlock() {
|
|
|
|
|
msg string
|
|
|
|
|
malleate func()
|
|
|
|
|
expPass bool
|
|
|
|
|
traceResponse []byte
|
|
|
|
|
traceResponse string
|
|
|
|
|
enableFeemarket bool
|
|
|
|
|
}{
|
|
|
|
|
{
|
|
|
|
@@ -757,7 +763,7 @@ func (suite *KeeperTestSuite) TestTraceBlock() {
|
|
|
|
|
traceConfig = nil
|
|
|
|
|
},
|
|
|
|
|
expPass: true,
|
|
|
|
|
traceResponse: []byte{0x5b, 0x7b, 0x22, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x67, 0x61, 0x73, 0x22, 0x3a, 0x30, 0x2c, 0x22, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x22, 0x3a, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x22, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x70, 0x63, 0x22, 0x3a, 0x30, 0x2c, 0x22, 0x6f, 0x70, 0x22, 0x3a, 0x22, 0x50, 0x55, 0x53, 0x48, 0x31, 0x22},
|
|
|
|
|
traceResponse: "[{\"result\":{\"gas\":34828,\"failed\":false,\"returnValue\":\"0000000000000000000000000000000000000000000000000000000000000001\",\"structLogs\":[{\"pc\":0,\"op\":\"PU",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
msg: "filtered trace",
|
|
|
|
@@ -769,7 +775,7 @@ func (suite *KeeperTestSuite) TestTraceBlock() {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
expPass: true,
|
|
|
|
|
traceResponse: []byte{0x5b, 0x7b, 0x22, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x67, 0x61, 0x73, 0x22, 0x3a, 0x30, 0x2c, 0x22, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x22, 0x3a, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x22, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x70, 0x63, 0x22, 0x3a, 0x30, 0x2c, 0x22, 0x6f, 0x70, 0x22, 0x3a, 0x22, 0x50, 0x55, 0x53, 0x48, 0x31, 0x22},
|
|
|
|
|
traceResponse: "[{\"result\":{\"gas\":34828,\"failed\":false,\"returnValue\":\"0000000000000000000000000000000000000000000000000000000000000001\",\"structLogs\":[{\"pc\":0,\"op\":\"PU",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
msg: "javascript tracer",
|
|
|
|
@@ -779,7 +785,7 @@ func (suite *KeeperTestSuite) TestTraceBlock() {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
expPass: true,
|
|
|
|
|
traceResponse: []byte{0x5b, 0x7b, 0x22, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d},
|
|
|
|
|
traceResponse: "[{\"result\":[]}]",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
msg: "default trace with enableFeemarket and filtered return",
|
|
|
|
@@ -791,7 +797,7 @@ func (suite *KeeperTestSuite) TestTraceBlock() {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
expPass: true,
|
|
|
|
|
traceResponse: []byte{0x5b, 0x7b, 0x22, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x67, 0x61, 0x73, 0x22, 0x3a, 0x30, 0x2c, 0x22, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x22, 0x3a, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x22, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x70, 0x63, 0x22, 0x3a, 0x30, 0x2c, 0x22, 0x6f, 0x70, 0x22, 0x3a, 0x22, 0x50, 0x55, 0x53, 0x48, 0x31, 0x22},
|
|
|
|
|
traceResponse: "[{\"result\":{\"gas\":34828,\"failed\":false,\"returnValue\":\"0000000000000000000000000000000000000000000000000000000000000001\",\"structLogs\":[{\"pc\":0,\"op\":\"PU",
|
|
|
|
|
enableFeemarket: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@@ -802,7 +808,7 @@ func (suite *KeeperTestSuite) TestTraceBlock() {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
expPass: true,
|
|
|
|
|
traceResponse: []byte{0x5b, 0x7b, 0x22, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x5b, 0x5d, 0x7d, 0x5d},
|
|
|
|
|
traceResponse: "[{\"result\":[]}]",
|
|
|
|
|
enableFeemarket: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@@ -825,7 +831,7 @@ func (suite *KeeperTestSuite) TestTraceBlock() {
|
|
|
|
|
txs = append([]*types.MsgEthereumTx{}, firstTx, secondTx)
|
|
|
|
|
},
|
|
|
|
|
expPass: true,
|
|
|
|
|
traceResponse: []byte{0x5b, 0x7b, 0x22, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x67, 0x61, 0x73, 0x22, 0x3a, 0x30, 0x2c, 0x22, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x22, 0x3a, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2c, 0x22, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x22, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x22, 0x2c, 0x22, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x70, 0x63, 0x22, 0x3a, 0x30, 0x2c, 0x22, 0x6f, 0x70, 0x22, 0x3a, 0x22, 0x50, 0x55, 0x53, 0x48, 0x31, 0x22},
|
|
|
|
|
traceResponse: "[{\"result\":{\"gas\":34828,\"failed\":false,\"returnValue\":\"0000000000000000000000000000000000000000000000000000000000000001\",\"structLogs\":[{\"pc\":0,\"op\":\"PU",
|
|
|
|
|
enableFeemarket: false,
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
@@ -855,9 +861,9 @@ func (suite *KeeperTestSuite) TestTraceBlock() {
|
|
|
|
|
suite.Require().NoError(err)
|
|
|
|
|
// if data is to big, slice the result
|
|
|
|
|
if len(res.Data) > 150 {
|
|
|
|
|
suite.Require().Equal(tc.traceResponse, res.Data[:150])
|
|
|
|
|
suite.Require().Equal(tc.traceResponse, string(res.Data[:150]))
|
|
|
|
|
} else {
|
|
|
|
|
suite.Require().Equal(tc.traceResponse, res.Data)
|
|
|
|
|
suite.Require().Equal(tc.traceResponse, string(res.Data))
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
suite.Require().Error(err)
|
|
|
|
|