Documentation
¶
Index ¶
- Constants
- func AccountBalanceCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error
- func AllBalancesCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error
- func CoinFromRequestKey(query []byte, accAddr sdk.AccAddress) (sdk.Coin, error)
- func DelegationCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error
- func DelegationsCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error
- func DepositIntervalCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error
- func DepositTx(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error
- func DetermineAllocationsForDelegation(currentAllocations map[string]sdkmath.Int, currentSum sdkmath.Int, ...) map[string]sdkmath.Int
- func DistributeRewardsFromWithdrawAccount(k Keeper, ctx sdk.Context, args []byte, query queryTypes.Query) error
- func GetDelegationKey(zone *types.Zone, delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte
- func GetDelegationsKey(zone *types.Zone, delAddr sdk.AccAddress) []byte
- func GetReceiptKey(chainID string, txhash string) string
- func GetUnbondingKey(chainID string, validator string, epochNumber int64) []byte
- func GetWithdrawalKey(chainID string, status int32) []byte
- func HandleRegisterZoneProposal(ctx sdk.Context, k Keeper, p *types.RegisterZoneProposal) error
- func HandleUpdateZoneProposal(ctx sdk.Context, k Keeper, p *types.UpdateZoneProposal) error
- func IntentSliceToMap(in []*types.ValidatorIntent) (out map[string]*types.ValidatorIntent)
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func PerfBalanceCallback(k Keeper, ctx sdk.Context, response []byte, query icqtypes.Query) error
- func RewardsCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error
- func SetAccountBalanceForDenom(k Keeper, ctx sdk.Context, zone types.Zone, address string, coin sdk.Coin) error
- func SetEpochBlockCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error
- func SetValidatorForZone(k *Keeper, ctx sdk.Context, zoneInfo types.Zone, data []byte) error
- func SetValidatorsForZone(k *Keeper, ctx sdk.Context, zoneInfo types.Zone, data []byte) error
- func ValidatorCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error
- func ValsetCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error
- type Callback
- type Callbacks
- type Hooks
- type Keeper
- func (k Keeper) AddWithdrawalRecord(ctx sdk.Context, chainID string, delegator string, ...)
- func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64)
- func (k *Keeper) AggregateIntents(ctx sdk.Context, zone types.Zone) error
- func (k Keeper) AllIntents(ctx sdk.Context, zone types.Zone, snapshot bool) []types.DelegatorIntent
- func (k Keeper) AllIntentsAsPointer(ctx sdk.Context, zone types.Zone, snapshot bool) []*types.DelegatorIntent
- func (k Keeper) AllOrdinalizedIntents(ctx sdk.Context, zone types.Zone, snapshot bool) ([]types.DelegatorIntent, error)
- func (k Keeper) AllPortConnections(ctx sdk.Context) (pcs []types.PortConnectionTuple)
- func (k Keeper) AllReceipts(ctx sdk.Context) []types.Receipt
- func (k Keeper) AllUnbondingRecords(ctx sdk.Context) []types.UnbondingRecord
- func (k Keeper) AllWithdrawalRecords(ctx sdk.Context) []types.WithdrawalRecord
- func (k Keeper) AllZones(ctx sdk.Context) []types.Zone
- func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64)
- func (k Keeper) BeginBlocker(ctx sdk.Context)
- func (k Keeper) CallbackHandler() Callbacks
- func (k *Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
- func (k Keeper) Delegations(c context.Context, req *types.QueryDelegationsRequest) (*types.QueryDelegationsResponse, error)
- func (k Keeper) DelegatorIntent(c context.Context, req *types.QueryDelegatorIntentRequest) (*types.QueryDelegatorIntentResponse, error)
- func (k Keeper) DeleteIntent(ctx sdk.Context, zone types.Zone, delegator string, snapshot bool)
- func (k Keeper) DeleteReceipt(ctx sdk.Context, key string)
- func (k Keeper) DeleteUnbondingRecord(ctx sdk.Context, chainID string, validator string, epochNumber int64)
- func (k Keeper) DeleteWithdrawalRecord(ctx sdk.Context, chainID string, txhash string, status int32)
- func (k Keeper) DeleteZone(ctx sdk.Context, chainID string)
- func (k Keeper) DepositAccount(c context.Context, req *types.QueryDepositAccountForChainRequest) (*types.QueryDepositAccountForChainResponse, error)
- func (k Keeper) DeterminePlanForDelegation(ctx sdk.Context, zone *types.Zone, amount sdk.Coins) map[string]sdkmath.Int
- func (k Keeper) EmitPerformanceBalanceQuery(ctx sdk.Context, zone *types.Zone) error
- func (k Keeper) EmitValsetRequery(ctx sdk.Context, connectionID string, chainID string) error
- func (k *Keeper) EnsureWithdrawalAddresses(ctx sdk.Context, zone *types.Zone) error
- func (k *Keeper) GCCompletedUnbondings(ctx sdk.Context, zone *types.Zone) error
- func (k Keeper) GetAllDelegations(ctx sdk.Context, zone *types.Zone) (delegations []types.Delegation)
- func (k Keeper) GetAllDelegationsAsPointer(ctx sdk.Context, zone *types.Zone) (delegations []*types.Delegation)
- func (k Keeper) GetChainID(ctx sdk.Context, connectionID string) (string, error)
- func (k Keeper) GetChainIDFromContext(ctx sdk.Context) (string, error)
- func (k Keeper) GetCodec() codec.Codec
- func (k *Keeper) GetCommissionRate(ctx sdk.Context) sdk.Dec
- func (k *Keeper) GetConnectionForPort(ctx sdk.Context, port string) (string, error)
- func (k Keeper) GetDelegatedAmount(ctx sdk.Context, zone *types.Zone) sdk.Coin
- func (k Keeper) GetDelegation(ctx sdk.Context, zone *types.Zone, delegatorAddress string, ...) (delegation types.Delegation, found bool)
- func (k *Keeper) GetDelegationMap(ctx sdk.Context, zone *types.Zone) (map[string]sdkmath.Int, sdkmath.Int)
- func (k Keeper) GetDelegatorDelegations(ctx sdk.Context, zone *types.Zone, delegator sdk.AccAddress) (delegations []types.Delegation)
- func (k Keeper) GetIntent(ctx sdk.Context, zone types.Zone, delegator string, snapshot bool) (types.DelegatorIntent, bool)
- func (k *Keeper) GetParam(ctx sdk.Context, key []byte) uint64
- func (k Keeper) GetParams(clientCtx sdk.Context) (params types.Params)
- func (k *Keeper) GetRatio(ctx sdk.Context, zone types.Zone, epochRewards math.Int) sdk.Dec
- func (k Keeper) GetReceipt(ctx sdk.Context, key string) (types.Receipt, bool)
- func (k Keeper) GetUnbondingAmount(ctx sdk.Context, zone *types.Zone) sdk.Coin
- func (k Keeper) GetUnbondingRecord(ctx sdk.Context, chainID string, validator string, epochNumber int64) (types.UnbondingRecord, bool)
- func (k Keeper) GetValidatorDelegations(ctx sdk.Context, zone *types.Zone, valAddr sdk.ValAddress) (delegations []types.Delegation)
- func (k *Keeper) GetValidatorForToken(ctx sdk.Context, delegatorAddress string, amount sdk.Coin) (string, error)
- func (k Keeper) GetWithdrawalRecord(ctx sdk.Context, chainID string, txhash string, status int32) (types.WithdrawalRecord, bool)
- func (k Keeper) GetZone(ctx sdk.Context, chainID string) (types.Zone, bool)
- func (k Keeper) GetZoneForDelegateAccount(ctx sdk.Context, address string) *types.Zone
- func (k Keeper) GetZoneForPerformanceAccount(ctx sdk.Context, address string) *types.Zone
- func (k Keeper) GetZoneFromContext(ctx sdk.Context) (*types.Zone, error)
- func (k *Keeper) HandleAcknowledgement(ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte) error
- func (k *Keeper) HandleBeginRedelegate(ctx sdk.Context, msg sdk.Msg, completion time.Time) error
- func (k Keeper) HandleChannelOpenAck(ctx sdk.Context, portID string, connectionID string) error
- func (k *Keeper) HandleCompleteMultiSend(ctx sdk.Context, msg sdk.Msg, memo string) error
- func (k *Keeper) HandleCompleteSend(ctx sdk.Context, msg sdk.Msg, memo string) error
- func (k *Keeper) HandleDelegate(ctx sdk.Context, msg sdk.Msg) error
- func (k *Keeper) HandleDistributeFeesFromModuleAccount(ctx sdk.Context) error
- func (k *Keeper) HandleMaturedUnbondings(ctx sdk.Context, zone *types.Zone) error
- func (k *Keeper) HandleMsgTransfer(ctx sdk.Context, msg sdk.Msg) error
- func (k *Keeper) HandleQueuedUnbondings(ctx sdk.Context, zone *types.Zone, epoch int64) error
- func (k Keeper) HandleReceiptTransaction(ctx sdk.Context, txr *sdk.TxResponse, txn *tx.Tx, zone types.Zone)
- func (k *Keeper) HandleRedeemTokens(ctx sdk.Context, msg sdk.Msg, amount sdk.Coin) error
- func (k *Keeper) HandleTimeout(ctx sdk.Context, packet channeltypes.Packet) error
- func (k *Keeper) HandleTokenizedShares(ctx sdk.Context, msg sdk.Msg, sharesAmount sdk.Coin, memo string) error
- func (k *Keeper) HandleUndelegate(ctx sdk.Context, msg sdk.Msg, completion time.Time, memo string) error
- func (k *Keeper) HandleUpdatedWithdrawAddress(ctx sdk.Context, msg sdk.Msg) error
- func (k *Keeper) HandleWithdrawRewards(ctx sdk.Context, msg sdk.Msg) error
- func (k Keeper) Hooks() Hooks
- func (k Keeper) InitPerformanceDelegations(ctx sdk.Context, zone types.Zone, response []byte) error
- func (k Keeper) IterateAllDelegations(ctx sdk.Context, zone *types.Zone, ...)
- func (k Keeper) IterateDelegatorDelegations(ctx sdk.Context, zone *types.Zone, delegator sdk.AccAddress, ...)
- func (k Keeper) IterateIntents(ctx sdk.Context, zone types.Zone, snapshot bool, ...)
- func (k Keeper) IteratePortConnections(ctx sdk.Context, cb func(pc types.PortConnectionTuple) (stop bool))
- func (k Keeper) IteratePrefixedUnbondingRecords(ctx sdk.Context, prefixBytes []byte, ...)
- func (k Keeper) IteratePrefixedWithdrawalRecords(ctx sdk.Context, prefixBytes []byte, ...)
- func (k Keeper) IterateReceipts(ctx sdk.Context, fn func(index int64, receiptInfo types.Receipt) (stop bool))
- func (k Keeper) IterateUnbondingRecords(ctx sdk.Context, ...)
- func (k Keeper) IterateWithdrawalRecords(ctx sdk.Context, ...)
- func (k Keeper) IterateZoneReceipts(ctx sdk.Context, zone *types.Zone, ...)
- func (k Keeper) IterateZoneStatusWithdrawalRecords(ctx sdk.Context, chainID string, status int32, ...)
- func (k Keeper) IterateZoneWithdrawalRecords(ctx sdk.Context, chainID string, ...)
- func (k Keeper) IterateZones(ctx sdk.Context, fn func(index int64, zoneInfo types.Zone) (stop bool))
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k *Keeper) MintQAsset(ctx sdk.Context, sender sdk.AccAddress, zone types.Zone, inCoins sdk.Coins) error
- func (k Keeper) NewReceipt(ctx sdk.Context, zone types.Zone, sender string, txhash string, ...) *types.Receipt
- func (k *Keeper) PrepareDelegationMessagesForCoins(ctx sdk.Context, zone *types.Zone, allocations map[string]sdkmath.Int) []sdk.Msg
- func (k *Keeper) PrepareDelegationMessagesForShares(ctx sdk.Context, zone *types.Zone, coins sdk.Coins) []sdk.Msg
- func (k *Keeper) Rebalance(ctx sdk.Context, zone types.Zone) error
- func (k Keeper) Receipts(c context.Context, req *types.QueryReceiptsRequest) (*types.QueryReceiptsResponse, error)
- func (k Keeper) RemoveDelegation(ctx sdk.Context, zone *types.Zone, delegation types.Delegation) error
- func (k *Keeper) ScopedKeeper() *capabilitykeeper.ScopedKeeper
- func (k Keeper) SetAccountBalance(ctx sdk.Context, zone types.Zone, address string, queryResult []byte) error
- func (k *Keeper) SetConnectionForPort(ctx sdk.Context, connectionID string, port string)
- func (k Keeper) SetDelegation(ctx sdk.Context, zone *types.Zone, delegation types.Delegation)
- func (k Keeper) SetIntent(ctx sdk.Context, zone types.Zone, intent types.DelegatorIntent, snapshot bool)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetReceipt(ctx sdk.Context, receipt types.Receipt)
- func (k Keeper) SetUnbondingRecord(ctx sdk.Context, record types.UnbondingRecord)
- func (k Keeper) SetWithdrawalRecord(ctx sdk.Context, record types.WithdrawalRecord)
- func (k Keeper) SetZone(ctx sdk.Context, zone *types.Zone)
- func (k *Keeper) SubmitTx(ctx sdk.Context, msgs []sdk.Msg, account *types.ICAAccount, memo string) error
- func (k *Keeper) TransferToDelegate(ctx sdk.Context, zone types.Zone, coins sdk.Coins, memo string) error
- func (k Keeper) UnbondingRecords(c context.Context, req *types.QueryUnbondingRecordsRequest) (*types.QueryUnbondingRecordsResponse, error)
- func (k *Keeper) UpdateDelegationRecordForAddress(ctx sdk.Context, delegatorAddress string, validatorAddress string, ...) error
- func (k *Keeper) UpdateDelegationRecordsForAddress(ctx sdk.Context, zone types.Zone, delegatorAddress string, args []byte) error
- func (k *Keeper) UpdateIntent(ctx sdk.Context, sender sdk.AccAddress, zone types.Zone, inAmount sdk.Coins, ...) error
- func (k *Keeper) UpdateRedemptionRate(ctx sdk.Context, zone types.Zone, epochRewards math.Int)
- func (k Keeper) UpdateWithdrawalRecordStatus(ctx sdk.Context, withdrawal *types.WithdrawalRecord, newStatus int32)
- func (k Keeper) UserZoneReceipts(ctx sdk.Context, zone *types.Zone, addr sdk.AccAddress) ([]types.Receipt, error)
- func (k *Keeper) WithdrawDelegationRewardsForResponse(ctx sdk.Context, zone *types.Zone, delegator string, response []byte) error
- func (k Keeper) WithdrawalRecords(c context.Context, req *types.QueryWithdrawalRecordsRequest) (*types.QueryWithdrawalRecordsResponse, error)
- func (k Keeper) ZoneInfos(c context.Context, req *types.QueryZonesInfoRequest) (*types.QueryZonesInfoResponse, error)
- func (k Keeper) ZoneWithdrawalRecords(c context.Context, req *types.QueryWithdrawalRecordsRequest) (*types.QueryWithdrawalRecordsResponse, error)
- type RebalanceTarget
Constants ¶
const ( // setting WithdrawStatusTokenize as 0 causes the value to be omitted when (un)marshalling :/ WithdrawStatusTokenize int32 = iota + 1 WithdrawStatusQueued int32 = iota + 1 WithdrawStatusUnbond int32 = iota + 1 WithdrawStatusSend int32 = iota + 1 WithdrawStatusCompleted int32 = iota + 1 )
const UNSET = "unset"
Variables ¶
This section is empty.
Functions ¶
func AccountBalanceCallback ¶ added in v0.3.0
AccountBalanceCallback is a callback handler for Balance queries.
func AllBalancesCallback ¶ added in v0.3.0
func CoinFromRequestKey ¶ added in v0.9.0
coinFromRequestKey parses
func DelegationCallback ¶ added in v0.3.0
func DelegationsCallback ¶ added in v0.3.0
func DepositIntervalCallback ¶ added in v0.3.0
func DetermineAllocationsForDelegation ¶ added in v0.9.0
func GetDelegationKey ¶ added in v0.2.0
func GetDelegationKey(zone *types.Zone, delAddr sdk.AccAddress, valAddr sdk.ValAddress) []byte
gets the key for delegator bond with validator VALUE: staking/Delegation
func GetDelegationsKey ¶ added in v0.2.0
func GetDelegationsKey(zone *types.Zone, delAddr sdk.AccAddress) []byte
gets the prefix for a delegator for all validators
func GetReceiptKey ¶
func GetUnbondingKey ¶ added in v0.9.0
unbondigng records are keyed by chainId, validator and epoch, as they must be unique with regard to this triple.
func GetWithdrawalKey ¶ added in v0.2.0
func HandleRegisterZoneProposal ¶ added in v0.4.0
HandleRegisterZoneProposal is a handler for executing a passed community spend proposal
func HandleUpdateZoneProposal ¶ added in v0.4.0
HandleUpdateZoneProposal is a handler for executing a passed community spend proposal
func IntentSliceToMap ¶ added in v0.9.0
func IntentSliceToMap(in []*types.ValidatorIntent) (out map[string]*types.ValidatorIntent)
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the interchainstaking MsgServer interface for the provided Keeper.
func PerfBalanceCallback ¶ added in v0.3.0
func RewardsCallback ¶ added in v0.3.0
func SetAccountBalanceForDenom ¶ added in v0.2.0
func SetAccountBalanceForDenom(k Keeper, ctx sdk.Context, zone types.Zone, address string, coin sdk.Coin) error
SetAccountBalanceForDenom sets the balance on an account for a given denominination.
func SetEpochBlockCallback ¶ added in v0.6.0
SetEpochBlockCallback records the block height of the registered zone at the epoch boundary.
func SetValidatorForZone ¶ added in v0.2.0
func SetValidatorsForZone ¶
func ValidatorCallback ¶ added in v0.3.0
Types ¶
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 ¶ added in v0.3.0
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 ¶
type Keeper ¶
type Keeper struct {
ICAControllerKeeper icacontrollerkeeper.Keeper
ICQKeeper interchainquerykeeper.Keeper
AccountKeeper authKeeper.AccountKeeper
BankKeeper bankkeeper.Keeper
IBCKeeper ibckeeper.Keeper
// contains filtered or unexported fields
}
Keeper of this module maintains collections of registered zones.
func NewKeeper ¶
func NewKeeper(cdc codec.Codec, storeKey storetypes.StoreKey, accountKeeper authKeeper.AccountKeeper, bankKeeper bankkeeper.Keeper, icacontrollerkeeper icacontrollerkeeper.Keeper, scopedKeeper *capabilitykeeper.ScopedKeeper, icqKeeper interchainquerykeeper.Keeper, ibcKeeper ibckeeper.Keeper, ps paramtypes.Subspace) Keeper
NewKeeper returns a new instance of zones Keeper. This function will panic on failure.
func (Keeper) AddWithdrawalRecord ¶
func (Keeper) AfterEpochEnd ¶
func (*Keeper) AggregateIntents ¶
func (Keeper) AllIntents ¶
AllIntents returns every intent in the store for the specified zone
func (Keeper) AllIntentsAsPointer ¶ added in v0.6.0
func (k Keeper) AllIntentsAsPointer(ctx sdk.Context, zone types.Zone, snapshot bool) []*types.DelegatorIntent
AllIntents returns every intent in the store for the specified zone
func (Keeper) AllOrdinalizedIntents ¶
func (k Keeper) AllOrdinalizedIntents(ctx sdk.Context, zone types.Zone, snapshot bool) ([]types.DelegatorIntent, error)
AllOrdinalizedIntents returns every intent in the store for the specified zone.
func (Keeper) AllPortConnections ¶ added in v0.6.0
func (k Keeper) AllPortConnections(ctx sdk.Context) (pcs []types.PortConnectionTuple)
AllPortConnections returns all delegations used during genesis dump.
func (Keeper) AllReceipts ¶ added in v0.6.0
func (Keeper) AllUnbondingRecords ¶ added in v0.9.0
func (k Keeper) AllUnbondingRecords(ctx sdk.Context) []types.UnbondingRecord
AllUnbondingRecords returns every record in the store for the specified zone
func (Keeper) AllWithdrawalRecords ¶
func (k Keeper) AllWithdrawalRecords(ctx sdk.Context) []types.WithdrawalRecord
AllWithdrawalRecords returns every record in the store for the specified zone
func (Keeper) BeforeEpochStart ¶
func (Keeper) BeginBlocker ¶
BeginBlocker of interchainstaking module
func (Keeper) CallbackHandler ¶
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) Delegations ¶ added in v0.2.0
func (k Keeper) Delegations(c context.Context, req *types.QueryDelegationsRequest) (*types.QueryDelegationsResponse, error)
func (Keeper) DelegatorIntent ¶
func (k Keeper) DelegatorIntent(c context.Context, req *types.QueryDelegatorIntentRequest) (*types.QueryDelegatorIntentResponse, error)
DelegatorIntent returns information about the delegation intent of the caller for the given zone.
func (Keeper) DeleteIntent ¶
DeleteIntent deletes delegator intent
func (Keeper) DeleteReceipt ¶
DeleteReceipt delete receipt info
func (Keeper) DeleteUnbondingRecord ¶ added in v0.9.0
func (k Keeper) DeleteUnbondingRecord(ctx sdk.Context, chainID string, validator string, epochNumber int64)
DeleteUnbondingRecord deletes unbonding record
func (Keeper) DeleteWithdrawalRecord ¶
func (k Keeper) DeleteWithdrawalRecord(ctx sdk.Context, chainID string, txhash string, status int32)
DeleteWithdrawalRecord deletes withdrawal record
func (Keeper) DeleteZone ¶ added in v0.6.0
DeleteZone delete zone info
func (Keeper) DepositAccount ¶ added in v0.2.0
func (k Keeper) DepositAccount(c context.Context, req *types.QueryDepositAccountForChainRequest) (*types.QueryDepositAccountForChainResponse, error)
DepositAccount returns the deposit account address for the given zone.
func (Keeper) DeterminePlanForDelegation ¶ added in v0.2.0
func (Keeper) EmitPerformanceBalanceQuery ¶ added in v0.2.0
func (Keeper) EmitValsetRequery ¶ added in v0.2.0
func (*Keeper) EnsureWithdrawalAddresses ¶ added in v0.6.0
func (*Keeper) GCCompletedUnbondings ¶ added in v0.9.0
func (Keeper) GetAllDelegations ¶ added in v0.2.0
func (k Keeper) GetAllDelegations(ctx sdk.Context, zone *types.Zone) (delegations []types.Delegation)
GetAllDelegations returns all delegations used during genesis dump.
func (Keeper) GetAllDelegationsAsPointer ¶ added in v0.6.0
func (k Keeper) GetAllDelegationsAsPointer(ctx sdk.Context, zone *types.Zone) (delegations []*types.Delegation)
GetAllDelegations returns all delegations used during genesis dump.
func (Keeper) GetChainID ¶
func (Keeper) GetChainIDFromContext ¶ added in v0.6.0
func (*Keeper) GetConnectionForPort ¶
func (Keeper) GetDelegatedAmount ¶ added in v0.6.0
func (Keeper) GetDelegation ¶ added in v0.2.0
func (k Keeper) GetDelegation(ctx sdk.Context, zone *types.Zone, delegatorAddress string, validatorAddress string) (delegation types.Delegation, found bool)
GetDelegation returns a specific delegation.
func (*Keeper) GetDelegationMap ¶ added in v0.9.0
func (Keeper) GetDelegatorDelegations ¶ added in v0.2.0
func (k Keeper) GetDelegatorDelegations(ctx sdk.Context, zone *types.Zone, delegator sdk.AccAddress) (delegations []types.Delegation)
GetDelegatorDelegations returns a given amount of all the delegations from a delegator.
func (Keeper) GetIntent ¶
func (k Keeper) GetIntent(ctx sdk.Context, zone types.Zone, delegator string, snapshot bool) (types.DelegatorIntent, bool)
GetIntent returns intent info by zone and delegator
func (Keeper) GetReceipt ¶
GetReceipt returns receipt
func (Keeper) GetUnbondingAmount ¶ added in v0.9.0
func (Keeper) GetUnbondingRecord ¶ added in v0.9.0
func (k Keeper) GetUnbondingRecord(ctx sdk.Context, chainID string, validator string, epochNumber int64) (types.UnbondingRecord, bool)
GetUnbondingRecord returns unbonding record info by zone, validator and epoch
func (Keeper) GetValidatorDelegations ¶ added in v0.2.0
func (k Keeper) GetValidatorDelegations(ctx sdk.Context, zone *types.Zone, valAddr sdk.ValAddress) (delegations []types.Delegation)
GetValidatorDelegations returns all delegations to a specific validator. Useful for querier.
func (*Keeper) GetValidatorForToken ¶
func (k *Keeper) GetValidatorForToken(ctx sdk.Context, delegatorAddress string, amount sdk.Coin) (string, error)
TODO: this should be part of Keeper, but part of zone. Refactor me.
func (Keeper) GetWithdrawalRecord ¶
func (k Keeper) GetWithdrawalRecord(ctx sdk.Context, chainID string, txhash string, status int32) (types.WithdrawalRecord, bool)
GetWithdrawalRecord returns withdrawal record info by zone and delegator
func (Keeper) GetZoneForDelegateAccount ¶
GetZoneForDelegateAccount determines the zone for a given address.
func (Keeper) GetZoneForPerformanceAccount ¶ added in v0.2.0
func (Keeper) GetZoneFromContext ¶ added in v0.2.0
GetZoneFromContext determines the zone from the current context
func (*Keeper) HandleAcknowledgement ¶
func (*Keeper) HandleBeginRedelegate ¶
func (Keeper) HandleChannelOpenAck ¶ added in v0.6.0
func (*Keeper) HandleCompleteMultiSend ¶
func (*Keeper) HandleCompleteSend ¶
func (*Keeper) HandleDistributeFeesFromModuleAccount ¶ added in v0.1.10
func (*Keeper) HandleMaturedUnbondings ¶ added in v0.9.0
func (*Keeper) HandleMsgTransfer ¶ added in v0.1.10
func (*Keeper) HandleQueuedUnbondings ¶ added in v0.9.0
handle queued unbondings is called once per epoch to aggregate all queued unbondings into a single unbond transaction per delegation.
func (Keeper) HandleReceiptTransaction ¶
func (*Keeper) HandleRedeemTokens ¶
func (*Keeper) HandleTimeout ¶
func (*Keeper) HandleTokenizedShares ¶
func (*Keeper) HandleUndelegate ¶ added in v0.6.0
func (*Keeper) HandleUpdatedWithdrawAddress ¶
func (*Keeper) HandleWithdrawRewards ¶
func (Keeper) InitPerformanceDelegations ¶ added in v0.2.0
func (Keeper) IterateAllDelegations ¶ added in v0.2.0
func (k Keeper) IterateAllDelegations(ctx sdk.Context, zone *types.Zone, cb func(delegation types.Delegation) (stop bool))
IterateAllDelegations iterates through all of the delegations.
func (Keeper) IterateDelegatorDelegations ¶ added in v0.2.0
func (k Keeper) IterateDelegatorDelegations(ctx sdk.Context, zone *types.Zone, delegator sdk.AccAddress, cb func(delegation types.Delegation) (stop bool))
IterateDelegatorDelegations iterates through one delegator's delegations.
func (Keeper) IterateIntents ¶
func (k Keeper) IterateIntents(ctx sdk.Context, zone types.Zone, snapshot bool, fn func(index int64, intent types.DelegatorIntent) (stop bool))
IterateIntents iterate through intents for a given zone
func (Keeper) IteratePortConnections ¶ added in v0.6.0
func (k Keeper) IteratePortConnections(ctx sdk.Context, cb func(pc types.PortConnectionTuple) (stop bool))
IteratePortConnections iterates through all of the delegations.
func (Keeper) IteratePrefixedUnbondingRecords ¶ added in v0.9.0
func (k Keeper) IteratePrefixedUnbondingRecords(ctx sdk.Context, prefixBytes []byte, fn func(index int64, record types.UnbondingRecord) (stop bool))
IteratePrefixedUnbondingRecords iterate through all records with given prefix
func (Keeper) IteratePrefixedWithdrawalRecords ¶ added in v0.6.0
func (k Keeper) IteratePrefixedWithdrawalRecords(ctx sdk.Context, prefixBytes []byte, fn func(index int64, record types.WithdrawalRecord) (stop bool))
IteratePrefixedWithdrawalRecords iterate through all records with given prefix
func (Keeper) IterateReceipts ¶
func (k Keeper) IterateReceipts(ctx sdk.Context, fn func(index int64, receiptInfo types.Receipt) (stop bool))
IterateQueries iterate through receipts
func (Keeper) IterateUnbondingRecords ¶ added in v0.9.0
func (k Keeper) IterateUnbondingRecords(ctx sdk.Context, fn func(index int64, record types.UnbondingRecord) (stop bool))
IterateUnbondingRecords iterate through all records
func (Keeper) IterateWithdrawalRecords ¶
func (k Keeper) IterateWithdrawalRecords(ctx sdk.Context, fn func(index int64, record types.WithdrawalRecord) (stop bool))
IterateWithdrawalRecords iterate through all records
func (Keeper) IterateZoneReceipts ¶ added in v0.6.0
func (k Keeper) IterateZoneReceipts(ctx sdk.Context, zone *types.Zone, fn func(index int64, receiptInfo types.Receipt) (stop bool))
IterateZoneReceipts iterate through receipts of the given zone
func (Keeper) IterateZoneStatusWithdrawalRecords ¶ added in v0.9.0
func (k Keeper) IterateZoneStatusWithdrawalRecords(ctx sdk.Context, chainID string, status int32, fn func(index int64, record types.WithdrawalRecord) (stop bool))
IterateZoneDelegatorWithdrawalRecords iterate through records for a given zone / delegator tuple
func (Keeper) IterateZoneWithdrawalRecords ¶ added in v0.6.0
func (k Keeper) IterateZoneWithdrawalRecords(ctx sdk.Context, chainID string, fn func(index int64, record types.WithdrawalRecord) (stop bool))
IterateZoneWithdrawalRecords iterate through records for a given zone
func (Keeper) IterateZones ¶ added in v0.6.0
func (k Keeper) IterateZones(ctx sdk.Context, fn func(index int64, zoneInfo types.Zone) (stop bool))
IterateZones iterate through zones
func (*Keeper) MintQAsset ¶
func (Keeper) NewReceipt ¶
func (*Keeper) PrepareDelegationMessagesForCoins ¶ added in v0.9.0
func (*Keeper) PrepareDelegationMessagesForShares ¶ added in v0.9.0
func (Keeper) Receipts ¶ added in v0.9.0
func (k Keeper) Receipts(c context.Context, req *types.QueryReceiptsRequest) (*types.QueryReceiptsResponse, error)
func (Keeper) RemoveDelegation ¶ added in v0.2.0
func (k Keeper) RemoveDelegation(ctx sdk.Context, zone *types.Zone, delegation types.Delegation) error
RemoveDelegation removes a delegation
func (*Keeper) ScopedKeeper ¶ added in v0.9.0
func (k *Keeper) ScopedKeeper() *capabilitykeeper.ScopedKeeper
func (Keeper) SetAccountBalance ¶
func (k Keeper) SetAccountBalance(ctx sdk.Context, zone types.Zone, address string, queryResult []byte) error
SetAccountBalance triggers provable KV queries to prove an AllBalances query.
func (*Keeper) SetConnectionForPort ¶
func (Keeper) SetDelegation ¶ added in v0.2.0
SetDelegation sets a delegation.
func (Keeper) SetIntent ¶
func (k Keeper) SetIntent(ctx sdk.Context, zone types.Zone, intent types.DelegatorIntent, snapshot bool)
SetIntent store the delegator intent
func (Keeper) SetReceipt ¶
SetReceipt set receipt info
func (Keeper) SetUnbondingRecord ¶ added in v0.9.0
func (k Keeper) SetUnbondingRecord(ctx sdk.Context, record types.UnbondingRecord)
SetUnbondingRecord store the unbonding record
func (Keeper) SetWithdrawalRecord ¶
func (k Keeper) SetWithdrawalRecord(ctx sdk.Context, record types.WithdrawalRecord)
SetWithdrawalRecord store the withdrawal record
func (*Keeper) TransferToDelegate ¶
func (Keeper) UnbondingRecords ¶ added in v0.9.0
func (k Keeper) UnbondingRecords(c context.Context, req *types.QueryUnbondingRecordsRequest) (*types.QueryUnbondingRecordsResponse, error)
func (*Keeper) UpdateDelegationRecordForAddress ¶
func (*Keeper) UpdateDelegationRecordsForAddress ¶
func (*Keeper) UpdateIntent ¶
func (*Keeper) UpdateRedemptionRate ¶ added in v0.9.0
func (Keeper) UpdateWithdrawalRecordStatus ¶ added in v0.9.0
func (Keeper) UserZoneReceipts ¶ added in v0.6.0
func (k Keeper) UserZoneReceipts(ctx sdk.Context, zone *types.Zone, addr sdk.AccAddress) ([]types.Receipt, error)
UserZoneReceipts returns all receipts of the given user for the given zone
func (*Keeper) WithdrawDelegationRewardsForResponse ¶
func (Keeper) WithdrawalRecords ¶ added in v0.6.0
func (k Keeper) WithdrawalRecords(c context.Context, req *types.QueryWithdrawalRecordsRequest) (*types.QueryWithdrawalRecordsResponse, error)
func (Keeper) ZoneInfos ¶ added in v0.6.0
func (k Keeper) ZoneInfos(c context.Context, req *types.QueryZonesInfoRequest) (*types.QueryZonesInfoResponse, error)
ZoneInfos returns information about registered zones.
func (Keeper) ZoneWithdrawalRecords ¶ added in v0.6.0
func (k Keeper) ZoneWithdrawalRecords(c context.Context, req *types.QueryWithdrawalRecordsRequest) (*types.QueryWithdrawalRecordsResponse, error)
type RebalanceTarget ¶ added in v0.9.0
func DetermineAllocationsForRebalancing ¶ added in v0.9.0
func DetermineAllocationsForRebalancing(currentAllocations map[string]math.Int, currentSum math.Int, targetAllocations types.ValidatorIntents) []RebalanceTarget