Documentation
¶
Index ¶
- Variables
- func Walk(c *CallTrace, ch chan *CallTrace)
- type AccessTuple
- type Block
- func (b *Block) BaseFeePerGas() *hexutil.Big
- func (b *Block) Difficulty() *hexutil.Big
- func (b *Block) GasLimit() *hexutil.Big
- func (b Block) Hash() common.Hash
- func (b Block) Number() types.Number
- func (b *Block) ParentHash() common.Hash
- func (b *Block) Time() *hexutil.Big
- func (b *Block) Timestamp() time.Time
- func (b Block) Transactions() []types.Transaction
- type BlockHeader
- func (b *BlockHeader) BaseFeePerGas() *hexutil.Big
- func (b *BlockHeader) Bloom() [256]byte
- func (b *BlockHeader) Coinbase() common.Address
- func (b *BlockHeader) Difficulty() *hexutil.Big
- func (b *BlockHeader) ExtraData() hexutil.Bytes
- func (b *BlockHeader) GasLimit() *hexutil.Big
- func (b *BlockHeader) GasUsed() *hexutil.Big
- func (b *BlockHeader) Hash() common.Hash
- func (b *BlockHeader) MixDigest() common.Hash
- func (b *BlockHeader) Nonce() [8]byte
- func (b *BlockHeader) Number() types.Number
- func (b *BlockHeader) ParentHash() common.Hash
- func (b *BlockHeader) ReceiptHash() common.Hash
- func (b *BlockHeader) StateRoot() common.Hash
- func (b *BlockHeader) Time() *hexutil.Big
- func (b *BlockHeader) Timestamp() time.Time
- func (b *BlockHeader) TxHash() common.Hash
- func (b *BlockHeader) UncleHash() common.Hash
- type CallTrace
- func (c *CallTrace) Error() string
- func (c *CallTrace) From() common.Address
- func (c *CallTrace) Gas() *hexutil.Uint64
- func (c *CallTrace) GasUsed() *hexutil.Uint64
- func (c *CallTrace) Hash() *common.Hash
- func (c *CallTrace) Input() hexutil.Bytes
- func (c *CallTrace) Output() hexutil.Bytes
- func (c *CallTrace) ParentHash() *common.Hash
- func (c *CallTrace) To() common.Address
- func (c *CallTrace) Traces() []types.Trace
- func (c *CallTrace) TransactionHash() *common.Hash
- func (c *CallTrace) Type() string
- func (c *CallTrace) Value() *hexutil.Big
- type EvmState
- type Header
- type Log
- type PubSubSchema
- type Schema
- type SubscriptionResult
- type TraceResult
- type Transaction
- func (t *Transaction) AccessList() (list []types.AccessTuple)
- func (t *Transaction) BlockHash() *common.Hash
- func (t *Transaction) BlockNumber() *hexutil.Big
- func (t *Transaction) From() common.Address
- func (t *Transaction) Gas() *hexutil.Big
- func (t *Transaction) GasFeeCap() *hexutil.Big
- func (t *Transaction) GasPrice() *hexutil.Big
- func (t *Transaction) GasTipCap() *hexutil.Big
- func (t *Transaction) Hash() common.Hash
- func (t *Transaction) Input() hexutil.Bytes
- func (t *Transaction) Nonce() *hexutil.Big
- func (t *Transaction) To() *common.Address
- func (t *Transaction) Value() *hexutil.Big
- type TransactionReceipt
- func (t *TransactionReceipt) BlockHash() common.Hash
- func (t *TransactionReceipt) BlockNumber() types.Number
- func (t *TransactionReceipt) ContractAddress() *common.Address
- func (t *TransactionReceipt) CumulativeGasUsed() *hexutil.Big
- func (t *TransactionReceipt) EffectiveGasPrice() hexutil.Uint64
- func (t *TransactionReceipt) From() common.Address
- func (t *TransactionReceipt) GasUsed() *hexutil.Big
- func (t *TransactionReceipt) Hash() string
- func (t *TransactionReceipt) Logs() []types.Log
- func (t *TransactionReceipt) LogsBloom() hexutil.Bytes
- func (t *TransactionReceipt) SetStatus(trace string)
- func (t *TransactionReceipt) Status() string
- func (t *TransactionReceipt) To() *common.Address
- func (t *TransactionReceipt) TransactionIndex() types.Number
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSchema = Schema{
ValueEth: ethSchema{},
ValueNet: netSchema{},
ValueTrace: traceSchema{},
ValuePubSub: pubSubSchema{},
}
Functions ¶
Types ¶
type AccessTuple ¶ added in v1.0.0
type AccessTuple struct {
ValueAddress common.Address `json:"address"`
ValueStorageKeys []common.Hash `json:"storageKeys"`
}
func (AccessTuple) Address ¶ added in v1.0.0
func (a AccessTuple) Address() common.Address
func (AccessTuple) StorageKeys ¶ added in v1.0.0
func (a AccessTuple) StorageKeys() []common.Hash
type Block ¶
type Block struct {
ValuesNumber types.Number `json:"number"`
ValuesHash common.Hash `json:"hash"`
ValueParentHash common.Hash `json:"parentHash"`
ValueTimestamp *hexutil.Big `json:"timestamp"`
ValueDifficulty *hexutil.Big `json:"difficulty"`
ValueGasLimit *hexutil.Big `json:"gasLimit"`
ValuesTransactions []*Transaction `json:"transactions"`
ValueBaseFeePerGas *hexutil.Big `json:"baseFeePerGas"`
}
func (*Block) BaseFeePerGas ¶ added in v1.1.2
func (*Block) Difficulty ¶ added in v0.6.0
func (*Block) ParentHash ¶ added in v0.6.0
func (Block) Transactions ¶
func (b Block) Transactions() []types.Transaction
type BlockHeader ¶ added in v0.6.0
type BlockHeader struct {
ValueNumber types.Number `json:"number"`
ValueBlockHash common.Hash `json:"hash"`
ValueStateRoot common.Hash `json:"stateRoot"`
ValueParentHash common.Hash `json:"parentHash"`
ValueUncleHash common.Hash `json:"sha3Uncles"`
ValueTxHash common.Hash `json:"transactionsRoot"`
ValueReceiptHash common.Hash `json:"receiptsRoot"`
ValueBloom hexutil.Bytes `json:"logsBloom"`
ValueTimestamp *hexutil.Big `json:"timestamp"`
ValueDifficulty *hexutil.Big `json:"difficulty"`
ValueGasLimit *hexutil.Big `json:"gasLimit"`
ValueGasUsed *hexutil.Big `json:"gasUsed"`
ValueCoinbase common.Address `json:"miner"`
ValueExtraData hexutil.Bytes `json:"extraData"`
ValueMixDigest common.Hash `json:"mixDigest"`
ValueNonce hexutil.Bytes `json:"nonce"`
ValueBaseFeePerGas *hexutil.Big `json:"baseFeePerGas"`
}
func (*BlockHeader) BaseFeePerGas ¶ added in v1.1.2
func (b *BlockHeader) BaseFeePerGas() *hexutil.Big
func (*BlockHeader) Bloom ¶ added in v0.6.0
func (b *BlockHeader) Bloom() [256]byte
func (*BlockHeader) Coinbase ¶ added in v0.6.0
func (b *BlockHeader) Coinbase() common.Address
func (*BlockHeader) Difficulty ¶ added in v0.6.0
func (b *BlockHeader) Difficulty() *hexutil.Big
func (*BlockHeader) ExtraData ¶ added in v0.6.0
func (b *BlockHeader) ExtraData() hexutil.Bytes
func (*BlockHeader) GasLimit ¶ added in v0.6.0
func (b *BlockHeader) GasLimit() *hexutil.Big
func (*BlockHeader) GasUsed ¶ added in v0.6.0
func (b *BlockHeader) GasUsed() *hexutil.Big
func (*BlockHeader) Hash ¶ added in v0.6.0
func (b *BlockHeader) Hash() common.Hash
func (*BlockHeader) MixDigest ¶ added in v0.6.0
func (b *BlockHeader) MixDigest() common.Hash
func (*BlockHeader) Nonce ¶ added in v0.6.0
func (b *BlockHeader) Nonce() [8]byte
func (*BlockHeader) Number ¶ added in v0.6.0
func (b *BlockHeader) Number() types.Number
func (*BlockHeader) ParentHash ¶ added in v0.6.0
func (b *BlockHeader) ParentHash() common.Hash
func (*BlockHeader) ReceiptHash ¶ added in v0.6.0
func (b *BlockHeader) ReceiptHash() common.Hash
func (*BlockHeader) StateRoot ¶ added in v0.6.0
func (b *BlockHeader) StateRoot() common.Hash
func (*BlockHeader) Time ¶ added in v0.6.0
func (b *BlockHeader) Time() *hexutil.Big
func (*BlockHeader) Timestamp ¶ added in v0.6.0
func (b *BlockHeader) Timestamp() time.Time
func (*BlockHeader) TxHash ¶ added in v0.6.0
func (b *BlockHeader) TxHash() common.Hash
func (*BlockHeader) UncleHash ¶ added in v0.6.0
func (b *BlockHeader) UncleHash() common.Hash
type CallTrace ¶
type CallTrace struct {
ValueHash *common.Hash `json:"hash"`
ValueParentHash *common.Hash `json:"parentHash"`
ValueTransactionHash *common.Hash `json:"transactionHash"`
ValueType string `json:"type"`
ValueFrom common.Address `json:"from"`
ValueTo common.Address `json:"to"`
ValueInput hexutil.Bytes `json:"input"`
ValueOutput hexutil.Bytes `json:"output"`
ValueGas *hexutil.Uint64 `json:"gas,omitempty"`
ValueGasUsed *hexutil.Uint64 `json:"gasUsed,omitempty"`
ValueValue *hexutil.Big `json:"value,omitempty"`
ValueError string `json:"error,omitempty"`
ValueCalls []CallTrace `json:"calls,omitempty"`
}
func (*CallTrace) ParentHash ¶
func (*CallTrace) TransactionHash ¶
type EvmState ¶
type EvmState struct {
ValuePc uint64 `json:"pc"`
ValueOp string `json:"op"`
ValueGas uint64 `json:"gas"`
ValueGasCost int64 `json:"gasCost"`
ValueDepth int `json:"depth"`
ValueError json.RawMessage `json:"error,omitempty"`
ValueStack *[]string `json:"stack,omitempty"`
ValueMemory *[]string `json:"memory,omitempty"`
ValueStorage *map[string]string `json:"storage,omitempty"`
}
type Log ¶
type Log struct {
ValueAddress string `json:"address"`
ValueBlockHash string `json:"blockHash"`
ValueBlockNumber string `json:"blockNumber"`
ValueData string `json:"data"`
ValueLogIndex string `json:"logIndex"`
ValueRemoved bool `json:"removed"`
ValueTopics []string `json:"topics"`
ValueTransactionHash string `json:"transactionHash"`
ValueTransactionIndex string `json:"transactionIndex"`
ValueTransactionLogIndex string `json:"transactionLogIndex"`
ValueType string `json:"type"`
}
type PubSubSchema ¶
type PubSubSchema interface {
Subscribe() (*jsonrpc2.Request, *types.SubscriptionID)
Unsubscribe(id types.SubscriptionID) (*jsonrpc2.Request, *types.UnsubscribeSuccess)
}
type Schema ¶
type Schema struct {
ValueEth schema.EthSchema
ValueNet schema.NetSchema
ValueTrace schema.TraceSchema
ValuePubSub schema.PubSubSchema
}
func (*Schema) PubSub ¶
func (s *Schema) PubSub() schema.PubSubSchema
func (*Schema) Trace ¶
func (s *Schema) Trace() schema.TraceSchema
type SubscriptionResult ¶
type SubscriptionResult struct {
Subscription types.SubscriptionID `json:"subscription"`
Result Header `json:"result"`
}
type TraceResult ¶
type TraceResult struct {
Gas uint64 `json:"gas"`
Failed bool `json:"failed"`
ReturnValue string `json:"returnValue"`
StructLogs []*EvmState `json:"structLogs"`
}
func (*TraceResult) ProcessTrace ¶
func (gtr *TraceResult) ProcessTrace()
func (*TraceResult) States ¶
func (gtr *TraceResult) States() []types.EvmState
type Transaction ¶
type Transaction struct {
ValueHash common.Hash `json:"hash"`
ValueFrom common.Address `json:"from"`
ValueTo *common.Address `json:"to"`
ValueInput hexutil.Bytes `json:"input"`
ValueValue *hexutil.Big `json:"value"`
ValueGas *hexutil.Big `json:"gas"`
ValueGasTipCap *hexutil.Big `json:"maxPriorityFeePerGas"`
ValueGasFeeCap *hexutil.Big `json:"maxFeePerGas"`
ValueGasPrice *hexutil.Big `json:"gasPrice"`
ValueBlockNumber *hexutil.Big `json:"blockNumber"`
ValueBlockHash *common.Hash `json:"blockHash"`
ValueNonce *hexutil.Big `json:"nonce"`
V *hexutil.Big `json:"v"`
R *hexutil.Big `json:"r"`
S *hexutil.Big `json:"s"`
ValueAccessList []*AccessTuple `json:"accessList"`
}
func (*Transaction) AccessList ¶ added in v1.0.0
func (t *Transaction) AccessList() (list []types.AccessTuple)
func (*Transaction) BlockHash ¶ added in v0.6.0
func (t *Transaction) BlockHash() *common.Hash
func (*Transaction) BlockNumber ¶ added in v0.6.0
func (t *Transaction) BlockNumber() *hexutil.Big
func (*Transaction) From ¶
func (t *Transaction) From() common.Address
func (*Transaction) Gas ¶
func (t *Transaction) Gas() *hexutil.Big
func (*Transaction) GasFeeCap ¶ added in v1.1.2
func (t *Transaction) GasFeeCap() *hexutil.Big
func (*Transaction) GasPrice ¶
func (t *Transaction) GasPrice() *hexutil.Big
func (*Transaction) GasTipCap ¶ added in v1.1.2
func (t *Transaction) GasTipCap() *hexutil.Big
func (*Transaction) Hash ¶
func (t *Transaction) Hash() common.Hash
func (*Transaction) Input ¶
func (t *Transaction) Input() hexutil.Bytes
func (*Transaction) Nonce ¶ added in v0.6.0
func (t *Transaction) Nonce() *hexutil.Big
func (*Transaction) To ¶
func (t *Transaction) To() *common.Address
func (*Transaction) Value ¶
func (t *Transaction) Value() *hexutil.Big
type TransactionReceipt ¶
type TransactionReceipt struct {
TTransactionHash string `json:"transactionHash"`
TTransactionIndex types.Number `json:"transactionIndex"`
TBlockHash common.Hash `json:"blockHash"`
TBlockNumber types.Number `json:"blockNumber"`
TFrom common.Address `json:"from"`
TTo *common.Address `json:"to"`
TGasUsed *hexutil.Big `json:"gasUsed"`
TCumulativeGasUsed *hexutil.Big `json:"cumulativeGasUsed"`
TEffectiveGasPrice hexutil.Uint64 `json:"effectiveGasPrice"`
TContractAddress *common.Address `json:"contractAddress"`
TStatus string `json:"status"` // Can be null, if null do a check anyways. 0x0 fail, 0x1 success
TLogs []*Log `json:"logs"`
TLogsBloom hexutil.Bytes `json:"logsBloom"`
TRoot *string `json:"root"`
}
func (*TransactionReceipt) BlockHash ¶ added in v0.2.10
func (t *TransactionReceipt) BlockHash() common.Hash
func (*TransactionReceipt) BlockNumber ¶ added in v0.2.10
func (t *TransactionReceipt) BlockNumber() types.Number
func (*TransactionReceipt) ContractAddress ¶
func (t *TransactionReceipt) ContractAddress() *common.Address
func (*TransactionReceipt) CumulativeGasUsed ¶
func (t *TransactionReceipt) CumulativeGasUsed() *hexutil.Big
func (*TransactionReceipt) EffectiveGasPrice ¶ added in v1.1.2
func (t *TransactionReceipt) EffectiveGasPrice() hexutil.Uint64
func (*TransactionReceipt) From ¶ added in v0.2.10
func (t *TransactionReceipt) From() common.Address
func (*TransactionReceipt) GasUsed ¶
func (t *TransactionReceipt) GasUsed() *hexutil.Big
func (*TransactionReceipt) Hash ¶
func (t *TransactionReceipt) Hash() string
func (*TransactionReceipt) Logs ¶
func (t *TransactionReceipt) Logs() []types.Log
func (*TransactionReceipt) LogsBloom ¶ added in v0.2.10
func (t *TransactionReceipt) LogsBloom() hexutil.Bytes
func (*TransactionReceipt) SetStatus ¶
func (t *TransactionReceipt) SetStatus(trace string)
func (*TransactionReceipt) Status ¶
func (t *TransactionReceipt) Status() string
func (*TransactionReceipt) To ¶ added in v0.2.10
func (t *TransactionReceipt) To() *common.Address
func (*TransactionReceipt) TransactionIndex ¶ added in v0.2.10
func (t *TransactionReceipt) TransactionIndex() types.Number
Click to show internal directories.
Click to hide internal directories.