mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 04:57:17 +00:00
4bfcc1ee5c
Useful for integration with external tools as one can just utilize an interface opposed to having to import and build a real EVM object.
37 lines
1.3 KiB
Go
37 lines
1.3 KiB
Go
package commands
|
|
|
|
import (
|
|
"github.com/holiman/uint256"
|
|
libcommon "github.com/ledgerwatch/erigon-lib/common"
|
|
|
|
"github.com/ledgerwatch/erigon/core/vm"
|
|
)
|
|
|
|
// Helper implementation of vm.Tracer; since the interface is big and most
|
|
// custom tracers implement just a few of the methods, this is a base struct
|
|
// to avoid lots of empty boilerplate code
|
|
type DefaultTracer struct {
|
|
}
|
|
|
|
func (t *DefaultTracer) CaptureTxStart(gasLimit uint64) {}
|
|
|
|
func (t *DefaultTracer) CaptureTxEnd(restGas uint64) {}
|
|
|
|
func (t *DefaultTracer) CaptureStart(env vm.VMInterface, from libcommon.Address, to libcommon.Address, precompile bool, create bool, input []byte, gas uint64, value *uint256.Int, code []byte) {
|
|
}
|
|
|
|
func (t *DefaultTracer) CaptureEnter(typ vm.OpCode, from libcommon.Address, to libcommon.Address, precompile bool, create bool, input []byte, gas uint64, value *uint256.Int, code []byte) {
|
|
}
|
|
|
|
func (t *DefaultTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) {
|
|
}
|
|
|
|
func (t *DefaultTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error) {
|
|
}
|
|
|
|
func (t *DefaultTracer) CaptureEnd(output []byte, usedGas uint64, err error) {
|
|
}
|
|
|
|
func (t *DefaultTracer) CaptureExit(output []byte, usedGas uint64, err error) {
|
|
}
|