jsonrpctest

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: Apache-2.0, BSD-2-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env struct {
	T         *testing.T
	Client    *ethclient.Client
	RawClient *rpc.Client
	ChainID   uint16

	WaitTxConfirmed func(common.Hash) error
	// contains filtered or unexported fields
}

func (*Env) Accounts

func (e *Env) Accounts() []common.Address

func (*Env) Balance

func (e *Env) Balance(address common.Address) *big.Int

func (*Env) BlockByHash

func (e *Env) BlockByHash(hash common.Hash) *types.Block

func (*Env) BlockByNumber

func (e *Env) BlockByNumber(number *big.Int) *types.Block

func (*Env) BlockNumber

func (e *Env) BlockNumber() uint64

func (*Env) BlockTransactionCountByHash

func (e *Env) BlockTransactionCountByHash(hash common.Hash) uint

func (*Env) BlockTransactionCountByNumber

func (e *Env) BlockTransactionCountByNumber() uint

func (*Env) Code

func (e *Env) Code(address common.Address) []byte

func (*Env) DeployEVMContract

func (e *Env) DeployEVMContract(creator *ecdsa.PrivateKey, contractABI abi.ABI, contractBytecode []byte, args ...interface{}) (*types.Transaction, *types.Receipt, common.Address)

func (*Env) MustSendTransaction

func (e *Env) MustSendTransaction(args *jsonrpc.SendTxArgs) common.Hash

func (*Env) MustTxReceipt

func (e *Env) MustTxReceipt(hash common.Hash) *types.Receipt

func (*Env) NonceAt

func (e *Env) NonceAt(address common.Address) uint64

func (*Env) SendTransaction

func (e *Env) SendTransaction(args *jsonrpc.SendTxArgs) (common.Hash, error)

func (*Env) SendTransactionAndWait added in v0.3.0

func (e *Env) SendTransactionAndWait(tx *types.Transaction) (*types.Receipt, error)

func (*Env) Sign

func (e *Env) Sign(address common.Address, data []byte) []byte

func (*Env) SignTransaction

func (e *Env) SignTransaction(args *jsonrpc.SendTxArgs) []byte

func (*Env) Signer added in v0.3.0

func (e *Env) Signer() types.Signer

func (*Env) Storage

func (e *Env) Storage(address common.Address, key common.Hash) []byte

func (*Env) TestRPCGasLimitTooLow added in v0.3.0

func (e *Env) TestRPCGasLimitTooLow(newAccountWithL2Funds FuncNewAccountWithL2Funds)

func (*Env) TestRPCGetLogs

func (e *Env) TestRPCGetLogs(newAccountWithL2Funds FuncNewAccountWithL2Funds)

func (*Env) TestRPCInvalidNonce

func (e *Env) TestRPCInvalidNonce(newAccountWithL2Funds FuncNewAccountWithL2Funds)

func (*Env) TransactionByBlockHashAndIndex

func (e *Env) TransactionByBlockHashAndIndex(blockHash common.Hash, index uint) *types.Transaction

func (*Env) TransactionByBlockNumberAndIndex

func (e *Env) TransactionByBlockNumberAndIndex(blockNumber *big.Int, index uint) *jsonrpc.RPCTransaction

func (*Env) TransactionByHash

func (e *Env) TransactionByHash(hash common.Hash) *types.Transaction

func (*Env) TxReceipt

func (e *Env) TxReceipt(hash common.Hash) (*types.Receipt, error)

func (*Env) UncleByBlockHashAndIndex

func (e *Env) UncleByBlockHashAndIndex(blockHash common.Hash, index uint) map[string]interface{}

func (*Env) UncleByBlockNumberAndIndex

func (e *Env) UncleByBlockNumberAndIndex(blockNumber *big.Int, index uint) map[string]interface{}

func (*Env) UncleCountByBlockHash

func (e *Env) UncleCountByBlockHash(hash common.Hash) uint

func (*Env) UncleCountByBlockNumber

func (e *Env) UncleCountByBlockNumber(blockNumber *big.Int) uint

type FuncNewAccountWithL2Funds added in v0.3.0

type FuncNewAccountWithL2Funds func(baseTokens ...uint64) (*ecdsa.PrivateKey, common.Address)

Jump to

Keyboard shortcuts

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