Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) BeginBlock(ctx sdk.Context)
- func (k Keeper) Delegate(ctx sdk.Context, delegator, provider, chainID string, amount sdk.Coin) error
- func (k Keeper) DelegatorProviders(goCtx context.Context, req *types.QueryDelegatorProvidersRequest) (res *types.QueryDelegatorProvidersResponse, err error)
- func (k Keeper) ExportDelegations(ctx sdk.Context) commontypes.GenesisState
- func (k Keeper) ExportDelegators(ctx sdk.Context) commontypes.GenesisState
- func (k Keeper) ExportUnbondings(ctx sdk.Context) []commontypes.RawMessage
- func (k Keeper) GetBondedPool(ctx sdk.Context) (bondedPool authtypes.ModuleAccountI)
- func (k Keeper) GetDelegatorProviders(ctx sdk.Context, delegator string, epoch uint64) (providers []string, err error)
- func (k Keeper) GetNotBondedPool(ctx sdk.Context) (notBondedPool authtypes.ModuleAccountI)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) InitDelegations(ctx sdk.Context, data commontypes.GenesisState)
- func (k Keeper) InitDelegators(ctx sdk.Context, data commontypes.GenesisState)
- func (k Keeper) InitUnbondings(ctx sdk.Context, data []commontypes.RawMessage)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) ProviderDelegators(goCtx context.Context, req *types.QueryProviderDelegatorsRequest) (*types.QueryProviderDelegatorsResponse, error)
- func (k Keeper) Redelegate(ctx sdk.Context, delegator, from, to, fromChainID, toChainID string, ...) error
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) TotalBondedTokens(ctx sdk.Context) math.Int
- func (k Keeper) TotalNotBondedTokens(ctx sdk.Context) math.Int
- func (k Keeper) Unbond(ctx sdk.Context, delegator, provider, chainID string, amount sdk.Coin) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, ps paramtypes.Subspace, bankKeeper types.BankKeeper, accountKeeper types.AccountKeeper, epochstorageKeeper types.EpochstorageKeeper, specKeeper types.SpecKeeper, ) *Keeper
func (Keeper) BeginBlock ¶ added in v0.22.1
func (Keeper) Delegate ¶ added in v0.22.1
func (k Keeper) Delegate(ctx sdk.Context, delegator, provider, chainID string, amount sdk.Coin) error
Delegate lets a delegator delegate an amount of coins to a provider. (effective on next epoch)
func (Keeper) DelegatorProviders ¶
func (k Keeper) DelegatorProviders(goCtx context.Context, req *types.QueryDelegatorProvidersRequest) (res *types.QueryDelegatorProvidersResponse, err error)
func (Keeper) ExportDelegations ¶
func (k Keeper) ExportDelegations(ctx sdk.Context) commontypes.GenesisState
ExportDelegations exports dualstaking delegations data (for genesis)
func (Keeper) ExportDelegators ¶
func (k Keeper) ExportDelegators(ctx sdk.Context) commontypes.GenesisState
ExportDelegators exports dualstaking delegators data (for genesis)
func (Keeper) ExportUnbondings ¶ added in v0.22.1
func (k Keeper) ExportUnbondings(ctx sdk.Context) []commontypes.RawMessage
ExportUnbondings exports dualstaking unbonding timers data (for genesis)
func (Keeper) GetBondedPool ¶ added in v0.22.1
func (k Keeper) GetBondedPool(ctx sdk.Context) (bondedPool authtypes.ModuleAccountI)
GetBondedPool returns the bonded tokens pool's module account
func (Keeper) GetDelegatorProviders ¶
func (k Keeper) GetDelegatorProviders(ctx sdk.Context, delegator string, epoch uint64) (providers []string, err error)
GetDelegatorProviders gets all the providers the delegator is delegated to
func (Keeper) GetNotBondedPool ¶ added in v0.22.1
func (k Keeper) GetNotBondedPool(ctx sdk.Context) (notBondedPool authtypes.ModuleAccountI)
GetNotBondedPool returns the not bonded tokens pool's module account
func (Keeper) InitDelegations ¶
func (k Keeper) InitDelegations(ctx sdk.Context, data commontypes.GenesisState)
InitDelegations imports dualstaking delegations data (from genesis)
func (Keeper) InitDelegators ¶
func (k Keeper) InitDelegators(ctx sdk.Context, data commontypes.GenesisState)
InitDelegators imports dualstaking delegators data (from genesis)
func (Keeper) InitUnbondings ¶ added in v0.22.1
func (k Keeper) InitUnbondings(ctx sdk.Context, data []commontypes.RawMessage)
InitUnbondings imports subscriptions timers data (from genesis)
func (Keeper) Params ¶
func (k Keeper) Params(goCtx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) ProviderDelegators ¶
func (k Keeper) ProviderDelegators(goCtx context.Context, req *types.QueryProviderDelegatorsRequest) (*types.QueryProviderDelegatorsResponse, error)
func (Keeper) Redelegate ¶
func (k Keeper) Redelegate(ctx sdk.Context, delegator, from, to, fromChainID, toChainID string, amount sdk.Coin) error
Redelegate lets a delegator transfer its delegation between providers, but without the funds being subject to unstakeHoldBlocks witholding period. (effective on next epoch)
func (Keeper) TotalBondedTokens ¶ added in v0.22.1
totalBondedTokens total staking tokens supply which is bonded
func (Keeper) TotalNotBondedTokens ¶ added in v0.22.1
totalNotBondedTokens total staking tokens supply which is not bonded
func (Keeper) Unbond ¶ added in v0.22.1
Unbond lets a delegator get its delegated coins back from a provider. The delegation ends immediately, but coins are held for unstakeHoldBlocks period before released and transferred back to the delegator. The rewards from the provider will be updated accordingly (or terminate) from the next epoch. (effective on next epoch)