2023-07-08 17:01:26 +00:00
|
|
|
package jsonrpc
|
2022-11-03 04:32:15 +00:00
|
|
|
|
|
|
|
import (
|
2022-12-03 14:43:53 +00:00
|
|
|
"github.com/holiman/uint256"
|
2023-01-27 04:34:04 +00:00
|
|
|
"github.com/ledgerwatch/erigon-lib/common"
|
2023-01-13 18:12:18 +00:00
|
|
|
|
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-10-05 05:23:08 +00:00
|
|
|
func (t *DefaultTracer) CaptureStart(env *vm.EVM, from common.Address, to common.Address, precompile bool, create bool, input []byte, gas uint64, value *uint256.Int, code []byte) {
|
2022-12-18 16:11:31 +00:00
|
|
|
}
|
|
|
|
|
2023-01-27 04:34:04 +00:00
|
|
|
func (t *DefaultTracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.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
|
|
|
}
|