2022-11-03 04:32:15 +00:00
|
|
|
package commands
|
|
|
|
|
|
|
|
import (
|
2022-12-03 14:43:53 +00:00
|
|
|
"github.com/holiman/uint256"
|
2023-01-13 18:12:18 +00:00
|
|
|
libcommon "github.com/ledgerwatch/erigon-lib/common"
|
|
|
|
|
2022-11-03 04:32:15 +00:00
|
|
|
"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 {
|
|
|
|
}
|
|
|
|
|
2022-12-18 04:36:57 +00:00
|
|
|
func (t *DefaultTracer) CaptureTxStart(gasLimit uint64) {}
|
|
|
|
|
|
|
|
func (t *DefaultTracer) CaptureTxEnd(restGas uint64) {}
|
|
|
|
|
2023-01-16 22:28:50 +00:00
|
|
|
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) {
|
2022-12-18 16:11:31 +00:00
|
|
|
}
|
|
|
|
|
2023-01-13 18:12:18 +00:00
|
|
|
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) {
|
2022-11-03 04:32:15 +00:00
|
|
|
}
|
|
|
|
|
2022-12-18 17:06:40 +00:00
|
|
|
func (t *DefaultTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error) {
|
2022-11-03 04:32:15 +00:00
|
|
|
}
|
|
|
|
|
2022-12-18 17:06:40 +00:00
|
|
|
func (t *DefaultTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error) {
|
2022-11-03 04:32:15 +00:00
|
|
|
}
|
|
|
|
|
2022-12-23 05:43:08 +00:00
|
|
|
func (t *DefaultTracer) CaptureEnd(output []byte, usedGas uint64, err error) {
|
2022-12-18 16:11:31 +00:00
|
|
|
}
|
|
|
|
|
2022-12-23 05:43:08 +00:00
|
|
|
func (t *DefaultTracer) CaptureExit(output []byte, usedGas uint64, err error) {
|
2022-11-03 04:32:15 +00:00
|
|
|
}
|