Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2025 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// URL is the URL of the Ethereum node for L1
	URL string `mapstructure:"URL"`

	EthermanConfig etherman.Config

	// ForkIDChunkSize is the max interval for each call to L1 provider to get the forkIDs
	ForkIDChunkSize uint64 `mapstructure:"ForkIDChunkSize"`
}

Config represents the configuration of the etherman

type L1Config

type L1Config struct {
	// Chain ID of the L1 network
	L1ChainID uint64 `json:"chainId"`
	// ZkEVMAddr Address of the L1 contract polygonZkEVMAddress
	ZkEVMAddr common.Address `json:"polygonZkEVMAddress"`
	// RollupManagerAddr Address of the L1 contract
	RollupManagerAddr common.Address `json:"polygonRollupManagerAddress"`
	// PolAddr Address of the L1 Pol token Contract
	PolAddr common.Address `json:"polTokenAddress"`
	// GlobalExitRootManagerAddr Address of the L1 GlobalExitRootManager contract
	GlobalExitRootManagerAddr common.Address `json:"polygonZkEVMGlobalExitRootAddress"`
}

L1Config represents the configuration of the network used in L1

type RPCClientConfig added in v0.1.0

type RPCClientConfig struct {
	URL         string         `mapstructure:"URL"`
	Mode        RPCMode        `jsonschema:"enum=basic, enum=op" mapstructure:"Mode"`
	ExtraParams map[string]any `jsonschema:"omitempty" mapstructure:",remain"`
}

func (RPCClientConfig) GetString added in v0.1.0

func (c RPCClientConfig) GetString(key string) (string, error)

type RPCMode added in v0.1.0

type RPCMode string
var (
	RPCModeBasic RPCMode = "basic"
	RPCModeOp    RPCMode = "op"
)

Jump to

Keyboard shortcuts

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