client

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewBesuClient

func NewBesuClient(endpoint string, clientType string) (*Client, error)

func NewETHClient

func NewETHClient(endpoint string, clientType string) (*Client, error)

func (Client) ClientType

func (cl Client) ClientType() string

func (Client) GetContractState

func (cl Client) GetContractState(ctx context.Context, address common.Address, storageKeys [][]byte, bn *big.Int) (ContractState, error)

func (Client) GetETHProof

func (cl Client) GetETHProof(address common.Address, storageKeys [][]byte, blockNumber *big.Int) (*ETHProof, error)

func (Client) GetIBFT2ContractState

func (cl Client) GetIBFT2ContractState(ctx context.Context, address common.Address, storageKeys [][]byte, bn *big.Int) (ContractState, error)

func (Client) GetMockContractState

func (cl Client) GetMockContractState(ctx context.Context, address common.Address, storageKeys [][]byte, bn *big.Int) (ContractState, error)

func (Client) WaitForReceiptAndGet

func (cl Client) WaitForReceiptAndGet(ctx context.Context, tx *gethtypes.Transaction) (Receipt, error)

type ContractState

type ContractState interface {
	Header() *gethtypes.Header
	ETHProof() *ETHProof
}

type ETHClient

type ETHClient interface {
	bind.ContractBackend
	BlockByNumber(ctx context.Context, bn *big.Int) (*gethtypes.Block, error)
	TransactionReceipt(ctx context.Context, txHash common.Hash) (Receipt, error)
}

type ETHContractState

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

func (ETHContractState) ETHProof

func (cs ETHContractState) ETHProof() *ETHProof

func (ETHContractState) Header

func (cs ETHContractState) Header() *gethtypes.Header

type ETHProof

type ETHProof struct {
	AccountProofRLP []byte
	StorageProofRLP [][]byte
}

type GenTxOpts

type GenTxOpts func(ctx context.Context) *bind.TransactOpts

func MakeGenTxOpts

func MakeGenTxOpts(chainID *big.Int, prv *ecdsa.PrivateKey) GenTxOpts

type IBFT2ContractState

type IBFT2ContractState struct {
	ParsedHeader *chains.ParsedHeader

	CommitSeals [][]byte
	// contains filtered or unexported fields
}

func (IBFT2ContractState) ChainHeaderRLP

func (cs IBFT2ContractState) ChainHeaderRLP() []byte

func (IBFT2ContractState) ETHProof

func (cs IBFT2ContractState) ETHProof() *ETHProof

func (IBFT2ContractState) GetCommitSeals

func (cs IBFT2ContractState) GetCommitSeals() [][]byte

func (IBFT2ContractState) Header

func (cs IBFT2ContractState) Header() *gethtypes.Header

func (IBFT2ContractState) SealingHeaderRLP

func (cs IBFT2ContractState) SealingHeaderRLP() []byte

func (IBFT2ContractState) Validators

func (cs IBFT2ContractState) Validators() [][]byte

type Receipt

type Receipt interface {
	PostState() []byte
	Status() uint64
	CumulativeGasUsed() uint64
	Bloom() gethtypes.Bloom
	Logs() []*gethtypes.Log
	TxHash() common.Hash
	ContractAddress() common.Address
	GasUsed() uint64
	BlockHash() common.Hash
	BlockNumber() *big.Int
	TransactionIndex() uint
	RevertReason() string
}

Jump to

Keyboard shortcuts

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