contract

package
v0.104.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: MIT Imports: 19 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand(cfg Config) (*cobra.Command, error)

NewCommand creates the contract command with verify-env subcommand.

func NewVerifyEnvCmd

func NewVerifyEnvCmd(cfg Config) *cobra.Command

NewVerifyEnvCmd creates the verify-env subcommand. Exported for domains that want to add it as a top-level command (e.g. verify-evm) while using the same implementation.

func NewVerifyEnvCmdWithUse

func NewVerifyEnvCmdWithUse(cfg Config, use string) *cobra.Command

NewVerifyEnvCmdWithUse creates the verify command with a custom Use string. Use this when adding as a top-level command with a custom name (e.g. "verify-evm").

Types

type Config

type Config struct {
	Logger                 logger.Logger
	Domain                 domain.Domain
	ContractInputsProvider evm.ContractInputsProvider
	// VerifierHTTPClient is optional; when set, verifiers use it for API calls (e.g. in tests).
	VerifierHTTPClient *http.Client

	Deps Deps
}

Config holds the configuration for contract commands.

func (Config) Validate

func (c Config) Validate() error

Validate checks that all required configuration fields are set.

type DataStoreLoadOptions

type DataStoreLoadOptions struct {
	// FromLocal, when true, always use local files (envdir.DataStore) and ignore domain config.
	// Use for local runs when you want to verify against local datastore only.
	FromLocal bool
}

DataStoreLoadOptions configures how the datastore is loaded.

type DataStoreLoaderFunc

type DataStoreLoaderFunc func(ctx context.Context, envdir domain.EnvDir, lggr logger.Logger, opts DataStoreLoadOptions) (datastore.DataStore, error)

DataStoreLoaderFunc returns a datastore for the given env directory. When opts.FromLocal is false and domain uses catalog datastore, loads from the remote catalog (CI-friendly).

type Deps

type Deps struct {
	NetworkLoader   NetworkLoaderFunc
	DataStoreLoader DataStoreLoaderFunc
}

Deps holds injectable dependencies.

type NetworkLoaderFunc

type NetworkLoaderFunc func(env string, dom domain.Domain) (*cfgnet.Config, error)

NetworkLoaderFunc loads network configuration for an environment.

Jump to

Keyboard shortcuts

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