config

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: AGPL-3.0, AGPL-3.0-or-later Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadFromFile

func LoadFromFile(configFilePath string, target interface{}) error

Types

type BigInt added in v0.0.12

type BigInt struct {
	*big.Int
}

BigInt handles both numeric and string JSON encodings for balances.

func (BigInt) MarshalJSON added in v0.0.12

func (b BigInt) MarshalJSON() ([]byte, error)

func (*BigInt) UnmarshalJSON added in v0.0.12

func (b *BigInt) UnmarshalJSON(data []byte) error

type GenesisAccount added in v0.0.12

type GenesisAccount struct {
	ContractName string                      `json:"contractName,omitempty"`
	AccountName  string                      `json:"accountName,omitempty"`
	Balance      BigInt                      `json:"balance"`
	Nonce        uint64                      `json:"nonce,string"`
	Address      common.Address              `json:"address"`
	Bytecode     string                      `json:"bytecode,omitempty"`
	Storage      map[common.Hash]common.Hash `json:"storage,omitempty"`
}

GenesisAccount represents a single account or contract entry within the genesis array.

type GenesisAllocs added in v0.0.12

type GenesisAllocs struct {
	Root    common.Hash      `json:"root"`
	Genesis []GenesisAccount `json:"genesis"`
}

GenesisAllocs represents the full genesis JSON structure.

func LoadGenesisAllocs

func LoadGenesisAllocs(baseDir, genesisPath string) (*GenesisAllocs, error)

LoadGenesisAllocs loads the genessis allocations from the provided baseDir followed by the relative path of the genesis allocs file

type RPCConfig

type RPCConfig struct {
	ChainID uint64
	URL     string
}

type RPCs

type RPCs struct {
	Networks map[string]RPCConfig
}

func Load

func Load(l1Network, rmAlias, rAlias, baseDir string) (*RPCs, *rollupmanager.RollupManager, *rollup.RollupMetadata, error)

Load RPCs configuration, rollup manager metadata and rollup metadata

func LoadRPCs

func LoadRPCs() (*RPCs, error)

func (*RPCs) GetChainID

func (r *RPCs) GetChainID(network string) (uint64, error)

func (*RPCs) GetClient

func (r *RPCs) GetClient(network string) (*ethclient.Client, error)

Jump to

Keyboard shortcuts

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