apitypes

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaxResponseSize = 1024 * 1024 * 100 // 100MB

MaxResponseSize is the max size of response

Functions

This section is empty.

Types

type BatchWriter

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

BatchWriter for multiple web3 requests

func NewBatchWriter

func NewBatchWriter(singleWriter Web3ResponseWriter) *BatchWriter

NewBatchWriter returns a new BatchWriter

func (*BatchWriter) Flush

func (w *BatchWriter) Flush() error

Flush writes data in batch buffer

func (*BatchWriter) Write

func (w *BatchWriter) Write(in interface{}) (int, error)

Write adds data into batch buffer

type BlockWithReceipts added in v1.9.0

type BlockWithReceipts struct {
	Block    *block.Block
	Receipts []*action.Receipt
}

BlockWithReceipts includes block and its receipts

type Listener

type Listener interface {
	Start() error
	Stop() error
	ReceiveBlock(*block.Block) error
	AddResponder(Responder) (string, error)
	RemoveResponder(string) (bool, error)
}

Listener pass new block to all responders

type Responder

type Responder interface {
	Respond(string, *block.Block) error
	Exit()
}

Responder responds to new block

type StructLog added in v1.10.1

type StructLog struct {
	Pc            uint64                      `json:"pc"`
	Op            vm.OpCode                   `json:"op"`
	Gas           math.HexOrDecimal64         `json:"gas"`
	GasCost       math.HexOrDecimal64         `json:"gasCost"`
	Memory        hexutil.Bytes               `json:"memory"`
	MemorySize    int                         `json:"memSize"`
	Stack         []uint256.Int               `json:"stack"`
	ReturnData    hexutil.Bytes               `json:"returnData"`
	Storage       map[common.Hash]common.Hash `json:"storage"`
	Depth         int                         `json:"depth"`
	RefundCounter uint64                      `json:"refund"`
	OpName        string                      `json:"opName"`
	ErrorString   string                      `json:"error"`
}

StructLog represents a structured log created during the execution of the EVM.

type Web3ResponseWriter

type Web3ResponseWriter interface {
	Write(interface{}) (int, error)
}

Web3ResponseWriter is writer for web3 request

func NewResponseWriter

func NewResponseWriter(handler func(interface{}) (int, error)) Web3ResponseWriter

NewResponseWriter returns a new responseWriter

Jump to

Keyboard shortcuts

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