Documentation ¶
Index ¶
- type Env
- func (e *Env) Accounts() []common.Address
- func (e *Env) Balance(address common.Address) *big.Int
- func (e *Env) BalanceAt(address common.Address, blockNumber *big.Int) *big.Int
- func (e *Env) BlockByHash(hash common.Hash) *types.Block
- func (e *Env) BlockByNumber(number *big.Int) *types.Block
- func (e *Env) BlockNumber() uint64
- func (e *Env) BlockTransactionCountByHash(hash common.Hash) uint
- func (e *Env) BlockTransactionCountByNumber() uint
- func (e *Env) Code(address common.Address) []byte
- func (e *Env) DeployEVMContract(creator *ecdsa.PrivateKey, contractABI abi.ABI, contractBytecode []byte, ...) (*types.Transaction, *types.Receipt, common.Address)
- func (e *Env) MustSendTransaction(args *jsonrpc.SendTxArgs) common.Hash
- func (e *Env) MustTxReceipt(hash common.Hash) *types.Receipt
- func (e *Env) NonceAt(address common.Address) uint64
- func (e *Env) SendTransaction(args *jsonrpc.SendTxArgs) (common.Hash, error)
- func (e *Env) SendTransactionAndWait(tx *types.Transaction) (*types.Receipt, error)
- func (e *Env) Sign(address common.Address, data []byte) []byte
- func (e *Env) SignTransaction(args *jsonrpc.SendTxArgs) []byte
- func (e *Env) Signer() types.Signer
- func (e *Env) Storage(address common.Address, key common.Hash) []byte
- func (e *Env) TestGasPrice()
- func (e *Env) TestRPCAccessHistoricalState()
- func (e *Env) TestRPCGasLimitTooLow()
- func (e *Env) TestRPCGetLogs()
- func (e *Env) TestRPCInvalidNonce()
- func (e *Env) TransactionByBlockHashAndIndex(blockHash common.Hash, index uint) *types.Transaction
- func (e *Env) TransactionByBlockNumberAndIndex(blockNumber *big.Int, index uint) (*jsonrpc.RPCTransaction, error)
- func (e *Env) TransactionByHash(hash common.Hash) *types.Transaction
- func (e *Env) TxReceipt(hash common.Hash) (*types.Receipt, error)
- func (e *Env) UncleByBlockHashAndIndex(blockHash common.Hash, index uint) map[string]interface{}
- func (e *Env) UncleByBlockNumberAndIndex(blockNumber *big.Int, index uint) map[string]interface{}
- func (e *Env) UncleCountByBlockHash(hash common.Hash) uint
- func (e *Env) UncleCountByBlockNumber(blockNumber *big.Int) uint
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 NewAccountWithL2Funds func(baseTokens ...uint64) (*ecdsa.PrivateKey, common.Address) // contains filtered or unexported fields }
Env is a testing environment for the EVM JSON-RPC support, allowing to run the same tests with both Solo and cluster backends.
func (*Env) BlockNumber ¶
func (*Env) BlockTransactionCountByHash ¶
func (*Env) BlockTransactionCountByNumber ¶
func (*Env) DeployEVMContract ¶
func (*Env) MustSendTransaction ¶
func (e *Env) MustSendTransaction(args *jsonrpc.SendTxArgs) common.Hash
func (*Env) SendTransaction ¶
func (*Env) SendTransactionAndWait ¶ added in v0.3.0
func (*Env) SignTransaction ¶
func (e *Env) SignTransaction(args *jsonrpc.SendTxArgs) []byte
func (*Env) TestGasPrice ¶ added in v1.0.3
func (e *Env) TestGasPrice()
func (*Env) TestRPCAccessHistoricalState ¶ added in v1.0.3
func (e *Env) TestRPCAccessHistoricalState()
func (*Env) TestRPCGasLimitTooLow ¶ added in v0.3.0
func (e *Env) TestRPCGasLimitTooLow()
func (*Env) TestRPCGetLogs ¶
func (e *Env) TestRPCGetLogs()
func (*Env) TestRPCInvalidNonce ¶
func (e *Env) TestRPCInvalidNonce()
func (*Env) TransactionByBlockHashAndIndex ¶
func (*Env) TransactionByBlockNumberAndIndex ¶
func (*Env) TransactionByHash ¶
func (e *Env) TransactionByHash(hash common.Hash) *types.Transaction
func (*Env) UncleByBlockHashAndIndex ¶
func (*Env) UncleByBlockNumberAndIndex ¶
Click to show internal directories.
Click to hide internal directories.