modelsc

package
v1.7.0-fuji-2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TracerJS = `` /* 13192-byte string literal not displayed */

)

Variables

View Source
var ErrNotFound = errors.New("block not found")

Functions

func Marshal

func Marshal(bl *types.Block) ([]byte, error)

Types

type Block

type Block struct {
	Header         types.Header        `json:"header"`
	Uncles         []types.Header      `json:"uncles"`
	TxsBytes       *[][]byte           `json:"txs,omitempty"`
	Version        uint32              `json:"version"`
	BlockExtraData []byte              `json:"blockExtraData"`
	Txs            []types.Transaction `json:"transactions,omitempty"`
}

func New

func New(bl *types.Block) (*Block, error)

func Unmarshal

func Unmarshal(data []byte) (*Block, error)

type BlockContainer

type BlockContainer struct {
	Block  *types.Block
	Traces []*TransactionTrace
	Logs   []*types.Log
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(url string) (*Client, error)

func (*Client) Close

func (c *Client) Close()

func (*Client) Latest

func (c *Client) Latest(rpcTimeout time.Duration) (*big.Int, error)

func (*Client) ReadBlock

func (c *Client) ReadBlock(blockNumber *big.Int, rpcTimeout time.Duration) (*BlockContainer, error)

type TracerParam

type TracerParam struct {
	Tracer  string `json:"tracer"`
	Timeout string `json:"timeout"`
}

type TransactionTrace

type TransactionTrace struct {
	Hash  string `json:"hash"`
	Idx   uint32 `json:"idx"`
	Trace []byte `json:"trace"`
}

Jump to

Keyboard shortcuts

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