keeper

package
v4.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2022 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ICACallbackID_Delegate   = "delegate"
	ICACallbackID_Claim      = "claim"
	ICACallbackID_Undelegate = "undelegate"
	ICACallbackID_Reinvest   = "reinvest"
	ICACallbackID_Redemption = "redemption"
	ICACallbackID_Rebalance  = "rebalance"
)
View Source
const (
	ICQCallbackID_WithdrawalBalance = "withdrawalbalance"
	ICQCallbackID_Delegation        = "delegation"
	ICQCallbackID_Validator         = "validator"
)

Variables

This section is empty.

Functions

func AllInvariants

func AllInvariants(k Keeper) sdk.Invariant

AllInvariants runs all invariants of the stakeibc module

func ClaimCallback

func ClaimCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack *channeltypes.Acknowledgement, args []byte) error

func DelegateCallback

func DelegateCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack *channeltypes.Acknowledgement, args []byte) error

func DelegatorSharesCallback

func DelegatorSharesCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error

DelegatorSharesCallback 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:

  1. the validator's internal exchange rate
  2. the Delegation ICA's delegated shares And apply the following equation: num_tokens = exchange_rate * num_shares

This is the callback from query #2

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"

func GetValidatorFromAddress

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

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

func RebalanceCallback

func RebalanceCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack *channeltypes.Acknowledgement, args []byte) error

func RedemptionCallback

func RedemptionCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack *channeltypes.Acknowledgement, args []byte) error

func RegisterInvariants

func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)

RegisterInvariants registers all governance invariants.

func ReinvestCallback

func ReinvestCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack *channeltypes.Acknowledgement, args []byte) error

func UndelegateCallback

func UndelegateCallback(k Keeper, ctx sdk.Context, packet channeltypes.Packet, ack *channeltypes.Acknowledgement, args []byte) error

func ValidatorExchangeRateCallback

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:

  1. the validator's internal exchange rate
  2. the Delegation ICA's delegated shares And apply the following equation: num_tokens = exchange_rate * num_shares

This is the callback from query #1

func WithdrawalBalanceCallback

func WithdrawalBalanceCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error

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 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

ICACallbacks wrapper struct for stakeibc keeper

type ICACallbacks

type ICACallbacks struct {
	// contains filtered or unexported fields
}

func (ICACallbacks) AddICACallback

func (c ICACallbacks) AddICACallback(id string, fn interface{}) icacallbackstypes.ICACallbackHandler

func (ICACallbacks) CallICACallback

func (c ICACallbacks) CallICACallback(ctx sdk.Context, id string, packet channeltypes.Packet, ack *channeltypes.Acknowledgement, args []byte) error

func (ICACallbacks) HasICACallback

func (c ICACallbacks) HasICACallback(id string) bool

func (ICACallbacks) RegisterICACallbacks

func (c ICACallbacks) RegisterICACallbacks() icacallbackstypes.ICACallbackHandler

type ICQCallback

type ICQCallback func(Keeper, sdk.Context, []byte, icqtypes.Query) error

ICQCallbacks wrapper struct for stakeibc keeper

type ICQCallbacks

type ICQCallbacks struct {
	// contains filtered or unexported fields
}

func (ICQCallbacks) AddICQCallback

func (c ICQCallbacks) AddICQCallback(id string, fn interface{}) icqtypes.QueryCallbacks

func (ICQCallbacks) CallICQCallback

func (c ICQCallbacks) CallICQCallback(ctx sdk.Context, id string, args []byte, query icqtypes.Query) error

func (ICQCallbacks) HasICQCallback

func (c ICQCallbacks) HasICQCallback(id string) bool

func (ICQCallbacks) RegisterICQCallbacks

func (c ICQCallbacks) RegisterICQCallbacks() icqtypes.QueryCallbacks

type IcaTx

type IcaTx struct {
	ConnectionId string
	Msgs         []sdk.Msg
	Account      types.ICAAccount
	Timeout      uint64
}

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

func (k Keeper) AddDelegationToValidator(ctx sdk.Context, hostZone types.HostZone, valAddr string, amt int64) (success bool)

func (Keeper) AddValidatorProposal

func (k Keeper) AddValidatorProposal(ctx sdk.Context, msg *types.AddValidatorProposal) error

func (Keeper) AddValidatorToHostZone

func (k Keeper) AddValidatorToHostZone(ctx sdk.Context, msg *types.MsgAddValidator, fromGovernance bool) error

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

func (k Keeper) BurnTokens(ctx sdk.Context, zone types.HostZone, stTokenBurnAmount int64) error

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

func (k Keeper) CleanupEpochUnbondingRecords(ctx sdk.Context, epochNumber uint64) bool

Deletes any epoch unbonding records that have had all unbondings claimed

func (Keeper) ConfirmValSetHasSpace

func (k Keeper) ConfirmValSetHasSpace(ctx sdk.Context, validators []*types.Validator) error

Check the max number of validators to confirm we won't exceed it when adding a new validator Types of additions:

  • change a weight from zero to non-zero
  • add a new validator with non-zero weight

func (Keeper) CreateDepositRecordsForEpoch

func (k Keeper) CreateDepositRecordsForEpoch(ctx sdk.Context, epochNumber uint64)

Create a new deposit record for each host zone for the given epoch

func (Keeper) CreateEpochUnbondingRecord

func (k Keeper) CreateEpochUnbondingRecord(ctx sdk.Context, epochNumber uint64) bool

func (Keeper) DecrementHostZoneUnbonding

func (k Keeper) DecrementHostZoneUnbonding(ctx sdk.Context, userRedemptionRecord recordstypes.UserRedemptionRecord, callbackArgs types.ClaimCallback) error

func (Keeper) DelegateOnHost

func (k Keeper) DelegateOnHost(ctx sdk.Context, hostZone types.HostZone, amt sdk.Coin, depositRecord recordstypes.DepositRecord) error

func (Keeper) GetAllEpochTracker

func (k Keeper) GetAllEpochTracker(ctx sdk.Context) (list []types.EpochTracker)

GetAllEpochTracker returns all epochTracker

func (Keeper) GetAllHostZone

func (k Keeper) GetAllHostZone(ctx sdk.Context) (list []types.HostZone)

GetAllHostZone returns all hostZone

func (Keeper) GetChainID

func (k Keeper) GetChainID(ctx sdk.Context, connectionID string) (string, error)

func (Keeper) GetClaimableRedemptionRecord

func (k Keeper) GetClaimableRedemptionRecord(ctx sdk.Context, msg *types.MsgClaimUndelegatedTokens) (*recordstypes.UserRedemptionRecord, error)

func (Keeper) GetConnectionId

func (k Keeper) GetConnectionId(ctx sdk.Context, portId string) (string, error)

func (Keeper) GetCounterpartyChainId

func (k Keeper) GetCounterpartyChainId(ctx sdk.Context, connectionID string) (string, error)

func (Keeper) GetDelegation

func (k Keeper) GetDelegation(ctx sdk.Context) (val types.Delegation, found bool)

GetDelegation returns delegation

func (Keeper) GetEpochTracker

func (k Keeper) GetEpochTracker(
	ctx sdk.Context,
	epochIdentifier string,
) (val types.EpochTracker, found bool)

GetEpochTracker returns a epochTracker from its index

func (Keeper) GetHostZone

func (k Keeper) GetHostZone(ctx sdk.Context, chain_id string) (val types.HostZone, found bool)

GetHostZone returns a hostZone from its id

func (Keeper) GetHostZoneCount

func (k Keeper) GetHostZoneCount(ctx sdk.Context) uint64

GetHostZoneCount get the total number of hostZone

func (Keeper) GetHostZoneFromHostDenom

func (k Keeper) GetHostZoneFromHostDenom(ctx sdk.Context, denom string) (*types.HostZone, error)

GetHostZoneFromHostDenom returns a HostZone from a HostDenom

func (Keeper) GetHostZoneFromIBCDenom

func (k Keeper) GetHostZoneFromIBCDenom(ctx sdk.Context, denom string) (*types.HostZone, error)

GetHostZoneFromIBCDenom returns a HostZone from a IBCDenom

func (Keeper) GetHostZoneUnbondingMsgs

func (k Keeper) GetHostZoneUnbondingMsgs(ctx sdk.Context, hostZone types.HostZone) (msgs []sdk.Msg, totalAmtToUnbond uint64, marshalledCallbackArgs []byte, epochUnbondingRecordIds []uint64, err error)

func (Keeper) GetICAAccount

func (k Keeper) GetICAAccount(ctx sdk.Context) (val types.ICAAccount, found bool)

GetICAAccount returns iCAAccount

func (Keeper) GetICATimeoutNanos

func (k Keeper) GetICATimeoutNanos(ctx sdk.Context, epochType string) (uint64, error)

func (Keeper) GetLatestCompletionTime

func (k Keeper) GetLatestCompletionTime(ctx sdk.Context, txMsgData *sdk.TxMsgData) (*time.Time, error)

func (Keeper) GetLightClientHeightSafely

func (k Keeper) GetLightClientHeightSafely(ctx sdk.Context, connectionID string) (uint64, error)

func (Keeper) GetLightClientTimeSafely

func (k Keeper) GetLightClientTimeSafely(ctx sdk.Context, connectionID string) (uint64, error)

func (Keeper) GetMinValidatorRequirements

func (k Keeper) GetMinValidatorRequirements(ctx sdk.Context) (val types.MinValidatorRequirements, found bool)

GetMinValidatorRequirements returns minValidatorRequirements

func (Keeper) GetModuleAccountBalance

func (k Keeper) GetModuleAccountBalance(hostZone types.HostZone, depositRecords []recordstypes.DepositRecord) (int64, error)

func (*Keeper) GetParam

func (k *Keeper) GetParam(ctx sdk.Context, key []byte) uint64

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)

GetParams get all parameters as types.Params

func (Keeper) GetRedemptionAccount

func (k Keeper) GetRedemptionAccount(ctx sdk.Context, hostZone types.HostZone) (*types.ICAAccount, bool)

func (Keeper) GetRedemptionTransferMsg

func (k Keeper) GetRedemptionTransferMsg(ctx sdk.Context, userRedemptionRecord *recordstypes.UserRedemptionRecord, hostZoneId string) (*IcaTx, error)

func (Keeper) GetStartTimeNextEpoch

func (k Keeper) GetStartTimeNextEpoch(ctx sdk.Context, epochType string) (uint64, error)

helper to get time at which next epoch begins, in unix nano units

func (Keeper) GetStrideEpochElapsedShare

func (k Keeper) GetStrideEpochElapsedShare(ctx sdk.Context) (sdk.Dec, error)

helper to get what share of the curr epoch we're through

func (Keeper) GetTargetValAmtsForHostZone

func (k Keeper) GetTargetValAmtsForHostZone(ctx sdk.Context, hostZone types.HostZone, finalDelegation uint64) (map[string]uint64, error)

This will get the target validator delegation for the given hostZone such that the total validator delegation is equal to the finalDelegation output key is ADDRESS not NAME

func (Keeper) GetTotalValidatorDelegations

func (k Keeper) GetTotalValidatorDelegations(hostZone types.HostZone) uint64

func (Keeper) GetTotalValidatorWeight

func (k Keeper) GetTotalValidatorWeight(hostZone types.HostZone) uint64

func (Keeper) GetUndelegatedBalance

func (k Keeper) GetUndelegatedBalance(hostZone types.HostZone, depositRecords []recordstypes.DepositRecord) (int64, error)

func (Keeper) GetValidator

func (k Keeper) GetValidator(ctx sdk.Context) (val types.Validator, found bool)

GetValidator returns validator

func (Keeper) GetValidatorDelegationAmtDifferences

func (k Keeper) GetValidatorDelegationAmtDifferences(ctx sdk.Context, hostZone types.HostZone) (map[string]int64, error)

This function returns a map from Validator Address to how many extra tokens need to be given to that validator

positive implies extra tokens need to be given,
negative impleis tokens need to be taken away

func (Keeper) Hooks

func (k Keeper) Hooks() Hooks

func (Keeper) ICACallbackHandler

func (k Keeper) ICACallbackHandler() ICACallbacks

func (Keeper) ICQCallbackHandler

func (k Keeper) ICQCallbackHandler() ICQCallbacks

func (Keeper) InitiateAllHostZoneUnbondings

func (k Keeper) InitiateAllHostZoneUnbondings(ctx sdk.Context, dayNumber uint64) (success bool, successfulUnbondings []string, failedUnbondings []string)

func (Keeper) InterchainAccountFromAddress

InterchainAccountFromAddress implements the Query/InterchainAccountFromAddress gRPC method

func (Keeper) IsRedemptionRateWithinSafetyBounds

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

func (k Keeper) IsWithinBufferWindow(ctx sdk.Context) (bool, error)

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) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) MarshalClaimCallbackArgs

func (k Keeper) MarshalClaimCallbackArgs(ctx sdk.Context, claimCallback types.ClaimCallback) ([]byte, error)

func (Keeper) MarshalDelegateCallbackArgs

func (k Keeper) MarshalDelegateCallbackArgs(ctx sdk.Context, delegateCallback types.DelegateCallback) ([]byte, error)

func (Keeper) MarshalRebalanceCallbackArgs

func (k Keeper) MarshalRebalanceCallbackArgs(ctx sdk.Context, rebalanceCallback types.RebalanceCallback) ([]byte, error)

func (Keeper) MarshalRedemptionCallbackArgs

func (k Keeper) MarshalRedemptionCallbackArgs(ctx sdk.Context, redemptionCallback types.RedemptionCallback) ([]byte, error)

func (Keeper) MarshalReinvestCallbackArgs

func (k Keeper) MarshalReinvestCallbackArgs(ctx sdk.Context, reinvestCallback types.ReinvestCallback) ([]byte, error)

func (Keeper) MarshalUndelegateCallbackArgs

func (k Keeper) MarshalUndelegateCallbackArgs(ctx sdk.Context, undelegateCallback types.UndelegateCallback) ([]byte, error)

func (Keeper) Params

func (Keeper) QueryDelegationsIcq

func (k Keeper) QueryDelegationsIcq(ctx sdk.Context, hostZone types.HostZone, valoper string) error

to icq delegation amounts, this fn is executed after validator exch rates are icq'd

func (Keeper) QueryValidatorExchangeRate

query and update validator exchange rate

func (Keeper) ReinvestRewards

func (k Keeper) ReinvestRewards(ctx sdk.Context)

func (Keeper) RemoveDelegation

func (k Keeper) RemoveDelegation(ctx sdk.Context)

RemoveDelegation removes delegation from the store

func (Keeper) RemoveEpochTracker

func (k Keeper) RemoveEpochTracker(
	ctx sdk.Context,
	epochIdentifier string,
)

RemoveEpochTracker removes a epochTracker from the store

func (Keeper) RemoveHostZone

func (k Keeper) RemoveHostZone(ctx sdk.Context, chain_id string)

RemoveHostZone removes a hostZone from the store

func (Keeper) RemoveICAAccount

func (k Keeper) RemoveICAAccount(ctx sdk.Context)

RemoveICAAccount removes iCAAccount from the store

func (Keeper) RemoveMinValidatorRequirements

func (k Keeper) RemoveMinValidatorRequirements(ctx sdk.Context)

RemoveMinValidatorRequirements removes minValidatorRequirements from the store

func (Keeper) RemoveValidator

func (k Keeper) RemoveValidator(ctx sdk.Context)

RemoveValidator removes validator from the store

func (Keeper) RemoveValidatorFromHostZone

func (k Keeper) RemoveValidatorFromHostZone(ctx sdk.Context, chainId string, validatorAddress string) error

func (Keeper) SetDelegation

func (k Keeper) SetDelegation(ctx sdk.Context, delegation types.Delegation)

SetDelegation set delegation in the store

func (Keeper) SetEpochTracker

func (k Keeper) SetEpochTracker(ctx sdk.Context, epochTracker types.EpochTracker)

SetEpochTracker set a specific epochTracker in the store from its index

func (*Keeper) SetHooks

func (k *Keeper) SetHooks(gh types.StakeIBCHooks) *Keeper

SetHooks sets the hooks for ibc staking

func (Keeper) SetHostZone

func (k Keeper) SetHostZone(ctx sdk.Context, hostZone types.HostZone)

SetHostZone set a specific hostZone in the store

func (Keeper) SetHostZoneCount

func (k Keeper) SetHostZoneCount(ctx sdk.Context, count uint64)

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) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

SetParams set the params

func (Keeper) SetValidator

func (k Keeper) SetValidator(ctx sdk.Context, validator types.Validator)

SetValidator set validator in the store

func (Keeper) SetWithdrawalAddress

func (k Keeper) SetWithdrawalAddress(ctx sdk.Context)

Set the withdrawal account address for each host zone

func (Keeper) SetWithdrawalAddressOnHost

func (k Keeper) SetWithdrawalAddressOnHost(ctx sdk.Context, hostZone types.HostZone) error

func (Keeper) StakeExistingDepositsOnHostZones

func (k Keeper) StakeExistingDepositsOnHostZones(ctx sdk.Context, epochNumber uint64, depositRecords []recordstypes.DepositRecord)

Iterate each deposit record marked DELEGATION_QUEUE and use the delegation ICA to delegate on the host zone

func (Keeper) SubmitHostZoneUnbondingMsg

func (k Keeper) SubmitHostZoneUnbondingMsg(ctx sdk.Context, msgs []sdk.Msg, totalAmtToUnbond uint64, marshalledCallbackArgs []byte, hostZone types.HostZone) error

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

func (k Keeper) SubmitTxsDayEpoch(
	ctx sdk.Context,
	connectionId string,
	msgs []sdk.Msg,
	account types.ICAAccount,
	callbackId string,
	callbackArgs []byte,
) (uint64, error)

func (Keeper) SubmitTxsEpoch

func (k Keeper) SubmitTxsEpoch(
	ctx sdk.Context,
	connectionId string,
	msgs []sdk.Msg,
	account types.ICAAccount,
	epochType string,
	callbackId string,
	callbackArgs []byte,
) (uint64, error)

func (Keeper) SubmitTxsStrideEpoch

func (k Keeper) SubmitTxsStrideEpoch(
	ctx sdk.Context,
	connectionId string,
	msgs []sdk.Msg,
	account types.ICAAccount,
	callbackId string,
	callbackArgs []byte,
) (uint64, error)

func (Keeper) SweepAllUnbondedTokens

func (k Keeper) SweepAllUnbondedTokens(ctx sdk.Context) (success bool, successfulSweeps []string, sweepAmounts []int64, failedSweeps []string)

Sends all unbonded tokens to the redemption account

returns:
   * success indicator if all chains succeeded
   * list of successful chains
   * list of tokens swept
   * list of failed chains

func (Keeper) SweepAllUnbondedTokensForHostZone

func (k Keeper) SweepAllUnbondedTokensForHostZone(ctx sdk.Context, hostZone types.HostZone, epochUnbondingRecords []recordstypes.EpochUnbondingRecord) (success bool, sweepAmount int64)

Batch transfers any unbonded tokens from the delegation account to the redemption account

func (Keeper) TransferExistingDepositsToHostZones

func (k Keeper) TransferExistingDepositsToHostZones(ctx sdk.Context, epochNumber uint64, depositRecords []recordstypes.DepositRecord)

Iterate each deposit record marked TRANSFER_QUEUE and IBC transfer tokens from the Stride controller account to the delegation ICAs on each host zone

func (Keeper) UnmarshalClaimCallbackArgs

func (k Keeper) UnmarshalClaimCallbackArgs(ctx sdk.Context, claimCallback []byte) (*types.ClaimCallback, error)

func (Keeper) UnmarshalDelegateCallbackArgs

func (k Keeper) UnmarshalDelegateCallbackArgs(ctx sdk.Context, delegateCallback []byte) (*types.DelegateCallback, error)

func (Keeper) UnmarshalRebalanceCallbackArgs

func (k Keeper) UnmarshalRebalanceCallbackArgs(ctx sdk.Context, rebalanceCallback []byte) (*types.RebalanceCallback, error)

func (Keeper) UnmarshalRedemptionCallbackArgs

func (k Keeper) UnmarshalRedemptionCallbackArgs(ctx sdk.Context, redemptionCallback []byte) (types.RedemptionCallback, error)

func (Keeper) UnmarshalReinvestCallbackArgs

func (k Keeper) UnmarshalReinvestCallbackArgs(ctx sdk.Context, reinvestCallback []byte) (*types.ReinvestCallback, error)

func (Keeper) UnmarshalUndelegateCallbackArgs

func (k Keeper) UnmarshalUndelegateCallbackArgs(ctx sdk.Context, undelegateCallback []byte) (types.UndelegateCallback, error)

func (Keeper) UpdateDelegationBalances

func (k Keeper) UpdateDelegationBalances(ctx sdk.Context, zone types.HostZone, undelegateCallback types.UndelegateCallback) error

func (Keeper) UpdateEpochTracker

func (k Keeper) UpdateEpochTracker(ctx sdk.Context, epochInfo epochstypes.EpochInfo) (epochNumber uint64, err error)

Update the epoch information in the stakeibc epoch tracker

func (Keeper) UpdateHostZoneUnbondings

func (k Keeper) UpdateHostZoneUnbondings(
	ctx sdk.Context,
	latestCompletionTime time.Time,
	zone types.HostZone,
	undelegateCallback types.UndelegateCallback,
) (stTokenBurnAmount int64, err error)

func (Keeper) UpdateRedemptionRates

func (k Keeper) UpdateRedemptionRates(ctx sdk.Context, depositRecords []recordstypes.DepositRecord)

Updates the redemption rate for each host zone The redemption rate equation is:

(Unbonded Balance + Staked Balance + Module Account Balance) / (stToken Supply)

func (Keeper) UpdateWithdrawalBalance

func (k Keeper) UpdateWithdrawalBalance(ctx sdk.Context, hostZone types.HostZone) error

Simple balance query helper using new ICQ module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL