v24

package
v24.0.0-testnet Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

Jump to

Keyboard shortcuts

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