keeper

package
v2.9.2-rc0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 46 Imported by: 6

Documentation

Index

Constants

View Source
const (
	Validator                            = "validator"
	Delegation                           = "validator-delegation"
	RewardAccountBalances                = "reward-balances"
	NonCompoundableRewardAccountBalances = "non-compoundable-reward-balances"
	DelegationAccountBalances            = "delegation-balances"
)

Variables

This section is empty.

Functions

func CValueLimits

func CValueLimits(k Keeper) sdk.Invariant

func DelegationAccountBalanceCallback

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

func DelegationCallback

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

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

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

func NonCompoundableRewardsAccountBalanceCallback added in v2.7.2

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

func RegisterInvariants

func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)

RegisterInvariants registers the bank module invariants

func Reverse added in v2.6.0

func Reverse[S ~[]E, E any](s S)

remove when go updates to 1.21, and use slices package. Reverse reverses the elements of the slice in place.

func RewardsAccountBalanceCallback

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

func ValidatorCallback

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

Types

type CallbackFn

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

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

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

func (Callbacks) Has

func (c Callbacks) Has(id string) bool

func (Callbacks) RegisterCallbacks

func (c Callbacks) RegisterCallbacks() icqtypes.QueryCallbacks

type DelegateAmount

type DelegateAmount struct {
	ValAddress string
	Amount     sdk.Dec
}

type EpochsHooks

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

func (EpochsHooks) AfterEpochEnd

func (h EpochsHooks) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64) error

func (EpochsHooks) BeforeEpochStart

func (h EpochsHooks) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64) error

type IBCTransferHooks

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

func (IBCTransferHooks) OnAcknowledgementPacket

func (i IBCTransferHooks) OnAcknowledgementPacket(
	ctx sdk.Context,
	packet channeltypes.Packet,
	acknowledgement []byte,
	relayer sdk.AccAddress,
	transferAckErr error,
) error

func (IBCTransferHooks) OnRecvPacket

func (i IBCTransferHooks) OnRecvPacket(
	ctx sdk.Context,
	packet channeltypes.Packet,
	relayer sdk.AccAddress,
	transferAck ibcexported.Acknowledgement,
) error

func (IBCTransferHooks) OnTimeoutPacket

func (i IBCTransferHooks) OnTimeoutPacket(
	ctx sdk.Context,
	packet channeltypes.Packet,
	relayer sdk.AccAddress,
	transferTimeoutErr error,
) error

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeKey storetypes.StoreKey,

	accountKeeper types.AccountKeeper,
	bankKeeper types.BankKeeper,
	epochsKeeper types.EpochsKeeper,
	icaControllerKeeper types.ICAControllerKeeper,
	ibcKeeper *ibckeeper.Keeper,
	ibcTransferKeeper types.IBCTransferKeeper,
	icqKeeper types.ICQKeeper,

	paramSpace paramtypes.Subspace,

	msgRouter *baseapp.MsgServiceRouter,

	authority string,
) Keeper

func (*Keeper) AddRedelegationEntry added in v2.6.0

func (k *Keeper) AddRedelegationEntry(ctx sdk.Context, chainID string, redelegationMsg stakingtypes.MsgBeginRedelegate, response stakingtypes.MsgBeginRedelegateResponse)

func (*Keeper) AdjustDepositsForRedemption

func (k *Keeper) AdjustDepositsForRedemption(
	ctx sdk.Context,
	hc *liquidstakeibctypes.HostChain,
	redeemAmount sdk.Coin,
) error

func (*Keeper) AfterEpochEnd

func (k *Keeper) AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64) error

func (*Keeper) BeforeEpochStart

func (k *Keeper) BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64) error

func (*Keeper) BeginBlock

func (k *Keeper) BeginBlock(ctx sdk.Context)

func (*Keeper) CValueWithinLimits

func (k *Keeper) CValueWithinLimits(hc *types.HostChain) bool

func (*Keeper) CalculateAutocompoundLimit

func (k *Keeper) CalculateAutocompoundLimit(autocompoundFactor sdk.Dec) sdk.Dec

func (*Keeper) CallbackHandler

func (k *Keeper) CallbackHandler() Callbacks

func (*Keeper) CreateDeposits

func (k *Keeper) CreateDeposits(ctx sdk.Context, epoch int64)

func (*Keeper) DeleteDeposit

func (k *Keeper) DeleteDeposit(ctx sdk.Context, deposit *liquidstakeibctypes.Deposit)

func (*Keeper) DeleteLSMDeposit added in v2.3.0

func (k *Keeper) DeleteLSMDeposit(ctx sdk.Context, deposit *liquidstakeibctypes.LSMDeposit)

func (*Keeper) DeleteRedelegationTx added in v2.6.0

func (k *Keeper) DeleteRedelegationTx(ctx sdk.Context, chainID, ibcSequenceID string)

func (*Keeper) DeleteUnbonding

func (k *Keeper) DeleteUnbonding(ctx sdk.Context, ub *types.Unbonding)

func (*Keeper) DeleteUserUnbonding

func (k *Keeper) DeleteUserUnbonding(ctx sdk.Context, ub *types.UserUnbonding)

func (*Keeper) DeleteValidatorUnbonding

func (k *Keeper) DeleteValidatorUnbonding(ctx sdk.Context, ub *types.ValidatorUnbonding)

func (*Keeper) DeleteValidatorUnbondingsForSequenceID

func (k *Keeper) DeleteValidatorUnbondingsForSequenceID(ctx sdk.Context, sequenceID string)

func (*Keeper) DepositWorkflow

func (k *Keeper) DepositWorkflow(ctx sdk.Context, epoch int64)

func (*Keeper) Deposits

func (k *Keeper) Deposits(
	goCtx context.Context,
	request *types.QueryDepositsRequest,
) (*types.QueryDepositsResponse, error)

func (*Keeper) DoClaim

func (k *Keeper) DoClaim(ctx sdk.Context, hc *types.HostChain)

func (*Keeper) DoDelegate

func (k *Keeper) DoDelegate(ctx sdk.Context, hc *types.HostChain)

func (*Keeper) DoDeleteMaturedRedelegation added in v2.6.0

func (k *Keeper) DoDeleteMaturedRedelegation(ctx sdk.Context, hc *types.HostChain)

func (*Keeper) DoDeleteRedelegationTxs added in v2.6.0

func (k *Keeper) DoDeleteRedelegationTxs(ctx sdk.Context)

func (*Keeper) DoProcessMaturedUndelegations

func (k *Keeper) DoProcessMaturedUndelegations(ctx sdk.Context, hc *types.HostChain)

func (*Keeper) DoRecreateICA

func (k *Keeper) DoRecreateICA(ctx sdk.Context, hc *types.HostChain)

func (*Keeper) DoRedeemLSMTokens added in v2.3.0

func (k *Keeper) DoRedeemLSMTokens(ctx sdk.Context, hc *types.HostChain)

func (*Keeper) ExchangeRate

func (k *Keeper) ExchangeRate(
	goCtx context.Context,
	request *types.QueryExchangeRateRequest,
) (*types.QueryExchangeRateResponse, error)

func (*Keeper) FailAllUnbondingsForSequenceID

func (k *Keeper) FailAllUnbondingsForSequenceID(ctx sdk.Context, sequenceID string)

func (*Keeper) FilterLSMDeposits added in v2.3.0

func (k *Keeper) FilterLSMDeposits(
	ctx sdk.Context,
	filter func(d liquidstakeibctypes.LSMDeposit) bool,
) []*liquidstakeibctypes.LSMDeposit

func (*Keeper) FilterLSMDepositsWithLimit added in v2.9.0

func (k *Keeper) FilterLSMDepositsWithLimit(
	ctx sdk.Context,
	filter func(d liquidstakeibctypes.LSMDeposit) bool,
) []*liquidstakeibctypes.LSMDeposit

func (*Keeper) FilterRedelegationTx added in v2.7.2

func (k *Keeper) FilterRedelegationTx(
	ctx sdk.Context,
	filter func(d types.RedelegateTx) bool,
) []*types.RedelegateTx

func (*Keeper) FilterUnbondings

func (k *Keeper) FilterUnbondings(ctx sdk.Context, filter func(u types.Unbonding) bool) []*types.Unbonding

func (*Keeper) FilterUserUnbondings

func (k *Keeper) FilterUserUnbondings(ctx sdk.Context, filter func(u types.UserUnbonding) bool) []*types.UserUnbonding

func (*Keeper) FilterValidatorUnbondings

func (k *Keeper) FilterValidatorUnbondings(
	ctx sdk.Context,
	filter func(u types.ValidatorUnbonding) bool,
) []*types.ValidatorUnbonding

func (*Keeper) GenerateAndExecuteICATx

func (k *Keeper) GenerateAndExecuteICATx(
	ctx sdk.Context,
	connectionID string,
	ownerID string,
	messages []proto.Message,
) (string, error)

func (*Keeper) GenerateDelegateMessages

func (k *Keeper) GenerateDelegateMessages(hc *types.HostChain, depositAmount math.Int) ([]proto.Message, error)

GenerateDelegateMessages produces the same result regardless the LSM flag on the host chain.

func (Keeper) GenerateRedelegateMsgs added in v2.6.0

func (k Keeper) GenerateRedelegateMsgs(ctx sdk.Context, hc types.HostChain) []proto.Message

func (*Keeper) GenerateUndelegateMessages

func (k *Keeper) GenerateUndelegateMessages(hc *types.HostChain, unbondAmount math.Int) ([]proto.Message, error)

func (*Keeper) GetAllDeposits

func (k *Keeper) GetAllDeposits(ctx sdk.Context) []*liquidstakeibctypes.Deposit

func (*Keeper) GetAllHostChains

func (k *Keeper) GetAllHostChains(ctx sdk.Context) []*types.HostChain

GetAllHostChains retrieves all registered host chains

func (*Keeper) GetAllRedelegationTx added in v2.6.0

func (k *Keeper) GetAllRedelegationTx(ctx sdk.Context) []*types.RedelegateTx

func (*Keeper) GetAllValidatorUnbondedAmount

func (k *Keeper) GetAllValidatorUnbondedAmount(ctx sdk.Context, hc *types.HostChain) math.Int

func (*Keeper) GetChainID

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

GetChainID gets the id of the host chain given a connection id

func (*Keeper) GetClientState

func (k *Keeper) GetClientState(ctx sdk.Context, connectionID string) (exported.ClientState, error)

GetClientState retrieves the client state given a connection id

func (*Keeper) GetDelegableDepositsForChain

func (k *Keeper) GetDelegableDepositsForChain(ctx sdk.Context, chainID string) []*liquidstakeibctypes.Deposit

func (*Keeper) GetDelegatingDepositsForChain

func (k *Keeper) GetDelegatingDepositsForChain(ctx sdk.Context, chainID string) []*liquidstakeibctypes.Deposit

func (*Keeper) GetDepositAmountOnHostChain

func (k *Keeper) GetDepositAmountOnHostChain(ctx sdk.Context, chainID string) math.Int

func (*Keeper) GetDepositAmountOnPersistence

func (k *Keeper) GetDepositAmountOnPersistence(ctx sdk.Context, chainID string) math.Int

func (*Keeper) GetDepositForChainAndEpoch

func (k *Keeper) GetDepositForChainAndEpoch(
	ctx sdk.Context,
	chainID string,
	epoch int64,
) (*liquidstakeibctypes.Deposit, bool)

func (*Keeper) GetDepositModuleAccount

func (k *Keeper) GetDepositModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI

GetDepositModuleAccount returns deposit module account interface

func (*Keeper) GetDepositsForHostChain

func (k *Keeper) GetDepositsForHostChain(ctx sdk.Context, chainID string) []*liquidstakeibctypes.Deposit

func (*Keeper) GetDepositsWithSequenceID

func (k *Keeper) GetDepositsWithSequenceID(ctx sdk.Context, sequenceID string) []*liquidstakeibctypes.Deposit

func (*Keeper) GetEpochNumber

func (k *Keeper) GetEpochNumber(ctx sdk.Context, epoch string) int64

func (*Keeper) GetHostChain

func (k *Keeper) GetHostChain(ctx sdk.Context, chainID string) (*types.HostChain, bool)

GetHostChain returns a host chain given its id

func (*Keeper) GetHostChainFromChannelID added in v2.3.0

func (k *Keeper) GetHostChainFromChannelID(ctx sdk.Context, channelID string) (*types.HostChain, bool)

GetHostChainFromChannelID returns a host chain given its channel id

func (*Keeper) GetHostChainFromDelegatorAddress

func (k *Keeper) GetHostChainFromDelegatorAddress(ctx sdk.Context, delegatorAddress string) (*types.HostChain, bool)

GetHostChainFromDelegatorAddress returns a host chain given its delegator address

func (*Keeper) GetHostChainFromHostDenom

func (k *Keeper) GetHostChainFromHostDenom(ctx sdk.Context, hostDenom string) (*types.HostChain, bool)

GetHostChainFromHostDenom returns a host chain given its host denomination

func (*Keeper) GetHostChainFromIbcDenom

func (k *Keeper) GetHostChainFromIbcDenom(ctx sdk.Context, ibcDenom string) (*types.HostChain, bool)

GetHostChainFromIbcDenom returns a host chain given its ibc denomination on Persistence

func (*Keeper) GetLSMDeposit added in v2.3.0

func (k *Keeper) GetLSMDeposit(ctx sdk.Context, chainID, delegator, denom string) (*liquidstakeibctypes.LSMDeposit, bool)

func (*Keeper) GetLSMDepositAmountUntokenized added in v2.3.0

func (k *Keeper) GetLSMDepositAmountUntokenized(ctx sdk.Context, chainID string) math.Int

func (*Keeper) GetLSMDepositsFromIbcDenom added in v2.3.0

func (k *Keeper) GetLSMDepositsFromIbcDenom(ctx sdk.Context, ibcDenom string) []*liquidstakeibctypes.LSMDeposit

func (*Keeper) GetLSMDepositsFromIbcSequenceID added in v2.3.0

func (k *Keeper) GetLSMDepositsFromIbcSequenceID(ctx sdk.Context, ibcSequenceID string) []*liquidstakeibctypes.LSMDeposit

func (*Keeper) GetParams

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

GetParams gets the total set of liquidstakeibc parameters.

func (*Keeper) GetPendingDepositsBeforeEpoch

func (k *Keeper) GetPendingDepositsBeforeEpoch(ctx sdk.Context, epoch int64) []*liquidstakeibctypes.Deposit

func (*Keeper) GetPortID

func (k *Keeper) GetPortID(owner string) string

GetPortID constructs a port id given the port owner

func (*Keeper) GetRedeemableDepositsForHostChain

func (k *Keeper) GetRedeemableDepositsForHostChain(
	ctx sdk.Context,
	hc *liquidstakeibctypes.HostChain,
) ([]*liquidstakeibctypes.Deposit, math.Int)

func (*Keeper) GetRedeemableLSMDeposits added in v2.3.0

func (k *Keeper) GetRedeemableLSMDeposits(ctx sdk.Context, chainID string) []*liquidstakeibctypes.LSMDeposit

func (*Keeper) GetRedelegationTx added in v2.6.0

func (k *Keeper) GetRedelegationTx(ctx sdk.Context, chainID, ibcSequenceID string) (*types.RedelegateTx, bool)

func (*Keeper) GetRedelegations added in v2.6.0

func (k *Keeper) GetRedelegations(ctx sdk.Context, chainID string) (*types.Redelegations, bool)

func (*Keeper) GetTransactionSequenceID

func (k *Keeper) GetTransactionSequenceID(channelID string, sequence uint64) string

func (*Keeper) GetTransferableLSMDeposits added in v2.3.0

func (k *Keeper) GetTransferableLSMDeposits(ctx sdk.Context, chainID string) []*liquidstakeibctypes.LSMDeposit

func (*Keeper) GetUnbonding

func (k *Keeper) GetUnbonding(ctx sdk.Context, chainID string, epochNumber int64) (*types.Unbonding, bool)

func (*Keeper) GetUndelegationModuleAccount

func (k *Keeper) GetUndelegationModuleAccount(ctx sdk.Context) authtypes.ModuleAccountI

GetUndelegationModuleAccount returns undelegation module account interface

func (*Keeper) GetUserUnbonding

func (k *Keeper) GetUserUnbonding(
	ctx sdk.Context,
	chainID string,
	delegatorAddress string,
	epochNumber int64,
) (*types.UserUnbonding, bool)

func (*Keeper) GetValidatorUnbonding

func (k *Keeper) GetValidatorUnbonding(
	ctx sdk.Context,
	chainID string,
	validatorAddress string,
	epochNumber int64,
) (*types.ValidatorUnbonding, bool)

func (*Keeper) HandleDelegateResponse

func (k *Keeper) HandleDelegateResponse(ctx sdk.Context, msg sdk.Msg, channel string, sequence uint64) error

func (*Keeper) HandleMsgBeginRedelegate added in v2.6.0

func (k *Keeper) HandleMsgBeginRedelegate(
	ctx sdk.Context,
	msg sdk.Msg,
	resp stakingtypes.MsgBeginRedelegateResponse,
	channel string,
	sequence uint64,
) error

func (*Keeper) HandleMsgRedeemTokensForShares added in v2.3.0

func (k *Keeper) HandleMsgRedeemTokensForShares(
	ctx sdk.Context,
	msg sdk.Msg,
	resp stakingtypes.MsgRedeemTokensForSharesResponse,
	channel string,
	sequence uint64,
) error

func (*Keeper) HandleMsgTransfer

func (k *Keeper) HandleMsgTransfer(
	ctx sdk.Context,
	msg sdk.Msg,
	resp ibctransfertypes.MsgTransferResponse,
	channel string,
	sequence uint64,
) error

func (*Keeper) HandleUndelegateResponse

func (k *Keeper) HandleUndelegateResponse(
	ctx sdk.Context,
	msg sdk.Msg,
	resp stakingtypes.MsgUndelegateResponse,
	channel string,
	sequence uint64,
) error

func (*Keeper) Hooks added in v2.7.2

func (k *Keeper) Hooks() types.LiquidStakeIBCHooks

Hooks gets the hooks for liquidstakeibc *Keeper {

func (*Keeper) HostChain

func (k *Keeper) HostChain(
	goCtx context.Context,
	request *types.QueryHostChainRequest,
) (*types.QueryHostChainResponse, error)

func (*Keeper) HostChainUserUnbondings added in v2.9.0

func (*Keeper) HostChains

func (k *Keeper) HostChains(
	goCtx context.Context,
	request *types.QueryHostChainsRequest,
) (*types.QueryHostChainsResponse, error)

func (*Keeper) IncreaseUndelegatingAmountForEpoch

func (k *Keeper) IncreaseUndelegatingAmountForEpoch(
	ctx sdk.Context,
	chainID string,
	epochNumber int64,
	burnAmount sdk.Coin,
	unbondAmount sdk.Coin,
)

func (*Keeper) IncreaseUserUnbondingAmountForEpoch

func (k *Keeper) IncreaseUserUnbondingAmountForEpoch(
	ctx sdk.Context,
	chainID string,
	delegatorAddress string,
	epochNumber int64,
	stkAmount sdk.Coin,
	unbondAmount sdk.Coin,
)

func (*Keeper) IsICAChannelActive

func (k *Keeper) IsICAChannelActive(ctx sdk.Context, hc *types.HostChain, portID string) bool

IsICAChannelActive checks if an ICA channel is active

func (*Keeper) LSMDeposits added in v2.3.0

func (k *Keeper) LSMDeposits(
	goCtx context.Context,
	request *types.QueryLSMDepositsRequest,
) (*types.QueryLSMDepositsResponse, error)

func (*Keeper) LSMWorkflow added in v2.3.0

func (k *Keeper) LSMWorkflow(ctx sdk.Context)

func (*Keeper) Logger

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

Logger returns a module-specific logger.

func (*Keeper) NewEpochHooks

func (k *Keeper) NewEpochHooks() EpochsHooks

func (*Keeper) NewIBCTransferHooks

func (k *Keeper) NewIBCTransferHooks() IBCTransferHooks

func (*Keeper) OnAcknowledgementIBCTransferPacket

func (k *Keeper) OnAcknowledgementIBCTransferPacket(
	ctx sdk.Context,
	packet channeltypes.Packet,
	acknowledgement []byte,
	relayer sdk.AccAddress,
	transferAckErr error,
) error

func (*Keeper) OnAcknowledgementPacket

func (k *Keeper) OnAcknowledgementPacket(
	ctx sdk.Context,
	packet channeltypes.Packet,
	acknowledgement []byte,
	relayer sdk.AccAddress,
) error

func (*Keeper) OnChanOpenAck

func (k *Keeper) OnChanOpenAck(
	ctx sdk.Context,
	portID string,
	channelID string,
	counterpartyChannelID string,
	counterpartyVersion string,
) error

func (*Keeper) OnChanOpenInit

func (k *Keeper) OnChanOpenInit(
	ctx sdk.Context,
	order channeltypes.Order,
	connectionHops []string,
	portID string,
	channelID string,
	channelCap *capabilitytypes.Capability,
	counterparty channeltypes.Counterparty,
	version string,
) (string, error)

func (*Keeper) OnRecvIBCTransferPacket

func (k *Keeper) OnRecvIBCTransferPacket(
	ctx sdk.Context,
	packet channeltypes.Packet,
	relayer sdk.AccAddress,
	transferAck ibcexported.Acknowledgement,
) error

func (*Keeper) OnTimeoutIBCTransferPacket

func (k *Keeper) OnTimeoutIBCTransferPacket(
	ctx sdk.Context,
	packet channeltypes.Packet,
	relayer sdk.AccAddress,
	transferTimeoutErr error,
) error

func (*Keeper) OnTimeoutPacket

func (k *Keeper) OnTimeoutPacket(
	ctx sdk.Context,
	packet channeltypes.Packet,
	relayer sdk.AccAddress,
) error

func (*Keeper) Params

func (*Keeper) ProcessHostChainValidatorUpdates

func (k *Keeper) ProcessHostChainValidatorUpdates(
	ctx sdk.Context,
	hc *types.HostChain,
	validator stakingtypes.Validator,
) error

ProcessHostChainValidatorUpdates processes the new validator set for a host chain

func (*Keeper) QueryDelegationHostChainAccountBalance

func (k *Keeper) QueryDelegationHostChainAccountBalance(
	ctx sdk.Context,
	hc *types.HostChain,
) error

QueryDelegationHostChainAccountBalance sends an ICQ query to get the delegation host account balance

func (*Keeper) QueryHostChainValidator

func (k *Keeper) QueryHostChainValidator(
	ctx sdk.Context,
	hc *types.HostChain,
	validatorAddress string,
) error

QueryHostChainValidator sends an ICQ query to retrieve a specific host chain validator

func (*Keeper) QueryNonCompoundableRewardsHostChainAccountBalance added in v2.7.2

func (k *Keeper) QueryNonCompoundableRewardsHostChainAccountBalance(
	ctx sdk.Context,
	hc *types.HostChain,
) error

QueryNonCompoundableRewardsHostChainAccountBalance sends an ICQ query to get the non-compoundable rewards host account balance

func (*Keeper) QueryRewardsHostChainAccountBalance

func (k *Keeper) QueryRewardsHostChainAccountBalance(
	ctx sdk.Context,
	hc *types.HostChain,
) error

QueryRewardsHostChainAccountBalance sends an ICQ query to get the rewards host account balance

func (*Keeper) QueryValidatorDelegation

func (k *Keeper) QueryValidatorDelegation(
	ctx sdk.Context,
	hc *types.HostChain,
	validator *types.Validator,
) error

QueryValidatorDelegation sends an ICQ query to get a validator delegation

func (Keeper) RebalanceWorkflow added in v2.6.0

func (k Keeper) RebalanceWorkflow(ctx sdk.Context, epoch int64)

RebalanceWorkflow tries to make redelegate transactions to host-chain to balance the delegations as per the weights.

func (*Keeper) RecalculateCValueLimits added in v2.10.0

func (k *Keeper) RecalculateCValueLimits(ctx sdk.Context, hc *types.HostChain, mintedAmount, lsAmount math.Int)

func (Keeper) RedelegationExistsToValidator added in v2.6.0

func (k Keeper) RedelegationExistsToValidator(redelegations []*stakingtypes.Redelegation, toValoper string) bool

func (Keeper) RedelegationFromAToB added in v2.6.0

func (k Keeper) RedelegationFromAToB(redelegations []*stakingtypes.Redelegation, fromValoper, toValoper string) (bool, uint32)

func (*Keeper) RedelegationTx added in v2.7.2

func (*Keeper) Redelegations added in v2.7.2

func (*Keeper) RedistributeValidatorWeight

func (k *Keeper) RedistributeValidatorWeight(ctx sdk.Context, hc *types.HostChain, validator *types.Validator)

func (*Keeper) RegisterICAAccount

func (k *Keeper) RegisterICAAccount(ctx sdk.Context, connectionID, owner string) error

RegisterICAAccount registers an ICA

func (*Keeper) RevertDepositsState

func (k *Keeper) RevertDepositsState(ctx sdk.Context, deposits []*liquidstakeibctypes.Deposit)

func (*Keeper) RevertLSMDepositsState added in v2.3.0

func (k *Keeper) RevertLSMDepositsState(ctx sdk.Context, deposits []*liquidstakeibctypes.LSMDeposit)

func (*Keeper) RevertUnbondingsState

func (k *Keeper) RevertUnbondingsState(ctx sdk.Context, unbondings []*types.Unbonding)

func (*Keeper) RewardsWorkflow

func (k *Keeper) RewardsWorkflow(ctx sdk.Context, epoch int64)

func (*Keeper) SendICATransfer

func (k *Keeper) SendICATransfer(
	ctx sdk.Context,
	hc *types.HostChain,
	amount sdk.Coin,
	sender string,
	receiver string,
	portOwner string,
) (string, error)

func (*Keeper) SendProtocolFee

func (k *Keeper) SendProtocolFee(ctx sdk.Context, protocolFee sdk.Coins, moduleAccount, feeAddress string) error

SendProtocolFee to the community pool

func (*Keeper) SetDeposit

func (k *Keeper) SetDeposit(ctx sdk.Context, deposit *liquidstakeibctypes.Deposit)

func (*Keeper) SetHooks added in v2.7.2

func (k *Keeper) SetHooks(hooks types.LiquidStakeIBCHooks) *Keeper

Set the liquidstakeibc hooks

func (*Keeper) SetHostChain

func (k *Keeper) SetHostChain(ctx sdk.Context, hc *types.HostChain)

SetHostChain sets a host chain in the store

func (*Keeper) SetHostChainValidator

func (k *Keeper) SetHostChainValidator(
	ctx sdk.Context,
	hc *types.HostChain,
	validator *types.Validator,
)

SetHostChainValidator sets a validator on the target host chain

func (*Keeper) SetLSMDeposit added in v2.3.0

func (k *Keeper) SetLSMDeposit(ctx sdk.Context, deposit *liquidstakeibctypes.LSMDeposit)

func (*Keeper) SetParams

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

SetParams sets the total set of liquidstakeibc parameters.

func (*Keeper) SetRedelegationTx added in v2.6.0

func (k *Keeper) SetRedelegationTx(ctx sdk.Context, redelegationTx *types.RedelegateTx)

func (*Keeper) SetRedelegations added in v2.6.0

func (k *Keeper) SetRedelegations(ctx sdk.Context, chainID string, redelegations []*stakingtypes.Redelegation)

func (*Keeper) SetUnbonding

func (k *Keeper) SetUnbonding(ctx sdk.Context, ub *types.Unbonding)

func (*Keeper) SetUserUnbonding

func (k *Keeper) SetUserUnbonding(ctx sdk.Context, ub *types.UserUnbonding)

func (*Keeper) SetValidatorUnbonding

func (k *Keeper) SetValidatorUnbonding(ctx sdk.Context, vu *types.ValidatorUnbonding)

func (*Keeper) SetWithdrawAddress

func (k *Keeper) SetWithdrawAddress(ctx sdk.Context, hc *types.HostChain) error

SetWithdrawAddress sends a MsgSetWithdrawAddress to set the withdrawal address to the rewards account

func (*Keeper) Unbonding

func (k *Keeper) Unbonding(
	goCtx context.Context,
	request *types.QueryUnbondingRequest,
) (*types.QueryUnbondingResponse, error)

func (*Keeper) Unbondings

func (k *Keeper) Unbondings(
	goCtx context.Context,
	request *types.QueryUnbondingsRequest,
) (*types.QueryUnbondingsResponse, error)

func (*Keeper) UndelegationWorkflow

func (k *Keeper) UndelegationWorkflow(ctx sdk.Context, epoch int64)

func (*Keeper) UpdateCValues

func (k *Keeper) UpdateCValues(ctx sdk.Context)

func (*Keeper) UpdateHostChainValidatorWeight

func (k *Keeper) UpdateHostChainValidatorWeight(
	ctx sdk.Context,
	hc *types.HostChain,
	address string,
	weight string,
) error

UpdateHostChainValidatorWeight updates a host chain validator weight

func (*Keeper) UpdateLSMDepositsStateAndSequence added in v2.3.0

func (k *Keeper) UpdateLSMDepositsStateAndSequence(
	ctx sdk.Context,
	deposits []*liquidstakeibctypes.LSMDeposit,
	state liquidstakeibctypes.LSMDeposit_LSMDepositState,
	ibcSequence string,
)

func (*Keeper) UserUnbondings

func (*Keeper) ValidatorUnbondings

func (*Keeper) ValidatorUndelegationWorkflow

func (k *Keeper) ValidatorUndelegationWorkflow(ctx sdk.Context, epoch int64)

type Migrator added in v2.3.0

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

Migrator is a struct for handling in-place store migrations.

func NewMigrator added in v2.3.0

func NewMigrator(keeper Keeper) Migrator

NewMigrator returns a new Migrator.

func (Migrator) Migrate1to2 added in v2.3.0

func (m Migrator) Migrate1to2(ctx sdk.Context) error

Migrate1to2 migrates from version 1 to 2.

func (Migrator) Migrate2to3 added in v2.6.0

func (m Migrator) Migrate2to3(ctx sdk.Context) error

Migrate2to3 migrates from version 2 to 3.

Jump to

Keyboard shortcuts

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