Documentation ¶
Index ¶
- Constants
- func CValueRangeInvariant(k Keeper) sdk.Invariant
- func DelegationCallback(k Keeper, ctx sdk.Context, response []byte, query icqtypes.Query) error
- func DivideAmountIntoValidatorSet(sortedValDiff types.WeightedAddressAmounts, coin sdk.Coin) (types.ValAddressAmounts, error)
- func DivideUndelegateAmountIntoValidatorSet(sortedValDiff types.WeightedAddressAmounts, coin sdk.Coin) (types.ValAddressAmounts, error)
- func FetchValidatorsToDelegate(valList types.AllowListedValidators, delegationState types.DelegationState, ...) (types.ValAddressAmounts, error)
- func FetchValidatorsToUndelegate(valList types.AllowListedValidators, delegationState types.DelegationState, ...) (types.ValAddressAmounts, error)
- func GetIdealCurrentDelegations(valList types.AllowListedValidators, delegationState types.DelegationState, ...) (types.WeightedAddressAmounts, error)
- func HandleAllowListedValidatorSetChangeProposal(ctx sdk.Context, k Keeper, content types.AllowListedValidatorSetChangeProposal) error
- func HandleMinDepositAndFeeChangeProposal(ctx sdk.Context, k Keeper, content types.MinDepositAndFeeChangeProposal) error
- func HandlePstakeFeeAddressChangeProposal(ctx sdk.Context, k Keeper, content types.PstakeFeeAddressChangeProposal) error
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
- func RewardsAccountBalanceCallback(k Keeper, ctx sdk.Context, response []byte, query icqtypes.Query) error
- type CallbackFn
- type Callbacks
- type EpochsHooks
- type IBCTransferHooks
- func (i IBCTransferHooks) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, ...) error
- func (i IBCTransferHooks) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, ...) error
- func (i IBCTransferHooks) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, ...) error
- type Keeper
- func (k Keeper) AddBalanceToDelegationState(ctx sdk.Context, coin sdk.Coin)
- func (k Keeper) AddDelegatorUnbondingEpochEntry(ctx sdk.Context, delegatorAddress sdk.AccAddress, epochNumber int64, ...)
- func (k Keeper) AddEntriesForUndelegationEpoch(ctx sdk.Context, epochNumber int64, entries []types.UndelegationEntry)
- func (k Keeper) AddHostAccountDelegation(ctx sdk.Context, delegation types.HostAccountDelegation)
- func (k Keeper) AddHostAccountUndelegation(ctx sdk.Context, undelegationEntry types.HostAccountUndelegation)
- func (k Keeper) AddIBCTransferToTransientStore(ctx sdk.Context, amount sdk.Coin)
- func (k Keeper) AddICADelegateToTransientStore(ctx sdk.Context, amount sdk.Coin)
- func (k Keeper) AddTotalUndelegationForEpoch(ctx sdk.Context, epochNumber int64, amount sdk.Coin)
- func (k Keeper) AddUndelegationTransferToTransientStore(ctx sdk.Context, undelegationTransfer types.TransientUndelegationTransfer)
- func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64) error
- func (k Keeper) AllowListedValidators(c context.Context, request *types.QueryAllowListedValidatorsRequest) (*types.QueryAllowListedValidatorsResponse, error)
- func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool
- func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64) error
- func (k Keeper) BeginBlock(ctx sdk.Context)
- func (k Keeper) BindPort(ctx sdk.Context, portID string) error
- func (k Keeper) CValue(c context.Context, request *types.QueryCValueRequest) (*types.QueryCValueResponse, error)
- func (k Keeper) CallbackHandler() Callbacks
- func (k Keeper) ChanCloseInit(ctx sdk.Context, portID, channelID string) error
- func (k Keeper) CheckPendingICATxs(ctx sdk.Context) (bool, error)
- func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
- func (k Keeper) ConvertStkToToken(ctx sdk.Context, stkCoin sdk.DecCoin, cValue sdk.Dec) (sdk.Coin, sdk.DecCoin)
- func (k Keeper) ConvertTokenToStk(ctx sdk.Context, token sdk.DecCoin, cValue sdk.Dec) (sdk.Coin, sdk.DecCoin)
- func (k Keeper) DelegateMsgs(ctx sdk.Context, amount math.Int, denom string, ...) ([]proto.Message, error)
- func (k Keeper) DelegationEpochWorkFlow(ctx sdk.Context, hostChainParams lscosmostypes.HostChainParams) error
- func (k Keeper) DelegationState(c context.Context, request *types.QueryDelegationStateRequest) (*types.QueryDelegationStateResponse, error)
- func (k Keeper) DelegatorUnbondingEpochEntries(c context.Context, ...) (*types.QueryAllDelegatorUnbondingEpochEntriesResponse, error)
- func (k Keeper) DelegatorUnbondingEpochEntry(c context.Context, request *types.QueryDelegatorUnbondingEpochEntryRequest) (*types.QueryDelegatorUnbondingEpochEntryResponse, error)
- func (k Keeper) DepositModuleAccount(c context.Context, request *types.QueryDepositModuleAccountRequest) (*types.QueryDepositModuleAccountResponse, error)
- func (k Keeper) DoDelegate(ctx sdk.Context) error
- func (k Keeper) FailUnbondingEpochCValue(ctx sdk.Context, epochNumber int64, undelegationAmount sdk.Coin)
- func (k Keeper) FailedUnbondings(c context.Context, request *types.QueryFailedUnbondingsRequest) (*types.QueryFailedUnbondingsResponse, error)
- func (k Keeper) ForceUpdateHostAccountDelegation(ctx sdk.Context, delegation types.HostAccountDelegation)
- func (k Keeper) GenerateAndExecuteICATx(ctx sdk.Context, connectionID string, ownerID string, msgs []proto.Message) error
- func (k Keeper) GetAllValidatorsState(ctx sdk.Context, denom string) (types.AllowListedVals, types.HostAccountDelegations)
- func (k Keeper) GetAllowListedValidators(ctx sdk.Context) types.AllowListedValidators
- func (k Keeper) GetCValue(ctx sdk.Context) sdk.Dec
- func (k Keeper) GetDelegationModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI
- func (k Keeper) GetDelegationState(ctx sdk.Context) types.DelegationState
- func (k Keeper) GetDelegationTransientAmount(ctx sdk.Context) math.Int
- func (k Keeper) GetDelegatorUnbondingEpochEntry(ctx sdk.Context, delegatorAddress sdk.AccAddress, epochNumber int64) types.DelegatorUnbondingEpochEntry
- func (k Keeper) GetDepositAccountAmount(ctx sdk.Context) math.Int
- func (k Keeper) GetDepositModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI
- func (k Keeper) GetHostAccountDelegation(ctx sdk.Context, validatorAddress string) types.HostAccountDelegation
- func (k Keeper) GetHostAccountMaturedUndelegations(ctx sdk.Context) []types.HostAccountUndelegation
- func (k Keeper) GetHostAccountUndelegationForEpoch(ctx sdk.Context, epochNumber int64) (types.HostAccountUndelegation, error)
- func (k Keeper) GetHostAccounts(ctx sdk.Context) types.HostAccounts
- func (k Keeper) GetHostChainParams(ctx sdk.Context) types.HostChainParams
- func (k Keeper) GetHostChainRewardAddress(ctx sdk.Context) types.HostChainRewardAddress
- func (k Keeper) GetHostDelegationAccountAmount(ctx sdk.Context) math.Int
- func (k Keeper) GetIBCDenom(ctx sdk.Context) string
- func (k Keeper) GetIBCTransferTransientAmount(ctx sdk.Context) math.Int
- func (k Keeper) GetIBCTransientStore(ctx sdk.Context) types.IBCAmountTransientStore
- func (k Keeper) GetMintedAmount(ctx sdk.Context) math.Int
- func (k Keeper) GetModuleState(ctx sdk.Context) bool
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetRewardBoosterModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI
- func (k Keeper) GetRewardModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI
- func (k Keeper) GetStakedAmount(ctx sdk.Context) math.Int
- func (k Keeper) GetUnbondingEpochCValue(ctx sdk.Context, epochNumber int64) types.UnbondingEpochCValue
- func (k Keeper) GetUndelegationModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI
- func (k Keeper) HandleDelegationCallback(ctx sdk.Context, response []byte, _ icqtypes.Query) error
- func (k Keeper) HandleRewardsAccountBalanceCallback(ctx sdk.Context, response []byte, _ icqtypes.Query) error
- func (k Keeper) HostAccountUndelegation(c context.Context, request *types.QueryHostAccountUndelegationRequest) (*types.QueryHostAccountUndelegationResponse, error)
- func (k Keeper) HostAccounts(c context.Context, request *types.QueryHostAccountsRequest) (*types.QueryHostAccountsResponse, error)
- func (k Keeper) HostChainParams(c context.Context, in *types.QueryHostChainParamsRequest) (*types.QueryHostChainParamsResponse, error)
- func (k Keeper) IBCTransientStore(c context.Context, request *types.QueryIBCTransientStoreRequest) (*types.QueryIBCTransientStoreResponse, error)
- func (k Keeper) IsBound(ctx sdk.Context, portID string) bool
- func (k Keeper) IterateAllDelegatorUnbondingEpochEntry(ctx sdk.Context) []types.DelegatorUnbondingEpochEntry
- func (k Keeper) IterateAllUnbondingEpochCValues(ctx sdk.Context) []types.UnbondingEpochCValue
- func (k Keeper) IterateDelegatorUnbondingEpochEntry(ctx sdk.Context, delegatorAddress sdk.AccAddress) []types.DelegatorUnbondingEpochEntry
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MatureUnbondingEpochCValue(ctx sdk.Context, epochNumber int64)
- func (k Keeper) MintTokens(ctx sdk.Context, mintCoin sdk.Coin, delegatorAddress sdk.AccAddress) error
- func (k Keeper) ModuleState(c context.Context, request *types.QueryModuleStateRequest) (*types.QueryModuleStateResponse, error)
- func (k Keeper) NewCapability(ctx sdk.Context, name string) error
- func (k Keeper) NewEpochHooks() EpochsHooks
- func (k Keeper) NewIBCTransferHooks() IBCTransferHooks
- func (k Keeper) OnAcknowledgementIBCTransferPacket(ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, ...) error
- func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, modulePacket channeltypes.Packet, acknowledgement []byte, ...) error
- func (k Keeper) OnChanCloseConfirm(ctx sdk.Context, portID, channelID string) error
- func (k Keeper) OnChanCloseInit(ctx sdk.Context, portID, channelID string) error
- func (k Keeper) OnChanOpenAck(ctx sdk.Context, portID, channelID string, counterpartyChannelID string, ...) error
- func (k Keeper) OnChanOpenConfirm(ctx sdk.Context, portID, channelID string) error
- func (k Keeper) OnChanOpenInit(ctx sdk.Context, order channeltypes.Order, connectionHops []string, ...) (string, error)
- func (k Keeper) OnChanOpenTry(ctx sdk.Context, order channeltypes.Order, connectionHops []string, ...) (string, error)
- func (k Keeper) OnRecvIBCTransferPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, ...) error
- func (k Keeper) OnRecvPacket(ctx sdk.Context, modulePacket channeltypes.Packet, relayer sdk.AccAddress) ibcexported.Acknowledgement
- func (k Keeper) OnTimeoutIBCTransferPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, ...) error
- func (k Keeper) OnTimeoutPacket(ctx sdk.Context, modulePacket channeltypes.Packet, relayer sdk.AccAddress) error
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) PendingUnbondings(c context.Context, request *types.QueryPendingUnbondingsRequest) (*types.QueryPendingUnbondingsResponse, error)
- func (k Keeper) ProcessMaturedUndelegation(ctx sdk.Context) error
- func (k Keeper) RemoveBalanceFromDelegationState(ctx sdk.Context, coins sdk.Coins)
- func (k Keeper) RemoveDelegatorUnbondingEpochEntry(ctx sdk.Context, delegatorAddress sdk.AccAddress, epochNumber int64)
- func (k Keeper) RemoveHostAccountUndelegation(ctx sdk.Context, epochNumber int64) error
- func (k Keeper) RemoveIBCTransferFromTransientStore(ctx sdk.Context, amount sdk.Coin)
- func (k Keeper) RemoveICADelegateFromTransientStore(ctx sdk.Context, amount sdk.Coin)
- func (k Keeper) RemoveUndelegationTransferFromTransientStore(ctx sdk.Context, amount sdk.Coin) (types.TransientUndelegationTransfer, error)
- func (k Keeper) RewardEpochEpochWorkFlow(ctx sdk.Context, hostChainParams lscosmostypes.HostChainParams) error
- func (k Keeper) SendProtocolFee(ctx sdk.Context, protocolFee sdk.Coins, ...) error
- func (k Keeper) SendTokensToDepositModule(ctx sdk.Context, depositCoin sdk.Coins, senderAddress sdk.AccAddress) error
- func (k Keeper) SetAllowListedValidators(ctx sdk.Context, allowlistedValidators types.AllowListedValidators)
- func (k Keeper) SetDelegationState(ctx sdk.Context, delegationState types.DelegationState)
- func (k Keeper) SetDelegatorUnbondingEpochEntry(ctx sdk.Context, unbondingEpochEntry types.DelegatorUnbondingEpochEntry)
- func (k Keeper) SetHostAccounts(ctx sdk.Context, hostAccounts types.HostAccounts)
- func (k Keeper) SetHostChainDelegationAddress(ctx sdk.Context, addr string) error
- func (k Keeper) SetHostChainParams(ctx sdk.Context, hostChainParams types.HostChainParams)
- func (k Keeper) SetHostChainRewardAddress(ctx sdk.Context, hostChainRewardAddress types.HostChainRewardAddress)
- func (k Keeper) SetHostChainRewardAddressIfEmpty(ctx sdk.Context, hostChainRewardAddress types.HostChainRewardAddress) error
- func (k Keeper) SetIBCTransientStore(ctx sdk.Context, ibcAmountTransientStore types.IBCAmountTransientStore)
- func (k Keeper) SetModuleState(ctx sdk.Context, enable bool)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetUnbondingEpochCValue(ctx sdk.Context, unbondingEpochCValue types.UnbondingEpochCValue)
- func (k Keeper) SubtractHostAccountDelegation(ctx sdk.Context, delegation types.HostAccountDelegation) error
- func (k Keeper) UnbondingEpochCValue(c context.Context, request *types.QueryUnbondingEpochCValueRequest) (*types.QueryUnbondingEpochCValueResponse, error)
- func (k Keeper) Unclaimed(c context.Context, request *types.QueryUnclaimedRequest) (*types.QueryUnclaimedResponse, error)
- func (k Keeper) UndelegateMsgs(ctx sdk.Context, amount math.Int, denom string, ...) ([]proto.Message, []types.UndelegationEntry, error)
- func (k Keeper) UndelegationEpochWorkFlow(ctx sdk.Context, hostChainParams lscosmostypes.HostChainParams, ...) error
- func (k Keeper) UpdateCompletionTimeForUndelegationEpoch(ctx sdk.Context, epochNumber int64, completionTime time.Time)
Constants ¶
const ( RewardsAccountBalance = "reward_account_balance" Delegation = "delegation" )
Variables ¶
This section is empty.
Functions ¶
func CValueRangeInvariant ¶
CValueRangeInvariant checks that if CValue is within module safety range
func DelegationCallback ¶
DelegationCallback returns response of HandleDelegationCallback
func DivideAmountIntoValidatorSet ¶
func DivideAmountIntoValidatorSet(sortedValDiff types.WeightedAddressAmounts, coin sdk.Coin) (types.ValAddressAmounts, error)
DivideAmountIntoValidatorSet : divides amount into validator set
func DivideUndelegateAmountIntoValidatorSet ¶
func DivideUndelegateAmountIntoValidatorSet(sortedValDiff types.WeightedAddressAmounts, coin sdk.Coin) (types.ValAddressAmounts, error)
DivideUndelegateAmountIntoValidatorSet : divides undelegation amount into validator set
func FetchValidatorsToDelegate ¶
func FetchValidatorsToDelegate(valList types.AllowListedValidators, delegationState types.DelegationState, amount sdk.Coin) (types.ValAddressAmounts, error)
FetchValidatorsToDelegate gives a list of all validators having weighted amount for few and 1uatom for rest in order to auto claim all rewards accumulated in current epoch
func FetchValidatorsToUndelegate ¶
func FetchValidatorsToUndelegate(valList types.AllowListedValidators, delegationState types.DelegationState, amount sdk.Coin) (types.ValAddressAmounts, error)
FetchValidatorsToUndelegate gives a list of all validators having weighted amount for few and 1uatom for rest in order to auto claim all rewards accumulated in current epoch
func GetIdealCurrentDelegations ¶
func GetIdealCurrentDelegations(valList types.AllowListedValidators, delegationState types.DelegationState, amt sdk.Coin, reverse bool) (types.WeightedAddressAmounts, error)
GetIdealCurrentDelegations returns ideal amount of delegations to validators on host chain
func HandleAllowListedValidatorSetChangeProposal ¶
func HandleAllowListedValidatorSetChangeProposal(ctx sdk.Context, k Keeper, content types.AllowListedValidatorSetChangeProposal) error
HandleAllowListedValidatorSetChangeProposal changes the allowList validator set
func HandleMinDepositAndFeeChangeProposal ¶
func HandleMinDepositAndFeeChangeProposal(ctx sdk.Context, k Keeper, content types.MinDepositAndFeeChangeProposal) error
HandleMinDepositAndFeeChangeProposal changes host chain params for desired min-deposit and protocol fee
func HandlePstakeFeeAddressChangeProposal ¶ added in v0.1.4
func HandlePstakeFeeAddressChangeProposal(ctx sdk.Context, k Keeper, content types.PstakeFeeAddressChangeProposal) error
HandlePstakeFeeAddressChangeProposal changes fee collector address
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
RegisterInvariants registers the lscosmos module invariants
Types ¶
type CallbackFn ¶
CallbackFn wrapper struct for interchainstaking keeper
type Callbacks ¶
type Callbacks struct {
// contains filtered or unexported fields
}
func (Callbacks) AddCallback ¶
func (c Callbacks) AddCallback(id string, fn interface{}) icqtypes.QueryCallbacks
AddCallback adds callback using the input id and interface
func (Callbacks) RegisterCallbacks ¶
func (c Callbacks) RegisterCallbacks() icqtypes.QueryCallbacks
RegisterCallbacks adds callbacks
type EpochsHooks ¶
type EpochsHooks struct {
// contains filtered or unexported fields
}
EpochsHooks wrapper struct for incentives keeper
func (EpochsHooks) AfterEpochEnd ¶
func (h EpochsHooks) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64) error
AfterEpochEnd gets called at the end of the epoch, end of epoch is the timestamp of first block produced after epoch duration.
func (EpochsHooks) BeforeEpochStart ¶
func (h EpochsHooks) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64) error
BeforeEpochStart new epoch is next block of epoch end block
type IBCTransferHooks ¶
type IBCTransferHooks struct {
// contains filtered or unexported fields
}
func (IBCTransferHooks) OnAcknowledgementPacket ¶
func (i IBCTransferHooks) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, transferAckErr error) error
func (IBCTransferHooks) OnRecvPacket ¶
func (i IBCTransferHooks) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, transferAck ibcexported.Acknowledgement) error
func (IBCTransferHooks) OnTimeoutPacket ¶
func (i IBCTransferHooks) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, transferTimeoutErr error) error
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper of this module maintains the state of whole module
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey store.StoreKey, ps paramtypes.Subspace, bankKeeper types.BankKeeper, accKeeper types.AccountKeeper, epochKeeper types.EpochKeeper, ics4WrapperKeeper types.ICS4WrapperKeeper, channelKeeper types.ChannelKeeper, portKeeper types.PortKeeper, ibcTransferKeeper types.IBCTransferKeeper, icaControllerKeeper types.ICAControllerKeeper, icqKeeper types.ICQKeeper, lscosmosScopedKeeper types.ScopedKeeper, msgRouter *baseapp.MsgServiceRouter, ) Keeper
NewKeeper returns a new instance of ls cosmos module keeper
func (Keeper) AddBalanceToDelegationState ¶
AddBalanceToDelegationState adds balance in the HostDelegationAccountBalance of types.DelegationState
func (Keeper) AddDelegatorUnbondingEpochEntry ¶
func (k Keeper) AddDelegatorUnbondingEpochEntry(ctx sdk.Context, delegatorAddress sdk.AccAddress, epochNumber int64, amount sdk.Coin)
AddDelegatorUnbondingEpochEntry adds delegator entry for unbondign stkatom for an unbonding epoch
func (Keeper) AddEntriesForUndelegationEpoch ¶
func (k Keeper) AddEntriesForUndelegationEpoch(ctx sdk.Context, epochNumber int64, entries []types.UndelegationEntry)
AddEntriesForUndelegationEpoch adds the input entries corresponding to the input epochNumber in types.DelegationState
func (Keeper) AddHostAccountDelegation ¶
func (k Keeper) AddHostAccountDelegation(ctx sdk.Context, delegation types.HostAccountDelegation)
AddHostAccountDelegation append the host account delegations in types.DelegationState provided in the input
func (Keeper) AddHostAccountUndelegation ¶
func (k Keeper) AddHostAccountUndelegation(ctx sdk.Context, undelegationEntry types.HostAccountUndelegation)
AddHostAccountUndelegation appends the input undelegationEntry in types.DelegationState
func (Keeper) AddIBCTransferToTransientStore ¶
AddIBCTransferToTransientStore adds ibctransfer tokens that are in ibc transition CONTRACT: to be used atomically with IBCTransfer of tokens from delegation account to it's host counterpart
func (Keeper) AddICADelegateToTransientStore ¶
AddICADelegateToTransientStore adds ibctransfer tokens that are in ibc transition CONTRACT: to be used atomically with RemoveBalanceFromDelegationState
func (Keeper) AddTotalUndelegationForEpoch ¶
AddTotalUndelegationForEpoch adds the total undelegations corresponding to the input epoch number in types.DelegationState
func (Keeper) AddUndelegationTransferToTransientStore ¶
func (k Keeper) AddUndelegationTransferToTransientStore(ctx sdk.Context, undelegationTransfer types.TransientUndelegationTransfer)
AddUndelegationTransferToTransientStore adds ibctransfer tokens that are in ibc transition from host chain to controller chain CONTRACT: to be used atomically with RemoveHostAccountUndelegation (after successful undelegations)
func (Keeper) AfterEpochEnd ¶
AfterEpochEnd handle the "stake", "reward" and "undelegate" epoch and their respective actions 1. "stake" generates delegate transaction for delegating the amount of stake accumulated over the "stake" epoch 2. "reward" generates delegate transaction for withdrawing and restaking the amount of stake accumulated over the "reward" epochs and shift the amount to next epoch if the min amount is not reached 3. "undelegate" generated the undelegate transaction for undelegating the amount accumulated over the "undelegate" epoch
func (Keeper) AllowListedValidators ¶
func (k Keeper) AllowListedValidators(c context.Context, request *types.QueryAllowListedValidatorsRequest) (*types.QueryAllowListedValidatorsResponse, error)
AllowListedValidators queries the current allow listed validators set
func (Keeper) AuthenticateCapability ¶
func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool
AuthenticateCapability wraps the lscosmosScopedKeeper's AuthenticateCapability function
func (Keeper) BeforeEpochStart ¶
BeforeEpochStart - call hook if registered
func (Keeper) BeginBlock ¶
BeginBlock will use utils.ApplyFuncIfNoError to apply the changes made by the functions passed as parameters
func (Keeper) BindPort ¶
BindPort defines a wrapper function for the ort Keeper's function in order to expose it to module's InitGenesis function
func (Keeper) CValue ¶
func (k Keeper) CValue(c context.Context, request *types.QueryCValueRequest) (*types.QueryCValueResponse, error)
CValue computes and returns the c value
func (Keeper) CallbackHandler ¶
CallbackHandler returns Callbacks with empty entries
func (Keeper) ChanCloseInit ¶
ChanCloseInit defines a wrapper function for the channel Keeper's function
func (Keeper) CheckPendingICATxs ¶
CheckPendingICATxs checks if there are any ongoing ica transaction which are stuck
func (Keeper) ClaimCapability ¶
func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
ClaimCapability allows the module that can claim a capability that IBC module passes to it
func (Keeper) ConvertStkToToken ¶
func (k Keeper) ConvertStkToToken(ctx sdk.Context, stkCoin sdk.DecCoin, cValue sdk.Dec) (sdk.Coin, sdk.DecCoin)
ConvertStkToToken converts a stk coin to token with the c value provided in the input.
func (Keeper) ConvertTokenToStk ¶
func (k Keeper) ConvertTokenToStk(ctx sdk.Context, token sdk.DecCoin, cValue sdk.Dec) (sdk.Coin, sdk.DecCoin)
ConvertTokenToStk converts a token coin to stk coin with the c value provided in the input.
func (Keeper) DelegateMsgs ¶
func (k Keeper) DelegateMsgs(ctx sdk.Context, amount math.Int, denom string, delegationState types.DelegationState) ([]proto.Message, error)
DelegateMsgs gives the list of Delegate Txs to be executed based on the current state and params. CONTRACT: allowlistedValList.len > 0, amount > 0
func (Keeper) DelegationEpochWorkFlow ¶
func (k Keeper) DelegationEpochWorkFlow(ctx sdk.Context, hostChainParams lscosmostypes.HostChainParams) error
DelegationEpochWorkFlow handles the delegation epoch work flow : 1. Checks and adds balance present in the rewards module account to delegation module account 2. Checks and adds balance present in the deposit module account to delegation module account 3. Checks and IBC transfers the balance present in the delegation module account to other chain 4. Transfer fees to the fee address in the host chain params
func (Keeper) DelegationState ¶
func (k Keeper) DelegationState(c context.Context, request *types.QueryDelegationStateRequest) (*types.QueryDelegationStateResponse, error)
DelegationState queries the current delegation state
func (Keeper) DelegatorUnbondingEpochEntries ¶
func (k Keeper) DelegatorUnbondingEpochEntries(c context.Context, request *types.QueryAllDelegatorUnbondingEpochEntriesRequest) (*types.QueryAllDelegatorUnbondingEpochEntriesResponse, error)
DelegatorUnbondingEpochEntries queries all the delegator unbonding epoch entries corresponding to the input delegator address in types.QueryAllDelegatorUnbondingEpochEntriesRequest
func (Keeper) DelegatorUnbondingEpochEntry ¶
func (k Keeper) DelegatorUnbondingEpochEntry(c context.Context, request *types.QueryDelegatorUnbondingEpochEntryRequest) (*types.QueryDelegatorUnbondingEpochEntryResponse, error)
DelegatorUnbondingEpochEntry queries the delegator unbonding epoch entry details corresponding to the input epoch number and delegator address in types.QueryDelegatorUnbondingEpochEntryRequest
func (Keeper) DepositModuleAccount ¶
func (k Keeper) DepositModuleAccount(c context.Context, request *types.QueryDepositModuleAccountRequest) (*types.QueryDepositModuleAccountResponse, error)
DepositModuleAccount queries the deposit module account balance
func (Keeper) DoDelegate ¶
DoDelegate generates and executes ICA transactions based on the generated delegation state from DelegateMsgs
func (Keeper) FailUnbondingEpochCValue ¶
func (k Keeper) FailUnbondingEpochCValue(ctx sdk.Context, epochNumber int64, undelegationAmount sdk.Coin)
FailUnbondingEpochCValue sets unbonding epochCValue as timeout for undelegation
func (Keeper) FailedUnbondings ¶
func (k Keeper) FailedUnbondings(c context.Context, request *types.QueryFailedUnbondingsRequest) (*types.QueryFailedUnbondingsResponse, error)
FailedUnbondings queries the failed unbonding entries corresponding to the input delegator address in types.QueryUnclaimedRequest
func (Keeper) ForceUpdateHostAccountDelegation ¶
func (k Keeper) ForceUpdateHostAccountDelegation(ctx sdk.Context, delegation types.HostAccountDelegation)
ForceUpdateHostAccountDelegation updates the delegation-state for a validator.
func (Keeper) GenerateAndExecuteICATx ¶
func (k Keeper) GenerateAndExecuteICATx(ctx sdk.Context, connectionID string, ownerID string, msgs []proto.Message) error
GenerateAndExecuteICATx does ica transactions with messages, optimistic bool does not check for channel to be open. only use to do icatxns when channel is getting created.
func (Keeper) GetAllValidatorsState ¶
func (k Keeper) GetAllValidatorsState(ctx sdk.Context, denom string) (types.AllowListedVals, types.HostAccountDelegations)
GetAllValidatorsState returns the combined allowed listed validators set and combined delegation state. It is done to keep the old validators in the loop while calculating weighted amounts for delegation and undelegation
func (Keeper) GetAllowListedValidators ¶
func (k Keeper) GetAllowListedValidators(ctx sdk.Context) types.AllowListedValidators
GetAllowListedValidators gets the allow listed validator set
func (Keeper) GetCValue ¶
GetCValue gets the C value after recalculating everytime when the function is called. Returns 1 if stakedAmount or mintedAmount is zero.
func (Keeper) GetDelegationModuleAccount ¶
func (k Keeper) GetDelegationModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI
GetDelegationModuleAccount returns the delegation module account interface
func (Keeper) GetDelegationState ¶
func (k Keeper) GetDelegationState(ctx sdk.Context) types.DelegationState
GetDelegationState gets the delegation state in store
func (Keeper) GetDelegationTransientAmount ¶
GetDelegationTransientAmount returns the delegation transient amount of the IBC denom
func (Keeper) GetDelegatorUnbondingEpochEntry ¶
func (k Keeper) GetDelegatorUnbondingEpochEntry(ctx sdk.Context, delegatorAddress sdk.AccAddress, epochNumber int64) types.DelegatorUnbondingEpochEntry
GetDelegatorUnbondingEpochEntry gets delegator entry for unbondign stkatom for an unbonding epoch
func (Keeper) GetDepositAccountAmount ¶
GetDepositAccountAmount returns the deposit account amount of the IBC denom
func (Keeper) GetDepositModuleAccount ¶
func (k Keeper) GetDepositModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI
GetDepositModuleAccount returns deposit module account interface
func (Keeper) GetHostAccountDelegation ¶
func (k Keeper) GetHostAccountDelegation(ctx sdk.Context, validatorAddress string) types.HostAccountDelegation
GetHostAccountDelegation gets the delegation for a particular validator
func (Keeper) GetHostAccountMaturedUndelegations ¶
func (k Keeper) GetHostAccountMaturedUndelegations(ctx sdk.Context) []types.HostAccountUndelegation
GetHostAccountMaturedUndelegations returns the host account matured undelegations
func (Keeper) GetHostAccountUndelegationForEpoch ¶
func (k Keeper) GetHostAccountUndelegationForEpoch(ctx sdk.Context, epochNumber int64) (types.HostAccountUndelegation, error)
GetHostAccountUndelegationForEpoch returns the host account undelegation the input epoch number
func (Keeper) GetHostAccounts ¶
func (k Keeper) GetHostAccounts(ctx sdk.Context) types.HostAccounts
GetHostAccounts gets host account port ids from store
func (Keeper) GetHostChainParams ¶
func (k Keeper) GetHostChainParams(ctx sdk.Context) types.HostChainParams
GetHostChainParams gets the host chain params in store
func (Keeper) GetHostChainRewardAddress ¶
func (k Keeper) GetHostChainRewardAddress(ctx sdk.Context) types.HostChainRewardAddress
GetHostChainRewardAddress gets host chain reward address
func (Keeper) GetHostDelegationAccountAmount ¶
GetHostDelegationAccountAmount returns the host account delegation account amount of IBC denom
func (Keeper) GetIBCDenom ¶
GetIBCDenom returns IBC denom in form of string
func (Keeper) GetIBCTransferTransientAmount ¶
GetIBCTransferTransientAmount returns the IBC transfer transient amount of the IBC denom
func (Keeper) GetIBCTransientStore ¶
func (k Keeper) GetIBCTransientStore(ctx sdk.Context) types.IBCAmountTransientStore
GetIBCTransientStore gets tokens that are in ibc transition
func (Keeper) GetMintedAmount ¶
GetMintedAmount gets minted amount
func (Keeper) GetModuleState ¶
GetModuleState blocks all module transactions except for register proposal or valset update
func (Keeper) GetRewardBoosterModuleAccount ¶
func (k Keeper) GetRewardBoosterModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI
GetRewardBoosterModuleAccount returns the rewards booster module account interface
func (Keeper) GetRewardModuleAccount ¶
func (k Keeper) GetRewardModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI
GetRewardModuleAccount returns the reward module account interface
func (Keeper) GetStakedAmount ¶
GetStakedAmount returns the total staked amount stored in delegation state
func (Keeper) GetUnbondingEpochCValue ¶
func (k Keeper) GetUnbondingEpochCValue(ctx sdk.Context, epochNumber int64) types.UnbondingEpochCValue
GetUnbondingEpochCValue sets cvalue for unbonding epoch
func (Keeper) GetUndelegationModuleAccount ¶
func (k Keeper) GetUndelegationModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI
GetUndelegationModuleAccount returns the undelegation module account interface
func (Keeper) HandleDelegationCallback ¶
HandleDelegationCallback generates and executes delegation query
func (Keeper) HandleRewardsAccountBalanceCallback ¶
func (k Keeper) HandleRewardsAccountBalanceCallback(ctx sdk.Context, response []byte, _ icqtypes.Query) error
HandleRewardsAccountBalanceCallback generates and executes rewards account balance query
func (Keeper) HostAccountUndelegation ¶
func (k Keeper) HostAccountUndelegation(c context.Context, request *types.QueryHostAccountUndelegationRequest) (*types.QueryHostAccountUndelegationResponse, error)
HostAccountUndelegation queries the host account undelegation details corresponding to the input epoch number in types.QueryHostAccountUndelegationRequest
func (Keeper) HostAccounts ¶
func (k Keeper) HostAccounts(c context.Context, request *types.QueryHostAccountsRequest) (*types.QueryHostAccountsResponse, error)
HostAccounts queries the host accounts
func (Keeper) HostChainParams ¶
func (k Keeper) HostChainParams(c context.Context, in *types.QueryHostChainParamsRequest) (*types.QueryHostChainParamsResponse, error)
HostChainParams queries the host chain params
func (Keeper) IBCTransientStore ¶
func (k Keeper) IBCTransientStore(c context.Context, request *types.QueryIBCTransientStoreRequest) (*types.QueryIBCTransientStoreResponse, error)
IBCTransientStore queries the current IBC transient store
func (Keeper) IterateAllDelegatorUnbondingEpochEntry ¶
func (k Keeper) IterateAllDelegatorUnbondingEpochEntry(ctx sdk.Context) []types.DelegatorUnbondingEpochEntry
IterateAllDelegatorUnbondingEpochEntry returns a list of all epoch entries ever created in the KV store by using the prefix iterator
func (Keeper) IterateAllUnbondingEpochCValues ¶
func (k Keeper) IterateAllUnbondingEpochCValues(ctx sdk.Context) []types.UnbondingEpochCValue
IterateAllUnbondingEpochCValues sets cvalue for all epochs
func (Keeper) IterateDelegatorUnbondingEpochEntry ¶
func (k Keeper) IterateDelegatorUnbondingEpochEntry(ctx sdk.Context, delegatorAddress sdk.AccAddress) []types.DelegatorUnbondingEpochEntry
IterateDelegatorUnbondingEpochEntry returns a list of types.DelegatorUnbondingEpochEntry by using prefix for iterating through the KV store entries using the input delegator address
func (Keeper) MatureUnbondingEpochCValue ¶
MatureUnbondingEpochCValue sets unbonding epochCValue as matured
func (Keeper) MintTokens ¶
func (k Keeper) MintTokens(ctx sdk.Context, mintCoin sdk.Coin, delegatorAddress sdk.AccAddress) error
MintTokens in the given account
func (Keeper) ModuleState ¶
func (k Keeper) ModuleState(c context.Context, request *types.QueryModuleStateRequest) (*types.QueryModuleStateResponse, error)
ModuleState queries the current module state
func (Keeper) NewCapability ¶
NewCapability allows the module that can initiate and claim a capability that IBC module passes to it
func (Keeper) NewEpochHooks ¶
func (k Keeper) NewEpochHooks() EpochsHooks
NewEpochHooks Return the wrapper struct
func (Keeper) NewIBCTransferHooks ¶
func (k Keeper) NewIBCTransferHooks() IBCTransferHooks
func (Keeper) OnAcknowledgementIBCTransferPacket ¶
func (k Keeper) OnAcknowledgementIBCTransferPacket(ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, transferAckErr error) error
OnAcknowledgementIBCTransferPacket performs the following steps : 1. Returns early if there is an error 2. Performs health checks the packet received 3. Updates balance in the delegation state by using AddBalanceToDelegationState 4. Removes amount from IBCTransferFromTransientStore
func (Keeper) OnAcknowledgementPacket ¶
func (k Keeper) OnAcknowledgementPacket( ctx sdk.Context, modulePacket channeltypes.Packet, acknowledgement []byte, relayer sdk.AccAddress, ) error
OnAcknowledgementPacket implements the IBCModule interface
func (Keeper) OnChanCloseConfirm ¶
OnChanCloseConfirm implements the IBCModule interface
func (Keeper) OnChanCloseInit ¶
OnChanCloseInit implements the IBCModule interface
func (Keeper) OnChanOpenAck ¶
func (k Keeper) OnChanOpenAck( ctx sdk.Context, portID, channelID string, counterpartyChannelID string, counterpartyVersion string, ) error
OnChanOpenAck implements the IBCModule interface
func (Keeper) OnChanOpenConfirm ¶
OnChanOpenConfirm implements the IBCModule interface
func (Keeper) OnChanOpenInit ¶
func (k Keeper) OnChanOpenInit( ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID string, channelID string, chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version string, ) (string, error)
OnChanOpenInit implements the IBCModule interface
func (Keeper) OnChanOpenTry ¶
func (k Keeper) OnChanOpenTry( ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID, channelID string, chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, counterpartyVersion string, ) (string, error)
OnChanOpenTry implements the IBCModule interface
func (Keeper) OnRecvIBCTransferPacket ¶
func (k Keeper) OnRecvIBCTransferPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, transferAck ibcexported.Acknowledgement) error
OnRecvIBCTransferPacket performs the following steps : 1. Checks if the acknowledgment was a success or not 2. Clears transient entries based on packet contents 3. Update the matured unbonding epoch c value using MatureUnbondingEpochCValue
func (Keeper) OnRecvPacket ¶
func (k Keeper) OnRecvPacket( ctx sdk.Context, modulePacket channeltypes.Packet, relayer sdk.AccAddress, ) ibcexported.Acknowledgement
OnRecvPacket implements the IBCModule interface
func (Keeper) OnTimeoutIBCTransferPacket ¶
func (k Keeper) OnTimeoutIBCTransferPacket(ctx sdk.Context, packet channeltypes.Packet, relayer sdk.AccAddress, transferTimeoutErr error) error
OnTimeoutIBCTransferPacket performs the following actions : 1. Returns early if there is a packet timeout error 2. Perform health checks on the packet received 3. Remove the amount from IBCTransferFromTransientStore
func (Keeper) OnTimeoutPacket ¶
func (k Keeper) OnTimeoutPacket( ctx sdk.Context, modulePacket channeltypes.Packet, relayer sdk.AccAddress, ) error
OnTimeoutPacket implements the IBCModule interface
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params queries the module params
func (Keeper) PendingUnbondings ¶
func (k Keeper) PendingUnbondings(c context.Context, request *types.QueryPendingUnbondingsRequest) (*types.QueryPendingUnbondingsResponse, error)
PendingUnbondings queries the pending unbonding entries corresponding to the input delegator address in types.QueryUnclaimedRequest
func (Keeper) ProcessMaturedUndelegation ¶
ProcessMaturedUndelegation processes all the matured undelegations by fetching all the host account matured undelegations and processing them one by one
func (Keeper) RemoveBalanceFromDelegationState ¶
RemoveBalanceFromDelegationState subtracts balance in the HostDelegationAccountBalance of types.DelegationState
func (Keeper) RemoveDelegatorUnbondingEpochEntry ¶
func (k Keeper) RemoveDelegatorUnbondingEpochEntry(ctx sdk.Context, delegatorAddress sdk.AccAddress, epochNumber int64)
RemoveDelegatorUnbondingEpochEntry removes the delegator unbonding epoch entry for the input delegator address and epoch number
func (Keeper) RemoveHostAccountUndelegation ¶
RemoveHostAccountUndelegation removes the completion time for undelegation epoch corresponding to the input epoch number in types.DelegationState
func (Keeper) RemoveIBCTransferFromTransientStore ¶
RemoveIBCTransferFromTransientStore removes ibctransfer tokens that are in ibc transition CONTRACT: to be used atomically with AddBalanceToDelegationState
func (Keeper) RemoveICADelegateFromTransientStore ¶
RemoveICADelegateFromTransientStore removes ibctransfer tokens that are in ibc transition Contract: to be used atomically with AddHostAccountDelegation and AddBalanceToDelegationState(incase of failed txns)
func (Keeper) RemoveUndelegationTransferFromTransientStore ¶
func (k Keeper) RemoveUndelegationTransferFromTransientStore(ctx sdk.Context, amount sdk.Coin) (types.TransientUndelegationTransfer, error)
RemoveUndelegationTransferFromTransientStore removes ibctransfer tokens that are in ibc transition from host chain to controller chain Contract: to be used atomically with MatureUnbondingEpochCValue (after successful undelegations) and AddHostAccountUndelegation ( after failed ICA+IBC txn - matured undelegations)
func (Keeper) RewardEpochEpochWorkFlow ¶
func (k Keeper) RewardEpochEpochWorkFlow(ctx sdk.Context, hostChainParams lscosmostypes.HostChainParams) error
RewardEpochEpochWorkFlow handles the rewards epoch work flow generates and executes the ICA transaction for claiming rewards
func (Keeper) SendProtocolFee ¶
func (k Keeper) SendProtocolFee(ctx sdk.Context, protocolFee sdk.Coins, moduleAccount, gstakeFeeAddressString string) error
SendProtocolFee to the community pool
func (Keeper) SendTokensToDepositModule ¶
func (k Keeper) SendTokensToDepositModule(ctx sdk.Context, depositCoin sdk.Coins, senderAddress sdk.AccAddress) error
SendTokensToDepositModule sends the tokens to DepositModuleAccount
func (Keeper) SetAllowListedValidators ¶
func (k Keeper) SetAllowListedValidators(ctx sdk.Context, allowlistedValidators types.AllowListedValidators)
SetAllowListedValidators sets allowlisted validator set
func (Keeper) SetDelegationState ¶
func (k Keeper) SetDelegationState(ctx sdk.Context, delegationState types.DelegationState)
SetDelegationState sets the delegation state in store
func (Keeper) SetDelegatorUnbondingEpochEntry ¶
func (k Keeper) SetDelegatorUnbondingEpochEntry(ctx sdk.Context, unbondingEpochEntry types.DelegatorUnbondingEpochEntry)
SetDelegatorUnbondingEpochEntry sets delegator entry for unbondign stkatom for an unbonding epoch
func (Keeper) SetHostAccounts ¶
func (k Keeper) SetHostAccounts(ctx sdk.Context, hostAccounts types.HostAccounts)
SetHostAccounts sets host account port ids in store
func (Keeper) SetHostChainDelegationAddress ¶
SetHostChainDelegationAddress sets the host chain delegator address in types.DelegationState
func (Keeper) SetHostChainParams ¶
func (k Keeper) SetHostChainParams(ctx sdk.Context, hostChainParams types.HostChainParams)
SetHostChainParams sets the host chain params in store
func (Keeper) SetHostChainRewardAddress ¶
func (k Keeper) SetHostChainRewardAddress(ctx sdk.Context, hostChainRewardAddress types.HostChainRewardAddress)
SetHostChainRewardAddress sets host chain reward address
func (Keeper) SetHostChainRewardAddressIfEmpty ¶
func (k Keeper) SetHostChainRewardAddressIfEmpty(ctx sdk.Context, hostChainRewardAddress types.HostChainRewardAddress) error
SetHostChainRewardAddressIfEmpty sets host chain reward address
func (Keeper) SetIBCTransientStore ¶
func (k Keeper) SetIBCTransientStore(ctx sdk.Context, ibcAmountTransientStore types.IBCAmountTransientStore)
SetIBCTransientStore sets tokens that are in ibc transition
func (Keeper) SetModuleState ¶
SetModuleState allows all module transactions
func (Keeper) SetUnbondingEpochCValue ¶
func (k Keeper) SetUnbondingEpochCValue(ctx sdk.Context, unbondingEpochCValue types.UnbondingEpochCValue)
SetUnbondingEpochCValue sets cvalue for unbonding epoch
func (Keeper) SubtractHostAccountDelegation ¶
func (k Keeper) SubtractHostAccountDelegation(ctx sdk.Context, delegation types.HostAccountDelegation) error
SubtractHostAccountDelegation calls the removeHostAccountDelegation function to subtract host account delegations in types.DelegationState
func (Keeper) UnbondingEpochCValue ¶
func (k Keeper) UnbondingEpochCValue(c context.Context, request *types.QueryUnbondingEpochCValueRequest) (*types.QueryUnbondingEpochCValueResponse, error)
UnbondingEpochCValue queries the unbonding epoch c value details corresponding to the input epoch number in types.QueryUnbondingEpochCValueRequest
func (Keeper) Unclaimed ¶
func (k Keeper) Unclaimed(c context.Context, request *types.QueryUnclaimedRequest) (*types.QueryUnclaimedResponse, error)
Unclaimed queries the unclaimed entries corresponding to the input delegator address in types.QueryUnclaimedRequest
func (Keeper) UndelegateMsgs ¶
func (k Keeper) UndelegateMsgs(ctx sdk.Context, amount math.Int, denom string, delegationState types.DelegationState) ([]proto.Message, []types.UndelegationEntry, error)
UndelegateMsgs gives the list of Undelegate Txs to be executed based on the current state and params. CONTRACT: allowlistedValList.len > 0, amount > 0
func (Keeper) UndelegationEpochWorkFlow ¶
func (k Keeper) UndelegationEpochWorkFlow(ctx sdk.Context, hostChainParams lscosmostypes.HostChainParams, epochNumber int64) error
UndelegationEpochWorkFlow handles the undelegation epoch work flow : 1. Fetches host account undelegations using in GetHostAccountUndelegationForEpoch 2. Convert stk coin to token using ConvertStkToToken based on the current c value 3. Form undelegation messages using the current delegation state 4. Generate and execute the ICA transaction for the undelegation messages 5. Perform KV store changes based on the previous actions Returns nil or an error based on the checks in the function
func (Keeper) UpdateCompletionTimeForUndelegationEpoch ¶
func (k Keeper) UpdateCompletionTimeForUndelegationEpoch(ctx sdk.Context, epochNumber int64, completionTime time.Time)
UpdateCompletionTimeForUndelegationEpoch updates the completion time for undelegation epoch corresponding to the input epoch number in types.DelegationState
Source Files ¶
- abci.go
- allowlisted_validators.go
- c_value.go
- delegation_state.go
- delegation_strategy.go
- delegator_unbonding_epoch_entry.go
- governance_proposal.go
- grpc_query.go
- grpc_query_params.go
- handshake.go
- hooks.go
- host_accounts.go
- host_chain_params.go
- host_chain_reward_address.go
- ica_txs.go
- icq_callbacks.go
- invariants.go
- keeper.go
- module_state.go
- msg_server.go
- params.go
- transient_store.go
- unbonding_epoch_c_value.go