Documentation
¶
Overview ¶
Package tracer provides custom tracing capabilities to comply with EIP-4337 specifications for forbidden opcodes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
// Loaded JS tracers for simulating various AiMiddleware methods using debug_traceCall.
Loaded, _ = NewTracers()
)
Functions ¶
This section is empty.
Types ¶
type AccessInfo ¶
AccessInfo provides context on read and write counts by storage slots.
type AccessMap ¶
type AccessMap = map[common.Address]AccessInfo
type BundlerCollectorReturn ¶
type BundlerCollectorReturn struct {
CallsFromAiMiddleware []CallFromAiMiddlewareInfo `json:"callsFromAiMiddleware"`
Keccak []string `json:"keccak"`
Calls []CallInfo `json:"calls"`
Logs []LogInfo `json:"logs"`
Debug []any `json:"debug"`
}
BundlerCollectorReturn is the return value from performing an EVM trace with BundlerCollectorTracer.js.
type BundlerExecutionReturn ¶
type BundlerExecutionReturn struct {
Reverts []string `json:"reverts"`
ValidationOOG bool `json:"validationOOG"`
ExecutionOOG bool `json:"executionOOG"`
ExecutionGasLimit float64 `json:"executionGasLimit"`
AiOperationEvent *LogInfo `json:"aiOperationEvent,omitempty"`
Output string `json:"output"`
Error string `json:"error"`
}
BundlerExecutionReturn is the return value from performing an EVM trace with BundlerExecutionTracer.js.
type CallFromAiMiddlewareInfo ¶
type CallFromAiMiddlewareInfo struct {
TopLevelMethodSig hexutil.Bytes `json:"topLevelMethodSig"`
TopLevelTargetAddress common.Address `json:"topLevelTargetAddress"`
Opcodes Counts `json:"opcodes"`
Access AccessMap `json:"access"`
ContractSize ContractSizeMap `json:"contractSize"`
ExtCodeAccessInfo ExtCodeAccessInfoMap `json:"extCodeAccessInfo"`
OOG bool `json:"oog"`
}
CallFromAiMiddleware provides context on opcodes and storage access made via the AiMiddleware to AiOperation entities.
type CallInfo ¶
type CallInfo struct {
// Common
Type string `json:"type"`
// Method info
From common.Address `json:"from"`
To common.Address `json:"to"`
Method string `json:"method"`
Value string `json:"value"`
Gas float64 `json:"gas"`
// Exit info
GasUsed float64 `json:"gasUsed"`
Data any `json:"data"`
}
CallInfo provides context on internal calls made during tracing.
type ContractSizeInfo ¶
type ContractSizeInfo struct {
ContractSize float64 `json:"contractSize"`
Opcode string `json:"opcode"`
}
ContractSizeInfo provides context on the code size and call type used to access upstream contracts.
type ContractSizeMap ¶
type ContractSizeMap map[common.Address]ContractSizeInfo
type ExtCodeAccessInfoMap ¶
ExtCodeAccessInfoMap provides context on potentially illegal use of EXTCODESIZE.