flags

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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const EnvVarPrefix = "OP_INTEROP_FILTER"

Variables

View Source
var (
	L2RPCsFlag = &cli.StringSliceFlag{
		Name:    "l2-rpcs",
		Usage:   "L2 RPC endpoints to connect to (chain ID is queried from each endpoint and matched to rollup configs)",
		EnvVars: prefixEnvVars("L2_RPCS"),
	}
	NetworksFlag = &cli.StringSliceFlag{
		Name:    "networks",
		Usage:   fmt.Sprintf("Predefined networks to load rollup configs from. Available: %s", strings.Join(chaincfg.AvailableNetworks(), ", ")),
		EnvVars: prefixEnvVars("NETWORKS"),
	}
	RollupConfigsFlag = &cli.StringSliceFlag{
		Name:    "rollup-configs",
		Usage:   "Paths to custom rollup config JSON files (for dev/test chains not in superchain registry)",
		EnvVars: prefixEnvVars("ROLLUP_CONFIGS"),
	}
	DataDirFlag = &cli.StringFlag{
		Name:    "data-dir",
		Usage:   "Directory for LogsDB storage. If empty, uses a temporary directory",
		EnvVars: prefixEnvVars("DATA_DIR"),
		Value:   "",
	}
	BackfillDurationFlag = &cli.StringFlag{
		Name:    "backfill-duration",
		Usage:   "Duration to backfill on startup (e.g., 24h, 30m, 1h30m)",
		EnvVars: prefixEnvVars("BACKFILL_DURATION"),
		Value:   "24h",
	}
	MessageExpiryWindowFlag = &cli.StringFlag{
		Name:    "message-expiry-window",
		Usage:   "Message expiry window duration (e.g., 168h for 7 days). Messages older than this are considered expired.",
		EnvVars: prefixEnvVars("MESSAGE_EXPIRY_WINDOW"),
		Value:   "168h",
	}
	JWTSecretFlag = &cli.StringFlag{
		Name: "admin.jwt-secret",
		Usage: "Path to JWT secret key for admin RPC authentication. " +
			"Keys are 32 bytes, hex encoded in a file. " +
			"A new key will be generated if the file is missing. " +
			"Required when admin.rpc.addr is set.",
		EnvVars:   prefixEnvVars("ADMIN_JWT_SECRET"),
		Value:     "",
		TakesFile: true,
	}
	AdminRPCAddrFlag = &cli.StringFlag{
		Name:    "admin.rpc.addr",
		Usage:   "Address to bind admin RPC server. If empty, admin RPC is disabled.",
		EnvVars: prefixEnvVars("ADMIN_RPC_ADDR"),
		Value:   "",
	}
	AdminRPCPortFlag = &cli.IntFlag{
		Name:    "admin.rpc.port",
		Usage:   "Port to bind admin RPC server.",
		EnvVars: prefixEnvVars("ADMIN_RPC_PORT"),
		Value:   8546,
	}
	RPCAddrFlag = &cli.StringFlag{
		Name:    "rpc.addr",
		Usage:   "RPC listening address",
		EnvVars: prefixEnvVars("RPC_ADDR"),
		Value:   "0.0.0.0",
	}
	RPCPortFlag = &cli.IntFlag{
		Name:    "rpc.port",
		Usage:   "RPC listening port",
		EnvVars: prefixEnvVars("RPC_PORT"),
		Value:   8545,
	}
	PollIntervalFlag = &cli.StringFlag{
		Name:    "poll-interval",
		Usage:   "Interval for polling new blocks from L2 RPCs (e.g., 2s, 500ms)",
		EnvVars: prefixEnvVars("POLL_INTERVAL"),
		Value:   "2s",
	}
	ValidationIntervalFlag = &cli.StringFlag{
		Name:    "validation-interval",
		Usage:   "Interval for cross-chain validation loop (e.g., 500ms, 1s)",
		EnvVars: prefixEnvVars("VALIDATION_INTERVAL"),
		Value:   "500ms",
	}
)
View Source
var Flags []cli.Flag

Functions

func CheckRequired

func CheckRequired(ctx *cli.Context) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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