Documentation ¶
Index ¶
- Constants
- Variables
- func NewConfigs(cfgs chains.ConfigsV2[string, db.Node]) types.Configs
- type Chain
- type ChainSetOpts
- type CosmosConfig
- func (c *CosmosConfig) Bech32Prefix() string
- func (c *CosmosConfig) BlockRate() time.Duration
- func (c *CosmosConfig) BlocksUntilTxTimeout() int64
- func (c *CosmosConfig) ConfirmPollPeriod() time.Duration
- func (c *CosmosConfig) FallbackGasPrice() sdk.Dec
- func (c *CosmosConfig) FeeToken() string
- func (c *CosmosConfig) GasLimitMultiplier() float64
- func (c *CosmosConfig) IsEnabled() bool
- func (c *CosmosConfig) MaxMsgsPerBatch() int64
- func (c *CosmosConfig) OCR2CachePollPeriod() time.Duration
- func (c *CosmosConfig) OCR2CacheTTL() time.Duration
- func (c *CosmosConfig) SetFrom(f *CosmosConfig)
- func (c *CosmosConfig) TOMLString() (string, error)
- func (c *CosmosConfig) TxMsgTimeout() time.Duration
- func (c *CosmosConfig) ValidateConfig() (err error)
- type CosmosConfigs
- func (cs CosmosConfigs) Chains(ids ...string) (r []relaytypes.ChainStatus, err error)
- func (cs CosmosConfigs) Node(name string) (n db.Node, err error)
- func (cs CosmosConfigs) NodeStatus(name string) (n relaytypes.NodeStatus, err error)
- func (cs CosmosConfigs) NodeStatuses(chainIDs ...string) (ns []relaytypes.NodeStatus, err error)
- func (cs CosmosConfigs) Nodes(chainID string) (ns []db.Node, err error)
- func (cs *CosmosConfigs) SetFrom(fs *CosmosConfigs) (err error)
- func (cs CosmosConfigs) ValidateConfig() (err error)
- type CosmosNodes
- type LegacyChainContainer
- type LegacyChains
- type LoopRelayerChainer
- type LoopRelayerSingleChain
- type SingleChainSet
Constants ¶
View Source
const DefaultRequestTimeout = 30 * time.Second
DefaultRequestTimeout is the default Cosmos client timeout. Note that while the cosmos node is processing a heavy block, requests can be delayed significantly (https://github.com/tendermint/tendermint/issues/6899), however there's nothing we can do but wait until the block is processed. So we set a fairly high timeout here. TODO(BCI-979): Remove this, or make this configurable with the updated client.
Variables ¶
View Source
var ( // ErrChainIDEmpty is returned when chain is required but was empty. ErrChainIDEmpty = errors.New("chain id empty") // ErrChainIDInvalid is returned when a chain id does not match any configured chains. ErrChainIDInvalid = errors.New("chain id does not match any local chains") )
Functions ¶
Types ¶
type ChainSetOpts ¶
type ChainSetOpts struct { QueryConfig pg.QConfig Logger logger.Logger DB *sqlx.DB KeyStore keystore.Cosmos EventBroadcaster pg.EventBroadcaster Configs types.Configs }
ChainSetOpts holds options for configuring a ChainSet.
func (*ChainSetOpts) ConfigsAndLogger ¶
func (*ChainSetOpts) NewTOMLChain ¶
func (o *ChainSetOpts) NewTOMLChain(cfg *CosmosConfig) (adapters.Chain, error)
func (*ChainSetOpts) Validate ¶
func (o *ChainSetOpts) Validate() (err error)
type CosmosConfig ¶
type CosmosConfig struct { ChainID *string Enabled *bool coscfg.Chain Nodes CosmosNodes }
func (*CosmosConfig) Bech32Prefix ¶ added in v2.5.0
func (c *CosmosConfig) Bech32Prefix() string
func (*CosmosConfig) BlockRate ¶
func (c *CosmosConfig) BlockRate() time.Duration
func (*CosmosConfig) BlocksUntilTxTimeout ¶
func (c *CosmosConfig) BlocksUntilTxTimeout() int64
func (*CosmosConfig) ConfirmPollPeriod ¶
func (c *CosmosConfig) ConfirmPollPeriod() time.Duration
func (*CosmosConfig) FallbackGasPrice ¶ added in v2.4.0
func (c *CosmosConfig) FallbackGasPrice() sdk.Dec
func (*CosmosConfig) FeeToken ¶ added in v2.5.0
func (c *CosmosConfig) FeeToken() string
func (*CosmosConfig) GasLimitMultiplier ¶
func (c *CosmosConfig) GasLimitMultiplier() float64
func (*CosmosConfig) IsEnabled ¶
func (c *CosmosConfig) IsEnabled() bool
func (*CosmosConfig) MaxMsgsPerBatch ¶
func (c *CosmosConfig) MaxMsgsPerBatch() int64
func (*CosmosConfig) OCR2CachePollPeriod ¶
func (c *CosmosConfig) OCR2CachePollPeriod() time.Duration
func (*CosmosConfig) OCR2CacheTTL ¶
func (c *CosmosConfig) OCR2CacheTTL() time.Duration
func (*CosmosConfig) SetFrom ¶
func (c *CosmosConfig) SetFrom(f *CosmosConfig)
func (*CosmosConfig) TOMLString ¶
func (c *CosmosConfig) TOMLString() (string, error)
func (*CosmosConfig) TxMsgTimeout ¶
func (c *CosmosConfig) TxMsgTimeout() time.Duration
func (*CosmosConfig) ValidateConfig ¶
func (c *CosmosConfig) ValidateConfig() (err error)
type CosmosConfigs ¶
type CosmosConfigs []*CosmosConfig
func (CosmosConfigs) Chains ¶
func (cs CosmosConfigs) Chains(ids ...string) (r []relaytypes.ChainStatus, err error)
func (CosmosConfigs) NodeStatus ¶ added in v2.1.0
func (cs CosmosConfigs) NodeStatus(name string) (n relaytypes.NodeStatus, err error)
func (CosmosConfigs) NodeStatuses ¶ added in v2.1.0
func (cs CosmosConfigs) NodeStatuses(chainIDs ...string) (ns []relaytypes.NodeStatus, err error)
func (CosmosConfigs) Nodes ¶
func (cs CosmosConfigs) Nodes(chainID string) (ns []db.Node, err error)
func (*CosmosConfigs) SetFrom ¶
func (cs *CosmosConfigs) SetFrom(fs *CosmosConfigs) (err error)
func (CosmosConfigs) ValidateConfig ¶
func (cs CosmosConfigs) ValidateConfig() (err error)
type CosmosNodes ¶
func (*CosmosNodes) SetFrom ¶
func (ns *CosmosNodes) SetFrom(fs *CosmosNodes)
type LegacyChainContainer ¶ added in v2.5.0
type LegacyChainContainer interface { Get(id string) (adapters.Chain, error) Len() int List(ids ...string) ([]adapters.Chain, error) Slice() []adapters.Chain }
LegacyChainContainer is container interface for Cosmos chains
type LegacyChains ¶ added in v2.5.0
func NewLegacyChains ¶ added in v2.5.0
func NewLegacyChains(m map[string]adapters.Chain) *LegacyChains
type LoopRelayerChainer ¶ added in v2.5.0
type LoopRelayerSingleChain ¶ added in v2.5.0
func NewLoopRelayerSingleChain ¶ added in v2.5.0
func NewLoopRelayerSingleChain(r *pkgcosmos.Relayer, s *SingleChainSet) *LoopRelayerSingleChain
func (*LoopRelayerSingleChain) Chain ¶ added in v2.5.0
func (r *LoopRelayerSingleChain) Chain() adapters.Chain
type SingleChainSet ¶ added in v2.5.0
type SingleChainSet struct { adapters.ChainSet ID string // contains filtered or unexported fields }
SingleChainSet is a chainset with 1 chain. TODO remove when relayer interface is updated
func NewSingleChainSet ¶ added in v2.5.0
func NewSingleChainSet(opts ChainSetOpts, cfg *CosmosConfig) (*SingleChainSet, error)
Click to show internal directories.
Click to hide internal directories.