parity

package
v0.2.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultSchema = Schema{
	ValueEth:    ethSchema{},
	ValueNet:    netSchema{},
	ValueTrace:  traceSchema{},
	ValueCode:   codeSchema{},
	ValuePubSub: pubSubSchema{},
	ValueParity: ParitySchema{},
}

Functions

This section is empty.

Types

type Action

type Action struct {
	CallType        string          `json:"callType"`
	Hash            *common.Hash    `json:"hash"`
	ParentHash      *common.Hash    `json:"hash"`
	TransactionHash *common.Hash    `json:"hash"`
	From            common.Address  `json:"from"`
	To              common.Address  `json:"to"`
	Input           hexutil.Bytes   `json:"input"`
	Gas             *hexutil.Uint64 `json:"gas,omitempty"`
	Value           *hexutil.Big    `json:"value,omitempty"`
}

type Block

type Block struct {
	ValuesTransactions []*Transaction `json:"transactions"`
}

func (*Block) Transactions

func (b *Block) Transactions() []ethereum.Transaction

type Ex

type Ex struct {
	Mem  Mem      `json:"mem"`
	Push []string `json:"push"`
	Used uint64   `json:"used"`
}
type Header struct {
	HNumber *ethereum.Number `json:"number"`
}

func (*Header) Number

func (h *Header) Number() *ethereum.Number

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"`
}

func (*Log) Data

func (l *Log) Data() string

func (*Log) Topics

func (l *Log) Topics() []string

type Mem

type Mem struct {
	Data hexutil.Bytes `json:"data"`
	Off  int64         `json:"off"`
}

type ParitySchema

type ParitySchema struct {
}

func (ParitySchema) VersionInfo

func (ParitySchema) VersionInfo() (*jsonrpc2.Request, *ParityVersionInfo)

type ParityVersionInfo

type ParityVersionInfo struct {
}

type PubSubSchema

type PubSubSchema interface {
	Subscribe() (*jsonrpc2.Request, *ethereum.SubscriptionID)
	Unsubscribe(id ethereum.SubscriptionID) (*jsonrpc2.Request, *ethereum.UnsubscribeSuccess)
}

type Result

type Result struct {
	GasUsed *hexutil.Uint64 `json:"gasUsed,omitempty"`
	Output  hexutil.Bytes   `json:"output"`
}

type Schema

type Schema struct {
	ValueEth    ethereum.EthSchema
	ValueNet    ethereum.NetSchema
	ValueTrace  ethereum.TraceSchema
	ValueCode   ethereum.CodeSchema
	ValuePubSub ethereum.PubSubSchema
	ValueParity ParitySchema
}

func (*Schema) Code

func (s *Schema) Code() ethereum.CodeSchema

func (*Schema) Eth

func (s *Schema) Eth() ethereum.EthSchema

func (*Schema) Net

func (s *Schema) Net() ethereum.NetSchema

func (*Schema) Parity

func (s *Schema) Parity() ParitySchema

func (*Schema) PubSub

func (s *Schema) PubSub() ethereum.PubSubSchema

func (*Schema) Trace

func (s *Schema) Trace() ethereum.TraceSchema

type Trace

type Trace struct {
	ValueAction       Action `json:"action"`
	ValueResult       Result `json:"result"`
	ValueLogs         []Log  `json:"logs"`
	ValueSubtraces    int    `json:"subtraces"`
	ValueError        string `json:"error"`
	ValueTraceAddress []int  `json:"traceAddress"`
	ValueType         string `json:"type"`
}

func (*Trace) Error

func (t *Trace) Error() string

func (*Trace) From

func (t *Trace) From() common.Address

func (*Trace) Gas

func (t *Trace) Gas() *hexutil.Uint64

func (*Trace) GasUsed

func (t *Trace) GasUsed() *hexutil.Uint64

func (*Trace) Hash

func (t *Trace) Hash() *common.Hash

func (*Trace) Input

func (t *Trace) Input() hexutil.Bytes

func (*Trace) Output

func (t *Trace) Output() hexutil.Bytes

func (*Trace) ParentHash

func (t *Trace) ParentHash() *common.Hash

func (*Trace) To

func (t *Trace) To() common.Address

func (*Trace) TransactionHash

func (t *Trace) TransactionHash() *common.Hash

func (*Trace) Type

func (t *Trace) Type() string

func (*Trace) Value

func (t *Trace) Value() *hexutil.Big

type TraceResult

type TraceResult struct {
	VmTrace   *VmTrace `json:"vmTrace"`
	CallTrace []*Trace `json:"traceSchema"`
}

func (*TraceResult) ProcessTrace

func (tr *TraceResult) ProcessTrace()

func (*TraceResult) States

func (tr *TraceResult) States() []ethereum.EvmState

func (*TraceResult) Traces

func (tr *TraceResult) Traces() []ethereum.Trace

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"`
	ValueGasPrice    *hexutil.Big    `json:"gasPrice"`
	ValueBlockNumber string          `json:"blockNumber"`
}

func (*Transaction) From

func (t *Transaction) From() *common.Address

func (*Transaction) Gas

func (t *Transaction) Gas() *hexutil.Big

func (*Transaction) GasPrice

func (t *Transaction) GasPrice() *hexutil.Big

func (*Transaction) Hash

func (t *Transaction) Hash() *common.Hash

func (*Transaction) Input

func (t *Transaction) Input() hexutil.Bytes

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 hexutil.Big `json:"transactionIndex"`
	TBlockHash        common.Hash `json:"blockHash"`
	TBlockNumber      hexutil.Big `json:"blockNumber"`

	TFrom common.Address  `json:"from"`
	TTo   *common.Address `json:"to"`

	TGasUsed           *hexutil.Big    `json:"gasUsed"`
	TCumulativeGasUsed *hexutil.Big    `json:"cumulativeGasUsed"`
	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() hexutil.Big

func (*TransactionReceipt) ContractAddress

func (t *TransactionReceipt) ContractAddress() *common.Address

func (*TransactionReceipt) CumulativeGasUsed

func (t *TransactionReceipt) CumulativeGasUsed() *hexutil.Big

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() []ethereum.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 (*TransactionReceipt) TransactionIndex added in v0.2.10

func (t *TransactionReceipt) TransactionIndex() hexutil.Big

type Version

type Version struct {
	Major int `json:"major"`
	Minor int `json:"minor"`
	Patch int `json:"patch"`
}

type VersionInfo

type VersionInfo struct {
	Hash    string  `json:"hash"`
	Track   string  `json:"track"`
	Version Version `json:"version"`
}

type VmState

type VmState struct {
	ValuePc      uint64             `json:"pc"`
	ValueOp      string             `json:"op"`
	ValueEx      Ex                 `json:"ex"`
	ValueSub     *VmTrace           `json:"sub"`
	ValueGas     uint64             `json:"gas"`
	ValueGasCost int64              `json:"cost"`
	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"`
	Terminating  bool
}

func Walk

func Walk(vmt *VmTrace) []*VmState

func (*VmState) Depth

func (pvs *VmState) Depth() int

func (*VmState) Op

func (pvs *VmState) Op() string

func (*VmState) Pc

func (pvs *VmState) Pc() uint64

func (*VmState) Stack

func (pvs *VmState) Stack() []string

type VmTrace

type VmTrace struct {
	Logs []*VmState    `json:"ops"`
	Code hexutil.Bytes `json:"code"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL