Skip to content

Commit

Permalink
update token params when upgrading
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer-zq committed Apr 22, 2024
1 parent b0d3229 commit 6fe72ef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/upgrades/v300/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ var (
// the portion of a chain's total stake can be liquid
GlobalLiquidStakingCap = sdk.MustNewDecFromStr("0.25") // 25%

// BeaconContractAddress is the address of the beacon contract
BeaconContractAddress = ""

allowMessages = []string{"*"}
)
9 changes: 9 additions & 0 deletions app/upgrades/v300/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,12 @@ func mergeEVM(ctx sdk.Context, box upgrades.Toolbox) error {
params.AllowUnprotectedTxs = true
return box.EvmKeeper.SetParams(ctx, params)
}

func mergeToken(ctx sdk.Context, box upgrades.Toolbox) error {
ctx.Logger().Info("start to run token module migrations...")

params := box.TokenKeeper.GetParams(ctx)
params.EnableErc20 = true
params.Beacon = BeaconContractAddress
return box.TokenKeeper.SetParams(ctx, params)
}

0 comments on commit 6fe72ef

Please sign in to comment.