Documentation ¶
Index ¶
- Variables
- func CreateUpgradeHandler(mm *module.Manager, configurator module.Configurator, ...) upgradetypes.UpgradeHandler
- func MigrateDepositRecords(ctx sdk.Context, k recordskeeper.Keeper)
- func MigrateEpochUnbondingRecords(ctx sdk.Context, k recordskeeper.Keeper)
- func MigrateHostZoneUnbondingRecords(hostZoneUnbonding *recordstypes.HostZoneUnbonding) *recordstypes.HostZoneUnbonding
- func MigrateHostZones(ctx sdk.Context, k stakeibckeeper.Keeper)
- func UpdateRedemptionRateBounds(ctx sdk.Context, k stakeibckeeper.Keeper)
Constants ¶
This section is empty.
Variables ¶
var ( UpgradeName = "v24" // Redemption rate bounds updated to give ~3 months of slack on outer bounds RedemptionRateOuterMinAdjustment = sdk.MustNewDecFromStr("0.05") RedemptionRateOuterMaxAdjustment = sdk.MustNewDecFromStr("0.10") // Osmosis will have a slighly larger buffer with the redemption rate // since their yield is less predictable OsmosisChainId = "osmosis-1" OsmosisRedemptionRateBuffer = sdk.MustNewDecFromStr("0.02") )
Functions ¶
func CreateUpgradeHandler ¶
func CreateUpgradeHandler( mm *module.Manager, configurator module.Configurator, bankKeeper bankkeeper.Keeper, recordsKeeper recordskeeper.Keeper, stakeibcKeeper stakeibckeeper.Keeper, ) upgradetypes.UpgradeHandler
CreateUpgradeHandler creates an SDK upgrade handler for v23
func MigrateDepositRecords ¶
func MigrateDepositRecords(ctx sdk.Context, k recordskeeper.Keeper)
Migrates the deposit records to set the DelegationTxsInProgress field which should be 1 if the status was DELEGATION_IN_PROGRESS, and 0 otherwise
func MigrateEpochUnbondingRecords ¶
func MigrateEpochUnbondingRecords(ctx sdk.Context, k recordskeeper.Keeper)
Migrate epoch unbonding records to accomodate the batched undelegations code changes, adding the new accounting fields to the host zone unbonding records
func MigrateHostZoneUnbondingRecords ¶
func MigrateHostZoneUnbondingRecords(hostZoneUnbonding *recordstypes.HostZoneUnbonding) *recordstypes.HostZoneUnbonding
Migrates a single host zone unbonding record to add the new fields: StTokensToBurn, NativeTokensToUnbond, and ClaimableNativeTokens
If the record is in status: UNBONDING_QUEUE, EXIT_TRANSFER_QUEUE, or EXIT_TRANSFER_IN_PROGRESS, set stTokensToBurn, NativeTokensToUnbond, and ClaimableNativeTokens all to 0
If the record is in status: UNBONDING_IN_PROGRESS set StTokensToBurn to the value of StTokenAmount, NativeTokensToUnbond to the value of NativeTokenAmount, and ClaimableNativeTokens to 0
If the record is in status CLAIMABLE, set StTokensToBurn and NativeTokensToUnbond to 0, and set ClaimableNativeTokens to the value of NativeTokenAmount
If the record is in status UNBONDING_IN_PROGRESS, we need to also set UndelegationTxsInProgress to 1; otherwise, it should be set to 0
func MigrateHostZones ¶
func MigrateHostZones(ctx sdk.Context, k stakeibckeeper.Keeper)
Migrate host zones to accomodate the staketia migration changes, adding a redemptions enabled field to each host zone
func UpdateRedemptionRateBounds ¶
func UpdateRedemptionRateBounds(ctx sdk.Context, k stakeibckeeper.Keeper)
Updates the outer redemption rate bounds
Types ¶
This section is empty.