Documentation ¶
Index ¶
- func LatestSubgraphTime(cfg SyncChannelConfig) (int, error)
- type ChainConfig
- type CrocQuery
- func (q *CrocQuery) QueryAmbientLiq(pos types.PositionLocation) (*big.Int, error)
- func (q *CrocQuery) QueryKnockoutLiq(pos types.KOClaimLocation) (*big.Int, error)
- func (q *CrocQuery) QueryKnockoutPivot(pos types.PositionLocation) (uint32, error)
- func (q *CrocQuery) QueryRangeLiquidity(pos types.PositionLocation) (*big.Int, error)
- func (q *CrocQuery) QueryRangeRewardsLiq(pos types.PositionLocation) (*big.Int, error)
- type GraphReqVars
- type GraphRequest
- type NetworkConfig
- func (c *NetworkConfig) ChainConfig(chainId types.ChainId) (ChainConfig, bool)
- func (c *NetworkConfig) ChainIDForNetwork(network types.NetworkName) (types.ChainId, bool)
- func (c *NetworkConfig) NetworkForChainID(chainId types.ChainId) (types.NetworkName, bool)
- func (c *NetworkConfig) RequireChainID(network types.NetworkName) types.ChainId
- type OnChainLoader
- type SubgraphQuery
- type SyncChannel
- type SyncChannelConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LatestSubgraphTime ¶
func LatestSubgraphTime(cfg SyncChannelConfig) (int, error)
Types ¶
type ChainConfig ¶
type CrocQuery ¶
type CrocQuery struct {
// contains filtered or unexported fields
}
func NewCrocQuery ¶
func NewCrocQuery(chain *OnChainLoader) *CrocQuery
func (*CrocQuery) QueryAmbientLiq ¶
func (*CrocQuery) QueryKnockoutLiq ¶
func (*CrocQuery) QueryKnockoutPivot ¶
func (q *CrocQuery) QueryKnockoutPivot(pos types.PositionLocation) (uint32, error)
func (*CrocQuery) QueryRangeLiquidity ¶
func (*CrocQuery) QueryRangeRewardsLiq ¶
type GraphReqVars ¶
type GraphRequest ¶
type GraphRequest struct { Query SubgraphQuery `json:"query"` Variables GraphReqVars `json:"variables"` }
type NetworkConfig ¶
type NetworkConfig map[types.NetworkName]ChainConfig
func LoadNetworkConfig ¶
func LoadNetworkConfig(path string) NetworkConfig
func (*NetworkConfig) ChainConfig ¶
func (c *NetworkConfig) ChainConfig(chainId types.ChainId) (ChainConfig, bool)
func (*NetworkConfig) ChainIDForNetwork ¶
func (c *NetworkConfig) ChainIDForNetwork(network types.NetworkName) (types.ChainId, bool)
func (*NetworkConfig) NetworkForChainID ¶
func (c *NetworkConfig) NetworkForChainID(chainId types.ChainId) (types.NetworkName, bool)
func (*NetworkConfig) RequireChainID ¶
func (c *NetworkConfig) RequireChainID(network types.NetworkName) types.ChainId
type OnChainLoader ¶
type OnChainLoader struct {
Cfg NetworkConfig
}
type SubgraphQuery ¶
type SubgraphQuery string
type SyncChannel ¶
type SyncChannel[R any, S any] struct { LastObserved int EarliestObserved int RowsIngested int // contains filtered or unexported fields }
func NewSyncChannel ¶
func NewSyncChannel[R any, S any](tbl tables.ITable[R, S], config SyncChannelConfig, consumeFn func(R)) SyncChannel[R, S]
func (*SyncChannel[R, S]) SyncTableToSubgraph ¶
type SyncChannelConfig ¶
type SyncChannelConfig struct { Chain ChainConfig Network types.NetworkName Query string }
Click to show internal directories.
Click to hide internal directories.