types

package
v0.0.0-...-29a35b7 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ETHTransaction

type ETHTransaction struct {
	From        string `json:"from"`
	Gas         string `json:"gas"`
	GasPrice    string `json:"gasPrice"`
	Hash        string `json:"hash"`
	Input       string `json:"input"`
	Nonce       string `json:"nonce"`
	To          string `json:"to"`
	Value       string `json:"value"`
	ParsedValue TXData `json:"-"`
	R           string `json:"r"`
	S           string `json:"s"`
	V           string `json:"v"`
}

func (ETHTransaction) Bytes

func (tx ETHTransaction) Bytes() []byte

type ETHTxReceipt

type ETHTxReceipt struct {
	TransactionHash   string `json:"transactionHash"`
	TransactionIndex  string `json:"transactionIndex"`
	BlockNumber       string `json:"blockNumber"`
	BlockHash         string `json:"blockHash"`
	CumulativeGasUsed string `json:"cumulativeGasUsed"`
	GasUsed           string `json:"gasUsed"`
	ContractAddress   string `json:"contractAddress"`
	Status            HexInt `json:"status"`
}

func (ETHTxReceipt) Bytes

func (receipt ETHTxReceipt) Bytes() []byte

type EthBlock

type EthBlock struct {
	Height          HexInt   `json:"number"`
	Hash            string   `json:"hash"`
	ParentHash      string   `json:"parentHash"`
	Nonce           string   `json:"nonce"`
	TransactionRoot string   `json:"transactionRoot"`
	StateRoot       string   `json:"stateRoot"`
	Miner           string   `json:"miner"`
	Difficulty      string   `json:"difficult"`
	TotalDifficulty string   `json:"totalDifficulty"`
	ExtraData       string   `json:"extraData"`
	Size            string   `json:"size"`
	GasLimit        string   `json:"Size"`
	GasUsed         string   `json:"gasUsed"`
	Timestamp       HexInt   `json:"timestamp"`
	Transactions    []string `json:"transactions"`
}

type EthRPCParam

type EthRPCParam struct {
	JSONRPC string        `json:"jsonrpc"`
	Method  string        `json:"method"`
	Params  []interface{} `json:"params"`
	Id      int64         `json:"id"`
}

func NewEthRPCParam

func NewEthRPCParam(method string, id int64, params []interface{}) EthRPCParam

func (EthRPCParam) Bytes

func (param EthRPCParam) Bytes() []byte

type EthRPCResp

type EthRPCResp struct {
	JSONRPC string      `json:"jsonrpc"`
	Id      int64       `json:"id"`
	Result  interface{} `json:"result"`
}

type HexInt

type HexInt int64

func (HexInt) MarshalJSON

func (hexInt HexInt) MarshalJSON() ([]byte, error)

func (*HexInt) UnmarshalJSON

func (hexInt *HexInt) UnmarshalJSON(data []byte) error

type TXData

type TXData struct {
	Method string
	To     string
	Amount int64
}

Jump to

Keyboard shortcuts

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