rpc

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: GPL-3.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetBlockReply

type GetBlockReply struct {
	ParentHash    []common.Hash    `json:"parentHash"          gencodec:"required"`
	UncleHash     []common.Hash    `json:"sha3Uncles"          gencodec:"required"`
	Coinbase      []common.Address `json:"miner"               gencodec:"required"`
	Root          []common.Hash    `json:"stateRoot"           gencodec:"required"`
	TxHash        []common.Hash    `json:"transactionsRoot"    gencodec:"required"`
	EtxHash       []common.Hash    `json:"extTransactionsRoot" gencodec:"required"`
	EtxRollupHash []common.Hash    `json:"extRollupRoot"       gencodec:"required"`
	ManifestHash  []common.Hash    `json:"manifestHash"        gencodec:"required"`
	ReceiptHash   []common.Hash    `json:"receiptsRoot"        gencodec:"required"`
	Bloom         []types.Bloom    `json:"logsBloom"           gencodec:"required"`
	Difficulty    []big.Int        `json:"difficulty"          gencodec:"required"`
	Number        []big.Int        `json:"number"              gencodec:"required"`
	GasLimit      []hexutil.Uint64 `json:"gasLimit"            gencodec:"required"`
	GasUsed       []hexutil.Uint64 `json:"gasUsed"             gencodec:"required"`
	BaseFee       []*hexutil.Big   `json:"baseFeePerGas"       gencodec:"required"`
	Location      common.Location  `json:"location"            gencodec:"required"`
	Time          hexutil.Uint64   `json:"timestamp"           gencodec:"required"`
	Extra         hexutil.Bytes    `json:"extraData"           gencodec:"required"`
	Nonce         types.BlockNonce `json:"nonce"`
	Hash          common.Hash      `json:"hash"`
}

type JsonError

type JsonError struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data,omitempty"`
}

type JsonRPCResponse

type JsonRPCResponse struct {
	Version string           `json:"version,omitempty"`
	ID      json.RawMessage  `json:"id,omitempty"`
	Error   *JsonError       `json:"error,omitempty"`
	Result  *json.RawMessage `json:"result,omitempty"`
}

type RPCClient

type RPCClient struct {
	sync.RWMutex
	Url  string
	Name string
	// contains filtered or unexported fields
}

func NewRPCClient

func NewRPCClient(name, url, timeout string) *RPCClient

func (*RPCClient) Sick

func (r *RPCClient) Sick() bool

type Tx

type Tx struct {
	Gas      string `json:"gas"`
	GasPrice string `json:"gasPrice"`
	Hash     string `json:"hash"`
}

type TxReceipt

type TxReceipt struct {
	TxHash    string `json:"transactionHash"`
	GasUsed   string `json:"gasUsed"`
	BlockHash string `json:"blockHash"`
	Status    string `json:"status"`
}

func (*TxReceipt) Confirmed

func (r *TxReceipt) Confirmed() bool

func (*TxReceipt) Successful

func (r *TxReceipt) Successful() bool

Use with previous method

Jump to

Keyboard shortcuts

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