verify

package
v1.16.7 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyVerified   = fmt.Errorf("contract already verified")
	ErrPartiallyVerified = fmt.Errorf("contract is partially verified but cannot be upgraded to full verification")
)

Functions

func AutoVerify added in v1.16.3

func AutoVerify(ctx context.Context, logger log.Logger, rpcUrl string, chainID uint64, stateFile string, artifactsLocator *artifacts.Locator, verifierTypes string, verifierUrl string, apiKey string) error

func ContractPathToName added in v1.16.3

func ContractPathToName(contractPath string) string

func GetArtifactPath added in v1.16.3

func GetArtifactPath(name string) string

GetArtifactPath returns the artifact path for a given contract name

func GetBundleFromFile added in v1.16.3

func GetBundleFromFile(filepath string) (map[string]common.Address, error)

func VerifyCLI

func VerifyCLI(cliCtx *cli.Context) error

Types

type APIChecker added in v1.16.3

type APIChecker interface {
	CanCheck() bool
	CheckStatus(ctx context.Context, address common.Address) (*VerificationStatus, error)
	GetDefaultURL(chainID uint64) (string, error)
	GetChainArg(chainID uint64) (string, error)
}

type ArtifactMetadata added in v1.16.3

type ArtifactMetadata struct {
	ContractPath    string
	CompilerVersion string
	Optimizer       OptimizerSettings
	EVMVersion      string
	Sources         map[string]SourceContent
}

ArtifactMetadata contains processed artifact information

type BlockscoutChecker added in v1.16.3

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

func NewBlockscoutChecker added in v1.16.3

func NewBlockscoutChecker(verifierUrl string, chainID uint64, logger log.Logger) *BlockscoutChecker

func (*BlockscoutChecker) CanCheck added in v1.16.3

func (b *BlockscoutChecker) CanCheck() bool

func (*BlockscoutChecker) CheckStatus added in v1.16.3

func (b *BlockscoutChecker) CheckStatus(ctx context.Context, address common.Address) (*VerificationStatus, error)

func (*BlockscoutChecker) GetChainArg added in v1.16.3

func (b *BlockscoutChecker) GetChainArg(chainID uint64) (string, error)

func (*BlockscoutChecker) GetDefaultURL added in v1.16.3

func (b *BlockscoutChecker) GetDefaultURL(chainID uint64) (string, error)

type EtherscanChecker added in v1.16.3

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

func NewEtherscanChecker added in v1.16.3

func NewEtherscanChecker(apiKey string, chainID uint64, logger log.Logger) *EtherscanChecker

func (*EtherscanChecker) CanCheck added in v1.16.3

func (e *EtherscanChecker) CanCheck() bool

func (*EtherscanChecker) CheckStatus added in v1.16.3

func (e *EtherscanChecker) CheckStatus(ctx context.Context, address common.Address) (*VerificationStatus, error)

func (*EtherscanChecker) GetChainArg added in v1.16.3

func (e *EtherscanChecker) GetChainArg(chainID uint64) (string, error)

func (*EtherscanChecker) GetDefaultURL added in v1.16.3

func (e *EtherscanChecker) GetDefaultURL(chainID uint64) (string, error)

type ForgeVerifier added in v1.16.3

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

func NewForgeVerifier added in v1.16.3

func NewForgeVerifier(opts ForgeVerifierOpts) (*ForgeVerifier, error)

func (*ForgeVerifier) VerifyContract added in v1.16.3

func (v *ForgeVerifier) VerifyContract(ctx context.Context, address common.Address, contractName string) error

func (*ForgeVerifier) VerifyContractWithConstructorArgs added in v1.16.3

func (v *ForgeVerifier) VerifyContractWithConstructorArgs(ctx context.Context, address common.Address, contractName string, constructorArgs string) error

func (*ForgeVerifier) VerifyContracts added in v1.16.3

func (v *ForgeVerifier) VerifyContracts(ctx context.Context, contracts map[string]common.Address) (verified, skipped, partiallyVerified, failed int, failedContracts, partiallyVerifiedContracts []string)

type ForgeVerifierOpts added in v1.16.3

type ForgeVerifierOpts struct {
	RpcUrl       string
	VerifierType string
	VerifierUrl  string
	ApiKey       string
	ChainID      uint64
	ArtifactsFS  foundry.StatDirFs
	Logger       log.Logger
}

type OptimizerSettings

type OptimizerSettings struct {
	Enabled bool `json:"enabled"`
	Runs    int  `json:"runs"`
}

OptimizerSettings represents compiler optimizer configuration

type SourceContent

type SourceContent struct {
	Content string
}

SourceContent represents the content of a source file

type VerificationStatus added in v1.16.3

type VerificationStatus struct {
	IsVerified          bool
	IsFullyVerified     bool
	IsPartiallyVerified bool
}

Jump to

Keyboard shortcuts

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