Documentation ¶
Index ¶
- type Hooks
- func (h Hooks) AfterDistributeMintedCoins(ctx sdk.Context, fees sdk.Coins)
- func (h Hooks) AfterExitPool(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, shareInAmount sdk.Int, ...)
- func (h Hooks) AfterJoinPool(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, enterCoins sdk.Coins, ...)
- func (h Hooks) AfterPoolCreated(ctx sdk.Context, sender sdk.AccAddress, poolId uint64)
- func (h Hooks) AfterSwap(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, input sdk.Coins, ...)
- type Keeper
- func (k Keeper) AllocateAsset(ctx sdk.Context) error
- func (k Keeper) CreatePoolPots(ctx sdk.Context, poolId uint64) error
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) FundCommunityPoolFromModule(ctx sdk.Context, asset sdk.Coin) error
- func (k Keeper) GetDistrInfo(ctx sdk.Context) types.DistrInfo
- func (k Keeper) GetLockableDurations(ctx sdk.Context) []time.Duration
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetPoolPotId(ctx sdk.Context, poolId uint64, lockableDuration time.Duration) (uint64, error)
- func (k Keeper) HandleUpdatePoolIncentivesProposal(ctx sdk.Context, p *types.UpdatePoolIncentivesProposal) error
- func (k Keeper) Hooks() Hooks
- func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) PotIds(ctx context.Context, req *types.QueryPotIdsRequest) (*types.QueryPotIdsResponse, error)
- func (k Keeper) SetDistrInfo(ctx sdk.Context, distrInfo types.DistrInfo)
- func (k Keeper) SetLockableDurations(ctx sdk.Context, lockableDurations []time.Duration)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetPoolPotId(ctx sdk.Context, poolId uint64, lockableDuration time.Duration, potId uint64)
- func (k Keeper) UpdateDistrRecords(ctx sdk.Context, records ...types.DistrRecord) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
func (Hooks) AfterDistributeMintedCoins ¶
Distribute coins after minter module allocate assets to pool-incentives module
func (Hooks) AfterExitPool ¶
func (h Hooks) AfterExitPool(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, shareInAmount sdk.Int, exitCoins sdk.Coins)
AfterExitPool hook is a noop
func (Hooks) AfterJoinPool ¶
func (h Hooks) AfterJoinPool(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, enterCoins sdk.Coins, shareOutAmount sdk.Int)
AfterJoinPool hook is a noop
func (Hooks) AfterPoolCreated ¶
AfterPoolCreated creates a pot for each pool’s lockable duration
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryMarshaler, storeKey sdk.StoreKey, paramSpace paramtypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, incentivesKeeper types.IncentivesKeeper, distrKeeper types.DistrKeeper, communityPoolName string, feeCollectorName string) Keeper
func (Keeper) AllocateAsset ¶
AllocateAsset allocates and distributes coin according a pot’s proportional weight that is recorded in the record
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
func (Keeper) FundCommunityPoolFromModule ¶
func (Keeper) GetLockableDurations ¶
func (Keeper) GetPoolPotId ¶
func (Keeper) HandleUpdatePoolIncentivesProposal ¶
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState)
func (Keeper) PotIds ¶
func (k Keeper) PotIds(ctx context.Context, req *types.QueryPotIdsRequest) (*types.QueryPotIdsResponse, error)
func (Keeper) SetDistrInfo ¶
func (Keeper) SetLockableDurations ¶
func (Keeper) SetPoolPotId ¶
func (Keeper) UpdateDistrRecords ¶
Click to show internal directories.
Click to hide internal directories.