Documentation ¶
Index ¶
- type InstrMapping
- type LineCol
- type SourceMap
- type SourceMapTracer
- func (s *SourceMapTracer) CaptureEnd(output []byte, gasUsed uint64, err error)
- func (s *SourceMapTracer) CaptureEnter(typ vm.OpCode, from common.Address, to common.Address, input []byte, ...)
- func (s *SourceMapTracer) CaptureExit(output []byte, gasUsed uint64, err error)
- func (s *SourceMapTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, ...)
- func (s *SourceMapTracer) CaptureStart(env *vm.EVM, from common.Address, to common.Address, create bool, input []byte, ...)
- func (s *SourceMapTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, ...)
- func (s *SourceMapTracer) CaptureStateAfter(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, ...)
- func (s *SourceMapTracer) CaptureTxEnd(restGas uint64)
- func (s *SourceMapTracer) CaptureTxStart(gasLimit uint64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InstrMapping ¶
type InstrMapping struct { S int32 // start offset in bytes within source (negative when non-existent!) L int32 // length in bytes within source (negative when non-existent!) F int32 // file index of source (negative when non-existent!) J byte // jump type (i=into, o=out, -=regular) M int32 // modifier depth }
type SourceMap ¶
type SourceMap struct { // source names Sources []string // per source, source offset -> line/col PosData [][]LineCol // per bytecode byte, byte index -> instr Instr []InstrMapping }
func ParseSourceMap ¶
ParseSourceMap parses a solidity sourcemap: mapping bytecode indices to source references. See https://docs.soliditylang.org/en/latest/internals/source_mappings.html
Sources is the list of source files, which will be read from the filesystem to transform token numbers into line/column numbers. The sources are as referenced in the source-map by index. Not all sources are necessary, some indices may be unknown.
func (*SourceMap) FormattedInfo ¶
type SourceMapTracer ¶
type SourceMapTracer struct {
// contains filtered or unexported fields
}
func NewSourceMapTracer ¶
func (*SourceMapTracer) CaptureEnd ¶
func (s *SourceMapTracer) CaptureEnd(output []byte, gasUsed uint64, err error)
func (*SourceMapTracer) CaptureEnter ¶
func (*SourceMapTracer) CaptureExit ¶
func (s *SourceMapTracer) CaptureExit(output []byte, gasUsed uint64, err error)
func (*SourceMapTracer) CaptureFault ¶
func (s *SourceMapTracer) CaptureFault(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, depth int, err error)
func (*SourceMapTracer) CaptureStart ¶
func (*SourceMapTracer) CaptureState ¶
func (s *SourceMapTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error)
func (*SourceMapTracer) CaptureStateAfter ¶
func (s *SourceMapTracer) CaptureStateAfter(pc uint64, op vm.OpCode, gas, cost uint64, scope *vm.ScopeContext, rData []byte, depth int, err error)
func (*SourceMapTracer) CaptureTxEnd ¶
func (s *SourceMapTracer) CaptureTxEnd(restGas uint64)
func (*SourceMapTracer) CaptureTxStart ¶
func (s *SourceMapTracer) CaptureTxStart(gasLimit uint64)
Click to show internal directories.
Click to hide internal directories.