context

package
v3.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: GPL-3.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Validator is the address used to submit prices.
	Validator string `mapstructure:"validator"`

	// NodeURIs are the BandChain RPC URIs to connect to.
	NodeURIs string `mapstructure:"nodes"`

	// ChainID is the target BandChain chain ID.
	ChainID string `mapstructure:"chain-id"`

	// BroadcastTimeout is the duration Grogu will wait for a transaction commit.
	BroadcastTimeout time.Duration `mapstructure:"broadcast-timeout"`

	// RPCPollInterval is the duration between RPC polls.
	RPCPollInterval time.Duration `mapstructure:"rpc-poll-interval"`

	// MaxTry is the maximum number of attempts to submit a transaction.
	MaxTry uint64 `mapstructure:"max-try"`

	// GasPrices is the gas price set for each transaction.
	GasPrices string `mapstructure:"gas-prices"`

	// GasAdjustStart is the gas adjustment start value.
	GasAdjustStart float64 `mapstructure:"gas-adjust-start"`

	// GasAdjustStep is the gas adjustment step for each transaction.
	GasAdjustStep float64 `mapstructure:"gas-adjust-step"`

	// DistributionStartPercentage defines the initial percentage for price distribution.
	DistributionStartPercentage uint64 `mapstructure:"distribution-start-pct"`

	// DistributionOffsetPercentage defines the range of the percentage for price distribution.
	DistributionOffsetPercentage uint64 `mapstructure:"distribution-offset-pct"`

	// Bothan is the URL for connecting to Bothan.
	Bothan string `mapstructure:"bothan"`

	// BothanTimeout is the timeout duration for Bothan requests.
	BothanTimeout time.Duration `mapstructure:"bothan-timeout"`

	// LogLevel is the level of logging for the logger.
	LogLevel string `mapstructure:"log-level"`

	// UpdaterQueryInterval is the interval for updater querying chain.
	UpdaterQueryInterval time.Duration `mapstructure:"updater-query-interval"`

	// MetricsListenAddr is an address to use for metrics server
	MetricsListenAddr string `mapstructure:"metrics-listen-addr"`
}

Config holds the configuration settings for the application.

type Context

type Context struct {
	Config         Config
	Keyring        keyring.Keyring
	Logger         *logger.Logger
	Home           string
	EncodingConfig params.EncodingConfig
}

Context holds the runtime context for the application.

func New

func New(
	cfg Config,
	kr keyring.Keyring,
	logger *logger.Logger,
	home string,
	encodingConfig params.EncodingConfig,
) *Context

Jump to

Keyboard shortcuts

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