Documentation
¶
Index ¶
- type Caller
- func (m *Caller) Address() types.Address
- func (m *Caller) Call(ctx context.Context, number types.BlockNumber, res any) error
- func (m *Caller) CallData() ([]byte, error)
- func (m *Caller) Client() rpc.RPC
- func (m *Caller) DecodeTo(bytes []byte, a any) error
- func (m *Caller) Gas(ctx context.Context, number types.BlockNumber) (uint64, error)
- func (m *Caller) MockAllowAllCalls() *Caller
- func (m *Caller) MockReset(t *testing.T) *Caller
- func (m *Caller) MockResult(result any, err error) *Caller
- func (m *Caller) SendTransaction(ctx context.Context) (*types.Hash, *types.Transaction, error)
- type TypedCaller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Caller ¶
type Caller struct { AddressFn func() types.Address CallDataFn func() ([]byte, error) ClientFn func() rpc.RPC CallFn func(ctx context.Context, number types.BlockNumber, res any) error GasFn func(ctx context.Context, number types.BlockNumber) (uint64, error) SendTransactionFn func(ctx context.Context) (*types.Hash, *types.Transaction, error) DecodeToFn func(bytes []byte, a any) error }
func (*Caller) MockAllowAllCalls ¶
func (*Caller) SendTransaction ¶
type TypedCaller ¶
type TypedCaller[T any] struct { Caller CallFn func(ctx context.Context, number types.BlockNumber) (T, error) DecodeFn func(bytes []byte) (T, error) }
func NewTypedCaller ¶
func NewTypedCaller[T any](t *testing.T) *TypedCaller[T]
func (*TypedCaller[T]) Call ¶
func (m *TypedCaller[T]) Call(ctx context.Context, number types.BlockNumber) (T, error)
func (*TypedCaller[T]) Decode ¶
func (m *TypedCaller[T]) Decode(bytes []byte) (T, error)
func (*TypedCaller[T]) MockReset ¶
func (m *TypedCaller[T]) MockReset(t *testing.T) *TypedCaller[T]
func (*TypedCaller[T]) MockResult ¶
func (m *TypedCaller[T]) MockResult(result T, err error) *TypedCaller[T]
Click to show internal directories.
Click to hide internal directories.