Documentation ¶
Index ¶
- func NewORM(db *sqlx.DB, lggr logger.Logger, cfg pg.QConfig) types.ORM
- func NewORMImmut(cfgs chains.ChainConfig[string, *starknetdb.ChainCfg, starknetdb.Node]) types.ORM
- func SetupNodes(db *sqlx.DB, cfg SetupConfig, lggr logger.Logger) (err error)
- type ChainSet
- type ChainSetOpts
- func (o *ChainSetOpts) NewChain(dbchain types.DBChain) (starkchain.Chain, error)
- func (o *ChainSetOpts) NewTOMLChain(cfg *StarknetConfig) (starkchain.Chain, error)
- func (o *ChainSetOpts) ORMAndLogger() (chains.ORM[string, *db.ChainCfg, db.Node], logger.Logger)
- func (o *ChainSetOpts) Validate() (err error)
- type SetupConfig
- type StarknetConfig
- func (c *StarknetConfig) AsV1() types.DBChain
- func (c *StarknetConfig) IsEnabled() bool
- func (c *StarknetConfig) OCR2CachePollPeriod() time.Duration
- func (c *StarknetConfig) OCR2CacheTTL() time.Duration
- func (c *StarknetConfig) RequestTimeout() time.Duration
- func (c *StarknetConfig) SetFrom(f *StarknetConfig)
- func (c *StarknetConfig) SetFromDB(ch types.DBChain, nodes []db.Node) error
- func (c *StarknetConfig) TxMaxBatchSize() int
- func (c *StarknetConfig) TxSendFrequency() time.Duration
- func (c *StarknetConfig) TxTimeout() time.Duration
- func (c *StarknetConfig) Update(cfg db.ChainCfg)
- func (c *StarknetConfig) ValidateConfig() (err error)
- type StarknetConfigs
- func (cs StarknetConfigs) Chains(ids ...string) (chains []types.DBChain)
- func (cs StarknetConfigs) Node(name string) (n db.Node, err error)
- func (cs StarknetConfigs) Nodes() (ns []db.Node)
- func (cs StarknetConfigs) NodesByID(chainIDs ...string) (ns []db.Node)
- func (cs *StarknetConfigs) SetFrom(fs *StarknetConfigs)
- func (cs StarknetConfigs) ValidateConfig() (err error)
- type StarknetNodes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewORMImmut ¶ added in v1.10.0
func NewORMImmut(cfgs chains.ChainConfig[string, *starknetdb.ChainCfg, starknetdb.Node]) types.ORM
func SetupNodes ¶
SetupNodes is a hack/shim method to allow node operators to specify multiple nodes via ENV. See: https://app.shortcut.com/chainlinklabs/epic/33587/overhaul-config?cf_workflow=500000005&ct_workflow=all
Types ¶
type ChainSet ¶
type ChainSet interface { starkchain.ChainSet Add(context.Context, string, *db.ChainCfg) (types.DBChain, error) Remove(string) error Configure(ctx context.Context, id string, enabled bool, config *db.ChainCfg) (types.DBChain, error) Show(id string) (types.DBChain, error) Index(offset, limit int) ([]types.DBChain, int, error) GetNodes(ctx context.Context, offset, limit int) (nodes []db.Node, count int, err error) GetNodesForChain(ctx context.Context, chainID string, offset, limit int) (nodes []db.Node, count int, err error) CreateNode(ctx context.Context, data db.Node) (db.Node, error) DeleteNode(ctx context.Context, id int32) error }
func NewChainSet ¶
func NewChainSet(opts ChainSetOpts) (ChainSet, error)
NewChainSet returns a new chain set for opts. https://app.shortcut.com/chainlinklabs/story/33622/remove-legacy-config
func NewChainSetImmut ¶ added in v1.10.0
func NewChainSetImmut(opts ChainSetOpts, cfgs StarknetConfigs) (ChainSet, error)
type ChainSetOpts ¶
type ChainSetOpts struct { Config coreconfig.BasicConfig Logger logger.Logger KeyStore keystore.StarkNet ORM types.ORM }
func (*ChainSetOpts) NewChain ¶
func (o *ChainSetOpts) NewChain(dbchain types.DBChain) (starkchain.Chain, error)
func (*ChainSetOpts) NewTOMLChain ¶ added in v1.10.0
func (o *ChainSetOpts) NewTOMLChain(cfg *StarknetConfig) (starkchain.Chain, error)
func (*ChainSetOpts) ORMAndLogger ¶
func (*ChainSetOpts) Validate ¶
func (o *ChainSetOpts) Validate() (err error)
type SetupConfig ¶
type StarknetConfig ¶ added in v1.10.0
type StarknetConfig struct { ChainID *string Enabled *bool stkcfg.Chain Nodes StarknetNodes }
func (*StarknetConfig) AsV1 ¶ added in v1.10.0
func (c *StarknetConfig) AsV1() types.DBChain
func (*StarknetConfig) IsEnabled ¶ added in v1.10.0
func (c *StarknetConfig) IsEnabled() bool
func (*StarknetConfig) OCR2CachePollPeriod ¶ added in v1.10.0
func (c *StarknetConfig) OCR2CachePollPeriod() time.Duration
func (*StarknetConfig) OCR2CacheTTL ¶ added in v1.10.0
func (c *StarknetConfig) OCR2CacheTTL() time.Duration
func (*StarknetConfig) RequestTimeout ¶ added in v1.10.0
func (c *StarknetConfig) RequestTimeout() time.Duration
func (*StarknetConfig) SetFrom ¶ added in v1.11.0
func (c *StarknetConfig) SetFrom(f *StarknetConfig)
func (*StarknetConfig) TxMaxBatchSize ¶ added in v1.10.0
func (c *StarknetConfig) TxMaxBatchSize() int
func (*StarknetConfig) TxSendFrequency ¶ added in v1.10.0
func (c *StarknetConfig) TxSendFrequency() time.Duration
func (*StarknetConfig) TxTimeout ¶ added in v1.10.0
func (c *StarknetConfig) TxTimeout() time.Duration
func (*StarknetConfig) Update ¶ added in v1.10.0
func (c *StarknetConfig) Update(cfg db.ChainCfg)
func (*StarknetConfig) ValidateConfig ¶ added in v1.10.0
func (c *StarknetConfig) ValidateConfig() (err error)
type StarknetConfigs ¶ added in v1.10.0
type StarknetConfigs []*StarknetConfig
func (StarknetConfigs) Chains ¶ added in v1.10.0
func (cs StarknetConfigs) Chains(ids ...string) (chains []types.DBChain)
func (StarknetConfigs) Node ¶ added in v1.10.0
func (cs StarknetConfigs) Node(name string) (n db.Node, err error)
func (StarknetConfigs) Nodes ¶ added in v1.10.0
func (cs StarknetConfigs) Nodes() (ns []db.Node)
func (StarknetConfigs) NodesByID ¶ added in v1.10.0
func (cs StarknetConfigs) NodesByID(chainIDs ...string) (ns []db.Node)
func (*StarknetConfigs) SetFrom ¶ added in v1.11.0
func (cs *StarknetConfigs) SetFrom(fs *StarknetConfigs)
func (StarknetConfigs) ValidateConfig ¶ added in v1.10.0
func (cs StarknetConfigs) ValidateConfig() (err error)
type StarknetNodes ¶ added in v1.10.0
func (*StarknetNodes) SetFrom ¶ added in v1.11.0
func (ns *StarknetNodes) SetFrom(fs *StarknetNodes)
Click to show internal directories.
Click to hide internal directories.