gethencoding

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CallFieldFrom = "from"
)

Variables

This section is empty.

Functions

func ExtractAddress

func ExtractAddress(param interface{}) (*gethcommon.Address, error)

ExtractAddress returns a gethcommon.Address given an interface{}, errors if unexpected values are used

func ExtractBlockNumber

func ExtractBlockNumber(param interface{}) (*gethrpc.BlockNumberOrHash, error)

func ExtractEthCall

func ExtractEthCall(param interface{}) (*gethapi.TransactionArgs, error)

ExtractEthCall extracts the eth_call gethapi.TransactionArgs from an interface{}

func ExtractEthCallMapString

func ExtractEthCallMapString(paramBytes interface{}) (map[string]string, error)

ExtractEthCallMapString extracts the eth_call gethapi.TransactionArgs from an interface{} it ensures that : - All types are string - All keys are lowercase - There is only one key per value - From field is set by default

func ExtractOptionalBlockNumber

func ExtractOptionalBlockNumber(params []interface{}, idx int) (*gethrpc.BlockNumberOrHash, error)

ExtractOptionalBlockNumber defaults nil or empty block number params to latest block number

func ExtractPrivateCustomQuery

func ExtractPrivateCustomQuery(_ interface{}, query interface{}) (*common.PrivateCustomQueryListTransactions, error)

Types

type EncodingService added in v0.21.0

type EncodingService interface {
	CreateEthHeaderForBatch(h *common.BatchHeader) (*types.Header, error)
	CreateEthBlockFromBatch(b *core.Batch) (*types.Block, error)
}

EncodingService handles conversion to Geth data structures

func NewGethEncodingService added in v0.21.0

func NewGethEncodingService(storage storage.Storage, logger gethlog.Logger) EncodingService

Jump to

Keyboard shortcuts

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