types

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: MIT Imports: 0 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	BlockHeader
	Size            string        `json:"size"`
	TotalDifficulty string        `json:"totalDifficulty"`
	Transactions    []Transaction `json:"transactions"`
	Uncles          []string      `json:"uncles"`
}

type BlockHeader

type BlockHeader struct {
	Author           string   `json:"author"`
	Difficulty       string   `json:"difficulty"`
	ExtraData        string   `json:"extraData"`
	GasLimit         string   `json:"gasLimit"`
	GasUsed          string   `json:"gasUsed"`
	Hash             string   `json:"hash"`
	LogsBloom        string   `json:"logsBloom"`
	Miner            string   `json:"miner"`
	MixHash          string   `json:"mixHash"`
	Nonce            string   `json:"nonce"`
	Number           string   `json:"number"`
	ParentHash       string   `json:"parentHash"`
	ReceiptsRoot     string   `json:"receiptsRoot"`
	SealFields       []string `json:"sealFields"`
	Sha3Uncles       string   `json:"sha3Uncles"`
	StateRoot        string   `json:"stateRoot"`
	Timestamp        string   `json:"timestamp"`
	TransactionsRoot string   `json:"transactionsRoot"`
}

type GethTxPool

type GethTxPool map[string]map[string]map[string]Transaction

type Log

type Log struct {
	Address             string   `json:"address"`
	BlockHash           string   `json:"blockHash"`
	BlockNumber         string   `json:"blockNumber"`
	Data                string   `json:"data"`
	LogIndex            string   `json:"logIndex"`
	Removed             bool     `json:"removed"`
	Topics              []string `json:"topics"`
	TransactionHash     string   `json:"transactionHash"`
	TransactionIndex    string   `json:"transactionIndex"`
	TransactionLogIndex string   `json:"transactionLogIndex"`
	Type                string   `json:"type"`
}

type RPCGetBlockByNumberResponse

type RPCGetBlockByNumberResponse struct {
	Jsonrpc string `json:"jsonrpc"`
	Result  Block  `json:"result"`
	ID      int    `json:"id"`
}

TODO check this

type RPCGetTransactionReceipt

type RPCGetTransactionReceipt struct {
	Jsonrpc string  `json:"jsonrpc"`
	Result  Receipt `json:"result"`
	ID      int     `json:"id"`
}

type RPCGetUncleByBlockHashAndIndex

type RPCGetUncleByBlockHashAndIndex struct {
	Jsonrpc string `json:"jsonrpc"`
	Result  Block  `json:"result"`
	ID      int    `json:"id"`
}

TODO check this

type RPCTraceBlock

type RPCTraceBlock struct {
	Jsonrpc string  `json:"jsonrpc"`
	Result  []Trace `json:"result"`
	ID      int     `json:"id"`
}

type RPCTraceReplayBlockTransactions

type RPCTraceReplayBlockTransactions struct {
	Jsonrpc string              `json:"jsonrpc"`
	Result  []TransactionReplay `json:"result"`
	ID      int                 `json:"id"`
}

type Receipt

type Receipt struct {
	BlockHash         string      `json:"blockHash"`
	BlockNumber       string      `json:"blockNumber"`
	ContractAddress   interface{} `json:"contractAddress"`
	CumulativeGasUsed string      `json:"cumulativeGasUsed"`
	From              string      `json:"from"`
	GasUsed           string      `json:"gasUsed"`
	Logs              []Log       `json:"logs"`
	LogsBloom         string      `json:"logsBloom"`
	Root              string      `json:"root"`
	Status            string      `json:"status"`
	To                string      `json:"to"`
	TransactionHash   string      `json:"transactionHash"`
	TransactionIndex  string      `json:"transactionIndex"`
}

type Trace

type Trace struct {
	Action              TraceAction  `json:"action"`
	BlockHash           *string      `json:"blockHash"`
	BlockNumber         *int         `json:"blockNumber"`
	Result              *TraceResult `json:"result"`
	Subtraces           int          `json:"subtraces"`
	TraceAddress        []int        `json:"traceAddress"`
	TransactionHash     *string      `json:"transactionHash"`
	TransactionPosition *int         `json:"transactionPosition"`
	Type                string       `json:"type"`
	Error               *string      `json:"error"`
}

type TraceAction

type TraceAction struct {
	// call
	CallType *string `json:"callType"`
	To       *string `json:"to"`
	Input    *string `json:"input"`
	// call + create
	From  *string `json:"from"`
	Gas   *string `json:"gas"`
	Value *string `json:"value"`
	// create
	Init *string `json:"init"`
	// suicide
	Address       *string `json:"address"`
	Balance       *string `json:"balance"`
	RefundAddress *string `json:"refundAddress"`
}

type TraceResult

type TraceResult struct {
	// call
	Output *string `json:"output"`
	// call + create
	GasUsed *string `json:"gasUsed"`
	// create
	Address *string `json:"address"`
	Code    *string `json:"code"`
}

type Transaction

type Transaction struct {
	BlockHash        string      `json:"blockHash"`
	BlockNumber      string      `json:"blockNumber"`
	ChainId          string      `json:"chainId"`
	Condition        interface{} `json:"condition"`
	Creates          string      `json:"creates"`
	From             string      `json:"from"`
	Gas              string      `json:"gas"`
	GasPrice         string      `json:"gasPrice"`
	Hash             string      `json:"hash"`
	Input            string      `json:"input"`
	Nonce            string      `json:"nonce"`
	PublicKey        string      `json:"publicKey"`
	R                string      `json:"r"`
	Raw              string      `json:"raw"`
	S                string      `json:"s"`
	StandardV        string      `json:"standardV"`
	To               string      `json:"to"`
	TransactionIndex string      `json:"transactionIndex"`
	V                string      `json:"v"`
	Value            string      `json:"value"`
}

type TransactionReplay

type TransactionReplay struct {
	Output          string                 `json:"output"`
	StateDiff       map[string]interface{} `json:"stateDiff"`
	Trace           []Trace                `json:"trace"`
	VMTrace         *VMTrace               `json:"vmTrace"`
	TransactionHash *string                `json:"transactionHash"`
}

type VMTrace

type VMTrace struct {
	Code string      `json:"code"`
	Ops  []VMTraceOp `json:"ops"`
}

type VMTraceOp

type VMTraceOp struct {
	Cost int `json:"cost"`
	Ex   struct {
		Mem   interface{} `json:"mem"`
		Push  interface{} `json:"push"`
		Store interface{} `json:"store"`
		Used  int         `json:"used"`
	} `json:"ex"`
	Pc  int      `json:"pc"`
	Sub *VMTrace `json:"sub"`
}

Jump to

Keyboard shortcuts

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