Documentation ¶
Index ¶
- Constants
- type Block
- type CallTraces
- type CodeSchema
- type EthSchema
- type EvmState
- type Header
- type Log
- type NetSchema
- type Number
- type OpCode
- type PubSubSchema
- type Schema
- type SubscriptionID
- type SubscriptionResult
- type Trace
- type TraceSchema
- type Transaction
- type TransactionReceipt
- type TransactionStates
- type UnsubscribeSuccess
Constants ¶
View Source
const ( CREATE OpCode = 0xf0 + iota CALL CALLCODE RETURN DELEGATECALL STATICCALL = 0xfa REVERT = 0xfd INVALID_OPCODE = 0xfe SELFDESTRUCT = 0xff )
0xf0 range - closures.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block interface {
Transactions() []Transaction
}
type CallTraces ¶
type CallTraces interface {
Traces() []Trace
}
type CodeSchema ¶
type OpCode ¶
type OpCode byte
OpCode is an EVM opcode
0x0 range - arithmetic ops.
0x10 range - comparison ops.
const ( ADDRESS OpCode = 0x30 + iota BALANCE ORIGIN CALLER CALLVALUE CALLDATALOAD CALLDATASIZE CALLDATACOPY CODESIZE CODECOPY GASPRICE EXTCODESIZE EXTCODECOPY RETURNDATASIZE RETURNDATACOPY )
0x30 range - closure state.
0x40 range - block operations.
const ( POP OpCode = 0x50 + iota MLOAD MSTORE MSTORE8 SLOAD SSTORE JUMP JUMPI PC MSIZE GAS JUMPDEST )
0x50 range - 'storage' and execution.
const ( PUSH1 OpCode = 0x60 + iota PUSH2 PUSH3 PUSH4 PUSH5 PUSH6 PUSH7 PUSH8 PUSH9 PUSH10 PUSH11 PUSH12 PUSH13 PUSH14 PUSH15 PUSH16 PUSH17 PUSH18 PUSH19 PUSH20 PUSH21 PUSH22 PUSH23 PUSH24 PUSH25 PUSH26 PUSH27 PUSH28 PUSH29 PUSH30 PUSH31 PUSH32 DUP1 DUP2 DUP3 DUP4 DUP5 DUP6 DUP7 DUP8 DUP9 DUP10 DUP11 DUP12 DUP13 DUP14 DUP15 DUP16 SWAP1 SWAP2 SWAP3 SWAP4 SWAP5 SWAP6 SWAP7 SWAP8 SWAP9 SWAP10 SWAP11 SWAP12 SWAP13 SWAP14 SWAP15 SWAP16 )
0x60 range.
func (OpCode) IsStaticJump ¶
IsStaticJump specifies if an opcode is JUMP.
type PubSubSchema ¶
type PubSubSchema interface { Subscribe() (*jsonrpc2.Request, *SubscriptionID) Unsubscribe(id SubscriptionID) (*jsonrpc2.Request, *UnsubscribeSuccess) }
type Schema ¶
type Schema interface { Eth() EthSchema Net() NetSchema Trace() TraceSchema Code() CodeSchema PubSub() PubSubSchema }
type SubscriptionID ¶
type SubscriptionID string
func NewNilSubscriptionID ¶
func NewNilSubscriptionID() SubscriptionID
func (SubscriptionID) String ¶
func (id SubscriptionID) String() string
type SubscriptionResult ¶
type SubscriptionResult struct { Subscription SubscriptionID `json:"subscription"` Result Header `json:"result"` }
type TraceSchema ¶
type TraceSchema interface { VMTrace(hash string) (*jsonrpc2.Request, TransactionStates) CallTrace(hash string) (*jsonrpc2.Request, CallTraces) }
type Transaction ¶
type TransactionReceipt ¶
type TransactionReceipt interface { Hash() string TransactionIndex() hexutil.Big BlockHash() common.Hash BlockNumber() hexutil.Big From() common.Address To() *common.Address GasUsed() *hexutil.Big CumulativeGasUsed() *hexutil.Big ContractAddress() *common.Address Status() string SetStatus(trace string) Logs() []Log LogsBloom() hexutil.Bytes }
type TransactionStates ¶
type TransactionStates interface { States() []EvmState ProcessTrace() }
type UnsubscribeSuccess ¶
type UnsubscribeSuccess bool
Click to show internal directories.
Click to hide internal directories.