Skip to content

Commit

Permalink
more test
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Sep 24, 2024
1 parent 33a58e9 commit 45dbcde
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions x/evm/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,21 @@ func (suite *GRPCServerTestSuiteSuite) TestTraceTx() {
expPass: false,
enableFeemarket: true,
},
{
msg: "default trace with enableFeemarket and sufficient balance",
malleate: func() {
suite.App.EvmKeeper.SetBalance(suite.Ctx, suite.Address, big.NewInt(1000000000000000000))
traceConfig = &types.TraceConfig{
DisableStack: true,
DisableStorage: true,
EnableMemory: false,
}
predecessors = []*types.MsgEthereumTx{}
},
expPass: true,
traceResponse: "{\"gas\":34828,\"failed\":false,\"returnValue\":\"0000000000000000000000000000000000000000000000000000000000000001\",\"structLogs\":[{\"pc\":0,\"op\":\"PUSH1\",\"gas\":",
enableFeemarket: true,
},
{
msg: "javascript tracer with enableFeemarket",
malleate: func() {
Expand All @@ -913,6 +928,19 @@ func (suite *GRPCServerTestSuiteSuite) TestTraceTx() {
expPass: false,
enableFeemarket: true,
},
{
msg: "javascript tracer with enableFeemarket and sufficient balance",
malleate: func() {
suite.App.EvmKeeper.SetBalance(suite.Ctx, suite.Address, big.NewInt(1000000000000000000))
traceConfig = &types.TraceConfig{
Tracer: "{data: [], fault: function(log) {}, step: function(log) { if(log.op.toString() == \"CALL\") this.data.push(log.stack.peek(0)); }, result: function() { return this.data; }}",
}
predecessors = []*types.MsgEthereumTx{}
},
expPass: true,
traceResponse: "[]",
enableFeemarket: true,
},
{
msg: "default tracer with predecessors",
malleate: func() {
Expand Down

0 comments on commit 45dbcde

Please sign in to comment.