Documentation ¶
Index ¶
- Constants
- func CValueRangeInvariant(k Keeper) sdk.Invariant
- func DivideAmountIntoValidatorSet(sortedValDiff types.WeightedAddressAmounts, coin sdk.Coin) ([]types.ValAddressAmount, error)
- func DivideUndelegateAmountIntoValidatorSet(sortedValDiff types.WeightedAddressAmounts, coin sdk.Coin) ([]types.ValAddressAmount, error)
- func FetchValidatorsToDelegate(valList types.AllowListedValidators, delegationState types.DelegationState, ...) ([]types.ValAddressAmount, error)
- func FetchValidatorsToUndelegate(valList types.AllowListedValidators, delegationState types.DelegationState, ...) ([]types.ValAddressAmount, error)
- func GetIdealCurrentDelegations(valList types.AllowListedValidators, delegationState types.DelegationState, ...) types.WeightedAddressAmounts
- 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 HandleRegisterHostChainProposal(ctx sdk.Context, k Keeper, content types.RegisterHostChainProposal) 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) 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, delegatorAddr string, amount sdk.Int, denom string) ([]sdk.Msg, 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) GenerateAndExecuteICATx(ctx sdk.Context, connectionID string, portID string, msgs []sdk.Msg) error
- func (k Keeper) GetAllValidatorsState(ctx sdk.Context) (types.AllowListedValidators, types.DelegationState)
- func (k Keeper) GetAllowListedValidators(ctx sdk.Context) types.AllowListedValidators
- func (k Keeper) GetCValue(ctx sdk.Context) sdk.Dec
- func (k Keeper) GetDelegationAccountAmount(ctx sdk.Context) sdk.Int
- 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) sdk.Int
- func (k Keeper) GetDelegatorUnbondingEpochEntry(ctx sdk.Context, delegatorAddress sdk.AccAddress, epochNumber int64) types.DelegatorUnbondingEpochEntry
- func (k Keeper) GetDepositAccountAmount(ctx sdk.Context) sdk.Int
- func (k Keeper) GetDepositModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI
- 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) sdk.Int
- func (k Keeper) GetIBCDenom(ctx sdk.Context) string
- func (k Keeper) GetIBCTransferTransientAmount(ctx sdk.Context) sdk.Int
- func (k Keeper) GetIBCTransientStore(ctx sdk.Context) types.IBCAmountTransientStore
- func (k Keeper) GetMintedAmount(ctx sdk.Context) sdk.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) sdk.Int
- func (k Keeper) GetUnbondingEpochCValue(ctx sdk.Context, epochNumber int64) types.UnbondingEpochCValue
- func (k Keeper) GetUndelegationModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI
- func (k Keeper) HandleRewardsAccountBalanceCallback(ctx sdk.Context, response []byte, query 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, ...) 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) RewardsBoosterAccount(c context.Context, request *types.QueryRewardBoosterAccountRequest) (*types.QueryRewardBoosterAccountResponse, 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) SendTokensToRewardBoosterModuleAccount(ctx sdk.Context, rewardsBoostCoin 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, delegatorAddr string, amount sdk.Int, denom string) ([]sdk.Msg, []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"
)
Variables ¶
This section is empty.
Functions ¶
func CValueRangeInvariant ¶
CValueRangeInvariant checks that if CValue is within module safety range
func DivideAmountIntoValidatorSet ¶
func DivideAmountIntoValidatorSet(sortedValDiff types.WeightedAddressAmounts, coin sdk.Coin) ([]types.ValAddressAmount, error)
DivideAmountIntoValidatorSet : divides amount into validator set
func DivideUndelegateAmountIntoValidatorSet ¶
func DivideUndelegateAmountIntoValidatorSet(sortedValDiff types.WeightedAddressAmounts, coin sdk.Coin) ([]types.ValAddressAmount, error)
DivideUndelegateAmountIntoValidatorSet : divides undelegation amount into validator set
func FetchValidatorsToDelegate ¶
func FetchValidatorsToDelegate(valList types.AllowListedValidators, delegationState types.DelegationState, amount sdk.Coin) ([]types.ValAddressAmount, 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.ValAddressAmount, 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
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 ¶
func HandlePstakeFeeAddressChangeProposal(ctx sdk.Context, k Keeper, content types.PstakeFeeAddressChangeProposal) error
HandlePstakeFeeAddressChangeProposal changes fee collector address
func HandleRegisterHostChainProposal ¶
func HandleRegisterHostChainProposal(ctx sdk.Context, k Keeper, content types.RegisterHostChainProposal) error
HandleRegisterHostChainProposal performs the writes host chain params.
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 ¶
Callbacks 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
func (Callbacks) RegisterCallbacks ¶
func (c Callbacks) RegisterCallbacks() icqtypes.QueryCallbacks
type EpochsHooks ¶
type EpochsHooks struct {
// contains filtered or unexported fields
}
EpochsHooks wrapper struct for incentives keeper
func (EpochsHooks) AfterEpochEnd ¶
func (EpochsHooks) BeforeEpochStart ¶
func (h EpochsHooks) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64) error
epochs hooks
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
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey sdk.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
func (Keeper) AddBalanceToDelegationState ¶
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 (Keeper) AddHostAccountDelegation ¶
func (k Keeper) AddHostAccountDelegation(ctx sdk.Context, delegation types.HostAccountDelegation)
func (Keeper) AddHostAccountUndelegation ¶
func (k Keeper) AddHostAccountUndelegation(ctx sdk.Context, undelegationEntry types.HostAccountUndelegation)
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 ¶
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)
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 ¶
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)
func (Keeper) CallbackHandler ¶
func (Keeper) ChanCloseInit ¶
ChanCloseInit defines a wrapper function for the channel Keeper's function
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 (Keeper) ConvertTokenToStk ¶
func (Keeper) DelegateMsgs ¶
func (k Keeper) DelegateMsgs(ctx sdk.Context, delegatorAddr string, amount sdk.Int, denom string) ([]sdk.Msg, error)
DelegateMsgs gives the list of Delegate Txs to be executed based on the current state and params.
func (Keeper) DelegationEpochWorkFlow ¶
func (k Keeper) DelegationEpochWorkFlow(ctx sdk.Context, hostChainParams lscosmostypes.HostChainParams) error
func (Keeper) DelegationState ¶
func (k Keeper) DelegationState(c context.Context, request *types.QueryDelegationStateRequest) (*types.QueryDelegationStateResponse, error)
func (Keeper) DelegatorUnbondingEpochEntries ¶
func (k Keeper) DelegatorUnbondingEpochEntries(c context.Context, request *types.QueryAllDelegatorUnbondingEpochEntriesRequest) (*types.QueryAllDelegatorUnbondingEpochEntriesResponse, error)
func (Keeper) DelegatorUnbondingEpochEntry ¶
func (k Keeper) DelegatorUnbondingEpochEntry(c context.Context, request *types.QueryDelegatorUnbondingEpochEntryRequest) (*types.QueryDelegatorUnbondingEpochEntryResponse, error)
func (Keeper) DepositModuleAccount ¶
func (k Keeper) DepositModuleAccount(c context.Context, request *types.QueryDepositModuleAccountRequest) (*types.QueryDepositModuleAccountResponse, error)
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)
func (Keeper) GenerateAndExecuteICATx ¶
func (k Keeper) GenerateAndExecuteICATx(ctx sdk.Context, connectionID string, portID string, msgs []sdk.Msg) 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) (types.AllowListedValidators, types.DelegationState)
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) GetDelegationAccountAmount ¶
func (Keeper) GetDelegationModuleAccount ¶
func (k Keeper) GetDelegationModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI
func (Keeper) GetDelegationState ¶
func (k Keeper) GetDelegationState(ctx sdk.Context) types.DelegationState
GetDelegationState gets the delegation state in store
func (Keeper) GetDelegationTransientAmount ¶
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 ¶
func (Keeper) GetDepositModuleAccount ¶
func (k Keeper) GetDepositModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI
func (Keeper) GetHostAccountMaturedUndelegations ¶
func (k Keeper) GetHostAccountMaturedUndelegations(ctx sdk.Context) []types.HostAccountUndelegation
func (Keeper) GetHostAccountUndelegationForEpoch ¶
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 ¶
func (Keeper) GetIBCTransferTransientAmount ¶
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
func (Keeper) GetRewardModuleAccount ¶
func (k Keeper) GetRewardModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI
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
func (Keeper) HandleRewardsAccountBalanceCallback ¶
func (Keeper) HostAccountUndelegation ¶
func (k Keeper) HostAccountUndelegation(c context.Context, request *types.QueryHostAccountUndelegationRequest) (*types.QueryHostAccountUndelegationResponse, error)
func (Keeper) HostAccounts ¶
func (k Keeper) HostAccounts(c context.Context, request *types.QueryHostAccountsRequest) (*types.QueryHostAccountsResponse, error)
func (Keeper) HostChainParams ¶
func (k Keeper) HostChainParams(c context.Context, in *types.QueryHostChainParamsRequest) (*types.QueryHostChainParamsResponse, error)
HostChainParams returns the stored host chain params set through proposal.
func (Keeper) IBCTransientStore ¶
func (k Keeper) IBCTransientStore(c context.Context, request *types.QueryIBCTransientStoreRequest) (*types.QueryIBCTransientStoreResponse, error)
func (Keeper) IterateAllDelegatorUnbondingEpochEntry ¶
func (k Keeper) IterateAllDelegatorUnbondingEpochEntry(ctx sdk.Context) []types.DelegatorUnbondingEpochEntry
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
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)
func (Keeper) NewCapability ¶
NewCapability allows the module that can initiate and claim a capability that IBC module passes to it
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
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, ) 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
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
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)
func (Keeper) PendingUnbondings ¶
func (k Keeper) PendingUnbondings(c context.Context, request *types.QueryPendingUnbondingsRequest) (*types.QueryPendingUnbondingsResponse, error)
func (Keeper) ProcessMaturedUndelegation ¶
func (Keeper) RemoveBalanceFromDelegationState ¶
func (Keeper) RemoveDelegatorUnbondingEpochEntry ¶
func (Keeper) RemoveHostAccountUndelegation ¶
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
func (Keeper) RewardEpochEpochWorkFlow ¶
func (k Keeper) RewardEpochEpochWorkFlow(ctx sdk.Context, hostChainParams lscosmostypes.HostChainParams) error
func (Keeper) RewardsBoosterAccount ¶
func (k Keeper) RewardsBoosterAccount(c context.Context, request *types.QueryRewardBoosterAccountRequest) (*types.QueryRewardBoosterAccountResponse, error)
func (Keeper) SendProtocolFee ¶
func (k Keeper) SendProtocolFee(ctx sdk.Context, protocolFee sdk.Coins, moduleAccount, pstakeFeeAddressString 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) SendTokensToRewardBoosterModuleAccount ¶
func (k Keeper) SendTokensToRewardBoosterModuleAccount(ctx sdk.Context, rewardsBoostCoin sdk.Coins, senderAddress sdk.AccAddress) error
SendTokensToRewardBoosterModuleAccount 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 ¶
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 (Keeper) UnbondingEpochCValue ¶
func (k Keeper) UnbondingEpochCValue(c context.Context, request *types.QueryUnbondingEpochCValueRequest) (*types.QueryUnbondingEpochCValueResponse, error)
func (Keeper) Unclaimed ¶
func (k Keeper) Unclaimed(c context.Context, request *types.QueryUnclaimedRequest) (*types.QueryUnclaimedResponse, error)
func (Keeper) UndelegateMsgs ¶
func (k Keeper) UndelegateMsgs(ctx sdk.Context, delegatorAddr string, amount sdk.Int, denom string) ([]sdk.Msg, []types.UndelegationEntry, error)
UndelegateMsgs gives the list of Undelegate Txs to be executed based on the current state and params.
func (Keeper) UndelegationEpochWorkFlow ¶
func (k Keeper) UndelegationEpochWorkFlow(ctx sdk.Context, hostChainParams lscosmostypes.HostChainParams, epochNumber int64) error
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