Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper *Keeper) types.MsgServer
- func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
- type Hooks
- func (h Hooks) AfterDelegateEnd(ctx sdk.Context, delegateMsg stakingtypes.MsgDelegate)
- func (h Hooks) AfterDelegateFail(ctx sdk.Context, delegateMsg stakingtypes.MsgDelegate)
- func (h Hooks) AfterIcaWithdrawFail(ctx sdk.Context, transferMsg transfertypes.MsgTransfer)
- func (h Hooks) AfterOnRecvPacket(ctx sdk.Context, data transfertypes.FungibleTokenPacketData)
- func (h Hooks) AfterTransferEnd(ctx sdk.Context, data transfertypes.FungibleTokenPacketData, baseDenom string)
- func (h Hooks) AfterTransferFail(ctx sdk.Context, data transfertypes.FungibleTokenPacketData, baseDenom string)
- func (h Hooks) AfterUndelegateEnd(ctx sdk.Context, undelegateMsg stakingtypes.MsgUndelegate, ...)
- func (h Hooks) AfterUndelegateFail(ctx sdk.Context, undelegateMsg stakingtypes.MsgUndelegate)
- func (h Hooks) AfterWithdrawEnd(ctx sdk.Context, transferMsg transfertypes.MsgTransfer)
- type IBCTransferOption
- type Keeper
- func (k Keeper) CalculateDepositAlpha(userDepositAmt, totalShareTokenSupply, totalStakedAmount *big.Int) *big.Int
- func (k Keeper) CalculateWithdrawAlpha(burnedStTokenAmt, totalShareTokenSupply, totalStakedAmount *big.Int) *big.Int
- func (k Keeper) ChangeDelegateState(ctx sdk.Context, zoneId string, version types.DelegateVersion)
- func (k Keeper) ChangeDepositState(ctx sdk.Context, zoneId string) bool
- func (k Keeper) ChangeUndelegateState(ctx sdk.Context, zoneId string, state types.UndelegatedStatusType)
- func (k Keeper) ChangeWithdrawState(ctx sdk.Context, zoneId string, preState, postState types.WithdrawStatusType)
- func (k Keeper) CheckDecimal(amount sdk.Coin, decimal int64) error
- func (k Keeper) ClaimShareToken(ctx sdk.Context, zone *icacontrolkeeper.RegisteredZone, asset sdk.Coin) (*sdk.Coin, error)
- func (k Keeper) ClaimWithdrawAsset(ctx sdk.Context, withdrawer sdk.AccAddress, amt sdk.Coin) error
- func (k Keeper) ConvertSnAssetToWAssetDecimal(amount *big.Int, decimal int64, denom string) (*sdk.Coin, error)
- func (k Keeper) ConvertWAssetToSnAssetDecimal(amount *big.Int, decimal int64, denom string) (*sdk.Coin, error)
- func (k Keeper) DeleteDelegateRecord(ctx sdk.Context, delegate *types.DelegateRecord)
- func (k Keeper) DeleteDepositRecord(ctx sdk.Context, zoneId string, depositor sdk.AccAddress, ...) error
- func (k Keeper) DeleteDepositRecords(ctx sdk.Context, zoneId string, state types.DepositStatusType)
- func (k Keeper) DeleteRecordedDepositItem(ctx sdk.Context, zoneId string, depositor sdk.AccAddress, ...) error
- func (k Keeper) DeleteUndelegateRecords(ctx sdk.Context, zoneId string, state types.UndelegatedStatusType)
- func (k Keeper) DeleteWithdrawRecord(ctx sdk.Context, withdraw *types.WithdrawRecord)
- func (k Keeper) GetAllAmountNotMintShareToken(ctx sdk.Context, zone *icacontroltypes.RegisteredZone) (sdk.Coin, error)
- func (k Keeper) GetAllUndelegateRecord(ctx sdk.Context, zoneId string) []*types.UndelegateRecord
- func (k Keeper) GetDelegateVersion(ctx sdk.Context, zoneId string) types.VersionState
- func (k Keeper) GetDelegateVersionStore(ctx sdk.Context) prefix.Store
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) GetReUndelegateAmount(ctx sdk.Context, snDenom string, zone icacontroltypes.RegisteredZone, ...) (sdk.Coin, sdk.Int)
- func (k Keeper) GetSnDenomForIBCDenom(ctx sdk.Context, ibcDenom string) (string, error)
- func (k Keeper) GetTotalDelegateAmtForUser(ctx sdk.Context, zoneId, denom string, userAddr sdk.AccAddress) sdk.Coin
- func (k Keeper) GetTotalDelegateAmtForZoneId(ctx sdk.Context, zoneId, denom string, version types.DelegateVersion, ...) sdk.Coin
- func (k Keeper) GetTotalDepositAmtForUserAddr(ctx sdk.Context, zoneId, userAddr, denom string) sdk.Coin
- func (k Keeper) GetTotalDepositAmtForZoneId(ctx sdk.Context, zoneId, denom string, state types.DepositStatusType) sdk.Coin
- func (k Keeper) GetTotalStakedForLazyMinting(ctx sdk.Context, denom, transferPortId, transferChanId string) (sdk.Coin, error)
- func (k Keeper) GetTotalWithdrawAmountForFailCase(ctx sdk.Context, zoneId, denom string, blockTime time.Time) sdk.Coin
- func (k Keeper) GetTotalWithdrawAmountForZoneId(ctx sdk.Context, zoneId, denom string, blockTime time.Time) sdk.Coin
- func (k Keeper) GetUndelegateAmount(ctx sdk.Context, snDenom string, zone icacontroltypes.RegisteredZone, ...) (sdk.Coin, sdk.Int)
- func (k Keeper) GetUndelegateRecord(ctx sdk.Context, zoneId, delegator string) (result *types.UndelegateRecord, found bool)
- func (k Keeper) GetUndelegateVersion(ctx sdk.Context, zoneId string) types.VersionState
- func (k Keeper) GetUndelegateVersionStore(ctx sdk.Context) prefix.Store
- func (k Keeper) GetUserDelegateRecord(ctx sdk.Context, zoneId string, claimer sdk.AccAddress) (result *types.DelegateRecord, found bool)
- func (k Keeper) GetUserDepositRecord(ctx sdk.Context, zoneId string, depositor sdk.AccAddress) (result *types.DepositRecord, found bool)
- func (k Keeper) GetWithdrawAmountForUser(ctx sdk.Context, zoneId, denom string, withdrawer string) sdk.Coin
- func (k Keeper) GetWithdrawAmt(ctx sdk.Context, amt sdk.Coin) (*sdk.Coin, error)
- func (k Keeper) GetWithdrawRecord(ctx sdk.Context, zoneId, withdrawer string) (result *types.WithdrawRecord, found bool)
- func (k Keeper) GetWithdrawVersion(ctx sdk.Context, zoneId string) types.VersionState
- func (k Keeper) GetWithdrawVersionStore(ctx sdk.Context) prefix.Store
- func (k Keeper) HasMaxDepositEntries(depositRecords types.DepositRecord, maxEntries int64) bool
- func (k Keeper) HasMaxUndelegateEntries(undelegateRecords types.UndelegateRecord, maxEntries int64) bool
- func (k Keeper) Hooks() Hooks
- func (k Keeper) IsAbleToWithdraw(ctx sdk.Context, from sdk.AccAddress, amt sdk.Coin) bool
- func (k Keeper) IsValidDelegateVersion(ctx sdk.Context, zoneId string, version uint64) bool
- func (k Keeper) IsValidUndelegateVersion(ctx sdk.Context, zoneId string, version uint64) bool
- func (k Keeper) IsValidWithdrawVersion(ctx sdk.Context, zoneId string, version uint64) bool
- func (k Keeper) IterateDelegateRecord(ctx sdk.Context, zoneId string, ...)
- func (k Keeper) IterateDepositRecord(ctx sdk.Context, zoneId string, ...)
- func (k Keeper) IterateUndelegatedRecords(ctx sdk.Context, zoneId string, ...)
- func (k Keeper) IterateWithdrawRecords(ctx sdk.Context, zoneId string, ...)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MintTo(ctx sdk.Context, claimer sdk.AccAddress, mintCoin sdk.Coin) error
- func (k Keeper) SetDelegateOracleVersion(ctx sdk.Context, zoneId string, version types.DelegateVersion, ...)
- func (k Keeper) SetDelegateRecord(ctx sdk.Context, msg *types.DelegateRecord)
- func (k Keeper) SetDelegateRecords(ctx sdk.Context, zoneId string)
- func (k Keeper) SetDelegateVersion(ctx sdk.Context, zoneId string, trace types.VersionState)
- func (k Keeper) SetDepositRecord(ctx sdk.Context, msg *types.DepositRecord)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetUndelegateRecord(ctx sdk.Context, record *types.UndelegateRecord)
- func (k Keeper) SetUndelegateRecordVersion(ctx sdk.Context, zoneId string, state types.UndelegatedStatusType, ...) bool
- func (k Keeper) SetUndelegateVersion(ctx sdk.Context, zoneId string, trace types.VersionState)
- func (k Keeper) SetWithdrawRecord(ctx sdk.Context, record *types.WithdrawRecord)
- func (k Keeper) SetWithdrawRecordVersion(ctx sdk.Context, zoneId string, state types.WithdrawStatusType, version uint64)
- func (k Keeper) SetWithdrawRecords(ctx sdk.Context, zoneId string, time time.Time)
- func (k Keeper) SetWithdrawVersion(ctx sdk.Context, zoneId string, trace types.VersionState)
- func (k Keeper) TotalClaimableAssets(ctx sdk.Context, zone icacontrolkeeper.RegisteredZone, claimer sdk.AccAddress) (*sdk.Coin, error)
- func (k Keeper) TransferToTargetZone(ctx sdk.Context, option *IBCTransferOption) error
- type QueryServer
- func (q QueryServer) ActiveWithdrawals(goCtx context.Context, request *types.QueryActiveWithdrawalsRequest) (*types.QueryActiveWithdrawalsResponse, error)
- func (q QueryServer) ClaimableAmount(goCtx context.Context, request *types.QueryClaimableAmountRequest) (*types.QueryClaimableAmountResponse, error)
- func (q QueryServer) DelegateCurrentVersion(goCtx context.Context, request *types.QueryCurrentDelegateVersion) (*types.QueryCurrentDelegateVersionResponse, error)
- func (q QueryServer) DelegateRecords(goCtx context.Context, request *types.QueryDelegateRecordRequest) (*types.QueryDelegateRecordResponse, error)
- func (q QueryServer) DelegateVersion(goCtx context.Context, request *types.QueryDelegateVersion) (*types.QueryDelegateVersionResponse, error)
- func (q QueryServer) DepositAmount(goCtx context.Context, request *types.QueryDepositAmountRequest) (*types.QueryDepositAmountResponse, error)
- func (q QueryServer) DepositRecords(goCtx context.Context, request *types.QueryDepositRecordRequest) (*types.QueryDepositRecordResponse, error)
- func (q QueryServer) EstimateSnAsset(goCtx context.Context, request *types.QueryEstimateSnAssetRequest) (*types.QueryEstimateSnAssetResponse, error)
- func (q QueryServer) Params(goCtx context.Context, request *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (q QueryServer) PendingWithdrawals(goCtx context.Context, request *types.QueryPendingWithdrawalsRequest) (*types.QueryPendingWithdrawalsResponse, error)
- func (q QueryServer) TotalSnAssetSupply(goCtx context.Context, request *types.QueryTotalSnAssetSupply) (*types.QueryTotalSnAssetSupplyResponse, error)
- func (q QueryServer) UndelegateCurrentVersion(goCtx context.Context, request *types.QueryCurrentUndelegateVersion) (*types.QueryCurrentUndelegateVersionResponse, error)
- func (q QueryServer) UndelegateRecords(goCtx context.Context, request *types.QueryUndelegateRecordRequest) (*types.QueryUndelegateRecordResponse, error)
- func (q QueryServer) UndelegateVersion(goCtx context.Context, request *types.QueryUndelegateVersion) (*types.QueryUndelegateVersionResponse, error)
- func (q QueryServer) WithdrawCurrentVersion(goCtx context.Context, request *types.QueryCurrentWithdrawVersion) (*types.QueryCurrentWithdrawVersionResponse, error)
- func (q QueryServer) WithdrawRecords(goCtx context.Context, request *types.QueryWithdrawRecordRequest) (*types.QueryWithdrawRecordResponse, error)
- func (q QueryServer) WithdrawVersion(goCtx context.Context, request *types.QueryWithdrawVersion) (*types.QueryWithdrawVersionResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl creates and returns a new types.MsgServer, fulfilling the icacontrol Msg service interface
func RegisterInvariants ¶
func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper)
RegisterInvariants registers the gal module invariants
Types ¶
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
Hooks wrapper struct for gal keeper
func (Hooks) AfterDelegateEnd ¶
func (h Hooks) AfterDelegateEnd(ctx sdk.Context, delegateMsg stakingtypes.MsgDelegate)
func (Hooks) AfterDelegateFail ¶ added in v0.6.3
func (h Hooks) AfterDelegateFail(ctx sdk.Context, delegateMsg stakingtypes.MsgDelegate)
func (Hooks) AfterIcaWithdrawFail ¶ added in v0.6.5
func (h Hooks) AfterIcaWithdrawFail(ctx sdk.Context, transferMsg transfertypes.MsgTransfer)
func (Hooks) AfterOnRecvPacket ¶
func (h Hooks) AfterOnRecvPacket(ctx sdk.Context, data transfertypes.FungibleTokenPacketData)
func (Hooks) AfterTransferEnd ¶
func (h Hooks) AfterTransferEnd(ctx sdk.Context, data transfertypes.FungibleTokenPacketData, baseDenom string)
AfterTransferEnd coins user deposit information. It will be used in share token minting process.
func (Hooks) AfterTransferFail ¶ added in v0.6.3
func (h Hooks) AfterTransferFail(ctx sdk.Context, data transfertypes.FungibleTokenPacketData, baseDenom string)
func (Hooks) AfterUndelegateEnd ¶
func (h Hooks) AfterUndelegateEnd(ctx sdk.Context, undelegateMsg stakingtypes.MsgUndelegate, msg *stakingtypes.MsgUndelegateResponse)
AfterUndelegateEnd is executed when ICA undelegation request finished. 1. It removes undelegation history in store. 2. It saves undelegation finish time to store.
func (Hooks) AfterUndelegateFail ¶ added in v0.6.3
func (h Hooks) AfterUndelegateFail(ctx sdk.Context, undelegateMsg stakingtypes.MsgUndelegate)
func (Hooks) AfterWithdrawEnd ¶
func (h Hooks) AfterWithdrawEnd(ctx sdk.Context, transferMsg transfertypes.MsgTransfer)
AfterWithdrawEnd is executed IcaWithdraw request finished. 1. Increase the withdrawal version. 2. The withdrawal status registered as transferred changes
type IBCTransferOption ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper defines a module interface that facilitates the transfer of coins between accounts.
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, key sdk.StoreKey, paramSpace paramtypes.Subspace, accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, icaControlKeeper icacontrolkeeper.Keeper, ibcTransferKeeper transfer.Keeper, oracleKeeper oraclekeeper.Keeper, airdropKeeper types.AirdropKeeper, channelKeeper ibcchanneltypes.Keeper) Keeper
func (Keeper) CalculateDepositAlpha ¶
func (k Keeper) CalculateDepositAlpha(userDepositAmt, totalShareTokenSupply, totalStakedAmount *big.Int) *big.Int
CalculateDepositAlpha calculates alpha value. DepositAlpha = userDepositAmount / totalStakedAmount Issued snAsset = Alpha * totalShareTokenSupply
func (Keeper) CalculateWithdrawAlpha ¶
func (k Keeper) CalculateWithdrawAlpha(burnedStTokenAmt, totalShareTokenSupply, totalStakedAmount *big.Int) *big.Int
CalculateWithdrawAlpha calculates lambda value. WithdrawAlpha = userWithdrawAmount / totalStakedAmount Issued coin = Lambda * totalShareTokenSupply
func (Keeper) ChangeDelegateState ¶ added in v0.6.5
func (Keeper) ChangeDepositState ¶
ChangeDepositState updates the deposit records corresponding to the preState to postState. This operation runs in the hook after the remote deposit is run.
func (Keeper) ChangeUndelegateState ¶
func (k Keeper) ChangeUndelegateState(ctx sdk.Context, zoneId string, state types.UndelegatedStatusType)
ChangeUndelegateState changes the status for recorded undelegation. UNDELEGATE_REQUEST_USER : Just requested undelegate by user. It is not in undelegate period. UNDELEGATE_REQUEST_ICA : Requested by ICA, It is in undelegate period.
func (Keeper) ChangeWithdrawState ¶
func (k Keeper) ChangeWithdrawState(ctx sdk.Context, zoneId string, preState, postState types.WithdrawStatusType)
ChangeWithdrawState changes each withdraw states. WithdrawStatusRegistered : Withdrawal requests have been registered state of the user. The property of this condition is not carried over from chain host. WithdrawStatusTransferred : WithdrawStatusTransferred is a state in which assets are periodically transferred to the Supernova chain. Assets in this state can be withdrawn by the user.
func (Keeper) CheckDecimal ¶ added in v0.6.4
func (Keeper) ClaimShareToken ¶
func (k Keeper) ClaimShareToken(ctx sdk.Context, zone *icacontrolkeeper.RegisteredZone, asset sdk.Coin) (*sdk.Coin, error)
ClaimShareToken is used when user want to claim their share token. It calculates user's share and the amount of claimable share token.
func (Keeper) ClaimWithdrawAsset ¶
ClaimWithdrawAsset is used when user want to claim their asset which is after undeleagted.
func (Keeper) ConvertSnAssetToWAssetDecimal ¶
func (k Keeper) ConvertSnAssetToWAssetDecimal(amount *big.Int, decimal int64, denom string) (*sdk.Coin, error)
ConvertSnAssetToWAssetDecimal changes snAsset to matching coin denom and decimal.
func (Keeper) ConvertWAssetToSnAssetDecimal ¶
func (k Keeper) ConvertWAssetToSnAssetDecimal(amount *big.Int, decimal int64, denom string) (*sdk.Coin, error)
ConvertWAssetToSnAssetDecimal changes the common coin to snAsset's denom and decimal.
func (Keeper) DeleteDelegateRecord ¶ added in v0.6.5
func (k Keeper) DeleteDelegateRecord(ctx sdk.Context, delegate *types.DelegateRecord)
func (Keeper) DeleteDepositRecord ¶ added in v0.6.5
func (k Keeper) DeleteDepositRecord(ctx sdk.Context, zoneId string, depositor sdk.AccAddress, state types.DepositStatusType) error
func (Keeper) DeleteDepositRecords ¶ added in v0.6.5
func (Keeper) DeleteRecordedDepositItem ¶
func (Keeper) DeleteUndelegateRecords ¶
func (k Keeper) DeleteUndelegateRecords(ctx sdk.Context, zoneId string, state types.UndelegatedStatusType)
DeleteUndelegateRecords deletes records corresponding to zoneId and state for undelegate records.
func (Keeper) DeleteWithdrawRecord ¶
func (k Keeper) DeleteWithdrawRecord(ctx sdk.Context, withdraw *types.WithdrawRecord)
DeleteWithdrawRecord removes withdraw record.
func (Keeper) GetAllAmountNotMintShareToken ¶
func (k Keeper) GetAllAmountNotMintShareToken(ctx sdk.Context, zone *icacontroltypes.RegisteredZone) (sdk.Coin, error)
GetAllAmountNotMintShareToken returns the sum of assets that have not yet been issued by the user among the assets that have been deposited.
func (Keeper) GetAllUndelegateRecord ¶
GetAllUndelegateRecord returns all undelegate records corresponding to zoneId.
func (Keeper) GetDelegateVersion ¶
GetDelegateVersion returns version for delegation corresponding to zone-id records.
func (Keeper) GetDelegateVersionStore ¶
GetDelegateVersionStore returns store for delegation.
func (Keeper) GetReUndelegateAmount ¶ added in v0.6.3
func (Keeper) GetSnDenomForIBCDenom ¶
GetSnDenomForIBCDenom changes the IBCDenom to the appropriate SnDenom.
func (Keeper) GetTotalDelegateAmtForUser ¶ added in v0.6.5
func (Keeper) GetTotalDelegateAmtForZoneId ¶ added in v0.6.5
func (k Keeper) GetTotalDelegateAmtForZoneId(ctx sdk.Context, zoneId, denom string, version types.DelegateVersion, state types.DelegateStatusType) sdk.Coin
func (Keeper) GetTotalDepositAmtForUserAddr ¶
func (k Keeper) GetTotalDepositAmtForUserAddr(ctx sdk.Context, zoneId, userAddr, denom string) sdk.Coin
GetTotalDepositAmtForUserAddr returns the sum of the user's address entered as input and the deposit coin corresponding to the coin denom.
func (Keeper) GetTotalDepositAmtForZoneId ¶
func (k Keeper) GetTotalDepositAmtForZoneId(ctx sdk.Context, zoneId, denom string, state types.DepositStatusType) sdk.Coin
GetTotalDepositAmtForZoneId returns the sum of all Deposit coins corresponding to a specified zoneId.
func (Keeper) GetTotalStakedForLazyMinting ¶
func (k Keeper) GetTotalStakedForLazyMinting(ctx sdk.Context, denom, transferPortId, transferChanId string) (sdk.Coin, error)
GetTotalStakedForLazyMinting returns the sum of coins delegated to the Host chain, which have not been issued snAsset.
func (Keeper) GetTotalWithdrawAmountForFailCase ¶ added in v0.6.3
func (Keeper) GetTotalWithdrawAmountForZoneId ¶
func (k Keeper) GetTotalWithdrawAmountForZoneId(ctx sdk.Context, zoneId, denom string, blockTime time.Time) sdk.Coin
GetTotalWithdrawAmountForZoneId returns total withdraw amount corresponding to zone-id and denom.
func (Keeper) GetUndelegateAmount ¶
func (k Keeper) GetUndelegateAmount(ctx sdk.Context, snDenom string, zone icacontroltypes.RegisteredZone, version uint64) (sdk.Coin, sdk.Int)
GetUndelegateAmount gets the information that corresponds to the zone during the de-delegation history.
func (Keeper) GetUndelegateRecord ¶
func (k Keeper) GetUndelegateRecord(ctx sdk.Context, zoneId, delegator string) (result *types.UndelegateRecord, found bool)
GetUndelegateRecord returns the record corresponding to zoneId and delegator among the user's undelegation records.
func (Keeper) GetUndelegateVersion ¶
GetUndelegateVersion returns the latest undelegation version.
func (Keeper) GetUndelegateVersionStore ¶
GetUndelegateVersionStore returns the store that stores the UndelegateVersion data. The un-delegation task is periodically operated by the bot, so it stores the version for the last action.
func (Keeper) GetUserDelegateRecord ¶ added in v0.6.5
func (k Keeper) GetUserDelegateRecord(ctx sdk.Context, zoneId string, claimer sdk.AccAddress) (result *types.DelegateRecord, found bool)
func (Keeper) GetUserDepositRecord ¶
func (k Keeper) GetUserDepositRecord(ctx sdk.Context, zoneId string, depositor sdk.AccAddress) (result *types.DepositRecord, found bool)
GetUserDepositRecord returns the amount of coin user deposit by address.
func (Keeper) GetWithdrawAmountForUser ¶
func (k Keeper) GetWithdrawAmountForUser(ctx sdk.Context, zoneId, denom string, withdrawer string) sdk.Coin
GetWithdrawAmountForUser returns withdraw record corresponding to zone id and denom.
func (Keeper) GetWithdrawAmt ¶
GetWithdrawAmt is used for calculating the amount of coin user can withdraw after un-delegate. This function is executed when ICA un-delegate call executed, and calculate using the balance of user's share coin.
func (Keeper) GetWithdrawRecord ¶
func (k Keeper) GetWithdrawRecord(ctx sdk.Context, zoneId, withdrawer string) (result *types.WithdrawRecord, found bool)
GetWithdrawRecord returns withdraw record item by key.
func (Keeper) GetWithdrawVersion ¶
GetWithdrawVersion returns current withdraw-version.
func (Keeper) GetWithdrawVersionStore ¶
GetWithdrawVersionStore returns store for Withdraw-version.
func (Keeper) HasMaxDepositEntries ¶ added in v0.6.4
func (k Keeper) HasMaxDepositEntries(depositRecords types.DepositRecord, maxEntries int64) bool
func (Keeper) HasMaxUndelegateEntries ¶
func (k Keeper) HasMaxUndelegateEntries(undelegateRecords types.UndelegateRecord, maxEntries int64) bool
func (Keeper) IsAbleToWithdraw ¶
IsAbleToWithdraw returns if user can withdraw their asset. It refers nova ICA account. If ICA account's balance is greater than user withdraw request amount, this function returns true.
func (Keeper) IsValidDelegateVersion ¶ added in v0.6.2
func (Keeper) IsValidUndelegateVersion ¶ added in v0.6.2
func (Keeper) IsValidWithdrawVersion ¶ added in v0.6.2
func (Keeper) IterateDelegateRecord ¶ added in v0.6.5
func (k Keeper) IterateDelegateRecord(ctx sdk.Context, zoneId string, fn func(index int64, delegateRecord types.DelegateRecord) (stop bool))
IterateDelegateRecord navigates all delegate requests.
func (Keeper) IterateDepositRecord ¶
func (k Keeper) IterateDepositRecord(ctx sdk.Context, zoneId string, fn func(index int64, depositRecord types.DepositRecord) (stop bool))
IterateDepositRecord navigates all deposit requests.
func (Keeper) IterateUndelegatedRecords ¶
func (k Keeper) IterateUndelegatedRecords(ctx sdk.Context, zoneId string, fn func(index int64, undelegateInfo *types.UndelegateRecord) (stop bool))
IterateUndelegatedRecords navigates de-delegation records.
func (Keeper) IterateWithdrawRecords ¶
func (k Keeper) IterateWithdrawRecords(ctx sdk.Context, zoneId string, fn func(index int64, withdrawInfo *types.WithdrawRecord) (stop bool))
IterateWithdrawRecords iterate all withdraw records.
func (Keeper) SetDelegateOracleVersion ¶ added in v0.6.5
func (k Keeper) SetDelegateOracleVersion(ctx sdk.Context, zoneId string, version types.DelegateVersion, oracleVersion uint64)
SetDelegateOracleVersion updates the Oracle version for recorded delegate requests. This action is required for the correct equity calculation.
func (Keeper) SetDelegateRecord ¶ added in v0.6.5
func (k Keeper) SetDelegateRecord(ctx sdk.Context, msg *types.DelegateRecord)
func (Keeper) SetDelegateRecords ¶ added in v0.6.5
func (Keeper) SetDelegateVersion ¶
SetDelegateVersion sets version for delegation corresponding to zone-id records.
func (Keeper) SetDepositRecord ¶
func (k Keeper) SetDepositRecord(ctx sdk.Context, msg *types.DepositRecord)
SetDepositRecord stores the deposit record which stores amount of the coin and user address.
func (Keeper) SetUndelegateRecord ¶
func (k Keeper) SetUndelegateRecord(ctx sdk.Context, record *types.UndelegateRecord)
SetUndelegateRecord writes a record of the user's undelegation actions.
func (Keeper) SetUndelegateRecordVersion ¶
func (k Keeper) SetUndelegateRecordVersion(ctx sdk.Context, zoneId string, state types.UndelegatedStatusType, version uint64) bool
SetUndelegateRecordVersion navigates undelegate records and updates version for records corresponding to zoneId and state.
func (Keeper) SetUndelegateVersion ¶
SetUndelegateVersion sets the new un-delgate Version.
func (Keeper) SetWithdrawRecord ¶
func (k Keeper) SetWithdrawRecord(ctx sdk.Context, record *types.WithdrawRecord)
SetWithdrawRecord stores the withdraw record.
func (Keeper) SetWithdrawRecordVersion ¶
func (k Keeper) SetWithdrawRecordVersion(ctx sdk.Context, zoneId string, state types.WithdrawStatusType, version uint64)
SetWithdrawRecordVersion set new version to withdraw record corresponding to zoneId and state.
func (Keeper) SetWithdrawRecords ¶
SetWithdrawRecords write multiple withdraw record.
func (Keeper) SetWithdrawVersion ¶
SetWithdrawVersion set withdraw version for zone id.
func (Keeper) TotalClaimableAssets ¶
func (k Keeper) TotalClaimableAssets(ctx sdk.Context, zone icacontrolkeeper.RegisteredZone, claimer sdk.AccAddress) (*sdk.Coin, error)
TotalClaimableAssets returns the total amount of claimable snAsset.
func (Keeper) TransferToTargetZone ¶
func (k Keeper) TransferToTargetZone(ctx sdk.Context, option *IBCTransferOption) error
TransferToTargetZone transfers user's asset to target zone(Host chain) using IBC transfer.
type QueryServer ¶
type QueryServer struct { types.QueryServer // contains filtered or unexported fields }
func NewQueryServer ¶
func NewQueryServer(keeper *Keeper) *QueryServer
func (QueryServer) ActiveWithdrawals ¶
func (q QueryServer) ActiveWithdrawals(goCtx context.Context, request *types.QueryActiveWithdrawalsRequest) (*types.QueryActiveWithdrawalsResponse, error)
func (QueryServer) ClaimableAmount ¶
func (q QueryServer) ClaimableAmount(goCtx context.Context, request *types.QueryClaimableAmountRequest) (*types.QueryClaimableAmountResponse, error)
func (QueryServer) DelegateCurrentVersion ¶ added in v0.6.2
func (q QueryServer) DelegateCurrentVersion(goCtx context.Context, request *types.QueryCurrentDelegateVersion) (*types.QueryCurrentDelegateVersionResponse, error)
func (QueryServer) DelegateRecords ¶ added in v0.6.5
func (q QueryServer) DelegateRecords(goCtx context.Context, request *types.QueryDelegateRecordRequest) (*types.QueryDelegateRecordResponse, error)
func (QueryServer) DelegateVersion ¶
func (q QueryServer) DelegateVersion(goCtx context.Context, request *types.QueryDelegateVersion) (*types.QueryDelegateVersionResponse, error)
func (QueryServer) DepositAmount ¶
func (q QueryServer) DepositAmount(goCtx context.Context, request *types.QueryDepositAmountRequest) (*types.QueryDepositAmountResponse, error)
func (QueryServer) DepositRecords ¶
func (q QueryServer) DepositRecords(goCtx context.Context, request *types.QueryDepositRecordRequest) (*types.QueryDepositRecordResponse, error)
func (QueryServer) EstimateSnAsset ¶
func (q QueryServer) EstimateSnAsset(goCtx context.Context, request *types.QueryEstimateSnAssetRequest) (*types.QueryEstimateSnAssetResponse, error)
func (QueryServer) Params ¶
func (q QueryServer) Params(goCtx context.Context, request *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (QueryServer) PendingWithdrawals ¶
func (q QueryServer) PendingWithdrawals(goCtx context.Context, request *types.QueryPendingWithdrawalsRequest) (*types.QueryPendingWithdrawalsResponse, error)
func (QueryServer) TotalSnAssetSupply ¶ added in v0.6.7
func (q QueryServer) TotalSnAssetSupply(goCtx context.Context, request *types.QueryTotalSnAssetSupply) (*types.QueryTotalSnAssetSupplyResponse, error)
func (QueryServer) UndelegateCurrentVersion ¶ added in v0.6.2
func (q QueryServer) UndelegateCurrentVersion(goCtx context.Context, request *types.QueryCurrentUndelegateVersion) (*types.QueryCurrentUndelegateVersionResponse, error)
func (QueryServer) UndelegateRecords ¶
func (q QueryServer) UndelegateRecords(goCtx context.Context, request *types.QueryUndelegateRecordRequest) (*types.QueryUndelegateRecordResponse, error)
func (QueryServer) UndelegateVersion ¶
func (q QueryServer) UndelegateVersion(goCtx context.Context, request *types.QueryUndelegateVersion) (*types.QueryUndelegateVersionResponse, error)
func (QueryServer) WithdrawCurrentVersion ¶ added in v0.6.2
func (q QueryServer) WithdrawCurrentVersion(goCtx context.Context, request *types.QueryCurrentWithdrawVersion) (*types.QueryCurrentWithdrawVersionResponse, error)
func (QueryServer) WithdrawRecords ¶
func (q QueryServer) WithdrawRecords(goCtx context.Context, request *types.QueryWithdrawRecordRequest) (*types.QueryWithdrawRecordResponse, error)
func (QueryServer) WithdrawVersion ¶
func (q QueryServer) WithdrawVersion(goCtx context.Context, request *types.QueryWithdrawVersion) (*types.QueryWithdrawVersionResponse, error)