types

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReqID added in v0.12.0

type ReqID [32]byte

ReqID is a inbox request ID.

func (ReqID) String added in v0.12.0

func (r ReqID) String() string

String returns the Uint64 representation of the req ID as a string.

func (ReqID) Uint64 added in v0.12.0

func (r ReqID) Uint64() uint64

Uint64 returns the req ID as a BigEndian uint64 (monotonically incrementing number).

type Target

type Target interface {
	// Name of the target
	Name() string

	// ChainID returns the chain ID of the target contract.
	ChainID() uint64

	// Address returns the address of the target contract.
	Address() common.Address

	// TokenPrereqs returns the token prerequisites required for the call.
	TokenPrereqs(call bindings.SolveCall) ([]bindings.SolveTokenPrereq, error)

	// Verify returns an error if the call should not be fulfilled.
	// TODO(corver): Return reject reason.
	Verify(srcChainID uint64, call bindings.SolveCall, deposits []bindings.SolveDeposit) error

	// LogCall logs the call for debugging purposes.
	LogCall(ctx context.Context, call bindings.SolveCall) error

	// LogMetadata logs target metadata.
	LogMetadata(ctx context.Context)
}

Target is the interface for a target contract the solver can interact with.

Jump to

Keyboard shortcuts

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