context

package
v3.0.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: GPL-3.0 Imports: 12 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 {
	ChainID            string        `mapstructure:"chain-id"`             // ChainID of the target chain
	NodeURI            string        `mapstructure:"node"`                 // Remote RPC URI of BandChain node to connect to
	Granter            string        `mapstructure:"granter"`              // The granter address
	GasPrices          string        `mapstructure:"gas-prices"`           // Gas prices of the transaction
	LogLevel           string        `mapstructure:"log-level"`            // Log level of the logger
	MaxMessages        uint64        `mapstructure:"max-messages"`         // The maximum number of messages in a transaction
	BroadcastTimeout   time.Duration `mapstructure:"broadcast-timeout"`    // The time that cylinder will wait for tx commit
	RPCPollInterval    time.Duration `mapstructure:"rpc-poll-interval"`    // The duration of rpc poll interval
	MaxTry             uint64        `mapstructure:"max-try"`              // The maximum number of tries to submit a report transaction
	MinDE              uint64        `mapstructure:"min-de"`               // The minimum number of DE
	GasAdjustStart     float64       `mapstructure:"gas-adjust-start"`     // The start value of gas adjustment
	GasAdjustStep      float64       `mapstructure:"gas-adjust-step"`      // The increment step of gad adjustment
	RandomSecret       tss.Scalar    `mapstructure:"random-secret"`        // The secret value that is used for random D,E
	CheckingDEInterval time.Duration `mapstructure:"checking-de-interval"` // The interval for updating DE
}

Config data structure for Cylinder process.

type Context

type Context struct {
	Config            *Config
	Keyring           keyring.Keyring
	Home              string
	Cdc               codec.Codec             // Codec for serialization.
	TxConfig          client.TxConfig         // Transaction configuration.
	InterfaceRegistry types.InterfaceRegistry // Interface registry for protobuf types.

	Logger *logger.Logger

	ErrCh chan error
	MsgCh chan sdk.Msg

	Store *store.Store
}

Context holds the context information for the Cylinder process.

func NewContext

func NewContext(
	cfg *Config,
	kr keyring.Keyring,
	home string,
	cdc codec.Codec,
	txConfig client.TxConfig,
	interfaceRegistry types.InterfaceRegistry,
) (*Context, error)

NewContext creates a new instance of the Context.

func (*Context) InitLog

func (ctx *Context) InitLog() error

Jump to

Keyboard shortcuts

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