Skip to content

Commit

Permalink
Trying removing even more hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
maoueh committed Dec 10, 2024
1 parent d235146 commit 0d476fe
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion x/evm/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"github.com/ethereum/go-ethereum/common"
cmath "github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/tracing"
ethtypes "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/ethereum/go-ethereum/crypto"
Expand Down Expand Up @@ -293,7 +294,15 @@ func (k *Keeper) applyEVMMessageWithTracing(
txCtx := core.NewEVMTxContext(msg)
evmHooks := evmtracers.GetCtxEthTracingHooks(ctx)
evmInstance := vm.NewEVM(*blockCtx, txCtx, stateDB, cfg, vm.Config{
Tracer: evmHooks,
Tracer: &tracing.Hooks{
OnTxStart: func(vm *tracing.VMContext, tx *ethtypes.Transaction, from common.Address) {
evmHooks.OnTxStart(vm, tx, from)

evmHooks.OnEnter(0, 0xf1, msg.From, msg.From, msg.Data, msg.GasLimit, msg.Value)
evmHooks.OnExit(0, nil, 0, nil, false)
},
OnTxEnd: evmHooks.OnTxEnd,
},
})
stateDB.SetEVM(evmInstance)
// stateDB.SetLogger(evmHooks)
Expand Down

0 comments on commit 0d476fe

Please sign in to comment.