var (
// ErrNoCode is returned by call and transact operations for which the requested
// recipient contract to operate on does not exist in the state db or does not
// have any code associated with it (i.e. suicided).ErrNoCode = errors.New("no contract code at given address")
// This error is raised when attempting to perform a pending state action
// on a backend that doesn't implement PendingContractCaller.ErrNoPendingState = errors.New("backend does not support pending state")
// This error is returned by WaitDeployed if contract creation leaves an
// empty contract behind.ErrNoCodeAfterDeploy = errors.New("no contract code after deployment")
)

Bind generates a Go wrapper around a contract ABI. This wrapper isn't meant
to be used as is in client code, but rather as an intermediate struct which
enforces compile time type safety and naming convention opposed to having to
manually maintain hard coded strings that break on runtime.

Call invokes the (constant) contract method with params as input values and
sets the output to result. The result type might be a single field for simple
returns, a slice of interfaces for anonymous returns and a struct for named
returns.

type CallOpts struct {
Pendingbool// Whether to operate on the pending state or the last known oneFromcommon.Address// Optional the sender address, otherwise the first account is usedBlockNumber *big.Int// Optional the block number on which the call should be performedContextcontext.Context// Network context to support cancellation and timeouts (nil = no timeout)
}

CallOpts is the collection of options to fine tune a contract call request.

type ContractTransactor interface {
// PendingCodeAt returns the code of the given account in the pending state.PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)
// PendingNonceAt retrieves the current pending nonce associated with an account.PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
// SuggestGasPrice retrieves the currently suggested gas price to allow a timely
// execution of a transaction.SuggestGasPrice(ctx context.Context) (*big.Int, error)
// EstimateGas tries to estimate the gas needed to execute a specific
// transaction based on the current pending state of the backend blockchain.
// There is no guarantee that this is the true gas limit requirement as other
// transactions may be added or removed by miners, but it should provide a basis
// for setting a reasonable default.EstimateGas(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error)
// SendTransaction injects the transaction into the pending pool for execution.SendTransaction(ctx context.Context, tx *types.Transaction) error
}

ContractTransactor defines the methods needed to allow operating with contract
on a write only basis. Beside the transacting method, the remainder are helpers
used when the user does not provide some needed values, but rather leaves it up
to the transactor to decide.

PendingContractCaller defines methods to perform contract calls on the pending state.
Call will try to discover this interface when access to the pending state is requested.
If the backend does not support the pending state, Call returns ErrNoPendingState.

type TransactOpts struct {
Fromcommon.Address// Ethereum account to send the transaction fromNonce *big.Int// Nonce to use for the transaction execution (nil = use pending state)SignerSignerFn// Method to use for signing the transaction (mandatory)Value *big.Int// Funds to transfer along along the transaction (nil = 0 = no funds)GasPrice *big.Int// Gas price to use for the transaction execution (nil = gas price oracle)GasLimituint64// Gas limit to set for the transaction execution (0 = estimate)Contextcontext.Context// Network context to support cancellation and timeouts (nil = no timeout)
}

TransactOpts is the collection of authorization data required to create a
valid Ethereum transaction.