Skip to content

Commit

Permalink
Add andes upgrade handler
Browse files Browse the repository at this point in the history
  • Loading branch information
anilcse committed Feb 7, 2020
1 parent 50f15bd commit 7bcd890
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,28 +205,28 @@ func NewXrnApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bo
app.bankKeeper, app.feeCollectionKeeper)
app.upgradeKeeper = upgrade.NewKeeper(app.upgradeStoreKey, app.cdc)

// this configures a no-op upgrade handler for the "patagonia" upgrade
app.upgradeKeeper.SetUpgradeHandler("darien-gap", func(ctx sdk.Context, plan upgrade.Plan) {
// this configures a no-op upgrade handler for the "andes" upgrade
app.upgradeKeeper.SetUpgradeHandler("andes", func(ctx sdk.Context, plan upgrade.Plan) {
addr, _ := sdk.AccAddressFromBech32("xrn:1vkxgpw4xtyeljzvqnxxy84kpa6udqaqw8leqjg")
personalAcc1, _ := sdk.AccAddressFromBech32("xrn:1cnc3nwujeknn6yanjm9m0pfcw02u0c3wuldv6w")
personalAcc2, _ := sdk.AccAddressFromBech32("xrn:1trppuyhpgaa634usnppnpu9p54syyexztwu3mw")
personalAcc3, _ := sdk.AccAddressFromBech32("xrn:188pnchffs8k45h8j8hcyzu400ap0unp3jechy9")
valAddr, _ := sdk.ValAddressFromBech32("xrn:valoper140y8m6r7s40mvmz6g5dqrsrfvfkq5m8c267452")

_, _ = app.bankKeeper.AddCoins(ctx, addr, sdk.Coins{sdk.Coin{Denom: "utree", Amount: sdk.NewInt(100000000)}})
_, _ = app.bankKeeper.AddCoins(ctx, personalAcc1, sdk.Coins{sdk.Coin{Denom: "utree", Amount: sdk.NewInt(100000000)}})
_, _ = app.bankKeeper.AddCoins(ctx, personalAcc2, sdk.Coins{sdk.Coin{Denom: "utree", Amount: sdk.NewInt(100000000)}})
_, _ = app.bankKeeper.AddCoins(ctx, personalAcc3, sdk.Coins{sdk.Coin{Denom: "utree", Amount: sdk.NewInt(100000000)}})
_, _ = app.bankKeeper.SubtractCoins(ctx, addr, sdk.Coins{sdk.Coin{Denom: "utree", Amount: sdk.NewInt(100000000)}})
_, _ = app.bankKeeper.SubtractCoins(ctx, personalAcc1, sdk.Coins{sdk.Coin{Denom: "utree", Amount: sdk.NewInt(100000000)}})
_, _ = app.bankKeeper.SubtractCoins(ctx, personalAcc2, sdk.Coins{sdk.Coin{Denom: "utree", Amount: sdk.NewInt(100000000)}})
_, _ = app.bankKeeper.SubtractCoins(ctx, personalAcc3, sdk.Coins{sdk.Coin{Denom: "utree", Amount: sdk.NewInt(100000000)}})

delegation := stakingTypes.Delegation{
DelegatorAddress: addr,
ValidatorAddress: valAddr,
Shares: sdk.NewDec(100000000),
}

app.stakingKeeper.SetDelegation(ctx, delegation)
app.stakingKeeper.RemoveDelegation(ctx, delegation)

votingParams := gov.NewVotingParams(21600000000000)
votingParams := gov.NewVotingParams(172800000000000)
govSubspace.Set(ctx, gov.ParamStoreKeyVotingParams, &votingParams)
})

Expand Down

0 comments on commit 7bcd890

Please sign in to comment.