exitproof

package
v0.1.109 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Overview

Package exitproof generates Polygon PoS exit proofs for L2→L1 token withdrawals.

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:          "exit-proof",
	Short:        "Generate a Polygon PoS exit proof for a burn transaction.",
	Long:         usage,
	Args:         cobra.NoArgs,
	SilenceUsage: true,
	PreRunE: func(cmd *cobra.Command, _ []string) error {
		if err := util.ValidateURL(args.l1RPCURL); err != nil {
			return fmt.Errorf("--l1-rpc-url: %w", err)
		}
		if err := util.ValidateURL(args.l2RPCURL); err != nil {
			return fmt.Errorf("--l2-rpc-url: %w", err)
		}
		if len(args.txHash) != 66 || !strings.HasPrefix(args.txHash, "0x") {
			return fmt.Errorf("--tx-hash must be a 0x-prefixed 32-byte hex string")
		}
		if !common.IsHexAddress(args.rootChainAddr) {
			return fmt.Errorf("--root-chain-address is not a valid hex address: %s", args.rootChainAddr)
		}
		return nil
	},
	RunE: func(cmd *cobra.Command, _ []string) error {
		return run(cmd.Context())
	},
}

Cmd is the cobra command for `polycli pos exit-proof`.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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