Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wire up private cctp repo and router repo #241

Merged
merged 22 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ import (
"github.com/strangelove-ventures/noble/app/upgrades/argon"
"github.com/strangelove-ventures/noble/app/upgrades/argon2"
"github.com/strangelove-ventures/noble/app/upgrades/argon3"
"github.com/strangelove-ventures/noble/app/upgrades/argon4"
"github.com/strangelove-ventures/noble/app/upgrades/neon"
"github.com/strangelove-ventures/noble/app/upgrades/radon"
"github.com/strangelove-ventures/noble/cmd"
Expand Down Expand Up @@ -941,6 +942,14 @@ func (app *App) setupUpgradeHandlers() {
app.RouterKeeper,
),
)
// argon3 upgrade
agouin marked this conversation as resolved.
Show resolved Hide resolved
app.UpgradeKeeper.SetUpgradeHandler(
argon4.UpgradeName,
argon4.CreateUpgradeHandler(
app.mm,
app.configurator,
),
)

upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk()
if err != nil {
Expand All @@ -963,6 +972,8 @@ func (app *App) setupUpgradeHandlers() {
storeLoader = argon2.CreateStoreLoader(upgradeInfo.Height)
case argon3.UpgradeName:
storeLoader = argon3.CreateStoreLoader(upgradeInfo.Height)
case argon4.UpgradeName:
storeLoader = argon3.CreateStoreLoader(upgradeInfo.Height)
agouin marked this conversation as resolved.
Show resolved Hide resolved
}

if storeLoader != nil {
Expand Down
4 changes: 4 additions & 0 deletions app/upgrades/argon4/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package argon4

// UpgradeName is the name of this specific software upgrade used on-chain.
const UpgradeName = "argon4"
13 changes: 13 additions & 0 deletions app/upgrades/argon4/store.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package argon4

import (
"github.com/cosmos/cosmos-sdk/baseapp"
storeTypes "github.com/cosmos/cosmos-sdk/store/types"
upgradeTypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

func CreateStoreLoader(upgradeHeight int64) baseapp.StoreLoader {
storeUpgrades := storeTypes.StoreUpgrades{}

return upgradeTypes.UpgradeStoreLoader(upgradeHeight, &storeUpgrades)
}
18 changes: 18 additions & 0 deletions app/upgrades/argon4/upgrade.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package argon4

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradeTypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
) upgradeTypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradeTypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
// noop upgrade

return mm.RunMigrations(ctx, configurator, vm)
}
}
1 change: 1 addition & 0 deletions interchaintest/upgrade_grand-1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func TestGrand1ChainUpgrade(t *testing.T) {
},
{
// This upgrade is only relevant to the grand-1 testnet
upgradeName: "argon4",
image: nobleImageInfo[0],
postUpgrade: testPostArgonUpgradeTestnet,
},
Expand Down