-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
29 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
package app | ||
|
||
import ( | ||
v4 "github.com/White-Whale-Defi-Platform/migaloo-chain/v4/app/upgrades/v4_1_1" | ||
v4 "github.com/White-Whale-Defi-Platform/migaloo-chain/v4/app/upgrades/v4_1_2" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
|
||
// BeginBlockForks executes any necessary fork logic based upon the current block height. | ||
func BeginBlockForks(ctx sdk.Context, app *MigalooApp) { | ||
if ctx.BlockHeight() == v4.UpgradeHeight { | ||
v4.UpdateAccountPermissionAndFeeBurnPercent(ctx, app.FeeBurnKeeper, app.AccountKeeper) | ||
v4.UpdateAlliance(ctx, app.AllianceKeeper) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package v4 | ||
|
||
const ( | ||
UpgradeHeight = 777300 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package v4 | ||
|
||
import ( | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
alliancekeeper "github.com/terra-money/alliance/x/alliance/keeper" | ||
"time" | ||
) | ||
|
||
func UpdateAlliance(ctx sdk.Context, alk alliancekeeper.Keeper) { | ||
allianceParams := alk.GetParams(ctx) | ||
allianceParams.RewardDelayTime = 10 * time.Minute | ||
|
||
_ = alk.SetParams(ctx, allianceParams) | ||
|
||
asset, found := alk.GetAssetByDenom(ctx, "ibc/30E9709461C4DA26A7A579E11DE44B591E676DB1B7F94714FBFF87ED6E47D6F4") | ||
if found { | ||
rewardStartTime := ctx.BlockTime() | ||
asset.LastRewardChangeTime = rewardStartTime | ||
asset.RewardStartTime = rewardStartTime | ||
alk.SetAsset(ctx, asset) | ||
} | ||
} |