Documentation ¶
Index ¶
- type Hooks
- func (h Hooks) AfterDistributeMintedCoin(ctx sdk.Context, mintedCoin sdk.Coin)
- 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) CreatePoolGauges(ctx sdk.Context, poolId uint64) error
- func (k Keeper) DistrInfo(ctx context.Context, _ *types.QueryDistrInfoRequest) (*types.QueryDistrInfoResponse, error)
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) FundCommunityPoolFromModule(ctx sdk.Context, asset sdk.Coin) error
- func (k Keeper) GaugeIds(ctx context.Context, req *types.QueryGaugeIdsRequest) (*types.QueryGaugeIdsResponse, 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) GetPoolGaugeId(ctx sdk.Context, poolId uint64, lockableDuration time.Duration) (uint64, error)
- func (k Keeper) GetPoolIdFromGaugeId(ctx sdk.Context, gaugeId uint64, lockableDuration time.Duration) (uint64, error)
- func (k Keeper) HandleReplacePoolIncentivesProposal(ctx sdk.Context, p *types.ReplacePoolIncentivesProposal) error
- func (k Keeper) HandleUpdatePoolIncentivesProposal(ctx sdk.Context, p *types.UpdatePoolIncentivesProposal) error
- func (k Keeper) Hooks() Hooks
- func (k Keeper) IncentivizedPools(ctx context.Context, _ *types.QueryIncentivizedPoolsRequest) (*types.QueryIncentivizedPoolsResponse, error)
- func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState)
- func (k Keeper) LockableDurations(ctx context.Context, _ *types.QueryLockableDurationsRequest) (*types.QueryLockableDurationsResponse, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(ctx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) ReplaceDistrRecords(ctx sdk.Context, records ...types.DistrRecord) 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) SetPoolGaugeId(ctx sdk.Context, poolId uint64, lockableDuration time.Duration, gaugeId 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) AfterDistributeMintedCoin ¶
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 gauge 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 gauge’s proportional weight that is recorded in the record
func (Keeper) CreatePoolGauges ¶
func (Keeper) DistrInfo ¶
func (k Keeper) DistrInfo(ctx context.Context, _ *types.QueryDistrInfoRequest) (*types.QueryDistrInfoResponse, error)
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
func (Keeper) FundCommunityPoolFromModule ¶
func (Keeper) GaugeIds ¶
func (k Keeper) GaugeIds(ctx context.Context, req *types.QueryGaugeIdsRequest) (*types.QueryGaugeIdsResponse, error)
func (Keeper) GetLockableDurations ¶
func (Keeper) GetPoolGaugeId ¶
func (Keeper) GetPoolIdFromGaugeId ¶
func (Keeper) HandleReplacePoolIncentivesProposal ¶
func (Keeper) HandleUpdatePoolIncentivesProposal ¶
func (Keeper) IncentivizedPools ¶
func (k Keeper) IncentivizedPools(ctx context.Context, _ *types.QueryIncentivizedPoolsRequest) (*types.QueryIncentivizedPoolsResponse, error)
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState)
func (Keeper) LockableDurations ¶
func (k Keeper) LockableDurations(ctx context.Context, _ *types.QueryLockableDurationsRequest) (*types.QueryLockableDurationsResponse, error)
func (Keeper) Params ¶
func (k Keeper) Params(ctx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) ReplaceDistrRecords ¶
This is checked for no err when a proposal is made, and executed when a proposal passes
func (Keeper) SetDistrInfo ¶
func (Keeper) SetLockableDurations ¶
func (Keeper) SetPoolGaugeId ¶
func (Keeper) UpdateDistrRecords ¶
This is checked for no err when a proposal is made, and executed when a proposal passes
Click to show internal directories.
Click to hide internal directories.