Documentation ¶
Index ¶
- func RegisterInvariants(ir sdk.InvariantRegistry, keeper *Keeper)
- func UniquePoolsInvariant(k *Keeper) sdk.Invariant
- func ValidPoolsInvariant(k *Keeper) sdk.Invariant
- type Keeper
- func (k *Keeper) AfterPoolCreated(ctx context.Context, poolID uint32) error
- func (k *Keeper) CreateOrGetPoolByDenom(ctx context.Context, denom string) (types.Pool, error)
- func (k *Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k *Keeper) GetNextPoolID(ctx context.Context) (poolID uint32, err error)
- func (k *Keeper) GetPool(ctx context.Context, id uint32) (types.Pool, bool, error)
- func (k *Keeper) GetPoolByDenom(ctx context.Context, denom string) (types.Pool, bool, error)
- func (k *Keeper) GetPools(ctx context.Context) ([]types.Pool, error)
- func (k *Keeper) InitGenesis(ctx sdk.Context, data *types.GenesisState) error
- func (k *Keeper) IsPoolAddress(ctx context.Context, address string) (bool, error)
- func (k *Keeper) IteratePools(ctx context.Context, cb func(pool types.Pool) (stop bool, err error)) error
- func (k *Keeper) Logger(ctx context.Context) log.Logger
- func (k *Keeper) PoolByDenom(ctx context.Context, request *types.QueryPoolByDenomRequest) (*types.QueryPoolResponse, error)
- func (k *Keeper) PoolByID(ctx context.Context, request *types.QueryPoolByIdRequest) (*types.QueryPoolResponse, error)
- func (k *Keeper) Pools(ctx context.Context, request *types.QueryPoolsRequest) (*types.QueryPoolsResponse, error)
- func (k *Keeper) SavePool(ctx context.Context, pool types.Pool) error
- func (k *Keeper) SetHooks(rs types.PoolsHooks) *Keeper
- func (k *Keeper) SetNextPoolID(ctx context.Context, poolID uint32) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, keeper *Keeper)
RegisterInvariants registers all pools module invariants
func UniquePoolsInvariant ¶
UniquePoolsInvariant checks that there are no duplicated pools for the same denom
func ValidPoolsInvariant ¶
ValidPoolsInvariant checks that all the pools are valid
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper(cdc codec.Codec, storeService corestoretypes.KVStoreService, accountKeeper types.AccountKeeper, ) *Keeper
func (*Keeper) AfterPoolCreated ¶
func (*Keeper) CreateOrGetPoolByDenom ¶
CreateOrGetPoolByDenom creates a new pool for the given denom if it does not exist. If the pool already exists, no action is taken. In both cases, the pool is returned.
func (*Keeper) ExportGenesis ¶
func (k *Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns a new GenesisState instance containing the information currently present inside the store
func (*Keeper) GetNextPoolID ¶
GetNextPoolID returns the next pool ID to be used when registering a new Pool
func (*Keeper) GetPool ¶
GetPool retrieves the pool with the given ID from the store. If the pool does not exist, false is returned instead
func (*Keeper) GetPoolByDenom ¶
GetPoolByDenom returns the pool for the given denom if it exists. If the pool does not exist, false is returned instead
func (*Keeper) InitGenesis ¶
InitGenesis initializes the genesis store using the provided data
func (*Keeper) IsPoolAddress ¶
IsPoolAddress returns true if the provided address is the address where the users' asset are kept when they perform a pool restaking.
func (*Keeper) IteratePools ¶
func (k *Keeper) IteratePools(ctx context.Context, cb func(pool types.Pool) (stop bool, err error)) error
IteratePools iterates over the pools in the store and performs a callback function
func (*Keeper) PoolByDenom ¶
func (k *Keeper) PoolByDenom(ctx context.Context, request *types.QueryPoolByDenomRequest) (*types.QueryPoolResponse, error)
PoolByDenom implements the Query/PoolByDenom gRPC method
func (*Keeper) PoolByID ¶
func (k *Keeper) PoolByID(ctx context.Context, request *types.QueryPoolByIdRequest) (*types.QueryPoolResponse, error)
PoolByID implements the Query/PoolById gRPC method
func (*Keeper) Pools ¶
func (k *Keeper) Pools(ctx context.Context, request *types.QueryPoolsRequest) (*types.QueryPoolsResponse, error)
Pools implements the Query/Pools gRPC method