client

package
v0.0.0-...-5628e88 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainClient

type ChainClient struct {
	ETHClient

	EthChainID int64
	// contains filtered or unexported fields
}

func NewETHClient

func NewETHClient(endpoint string, ethChainID int64) (*ChainClient, error)

func (ChainClient) GetContractState

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

func (ChainClient) GetETHProof

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

func (ChainClient) GetEthContractState

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

func (ChainClient) GetMockContractState

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

func (ChainClient) MineBlock

func (cl ChainClient) MineBlock(time time.Time) ([]byte, error)

func (ChainClient) WaitForReceiptAndGet

func (cl ChainClient) 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 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