Versions in this module Expand all Collapse all v14 v14.0.0 Aug 28, 2023 Changes in this version + const ICACallbackID_Claim + const ICACallbackID_Delegate + const ICACallbackID_Detokenize + const ICACallbackID_Rebalance + const ICACallbackID_Redemption + const ICACallbackID_Reinvest + const ICACallbackID_Undelegate + const ICQCallbackID_Delegation + const ICQCallbackID_FeeBalance + const ICQCallbackID_Validator + const ICQCallbackID_WithdrawalBalance + const RebalanceIcaBatchSize + const StrideEpochsPerDayEpoch + const UndelegateICABatchSize + var DetokenizationTimeout = time.Hour * 24 + var IsValidIBCPath = regexp.MustCompile(fmt.Sprintf(`^%s/(%s[0-9]{1,20})$`, transfertypes.PortID, channeltypes.ChannelPrefix)).MatchString + var LSMSlashQueryTimeout = time.Minute * 5 + func AllInvariants(k Keeper) sdk.Invariant + func DelegatorSharesCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error + func EmitFailedLSMLiquidStakeEvent(ctx sdk.Context, hostZone types.HostZone, ...) + func EmitPendingLSMLiquidStakeEvent(ctx sdk.Context, hostZone types.HostZone, ...) + func EmitSuccessfulLSMLiquidStakeEvent(ctx sdk.Context, hostZone types.HostZone, ...) + func EmitSuccessfulLiquidStakeEvent(ctx sdk.Context, msg *types.MsgLiquidStake, hostZone types.HostZone, ...) + func EmitUndelegationEvent(ctx sdk.Context, hostZone types.HostZone, totalUnbondAmount sdkmath.Int) + func EmitValidatorSharesToTokensRateChangeEvent(ctx sdk.Context, chainId string, validatorAddress string, ...) + func EmitValidatorSlashEvent(ctx sdk.Context, hostZone types.HostZone, validatorAddress string, ...) + func FeeBalanceCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error + func GetLSMTokenDepositId(blockHeight int64, chainId, stakerAddress, denom string) string + func GetValidatorFromAddress(validators []*types.Validator, address string) (val types.Validator, index int64, found bool) + func NewMsgServerImpl(keeper Keeper) types.MsgServer + func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper) + func ValidatorSharesToTokensRateCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error + func WithdrawalBalanceCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error + type Hooks struct + func (h Hooks) AfterEpochEnd(ctx sdk.Context, epochInfo epochstypes.EpochInfo) + func (h Hooks) BeforeEpochStart(ctx sdk.Context, epochInfo epochstypes.EpochInfo) + type ICQCallback func(Keeper, sdk.Context, []byte, icqtypes.Query) error + type ICQCallbacks struct + func (c ICQCallbacks) AddICQCallback(id string, fn interface{}) icqtypes.QueryCallbacks + func (c ICQCallbacks) CallICQCallback(ctx sdk.Context, id string, args []byte, query icqtypes.Query) error + func (c ICQCallbacks) HasICQCallback(id string) bool + func (c ICQCallbacks) RegisterICQCallbacks() icqtypes.QueryCallbacks + type IcaTx struct + ConnectionId string + ICAAccountType types.ICAAccountType + Msgs []proto.Message + Timeout uint64 + type Keeper struct + AccountKeeper types.AccountKeeper + ConsumerKeeper types.ConsumerKeeper + IBCKeeper ibckeeper.Keeper + ICACallbacksKeeper icacallbackskeeper.Keeper + ICAControllerKeeper icacontrollerkeeper.Keeper + ICAOracleKeeper types.ICAOracleKeeper + InterchainQueryKeeper icqkeeper.Keeper + RatelimitKeeper types.RatelimitKeeper + RecordsKeeper recordsmodulekeeper.Keeper + StakingKeeper stakingkeeper.Keeper + func NewKeeper(cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, ...) Keeper + func (k *Keeper) GetParam(ctx sdk.Context, key []byte) uint64 + func (k *Keeper) SetHooks(gh types.StakeIBCHooks) *Keeper + func (k Keeper) AddDelegationToValidator(ctx sdk.Context, hostZone *types.HostZone, validatorAddress string, ...) error + func (k Keeper) AddValidatorToHostZone(ctx sdk.Context, chainId string, validator types.Validator, ...) error + func (k Keeper) AddValidatorsProposal(ctx sdk.Context, msg *types.AddValidatorsProposal) error + func (k Keeper) AddressUnbondings(c context.Context, req *types.QueryAddressUnbondings) (*types.QueryAddressUnbondingsResponse, error) + func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochInfo epochstypes.EpochInfo) + func (k Keeper) AllocateHostZoneReward(ctx sdk.Context) + func (k Keeper) AssertStrideAndDayEpochRelationship(ctx sdk.Context) + func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochInfo epochstypes.EpochInfo) + func (k Keeper) BeginBlocker(ctx sdk.Context) + func (k Keeper) BurnTokens(ctx sdk.Context, hostZone types.HostZone, stTokenBurnAmount sdkmath.Int) error + func (k Keeper) CalculateLSMStToken(liquidStakedShares sdkmath.Int, lsmLiquidStake types.LSMLiquidStake) sdk.Coin + func (k Keeper) Callbacks() icacallbackstypes.ModuleCallbacks + func (k Keeper) CheckDelegationChangedDuringQuery(ctx sdk.Context, validator types.Validator, ...) (overlapped bool, err error) + func (k Keeper) CheckForSlash(ctx sdk.Context, hostZone types.HostZone, valIndex int64, ...) (validatorWasSlashed bool, delegatedTokens sdkmath.Int, err error) + func (k Keeper) CheckIfValidatorWasSlashed(ctx sdk.Context, hostZone types.HostZone, ...) (validatorWasSlashed bool, err error) + func (k Keeper) CheckIsStToken(ctx sdk.Context, denom string) bool + func (k Keeper) ClaimCallback(ctx sdk.Context, packet channeltypes.Packet, ...) error + func (k Keeper) CleanupEpochUnbondingRecords(ctx sdk.Context, epochNumber uint64) bool + func (k Keeper) CreateDepositRecordsForEpoch(ctx sdk.Context, epochNumber uint64) + func (k Keeper) CreateEpochUnbondingRecord(ctx sdk.Context, epochNumber uint64) bool + func (k Keeper) DecrementHostZoneUnbonding(ctx sdk.Context, userRedemptionRecord recordstypes.UserRedemptionRecord, ...) error + func (k Keeper) DecrementValidatorDelegationChangesInProgress(hostZone *types.HostZone, validatorAddress string) error + func (k Keeper) DelegateCallback(ctx sdk.Context, packet channeltypes.Packet, ...) error + func (k Keeper) DelegateOnHost(ctx sdk.Context, hostZone types.HostZone, amt sdk.Coin, ...) error + func (k Keeper) DetokenizeAllLSMDeposits(ctx sdk.Context) + func (k Keeper) DetokenizeCallback(ctx sdk.Context, packet channeltypes.Packet, ...) error + func (k Keeper) DetokenizeLSMDeposit(ctx sdk.Context, hostZone types.HostZone, deposit recordstypes.LSMTokenDeposit) error + func (k Keeper) EndBlocker(ctx sdk.Context) + func (k Keeper) EpochTracker(c context.Context, req *types.QueryGetEpochTrackerRequest) (*types.QueryGetEpochTrackerResponse, error) + func (k Keeper) EpochTrackerAll(c context.Context, req *types.QueryAllEpochTrackerRequest) (*types.QueryAllEpochTrackerResponse, error) + func (k Keeper) FailLSMLiquidStake(ctx sdk.Context, hostZone types.HostZone, lsmLiquidStake types.LSMLiquidStake, ...) + func (k Keeper) FinishLSMLiquidStake(ctx sdk.Context, lsmLiquidStake types.LSMLiquidStake, async bool) error + func (k Keeper) GetAllActiveHostZone(ctx sdk.Context) (list []types.HostZone) + func (k Keeper) GetAllEpochTracker(ctx sdk.Context) (list []types.EpochTracker) + func (k Keeper) GetAllHostZone(ctx sdk.Context) (list []types.HostZone) + func (k Keeper) GetChainID(ctx sdk.Context, connectionID string) (string, error) + func (k Keeper) GetClaimableRedemptionRecord(ctx sdk.Context, msg *types.MsgClaimUndelegatedTokens) (*recordstypes.UserRedemptionRecord, error) + func (k Keeper) GetConnectionId(ctx sdk.Context, portId string) (string, error) + func (k Keeper) GetCounterpartyChainId(ctx sdk.Context, connectionID string) (string, error) + func (k Keeper) GetDepositAccountBalance(chainId string, depositRecords []recordstypes.DepositRecord) sdk.Dec + func (k Keeper) GetEpochTracker(ctx sdk.Context, epochIdentifier string) (val types.EpochTracker, found bool) + func (k Keeper) GetHostZone(ctx sdk.Context, chainId string) (val types.HostZone, found bool) + func (k Keeper) GetHostZoneFromHostDenom(ctx sdk.Context, denom string) (*types.HostZone, error) + func (k Keeper) GetHostZoneFromIBCDenom(ctx sdk.Context, denom string) (*types.HostZone, error) + func (k Keeper) GetHostZoneFromLSMTokenPath(ctx sdk.Context, path string) (types.HostZone, error) + func (k Keeper) GetHostZoneFromTransferChannelID(ctx sdk.Context, channelID string) (hostZone types.HostZone, found bool) + func (k Keeper) GetICATimeoutNanos(ctx sdk.Context, epochType string) (uint64, error) + func (k Keeper) GetLSMTokenDenomTrace(ctx sdk.Context, denom string) (transfertypes.DenomTrace, error) + func (k Keeper) GetLatestCompletionTime(ctx sdk.Context, msgResponses [][]byte) (*time.Time, error) + func (k Keeper) GetLightClientHeightSafely(ctx sdk.Context, connectionID string) (uint64, error) + func (k Keeper) GetLightClientTimeSafely(ctx sdk.Context, connectionID string) (uint64, error) + func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) + func (k Keeper) GetRebalanceICAMessages(hostZone types.HostZone, validatorDeltas []RebalanceValidatorDelegationChange) (msgs []proto.Message, rebalancings []*types.Rebalancing) + func (k Keeper) GetRedemptionTransferMsg(ctx sdk.Context, userRedemptionRecord *recordstypes.UserRedemptionRecord, ...) (*IcaTx, error) + func (k Keeper) GetStartTimeNextEpoch(ctx sdk.Context, epochType string) (uint64, error) + func (k Keeper) GetStrideEpochElapsedShare(ctx sdk.Context) (sdk.Dec, error) + func (k Keeper) GetTargetValAmtsForHostZone(ctx sdk.Context, hostZone types.HostZone, totalDelegation sdkmath.Int) (map[string]sdkmath.Int, error) + func (k Keeper) GetTotalTokenizedDelegations(ctx sdk.Context, hostZone types.HostZone) sdk.Dec + func (k Keeper) GetTotalUnbondAmountAndRecordsIds(ctx sdk.Context, chainId string) (totalUnbonded sdkmath.Int, unbondingRecordIds []uint64) + func (k Keeper) GetTotalValidatorWeight(validators []types.Validator) uint64 + func (k Keeper) GetUnbondingICAMessages(hostZone types.HostZone, totalUnbondAmount sdkmath.Int, ...) (msgs []proto.Message, unbondings []*types.SplitDelegation, err error) + func (k Keeper) GetUndelegatedBalance(chainId string, depositRecords []recordstypes.DepositRecord) sdk.Dec + func (k Keeper) GetUpdatedSlashQueryCheckpoint(ctx sdk.Context, totalDelegations sdkmath.Int) sdkmath.Int + func (k Keeper) GetValidatorDelegationDifferences(ctx sdk.Context, hostZone types.HostZone) ([]RebalanceValidatorDelegationChange, error) + func (k Keeper) GetValidatorFromLSMTokenDenom(denom string, validators []*types.Validator) (types.Validator, error) + func (k Keeper) GetValidatorUnbondCapacity(ctx sdk.Context, validators []*types.Validator, ...) (validatorCapacities []ValidatorUnbondCapacity) + func (k Keeper) Hooks() Hooks + func (k Keeper) HostZone(c context.Context, req *types.QueryGetHostZoneRequest) (*types.QueryGetHostZoneResponse, error) + func (k Keeper) HostZoneAll(c context.Context, req *types.QueryAllHostZoneRequest) (*types.QueryAllHostZoneResponse, error) + func (k Keeper) ICQCallbackHandler() ICQCallbacks + func (k Keeper) IncrementValidatorDelegationChangesInProgress(hostZone *types.HostZone, validatorAddress string) error + func (k Keeper) IncrementValidatorSlashQueryProgress(ctx sdk.Context, chainId string, validatorAddress string, amount sdkmath.Int) error + func (k Keeper) InitiateAllHostZoneUnbondings(ctx sdk.Context, dayNumber uint64) + func (k Keeper) InterchainAccountFromAddress(goCtx context.Context, req *types.QueryInterchainAccountFromAddressRequest) (*types.QueryInterchainAccountFromAddressResponse, error) + func (k Keeper) IsRedemptionRateWithinSafetyBounds(ctx sdk.Context, zone types.HostZone) (bool, error) + func (k Keeper) IsWithinBufferWindow(ctx sdk.Context) (bool, error) + func (k Keeper) IterateHostZones(ctx sdk.Context, ...) + func (k Keeper) LSMSlashQueryCallback(ctx sdk.Context, hostZone types.HostZone, query icqtypes.Query, ...) error + func (k Keeper) LSMSlashQueryTimeout(ctx sdk.Context, hostZone types.HostZone, query icqtypes.Query) error + func (k Keeper) LiquidStakeRewardCollectorBalance(ctx sdk.Context, msgSvr types.MsgServer) bool + func (k Keeper) Logger(ctx sdk.Context) log.Logger + func (k Keeper) MarshalClaimCallbackArgs(ctx sdk.Context, claimCallback types.ClaimCallback) ([]byte, error) + func (k Keeper) MarshalDelegateCallbackArgs(ctx sdk.Context, delegateCallback types.DelegateCallback) ([]byte, error) + func (k Keeper) MarshalRebalanceCallbackArgs(ctx sdk.Context, rebalanceCallback types.RebalanceCallback) ([]byte, error) + func (k Keeper) MarshalRedemptionCallbackArgs(ctx sdk.Context, redemptionCallback types.RedemptionCallback) ([]byte, error) + func (k Keeper) MarshalReinvestCallbackArgs(ctx sdk.Context, reinvestCallback types.ReinvestCallback) ([]byte, error) + func (k Keeper) ModuleAddress(goCtx context.Context, req *types.QueryModuleAddressRequest) (*types.QueryModuleAddressResponse, error) + func (k Keeper) NextPacketSequence(c context.Context, req *types.QueryGetNextPacketSequenceRequest) (*types.QueryGetNextPacketSequenceResponse, error) + func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) + func (k Keeper) PostRedemptionRateToOracles(ctx sdk.Context, hostDenom string, redemptionRate sdk.Dec) error + func (k Keeper) QueryValidatorSharesToTokensRate(ctx sdk.Context, chainId string, validatorAddress string) error + func (k Keeper) RebalanceAllHostZones(ctx sdk.Context) + func (k Keeper) RebalanceCallback(ctx sdk.Context, packet channeltypes.Packet, ...) error + func (k Keeper) RebalanceDelegationsForHostZone(ctx sdk.Context, chainId string) error + func (k Keeper) RedemptionCallback(ctx sdk.Context, packet channeltypes.Packet, ...) error + func (k Keeper) RegisterStTokenDenomsToWhitelist(ctx sdk.Context, denoms []string) error + func (k Keeper) ReinvestCallback(ctx sdk.Context, packet channeltypes.Packet, ...) error + func (k Keeper) ReinvestRewards(ctx sdk.Context) + func (k Keeper) RemoveEpochTracker(ctx sdk.Context, epochIdentifier string) + func (k Keeper) RemoveHostZone(ctx sdk.Context, chain_id string) + func (k Keeper) RemoveValidatorFromHostZone(ctx sdk.Context, chainId string, validatorAddress string) error + func (k Keeper) SetEpochTracker(ctx sdk.Context, epochTracker types.EpochTracker) + func (k Keeper) SetHostZone(ctx sdk.Context, hostZone types.HostZone) + func (k Keeper) SetParams(ctx sdk.Context, params types.Params) + func (k Keeper) SetWithdrawalAddress(ctx sdk.Context) + func (k Keeper) SetWithdrawalAddressOnHost(ctx sdk.Context, hostZone types.HostZone) error + func (k Keeper) ShouldCheckIfValidatorWasSlashed(ctx sdk.Context, validator types.Validator, transactionStakeAmount sdkmath.Int) bool + func (k Keeper) SlashValidatorOnHostZone(ctx sdk.Context, hostZone types.HostZone, valIndex int64, ...) error + func (k Keeper) StakeExistingDepositsOnHostZones(ctx sdk.Context, epochNumber uint64, ...) + func (k Keeper) StartLSMLiquidStake(ctx sdk.Context, msg types.MsgLSMLiquidStake) (types.LSMLiquidStake, error) + func (k Keeper) SubmitDelegationICQ(ctx sdk.Context, hostZone types.HostZone, validatorAddress string) error + func (k Keeper) SubmitTxs(ctx sdk.Context, connectionId string, msgs []proto.Message, ...) (uint64, error) + func (k Keeper) SubmitTxsDayEpoch(ctx sdk.Context, connectionId string, msgs []proto.Message, ...) (uint64, error) + func (k Keeper) SubmitTxsEpoch(ctx sdk.Context, connectionId string, msgs []proto.Message, ...) (uint64, error) + func (k Keeper) SubmitTxsStrideEpoch(ctx sdk.Context, connectionId string, msgs []proto.Message, ...) (uint64, error) + func (k Keeper) SubmitValidatorSharesToTokensRateICQ(ctx sdk.Context, chainId string, validatorAddress string, ...) error + func (k Keeper) SubmitValidatorSlashQuery(ctx sdk.Context, lsmLiquidStake types.LSMLiquidStake) error + func (k Keeper) SweepAllUnbondedTokens(ctx sdk.Context) (success bool, successfulSweeps []string, sweepAmounts []sdkmath.Int, ...) + func (k Keeper) SweepAllUnbondedTokensForHostZone(ctx sdk.Context, hostZone types.HostZone, ...) (success bool, sweepAmount sdkmath.Int) + func (k Keeper) SweepStTokensFromRewardCollToFeeColl(ctx sdk.Context) error + func (k Keeper) ToggleLSMProposal(ctx sdk.Context, msg *types.ToggleLSMProposal) error + func (k Keeper) TransferAllLSMDeposits(ctx sdk.Context) + func (k Keeper) TransferExistingDepositsToHostZones(ctx sdk.Context, epochNumber uint64, ...) + func (k Keeper) UnbondFromHostZone(ctx sdk.Context, hostZone types.HostZone) error + func (k Keeper) UndelegateCallback(ctx sdk.Context, packet channeltypes.Packet, ...) error + func (k Keeper) UnmarshalClaimCallbackArgs(ctx sdk.Context, claimCallback []byte) (*types.ClaimCallback, error) + func (k Keeper) UnmarshalDelegateCallbackArgs(ctx sdk.Context, delegateCallback []byte) (*types.DelegateCallback, error) + func (k Keeper) UnmarshalRebalanceCallbackArgs(ctx sdk.Context, rebalanceCallback []byte) (*types.RebalanceCallback, error) + func (k Keeper) UnmarshalRedemptionCallbackArgs(ctx sdk.Context, redemptionCallback []byte) (types.RedemptionCallback, error) + func (k Keeper) UnmarshalReinvestCallbackArgs(ctx sdk.Context, reinvestCallback []byte) (*types.ReinvestCallback, error) + func (k Keeper) UpdateDelegationBalances(ctx sdk.Context, hostZone types.HostZone, ...) error + func (k Keeper) UpdateEpochTracker(ctx sdk.Context, epochInfo epochstypes.EpochInfo) (epochNumber uint64, err error) + func (k Keeper) UpdateHostZoneUnbondings(ctx sdk.Context, latestCompletionTime time.Time, chainId string, ...) (stTokenBurnAmount sdkmath.Int, err error) + func (k Keeper) UpdateRedemptionRateForHostZone(ctx sdk.Context, hostZone types.HostZone, ...) + func (k Keeper) UpdateRedemptionRates(ctx sdk.Context, depositRecords []recordstypes.DepositRecord) + func (k Keeper) UpdateWithdrawalBalance(ctx sdk.Context, hostZone types.HostZone) error + func (k Keeper) ValidateLSMLiquidStake(ctx sdk.Context, msg types.MsgLSMLiquidStake) (types.LSMLiquidStake, error) + func (k Keeper) Validators(c context.Context, req *types.QueryGetValidatorsRequest) (*types.QueryGetValidatorsResponse, error) + type RebalanceValidatorDelegationChange struct + Delta sdkmath.Int + ValidatorAddress string + type ValidatorUnbondCapacity struct + BalancedDelegation sdkmath.Int + Capacity sdkmath.Int + CurrentDelegation sdkmath.Int + ValidatorAddress string + func SortUnbondingCapacityByPriority(validatorUnbondCapacity []ValidatorUnbondCapacity) ([]ValidatorUnbondCapacity, error) + func (c *ValidatorUnbondCapacity) GetBalanceRatio() (sdk.Dec, error) v14.0.0-testnet Aug 31, 2023 Other modules containing this package github.com/Stride-Labs/stride github.com/Stride-Labs/stride/v10 github.com/Stride-Labs/stride/v11 github.com/Stride-Labs/stride/v12 github.com/Stride-Labs/stride/v13 github.com/Stride-Labs/stride/v15 github.com/Stride-Labs/stride/v16 github.com/Stride-Labs/stride/v17 github.com/Stride-Labs/stride/v18 github.com/Stride-Labs/stride/v19 github.com/Stride-Labs/stride/v20 github.com/Stride-Labs/stride/v21 github.com/Stride-Labs/stride/v22 github.com/Stride-Labs/stride/v23 github.com/Stride-Labs/stride/v24 github.com/Stride-Labs/stride/v3 github.com/Stride-Labs/stride/v4 github.com/Stride-Labs/stride/v5 github.com/Stride-Labs/stride/v6 github.com/Stride-Labs/stride/v7 github.com/Stride-Labs/stride/v8 github.com/Stride-Labs/stride/v9