config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package config contains the parsers for the config files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetConfig

type AssetConfig struct {
	Address string `yaml:"address"`
	ChainID uint32 `yaml:"chainid"`
}

AssetConfig represents the configuration for each asset.

type ChainConfig

type ChainConfig struct {
	ChainID                 uint32 `yaml:"chainId"`
	RPCURL                  string `yaml:"rpcUrl"`
	FastBridgeAddress       string `yaml:"fastBridgeContract"`
	FastBridgeBlockDeployed uint64 `yaml:"fastBridgeBlockDeployed"`
	PollInterval            int    `yaml:"pollInterval"`
	MaxGetLogsRange         uint64 `yaml:"maxGetLogsRange"`
	Confirmations           uint64 `yaml:"confirmations"`
}

ChainConfig represents the configuration for each chain.

type Config

type Config struct {
	Chains         map[uint32]ChainConfig `yaml:"chains"`
	Database       DatabaseConfig         `yaml:"database"`
	Assets         []AssetConfig          `yaml:"assets"`
	RelayerAddress string                 `yaml:"relayer_address"`
	// (this is signer used to submit transactions)
	Signer            ethConfig.SignerConfig `yaml:"unbonded_signer"`
	SubmitterConfig   submitterConfig.Config `yaml:"submitter_config"`
	OmnirpcURL        string                 `yaml:"omnirpc_url"`
	MaxQueueSize      int                    `yaml:"max_queue_size"`
	Deadline          int64                  `yaml:"deadline"`
	QueuePollInterval int                    `yaml:"queue_poll_interval"`
	SkipMigrations    bool                   `yaml:"skip_migrations"`
	RFQURL            string                 `yaml:"rfq_url"`
}

Config represents the application's configuration structure.

func DecodeConfig

func DecodeConfig(filePath string) (cfg Config, err error)

DecodeConfig parses in a config from a file.

type DatabaseConfig

type DatabaseConfig struct {
	Type string `yaml:"type"`
	DSN  string `yaml:"dsn"` // Data Source Name
}

DatabaseConfig represents the configuration for the database.

Jump to

Keyboard shortcuts

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