Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDidNotIngestAllData = errors.New("cold start manager has not yet ingested initial data")
Functions ¶
func IsMultiDenom ¶
IsMultiDenom returns true if the given denoms has >2 denoms
func ShouldFilterDenom ¶
ShouldFilterDenom returns true if the given denom should be filtered out.
Types ¶
type EventWrapper ¶
map data type is unsupported by the dataflow / apache beam thus using struct to represent the data
type Keepers ¶
type Keepers struct { BankKeeper bankkeeper.Keeper PoolManagerKeeper PoolManagerKeeperI }
type Pair ¶
type Pair struct { PoolID uint64 `json:"pool_id"` MultiAsset bool `json:"multi_asset"` Denom0 string `json:"denom_0"` IdxDenom0 uint8 `json:"idx_denom_0"` Denom1 string `json:"denom_1"` IdxDenom1 uint8 `json:"idx_denom_1"` FeeBps uint64 `json:"fee_bps"` IngestedAt time.Time `json:"ingested_at"` PairCreatedAt time.Time `json:"pair_created_at"` PairCreatedAtHeight uint64 `json:"pair_created_at_height"` PairCreatedAtTxnHash string `json:"pair_created_at_txn_hash"` }
Pair represents a pair of tokens in a pool and message to be published to PubSub
type PairPublisher ¶
type PairPublisher interface { // PublishPoolPairs publishes the given pools as pairs. // The difference between this function and PublishPair is: // - PublishPair operates on the pair level and publishes a single pair. // - PublishPoolPairs operates on the pool level and publishes all the pair combo in the pool // with the taker fee and spread factor, as well as the newly created pool metadata, if any. PublishPoolPairs(ctx sdk.Context, pools []poolmanagertypes.PoolI, createdPoolIDs map[uint64]commondomain.PoolCreation) error }
PairPublisher is an interface for publishing pair data.
type PoolManagerKeeperI ¶
type PoolManagerKeeperI interface { GetTradingPairTakerFee(ctx sdk.Context, denom0, denom1 string) (osmomath.Dec, error) GetTotalPoolLiquidity(ctx sdk.Context, poolId uint64) (sdk.Coins, error) GetPool(ctx sdk.Context, poolId uint64) (types.PoolI, error) RouteCalculateSpotPrice(ctx sdk.Context, poolId uint64, quoteAssetDenom string, baseAssetDenom string) (price osmomath.BigDec, err error) }
type Publisher ¶
type Publisher interface { TokenSupplyPublisher PublishBlock(ctx context.Context, block Block) error PublishTransaction(ctx context.Context, txn Transaction) error PublishPair(ctx context.Context, pair Pair) error }
Publisher is an interface for publishing various types of data.
type TokenSupply ¶
type TokenSupplyOffset ¶
type TokenSupplyPublisher ¶
type TokenSupplyPublisher interface { PublishTokenSupply(ctx context.Context, tokenSupply TokenSupply) error PublishTokenSupplyOffset(ctx context.Context, tokenSupplyOffset TokenSupplyOffset) error }
TokenSupplyPublisher is an interface for publishing token supply data.
type Transaction ¶
type Transaction struct { Height uint64 `json:"height"` BlockTime time.Time `json:"timestamp"` GasWanted uint64 `json:"gas_wanted"` GasUsed uint64 `json:"gas_used"` Fees sdk.Coins `json:"fees"` MessageType string `json:"msg_type"` TransactionHash string `json:"tx_hash"` TransactionIndexId int `json:"tx_index_id"` Events []EventWrapper `json:"events"` IngestedAt time.Time `json:"ingested_at"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.