domain

package
v25.0.3-indexer-4240526b Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

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 added in v25.2.1

func IsMultiDenom(denoms []string) bool

IsMultiDenom returns true if the given denoms has >2 denoms

func ShouldFilterDenom added in v25.2.1

func ShouldFilterDenom(denom string) bool

ShouldFilterDenom returns true if the given denom should be filtered out.

Types

type Block

type Block struct {
	ChainId     string    `json:"chain_id"`
	Height      uint64    `json:"height"`
	BlockTime   time.Time `json:"timestamp"`
	GasConsumed uint64    `json:"gas_consumed"`
	IngestedAt  time.Time `json:"ingested_at"`
}

type EventWrapper added in v25.2.1

type EventWrapper struct {
	Index int         `json:"event_index"`
	Event types.Event `json:"event"`
}

type Keepers

type Keepers struct {
	BankKeeper        bankkeeper.Keeper
	PoolManagerKeeper PoolManagerKeeperI
}

type Pair added in v25.2.1

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"`
}

Pair represents a pair of tokens in a pool and message to be published to PubSub

type PairPublisher added in v25.2.1

type PairPublisher interface {
	// PublishPoolPairs publishes the given pools as pairs.
	PublishPoolPairs(ctx sdk.Context, pools []poolmanagertypes.PoolI) error
}

PairPublisher is an interface for publishing pair data.

type Pool

type Pool struct {
	IngestedAt time.Time `json:"ingested_at"`
}

type PoolManagerKeeperI added in v25.2.1

type PoolManagerKeeperI interface {
	GetTradingPairTakerFee(ctx sdk.Context, denom0, denom1 string) (osmomath.Dec, error)
}

type Publisher

type Publisher interface {
	TokenSupplyPublisher

	PublishBlock(ctx context.Context, block Block) error
	PublishTransaction(ctx context.Context, txn Transaction) error
	PublishPool(ctx context.Context, pool Pool) error
	PublishPair(ctx context.Context, pair Pair) error
}

Publisher is an interface for publishing various types of data.

type TokenSupply

type TokenSupply struct {
	Denom      string       `json:"denom"`
	Supply     osmomath.Int `json:"supply"`
	IngestedAt time.Time    `json:"ingested_at"`
}

type TokenSupplyOffset

type TokenSupplyOffset struct {
	Denom        string       `json:"denom"`
	SupplyOffset osmomath.Int `json:"supply_offset"`
	IngestedAt   time.Time    `json:"ingested_at"`
}

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"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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