Documentation
¶
Index ¶
- Constants
- func AllInvariants(k Keeper) sdk.Invariant
- func ClaimCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ...) error
- func DelegateCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ...) error
- func DelegatorSharesCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error
- func GetValidatorFromAddress(validators []*types.Validator, address string) (val types.Validator, index int64, found bool)
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func RedemptionCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ...) error
- func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
- func ReinvestCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ...) error
- func UndelegateCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ...) error
- func ValidatorExchangeRateCallback(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 Callback
- type Callbacks
- type Hooks
- type ICACallback
- type ICACallbacks
- func (c ICACallbacks) AddICACallback(id string, fn interface{}) icacallbackstypes.ICACallbackHandler
- func (c ICACallbacks) CallICACallback(ctx sdk.Context, id string, packet channeltypes.Packet, ...) error
- func (c ICACallbacks) HasICACallback(id string) bool
- func (c ICACallbacks) RegisterICACallbacks() icacallbackstypes.ICACallbackHandler
- type IcaTx
- type Keeper
- func (k Keeper) AddDelegationToValidator(ctx sdk.Context, hostZone types.HostZone, valAddr string, amt int64) (success bool)
- func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochInfo epochstypes.EpochInfo)
- func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochInfo epochstypes.EpochInfo)
- func (k Keeper) BurnTokens(ctx sdk.Context, zone types.HostZone, stTokenBurnAmount int64) error
- func (k Keeper) CallbackHandler() Callbacks
- func (k *Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) 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) DelegateOnHost(ctx sdk.Context, hostZone types.HostZone, amt sdk.Coin, depositRecordId uint64) error
- 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) 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) GetDelegation(ctx sdk.Context) (val types.Delegation, found bool)
- func (k Keeper) GetEpochTracker(ctx sdk.Context, epochIdentifier string) (val types.EpochTracker, found bool)
- func (k Keeper) GetHostZone(ctx sdk.Context, chain_id string) (val types.HostZone, found bool)
- func (k Keeper) GetHostZoneCount(ctx sdk.Context) uint64
- 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) GetHostZoneUnbondingMsgs(ctx sdk.Context, hostZone types.HostZone) ([]sdk.Msg, uint64, []byte, error)
- func (k Keeper) GetICAAccount(ctx sdk.Context) (val types.ICAAccount, found bool)
- func (k Keeper) GetICATimeoutNanos(ctx sdk.Context, epochType string) (uint64, error)
- func (k Keeper) GetLatestCompletionTime(ctx sdk.Context, txMsgData *sdk.TxMsgData) (*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) GetMinValidatorRequirements(ctx sdk.Context) (val types.MinValidatorRequirements, found bool)
- func (k Keeper) GetModuleAccountBalance(hostZone types.HostZone, depositRecords []recordstypes.DepositRecord) (int64, error)
- func (k *Keeper) GetParam(ctx sdk.Context, key []byte) uint64
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetRedemptionAccount(ctx sdk.Context, hostZone types.HostZone) (*types.ICAAccount, bool)
- 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, finalDelegation uint64) (map[string]uint64, error)
- func (k Keeper) GetTotalValidatorDelegations(hostZone types.HostZone) uint64
- func (k Keeper) GetTotalValidatorWeight(hostZone types.HostZone) uint64
- func (k Keeper) GetUndelegatedBalance(hostZone types.HostZone, depositRecords []recordstypes.DepositRecord) (int64, error)
- func (k Keeper) GetValidator(ctx sdk.Context) (val types.Validator, found bool)
- func (k Keeper) GetValidatorDelegationAmtDifferences(ctx sdk.Context, hostZone types.HostZone) (map[string]int64, error)
- 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) ICAAccount(c context.Context, req *types.QueryGetICAAccountRequest) (*types.QueryGetICAAccountResponse, error)
- func (k Keeper) ICACallbackHandler() ICACallbacks
- func (k Keeper) InitiateAllHostZoneUnbondings(ctx sdk.Context, dayNumber uint64) (success bool, successfulUnbondings []string, failedUnbondings []string)
- 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) 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) MarshalRedemptionCallbackArgs(ctx sdk.Context, redemptionCallback types.RedemptionCallback) ([]byte, error)
- func (k Keeper) MarshalReinvestCallbackArgs(ctx sdk.Context, reinvestCallback types.ReinvestCallback) ([]byte, error)
- func (k Keeper) MarshalUndelegateCallbackArgs(ctx sdk.Context, undelegateCallback types.UndelegateCallback) ([]byte, error)
- func (k Keeper) ModuleAddress(goCtx context.Context, req *types.QueryModuleAddressRequest) (*types.QueryModuleAddressResponse, error)
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) QueryDelegationsIcq(ctx sdk.Context, hostZone types.HostZone, valoper string) error
- func (k Keeper) QueryValidatorExchangeRate(ctx sdk.Context, msg *types.MsgUpdateValidatorSharesExchRate) (*types.MsgUpdateValidatorSharesExchRateResponse, error)
- func (k Keeper) RemoveDelegation(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) RemoveICAAccount(ctx sdk.Context)
- func (k Keeper) RemoveMinValidatorRequirements(ctx sdk.Context)
- func (k Keeper) RemoveValidator(ctx sdk.Context)
- func (k Keeper) RemoveValidatorFromHostZone(ctx sdk.Context, chainId string, validatorAddress string) error
- func (k Keeper) SetDelegation(ctx sdk.Context, delegation types.Delegation)
- func (k Keeper) SetEpochTracker(ctx sdk.Context, epochTracker types.EpochTracker)
- func (k Keeper) SetHostZone(ctx sdk.Context, hostZone types.HostZone)
- func (k Keeper) SetHostZoneCount(ctx sdk.Context, count uint64)
- func (k Keeper) SetICAAccount(ctx sdk.Context, iCAAccount types.ICAAccount)
- func (k Keeper) SetMinValidatorRequirements(ctx sdk.Context, minValidatorRequirements types.MinValidatorRequirements)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetValidator(ctx sdk.Context, validator types.Validator)
- func (k Keeper) SetWithdrawalAddress(ctx sdk.Context)
- func (k Keeper) SetWithdrawalAddressOnHost(ctx sdk.Context, hostZone types.HostZone) error
- func (k Keeper) StakeExistingDepositsOnHostZones(ctx sdk.Context, epochNumber uint64, ...)
- func (k Keeper) SubmitHostZoneUnbondingMsg(ctx sdk.Context, msgs []sdk.Msg, totalAmtToUnbond uint64, ...) error
- func (k Keeper) SubmitTxs(ctx sdk.Context, connectionId string, msgs []sdk.Msg, account types.ICAAccount, ...) (uint64, error)
- func (k Keeper) SubmitTxsDayEpoch(ctx sdk.Context, connectionId string, msgs []sdk.Msg, account types.ICAAccount, ...) (uint64, error)
- func (k Keeper) SubmitTxsEpoch(ctx sdk.Context, connectionId string, msgs []sdk.Msg, account types.ICAAccount, ...) (uint64, error)
- func (k Keeper) SubmitTxsStrideEpoch(ctx sdk.Context, connectionId string, msgs []sdk.Msg, account types.ICAAccount, ...) (uint64, error)
- func (k Keeper) SweepAllUnbondedTokens(ctx sdk.Context) (success bool, successfulSweeps []string, sweepAmounts []int64, ...)
- func (k Keeper) SweepAllUnbondedTokensForHostZone(ctx sdk.Context, hostZone types.HostZone, ...) (success bool, sweepAmount int64)
- func (k Keeper) TransferExistingDepositsToHostZones(ctx sdk.Context, epochNumber uint64, ...)
- 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) UnmarshalRedemptionCallbackArgs(ctx sdk.Context, redemptionCallback []byte) (types.RedemptionCallback, error)
- func (k Keeper) UnmarshalReinvestCallbackArgs(ctx sdk.Context, reinvestCallback []byte) (*types.ReinvestCallback, error)
- func (k Keeper) UnmarshalUndelegateCallbackArgs(ctx sdk.Context, undelegateCallback []byte) (types.UndelegateCallback, error)
- func (k Keeper) UpdateDelegationBalances(ctx sdk.Context, zone types.HostZone, ...) error
- func (k Keeper) UpdateHostZoneUnbondings(ctx sdk.Context, latestCompletionTime time.Time, zone types.HostZone, ...) (stTokenBurnAmount int64, err error)
- func (k Keeper) UpdateRedemptionRates(ctx sdk.Context, depositRecords []recordstypes.DepositRecord)
- func (k Keeper) UpdateWithdrawalBalance(ctx sdk.Context, zoneInfo types.HostZone) error
- func (k Keeper) Validators(c context.Context, req *types.QueryGetValidatorsRequest) (*types.QueryGetValidatorsResponse, error)
Constants ¶
const CLAIM = "claim"
const DELEGATE = "delegate"
const REDEMPTION = "redemption"
const REINVEST = "reinvest"
const UNDELEGATE = "undelegate"
Variables ¶
This section is empty.
Functions ¶
func AllInvariants ¶ added in v0.5.1
AllInvariants runs all invariants of the stakeibc module
func ClaimCallback ¶ added in v0.5.1
func ClaimCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack *channeltypes.Acknowledgement, args []byte) error
func DelegateCallback ¶ added in v0.5.1
func DelegateCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack *channeltypes.Acknowledgement, args []byte) error
func DelegatorSharesCallback ¶ added in v0.5.1
DelegationCallback is a callback handler for UpdateValidatorSharesExchRate queries.
In an attempt to get the ICA's delegation amount on a given validator, we have to query:
- the validator's internal exchange rate
- the Delegation ICA's delegated shares And apply the following equation: num_tokens = exchange_rate * num_shares
This callback from query #2
NOTE(TEST-112) for now, to get proofs in your ICQs, you need to query the entire store on the host zone! e.g. "store/bank/key"
func GetValidatorFromAddress ¶ added in v0.5.1
func GetValidatorFromAddress(validators []*types.Validator, address string) (val types.Validator, index int64, found bool)
get a validator and its index from a list of validators, by address
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
func RedemptionCallback ¶ added in v0.5.1
func RedemptionCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack *channeltypes.Acknowledgement, args []byte) error
func RegisterInvariants ¶ added in v0.5.1
func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
RegisterInvariants registers all governance invariants.
func ReinvestCallback ¶ added in v0.5.1
func ReinvestCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack *channeltypes.Acknowledgement, args []byte) error
func UndelegateCallback ¶ added in v0.5.1
func UndelegateCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack *channeltypes.Acknowledgement, args []byte) error
func ValidatorExchangeRateCallback ¶ added in v0.5.1
func ValidatorExchangeRateCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error
ValidatorCallback is a callback handler for validator queries.
In an attempt to get the ICA's delegation amount on a given validator, we have to query:
- the validator's internal exchange rate
- the Delegation ICA's delegated shares And apply the following equation: num_tokens = exchange_rate * num_shares
This callback from query #1
func WithdrawalBalanceCallback ¶ added in v0.0.7
WithdrawalBalanceCallback is a callback handler for WithdrawalBalance queries. Note: for now, to get proofs in your ICQs, you need to query the entire store on the host zone! e.g. "store/bank/key"
Types ¶
type Callbacks ¶ added in v0.0.6
type Callbacks struct {
// contains filtered or unexported fields
}
func (Callbacks) AddCallback ¶ added in v0.0.6
func (c Callbacks) AddCallback(id string, fn interface{}) icqtypes.QueryCallbacks
func (Callbacks) RegisterCallbacks ¶ added in v0.0.6
func (c Callbacks) RegisterCallbacks() icqtypes.QueryCallbacks
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
Hooks wrapper struct for incentives keeper
func (Hooks) AfterEpochEnd ¶
func (h Hooks) AfterEpochEnd(ctx sdk.Context, epochInfo epochstypes.EpochInfo)
func (Hooks) BeforeEpochStart ¶
func (h Hooks) BeforeEpochStart(ctx sdk.Context, epochInfo epochstypes.EpochInfo)
epochs hooks
type ICACallback ¶ added in v0.5.1
type ICACallback func(Keeper, sdk.Context, channeltypes.Packet, *channeltypes.Acknowledgement, []byte) error
ICACallbacks wrapper struct for stakeibc keeper
type ICACallbacks ¶ added in v0.5.1
type ICACallbacks struct {
// contains filtered or unexported fields
}
func (ICACallbacks) AddICACallback ¶ added in v0.5.1
func (c ICACallbacks) AddICACallback(id string, fn interface{}) icacallbackstypes.ICACallbackHandler
func (ICACallbacks) CallICACallback ¶ added in v0.5.1
func (c ICACallbacks) CallICACallback(ctx sdk.Context, id string, packet channeltypes.Packet, ack *channeltypes.Acknowledgement, args []byte) error
func (ICACallbacks) HasICACallback ¶ added in v0.5.1
func (c ICACallbacks) HasICACallback(id string) bool
func (ICACallbacks) RegisterICACallbacks ¶ added in v0.5.1
func (c ICACallbacks) RegisterICACallbacks() icacallbackstypes.ICACallbackHandler
type Keeper ¶
type Keeper struct { ICAControllerKeeper icacontrollerkeeper.Keeper IBCKeeper ibckeeper.Keeper InterchainQueryKeeper icqkeeper.Keeper RecordsKeeper recordsmodulekeeper.Keeper StakingKeeper stakingkeeper.Keeper ICACallbacksKeeper icacallbackskeeper.Keeper // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey sdk.StoreKey, ps paramtypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper bankkeeper.Keeper, icacontrollerkeeper icacontrollerkeeper.Keeper, ibcKeeper ibckeeper.Keeper, scopedKeeper capabilitykeeper.ScopedKeeper, interchainQueryKeeper icqkeeper.Keeper, RecordsKeeper recordsmodulekeeper.Keeper, StakingKeeper stakingkeeper.Keeper, ICACallbacksKeeper icacallbackskeeper.Keeper, ) Keeper
func (Keeper) AddDelegationToValidator ¶ added in v0.0.7
func (Keeper) AfterEpochEnd ¶
func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochInfo epochstypes.EpochInfo)
func (Keeper) BeforeEpochStart ¶
func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochInfo epochstypes.EpochInfo)
func (Keeper) BurnTokens ¶ added in v0.5.1
func (Keeper) CallbackHandler ¶ added in v0.0.6
func (*Keeper) ClaimCapability ¶
func (k *Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
ClaimCapability claims the channel capability passed via the OnOpenChanInit callback
func (Keeper) CleanupEpochUnbondingRecords ¶ added in v0.0.7
func (Keeper) CreateDepositRecordsForEpoch ¶ added in v0.0.7
func (Keeper) CreateEpochUnbondingRecord ¶ added in v0.5.1
func (Keeper) DecrementHostZoneUnbonding ¶ added in v0.5.1
func (k Keeper) DecrementHostZoneUnbonding(ctx sdk.Context, userRedemptionRecord recordstypes.UserRedemptionRecord, callbackArgs types.ClaimCallback) error
func (Keeper) DelegateOnHost ¶
func (Keeper) EpochTracker ¶ added in v0.0.7
func (k Keeper) EpochTracker(c context.Context, req *types.QueryGetEpochTrackerRequest) (*types.QueryGetEpochTrackerResponse, error)
func (Keeper) EpochTrackerAll ¶ added in v0.0.7
func (k Keeper) EpochTrackerAll(c context.Context, req *types.QueryAllEpochTrackerRequest) (*types.QueryAllEpochTrackerResponse, error)
func (Keeper) GetAllEpochTracker ¶ added in v0.0.7
func (k Keeper) GetAllEpochTracker(ctx sdk.Context) (list []types.EpochTracker)
GetAllEpochTracker returns all epochTracker
func (Keeper) GetAllHostZone ¶
GetAllHostZone returns all hostZone
func (Keeper) GetChainID ¶
func (Keeper) GetClaimableRedemptionRecord ¶ added in v0.0.7
func (k Keeper) GetClaimableRedemptionRecord(ctx sdk.Context, msg *types.MsgClaimUndelegatedTokens) (*recordstypes.UserRedemptionRecord, error)
func (Keeper) GetConnectionId ¶
func (Keeper) GetCounterpartyChainId ¶
func (Keeper) GetDelegation ¶
GetDelegation returns delegation
func (Keeper) GetEpochTracker ¶ added in v0.0.7
func (k Keeper) GetEpochTracker( ctx sdk.Context, epochIdentifier string, ) (val types.EpochTracker, found bool)
GetEpochTracker returns a epochTracker from its index
func (Keeper) GetHostZone ¶
GetHostZone returns a hostZone from its id
func (Keeper) GetHostZoneCount ¶
GetHostZoneCount get the total number of hostZone
func (Keeper) GetHostZoneFromHostDenom ¶ added in v0.0.6
GetHostZoneFromHostDenom returns a HostZone from a HostDenom
func (Keeper) GetHostZoneFromIBCDenom ¶ added in v0.0.6
GetHostZoneFromIBCDenom returns a HostZone from a IBCDenom
func (Keeper) GetHostZoneUnbondingMsgs ¶ added in v0.5.1
func (k Keeper) GetHostZoneUnbondingMsgs(ctx sdk.Context, hostZone types.HostZone) ([]sdk.Msg, uint64, []byte, error)
return: - msgs to send to the host zone - total amount to unbond - marshalled callback args - error
func (Keeper) GetICAAccount ¶
GetICAAccount returns iCAAccount
func (Keeper) GetICATimeoutNanos ¶ added in v0.5.1
func (Keeper) GetLatestCompletionTime ¶ added in v0.5.1
func (Keeper) GetLightClientHeightSafely ¶ added in v0.0.6
func (Keeper) GetLightClientTimeSafely ¶ added in v0.0.7
func (Keeper) GetMinValidatorRequirements ¶
func (k Keeper) GetMinValidatorRequirements(ctx sdk.Context) (val types.MinValidatorRequirements, found bool)
GetMinValidatorRequirements returns minValidatorRequirements
func (Keeper) GetModuleAccountBalance ¶ added in v0.0.7
func (k Keeper) GetModuleAccountBalance(hostZone types.HostZone, depositRecords []recordstypes.DepositRecord) (int64, error)
func (Keeper) GetRedemptionAccount ¶ added in v0.0.7
func (Keeper) GetRedemptionTransferMsg ¶ added in v0.0.7
func (k Keeper) GetRedemptionTransferMsg(ctx sdk.Context, userRedemptionRecord *recordstypes.UserRedemptionRecord, hostZoneId string) (*IcaTx, error)
func (Keeper) GetStartTimeNextEpoch ¶ added in v0.5.1
helper to get time at which next epoch begins, in unix nano units
func (Keeper) GetStrideEpochElapsedShare ¶ added in v0.5.1
helper to get what share of the curr epoch we're through
func (Keeper) GetTargetValAmtsForHostZone ¶ added in v0.0.7
func (Keeper) GetTotalValidatorDelegations ¶ added in v0.0.7
func (Keeper) GetTotalValidatorWeight ¶ added in v0.0.7
func (Keeper) GetUndelegatedBalance ¶ added in v0.0.7
func (k Keeper) GetUndelegatedBalance(hostZone types.HostZone, depositRecords []recordstypes.DepositRecord) (int64, error)
func (Keeper) GetValidator ¶
GetValidator returns validator
func (Keeper) GetValidatorDelegationAmtDifferences ¶ added in v0.0.7
func (Keeper) HostZone ¶
func (k Keeper) HostZone(c context.Context, req *types.QueryGetHostZoneRequest) (*types.QueryGetHostZoneResponse, error)
func (Keeper) HostZoneAll ¶
func (k Keeper) HostZoneAll(c context.Context, req *types.QueryAllHostZoneRequest) (*types.QueryAllHostZoneResponse, error)
func (Keeper) ICAAccount ¶
func (k Keeper) ICAAccount(c context.Context, req *types.QueryGetICAAccountRequest) (*types.QueryGetICAAccountResponse, error)
func (Keeper) ICACallbackHandler ¶ added in v0.5.1
func (k Keeper) ICACallbackHandler() ICACallbacks
func (Keeper) InitiateAllHostZoneUnbondings ¶ added in v0.0.7
func (Keeper) InterchainAccountFromAddress ¶
func (k Keeper) InterchainAccountFromAddress(goCtx context.Context, req *types.QueryInterchainAccountFromAddressRequest) (*types.QueryInterchainAccountFromAddressResponse, error)
InterchainAccountFromAddress implements the Query/InterchainAccountFromAddress gRPC method
func (Keeper) IsRedemptionRateWithinSafetyBounds ¶ added in v0.5.1
func (k Keeper) IsRedemptionRateWithinSafetyBounds(ctx sdk.Context, zone types.HostZone) (bool, error)
safety check: ensure the redemption rate is NOT below our min safety threshold && NOT above our max safety threshold on host zone
func (Keeper) IsWithinBufferWindow ¶ added in v0.5.1
helper to check whether ICQs are valid in this portion of the epoch
func (Keeper) IterateHostZones ¶
func (k Keeper) IterateHostZones(ctx sdk.Context, fn func(ctx sdk.Context, index int64, zoneInfo types.HostZone) error)
IterateHostZones iterates zones
func (Keeper) MarshalClaimCallbackArgs ¶ added in v0.5.1
func (Keeper) MarshalDelegateCallbackArgs ¶ added in v0.5.1
func (Keeper) MarshalRedemptionCallbackArgs ¶ added in v0.5.1
func (Keeper) MarshalReinvestCallbackArgs ¶ added in v0.5.1
func (Keeper) MarshalUndelegateCallbackArgs ¶ added in v0.5.1
func (Keeper) ModuleAddress ¶ added in v0.0.6
func (k Keeper) ModuleAddress(goCtx context.Context, req *types.QueryModuleAddressRequest) (*types.QueryModuleAddressResponse, error)
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) QueryDelegationsIcq ¶ added in v0.5.1
to icq delegation amounts, this fn is executed after validator exch rates are icq'd
func (Keeper) QueryValidatorExchangeRate ¶ added in v0.5.1
func (k Keeper) QueryValidatorExchangeRate(ctx sdk.Context, msg *types.MsgUpdateValidatorSharesExchRate) (*types.MsgUpdateValidatorSharesExchRateResponse, error)
query and update validator exchange rate
func (Keeper) RemoveDelegation ¶
RemoveDelegation removes delegation from the store
func (Keeper) RemoveEpochTracker ¶ added in v0.0.7
RemoveEpochTracker removes a epochTracker from the store
func (Keeper) RemoveHostZone ¶
RemoveHostZone removes a hostZone from the store
func (Keeper) RemoveICAAccount ¶
RemoveICAAccount removes iCAAccount from the store
func (Keeper) RemoveMinValidatorRequirements ¶
RemoveMinValidatorRequirements removes minValidatorRequirements from the store
func (Keeper) RemoveValidator ¶
RemoveValidator removes validator from the store
func (Keeper) RemoveValidatorFromHostZone ¶ added in v0.0.7
func (Keeper) SetDelegation ¶
func (k Keeper) SetDelegation(ctx sdk.Context, delegation types.Delegation)
SetDelegation set delegation in the store
func (Keeper) SetEpochTracker ¶ added in v0.0.7
func (k Keeper) SetEpochTracker(ctx sdk.Context, epochTracker types.EpochTracker)
SetEpochTracker set a specific epochTracker in the store from its index
func (Keeper) SetHostZone ¶
SetHostZone set a specific hostZone in the store
func (Keeper) SetHostZoneCount ¶
SetHostZoneCount set the total number of hostZone
func (Keeper) SetICAAccount ¶
func (k Keeper) SetICAAccount(ctx sdk.Context, iCAAccount types.ICAAccount)
SetICAAccount set iCAAccount in the store
func (Keeper) SetMinValidatorRequirements ¶
func (k Keeper) SetMinValidatorRequirements(ctx sdk.Context, minValidatorRequirements types.MinValidatorRequirements)
SetMinValidatorRequirements set minValidatorRequirements in the store
func (Keeper) SetValidator ¶
SetValidator set validator in the store
func (Keeper) SetWithdrawalAddress ¶ added in v0.0.7
-------------------- helper functions --------------------
func (Keeper) SetWithdrawalAddressOnHost ¶ added in v0.0.7
func (Keeper) StakeExistingDepositsOnHostZones ¶ added in v0.0.7
func (k Keeper) StakeExistingDepositsOnHostZones(ctx sdk.Context, epochNumber uint64, depositRecords []recordstypes.DepositRecord)
func (Keeper) SubmitHostZoneUnbondingMsg ¶ added in v0.5.1
func (Keeper) SubmitTxs ¶
func (k Keeper) SubmitTxs( ctx sdk.Context, connectionId string, msgs []sdk.Msg, account types.ICAAccount, timeoutTimestamp uint64, callbackId string, callbackArgs []byte, ) (uint64, error)
SubmitTxs submits an ICA transaction containing multiple messages
func (Keeper) SubmitTxsDayEpoch ¶ added in v0.0.7
func (Keeper) SubmitTxsEpoch ¶ added in v0.0.7
func (Keeper) SubmitTxsStrideEpoch ¶ added in v0.0.7
func (Keeper) SweepAllUnbondedTokens ¶ added in v0.0.7
func (Keeper) SweepAllUnbondedTokensForHostZone ¶ added in v0.5.1
func (k Keeper) SweepAllUnbondedTokensForHostZone(ctx sdk.Context, hostZone types.HostZone, epochUnbondingRecords []recordstypes.EpochUnbondingRecord) (success bool, sweepAmount int64)
func (Keeper) TransferExistingDepositsToHostZones ¶ added in v0.0.7
func (k Keeper) TransferExistingDepositsToHostZones(ctx sdk.Context, epochNumber uint64, depositRecords []recordstypes.DepositRecord)
func (Keeper) UnmarshalClaimCallbackArgs ¶ added in v0.5.1
func (Keeper) UnmarshalDelegateCallbackArgs ¶ added in v0.5.1
func (Keeper) UnmarshalRedemptionCallbackArgs ¶ added in v0.5.1
func (Keeper) UnmarshalReinvestCallbackArgs ¶ added in v0.5.1
func (Keeper) UnmarshalUndelegateCallbackArgs ¶ added in v0.5.1
func (Keeper) UpdateDelegationBalances ¶ added in v0.5.1
func (Keeper) UpdateHostZoneUnbondings ¶ added in v0.5.1
func (Keeper) UpdateRedemptionRates ¶ added in v0.0.7
func (k Keeper) UpdateRedemptionRates(ctx sdk.Context, depositRecords []recordstypes.DepositRecord)
func (Keeper) UpdateWithdrawalBalance ¶ added in v0.0.7
Simple balance query helper using new ICQ module
func (Keeper) Validators ¶ added in v0.0.7
func (k Keeper) Validators(c context.Context, req *types.QueryGetValidatorsRequest) (*types.QueryGetValidatorsResponse, error)
Source Files
¶
- callbacks.go
- delegation.go
- deposit_records.go
- epoch_tracker.go
- grpc_query.go
- grpc_query_epoch_tracker.go
- grpc_query_host_zone.go
- grpc_query_ica_account.go
- grpc_query_module_address.go
- grpc_query_params.go
- grpc_query_register_ica.go
- grpc_query_validator.go
- hooks.go
- host_zone.go
- ica_account.go
- icacallbacks.go
- icacallbacks_claim.go
- icacallbacks_delegate.go
- icacallbacks_redemption.go
- icacallbacks_reinvest.go
- icacallbacks_undelegate.go
- invariants.go
- keeper.go
- min_validator_requirements.go
- msg_server.go
- msg_server_add_validator.go
- msg_server_change_validator_weight.go
- msg_server_claim_undelegated_tokens.go
- msg_server_clear_balance.go
- msg_server_delete_validator.go
- msg_server_liquid_stake.go
- msg_server_rebalance_validators.go
- msg_server_redeem_stake.go
- msg_server_register_host_zone.go
- msg_server_restore_interchain_account.go
- msg_server_submit_tx.go
- msg_server_update_validator_shares_exch_rate.go
- params.go
- unbonding_records.go
- validator.go
- validator_selection.go