gethencoding

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CallFieldFrom = "from"
)

Variables

This section is empty.

Functions

func CreateEthBlockFromBatch

func CreateEthBlockFromBatch(b *core.Batch) (*types.Block, error)

func CreateEthHeaderForBatch

func CreateEthHeaderForBatch(h *common.BatchHeader, secret []byte) (*types.Header, error)

CreateEthHeaderForBatch - the EVM requires an Ethereum "block" header. In this function we are creating one from the Batch Header

func DecodeParamBytes

func DecodeParamBytes(paramBytes []byte) ([]interface{}, error)

DecodeParamBytes decodes the parameters byte array into a slice of interfaces Helps each calling method to manage the positional data

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.BlockNumber, error)

ExtractBlockNumber returns a gethrpc.BlockNumber given an interface{}, errors if unexpected values are used

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.BlockNumber, error)

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

func ExtractPrivateCustomQuery

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

func ExtractViewingKey

func ExtractViewingKey(vkBytesIntf interface{}) ([]byte, []byte, error)

ExtractViewingKey returns the viewingkey pubkey and the signature from the request

Types

This section is empty.

Jump to

Keyboard shortcuts

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