test

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbiBasedRpc

type AbiBasedRpc struct {
	RpcStub
	// contains filtered or unexported fields
}

func NewAbiBasedRpc

func NewAbiBasedRpc(t *testing.T, to common.Address, contractAbi *abi.ABI) *AbiBasedRpc

func (*AbiBasedRpc) AddContract

func (l *AbiBasedRpc) AddContract(to common.Address, contractAbi *abi.ABI)

func (*AbiBasedRpc) SetResponse

func (l *AbiBasedRpc) SetResponse(to common.Address, method string, block rpcblock.Block, expected []interface{}, output []interface{})

func (*AbiBasedRpc) VerifyTxCandidate

func (l *AbiBasedRpc) VerifyTxCandidate(candidate txmgr.TxCandidate)

type ExpectedRpcCall added in v1.4.0

type ExpectedRpcCall interface {
	fmt.Stringer
	Matches(rpcMethod string, args ...interface{}) error
	Execute(t *testing.T, out interface{})
}

func NewGetBalanceCall added in v1.4.0

func NewGetBalanceCall(addr common.Address, block rpcblock.Block, balance *big.Int) ExpectedRpcCall

type GenericExpectedCall added in v1.4.0

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

func (*GenericExpectedCall) Execute added in v1.4.0

func (c *GenericExpectedCall) Execute(t *testing.T, out interface{})

func (*GenericExpectedCall) Matches added in v1.4.0

func (c *GenericExpectedCall) Matches(rpcMethod string, args ...interface{}) error

func (*GenericExpectedCall) String added in v1.4.0

func (c *GenericExpectedCall) String() string

type RpcStub added in v1.4.0

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

func NewRpcStub added in v1.4.0

func NewRpcStub(t *testing.T) *RpcStub

func (*RpcStub) AddExpectedCall added in v1.4.0

func (r *RpcStub) AddExpectedCall(call ExpectedRpcCall)

func (*RpcStub) BatchCallContext added in v1.4.0

func (r *RpcStub) BatchCallContext(ctx context.Context, b []rpc.BatchElem) error

func (*RpcStub) CallContext added in v1.4.0

func (r *RpcStub) CallContext(_ context.Context, out interface{}, method string, args ...interface{}) error

func (*RpcStub) ClearResponses added in v1.4.0

func (r *RpcStub) ClearResponses()

Jump to

Keyboard shortcuts

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