Documentation
¶
Index ¶
- Constants
- func DistributeRewardsFromWithdrawAccount(k Keeper, ctx sdk.Context, args []byte, query queryTypes.Query) error
- func GetReceiptKey(zone types.RegisteredZone, txhash string) string
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- func SetValidatorsForZone(k Keeper, ctx sdk.Context, zoneInfo types.RegisteredZone, data []byte) error
- type Callback
- type Callbacks
- type Hooks
- type Keeper
- func (k Keeper) AddWithdrawalRecord(ctx sdk.Context, delegator string, validator string, recipient string, ...)
- func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64)
- func (k *Keeper) AggregateIntents(ctx sdk.Context, zone types.RegisteredZone)
- func (k Keeper) AllIntents(ctx sdk.Context, zone types.RegisteredZone) []types.DelegatorIntent
- func (k Keeper) AllOrdinalizedIntents(ctx sdk.Context, zone types.RegisteredZone) []types.DelegatorIntent
- func (k Keeper) AllRegisteredZones(ctx sdk.Context) []types.RegisteredZone
- func (k Keeper) AllWithdrawalRecords(ctx sdk.Context, delegator string) []types.WithdrawalRecord
- 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) Delegate(ctx sdk.Context, zone types.RegisteredZone, account *types.ICAAccount) error
- func (k Keeper) DelegatorIntent(c context.Context, req *types.QueryDelegatorIntentRequest) (*types.QueryDelegatorIntentResponse, error)
- func (k Keeper) DeleteIntent(ctx sdk.Context, zone types.RegisteredZone, delegator string)
- func (k Keeper) DeleteReceipt(ctx sdk.Context, key string)
- func (k Keeper) DeleteRegisteredZone(ctx sdk.Context, chain_id string)
- func (k Keeper) DeleteWithdrawalRecord(ctx sdk.Context, delegator string, validator string, recipient string)
- func (k Keeper) DepositAccountFromAddress(c context.Context, req *types.QueryDepositAccountForChainRequest) (*types.QueryDepositAccountForChainResponse, error)
- func (k Keeper) DetermineValidatorsForDelegation(ctx sdk.Context, zone types.RegisteredZone, amount sdk.Coin) (map[string]sdk.Coin, error)
- func (k Keeper) GetChainID(ctx sdk.Context, connectionID string) (string, error)
- func (k *Keeper) GetCommissionRate(ctx sdk.Context) sdk.Dec
- func (k *Keeper) GetConnectionForPort(ctx sdk.Context, port string) (string, error)
- func (k Keeper) GetICAForDelegateAccount(ctx sdk.Context, address string) (*types.RegisteredZone, *types.ICAAccount)
- func (k Keeper) GetIntent(ctx sdk.Context, zone types.RegisteredZone, delegator string) (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) GetReceipt(ctx sdk.Context, key string) (types.Receipt, bool)
- func (k Keeper) GetRegisteredZoneInfo(ctx sdk.Context, chain_id string) (types.RegisteredZone, bool)
- func (k *Keeper) GetValidatorForToken(ctx sdk.Context, delegatorAddress string, amount sdk.Coin) (string, error)
- func (k Keeper) GetWithdrawalRecord(ctx sdk.Context, delegator string, validator string, recipient string) (types.WithdrawalRecord, bool)
- func (k Keeper) GetZoneForDelegateAccount(ctx sdk.Context, address string) *types.RegisteredZone
- 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) HandleCompleteMultiSend(ctx sdk.Context, msg sdk.Msg) error
- func (k *Keeper) HandleCompleteSend(ctx sdk.Context, msg sdk.Msg) error
- func (k *Keeper) HandleDelegate(ctx sdk.Context, msg sdk.Msg) error
- func (k Keeper) HandleReceiptTransaction(ctx sdk.Context, tx *coretypes.ResultTx, zone types.RegisteredZone)
- 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, amount sdk.Coin) error
- func (k *Keeper) HandleUpdatedWithdrawAddress(ctx sdk.Context, msg sdk.Msg) error
- func (k *Keeper) HandleWithdrawRewards(ctx sdk.Context, msg sdk.Msg, amount sdk.Coins) error
- func (k Keeper) Hooks() Hooks
- func (k Keeper) IterateIntents(ctx sdk.Context, zone types.RegisteredZone, ...)
- func (k Keeper) IterateReceipts(ctx sdk.Context, fn func(index int64, receiptInfo types.Receipt) (stop bool))
- func (k Keeper) IterateRegisteredZones(ctx sdk.Context, ...)
- func (k Keeper) IterateWithdrawalRecords(ctx sdk.Context, delegator string, ...)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k *Keeper) MintQAsset(ctx sdk.Context, sender sdk.AccAddress, zone types.RegisteredZone, ...) error
- func (k Keeper) NewReceipt(ctx sdk.Context, zone types.RegisteredZone, sender string, txhash string, ...) *types.Receipt
- func (k Keeper) RegisteredZoneInfos(c context.Context, req *types.QueryRegisteredZonesInfoRequest) (*types.QueryRegisteredZonesInfoResponse, error)
- func (k Keeper) SetAccountBalance(ctx sdk.Context, zone types.RegisteredZone, address string, queryResult []byte) error
- func (k *Keeper) SetConnectionForPort(ctx sdk.Context, connectionId string, port string) error
- func (k Keeper) SetIntent(ctx sdk.Context, zone types.RegisteredZone, intent types.DelegatorIntent)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetReceipt(ctx sdk.Context, receipt types.Receipt)
- func (k Keeper) SetRegisteredZone(ctx sdk.Context, zone types.RegisteredZone)
- func (k Keeper) SetWithdrawalRecord(ctx sdk.Context, record *types.WithdrawalRecord)
- func (k *Keeper) SubmitTx(ctx sdk.Context, msgs []sdk.Msg, account *types.ICAAccount) error
- func (k *Keeper) TransferToDelegate(ctx sdk.Context, zone types.RegisteredZone, inAmount sdk.Coins) error
- func (k *Keeper) TransferToDelegateMulti(ctx sdk.Context, zone types.RegisteredZone, inAmount sdk.Coins) error
- func (k *Keeper) UpdateDelegationRecordForAddress(ctx sdk.Context, delegatorAddress string, validatorAddress string, ...) error
- func (k *Keeper) UpdateDelegationRecordsForAddress(ctx sdk.Context, zone types.RegisteredZone, delegatorAddress string, ...) error
- func (k *Keeper) UpdateIntent(ctx sdk.Context, sender sdk.AccAddress, zone types.RegisteredZone, ...)
- func (k *Keeper) WithdrawDelegationRewardsForResponse(ctx sdk.Context, zone types.RegisteredZone, delegator string, response []byte) error
Constants ¶
const ( // setting WITHDRAW_STATUS_TOKENIZE as 0 causes the value to be omitted when (un)marshalling :/ WITHDRAW_STATUS_TOKENIZE int32 = iota + 1 WITHDRAW_STATUS_SEND int32 = iota + 1 )
Variables ¶
This section is empty.
Functions ¶
func GetReceiptKey ¶
func GetReceiptKey(zone types.RegisteredZone, txhash string) string
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the interchainstaking MsgServer interface for the provided Keeper.
func SetValidatorsForZone ¶
Types ¶
type Callbacks ¶
type Callbacks struct {
// contains filtered or unexported fields
}
func (Callbacks) AddCallback ¶
func (Callbacks) Call ¶
// callback handler
func (c Callbacks) Call(id string, ctx sdk.Context, args proto.Message) error {
return c.callbacks[id](c.k, ctx, args)
}
callback handler
func (Callbacks) RemoveCallback ¶
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 sdk.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
func (Keeper) AddWithdrawalRecord ¶
func (Keeper) AfterEpochEnd ¶
func (*Keeper) AggregateIntents ¶
func (k *Keeper) AggregateIntents(ctx sdk.Context, zone types.RegisteredZone)
func (Keeper) AllIntents ¶
func (k Keeper) AllIntents(ctx sdk.Context, zone types.RegisteredZone) []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.RegisteredZone) []types.DelegatorIntent
AllOrdinalizedIntents returns every intent in the store for the specified zone
func (Keeper) AllRegisteredZones ¶
func (k Keeper) AllRegisteredZones(ctx sdk.Context) []types.RegisteredZone
AllRegisteredZonesInfos returns every zoneInfo in the store
func (Keeper) AllWithdrawalRecords ¶
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) Delegate ¶
func (k *Keeper) Delegate(ctx sdk.Context, zone types.RegisteredZone, account *types.ICAAccount) 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) DeleteRegisteredZone ¶
DeleteRegisteredZone delete zone info
func (Keeper) DeleteWithdrawalRecord ¶
func (k Keeper) DeleteWithdrawalRecord(ctx sdk.Context, delegator string, validator string, recipient string)
DeleteWithdrawalRecord deletes withdrawal record
func (Keeper) DepositAccountFromAddress ¶
func (k Keeper) DepositAccountFromAddress(c context.Context, req *types.QueryDepositAccountForChainRequest) (*types.QueryDepositAccountForChainResponse, error)
DepositAccountFromAddress returns the deposit account address for the given zone.
func (Keeper) DetermineValidatorsForDelegation ¶
func (Keeper) GetChainID ¶
func (*Keeper) GetConnectionForPort ¶
func (Keeper) GetICAForDelegateAccount ¶
func (k Keeper) GetICAForDelegateAccount(ctx sdk.Context, address string) (*types.RegisteredZone, *types.ICAAccount)
func (Keeper) GetIntent ¶
func (k Keeper) GetIntent(ctx sdk.Context, zone types.RegisteredZone, delegator string) (types.DelegatorIntent, bool)
GetIntent returns intent info by zone and delegator
func (Keeper) GetReceipt ¶
GetReceipt returns receipt
func (Keeper) GetRegisteredZoneInfo ¶
func (k Keeper) GetRegisteredZoneInfo(ctx sdk.Context, chain_id string) (types.RegisteredZone, bool)
GetRegsiteredZoneInfo returns zone info by chain_id
func (*Keeper) GetValidatorForToken ¶
func (Keeper) GetWithdrawalRecord ¶
func (k Keeper) GetWithdrawalRecord(ctx sdk.Context, delegator string, validator string, recipient string) (types.WithdrawalRecord, bool)
GetWithdrawalRecord returns withdrawal record info by zone and delegator
func (Keeper) GetZoneForDelegateAccount ¶
func (*Keeper) HandleAcknowledgement ¶
func (*Keeper) HandleBeginRedelegate ¶
func (*Keeper) HandleCompleteMultiSend ¶
func (*Keeper) HandleCompleteSend ¶
TODO: rework to reflect changes to HandleWithdrawRewards:
- handle MsgSend from WithdrawalAccount to FeeAccount;
- handle MsgSend from WithdrawalAccount to Delegation Accounts;
func (Keeper) HandleReceiptTransaction ¶
func (*Keeper) HandleRedeemTokens ¶
func (*Keeper) HandleTimeout ¶
func (*Keeper) HandleTokenizedShares ¶
func (*Keeper) HandleUpdatedWithdrawAddress ¶
func (*Keeper) HandleWithdrawRewards ¶
func (Keeper) IterateIntents ¶
func (k Keeper) IterateIntents(ctx sdk.Context, zone types.RegisteredZone, fn func(index int64, intent types.DelegatorIntent) (stop bool))
IterateIntents iterate through intents for a given zone
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) IterateRegisteredZones ¶
func (k Keeper) IterateRegisteredZones(ctx sdk.Context, fn func(index int64, zoneInfo types.RegisteredZone) (stop bool))
IterateRegisteredZones iterate through zones
func (Keeper) IterateWithdrawalRecords ¶
func (k Keeper) IterateWithdrawalRecords(ctx sdk.Context, delegator string, fn func(index int64, record types.WithdrawalRecord) (stop bool))
IterateWithdrawalRecords iterate through records for a given zone
func (*Keeper) MintQAsset ¶
func (k *Keeper) MintQAsset(ctx sdk.Context, sender sdk.AccAddress, zone types.RegisteredZone, inCoins sdk.Coins) error
func (Keeper) NewReceipt ¶
func (Keeper) RegisteredZoneInfos ¶
func (k Keeper) RegisteredZoneInfos(c context.Context, req *types.QueryRegisteredZonesInfoRequest) (*types.QueryRegisteredZonesInfoResponse, error)
RegisteredZoneInfos returns information about registered zones.
func (Keeper) SetAccountBalance ¶
func (*Keeper) SetConnectionForPort ¶
func (Keeper) SetIntent ¶
func (k Keeper) SetIntent(ctx sdk.Context, zone types.RegisteredZone, intent types.DelegatorIntent)
SetIntent store the delegator intent
func (Keeper) SetReceipt ¶
SetReceipt set receipt info
func (Keeper) SetRegisteredZone ¶
func (k Keeper) SetRegisteredZone(ctx sdk.Context, zone types.RegisteredZone)
SetRegisteredZone set zone info
func (Keeper) SetWithdrawalRecord ¶
func (k Keeper) SetWithdrawalRecord(ctx sdk.Context, record *types.WithdrawalRecord)
SetWithdrawalRecord store the withdrawal record
func (*Keeper) TransferToDelegate ¶
func (*Keeper) TransferToDelegateMulti ¶
func (*Keeper) UpdateDelegationRecordForAddress ¶
func (*Keeper) UpdateDelegationRecordsForAddress ¶
func (*Keeper) UpdateIntent ¶
func (k *Keeper) UpdateIntent(ctx sdk.Context, sender sdk.AccAddress, zone types.RegisteredZone, inAmount sdk.Coins)