diff --git a/app/upgrades.go b/app/upgrades.go index 6407fcbd..a40a9cfe 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -14,6 +14,7 @@ import ( v410 "github.com/jackalLabs/canine-chain/v4/app/upgrades/v410" "github.com/jackalLabs/canine-chain/v4/app/upgrades/v410beta" "github.com/jackalLabs/canine-chain/v4/app/upgrades/v410testnet" + v420 "github.com/jackalLabs/canine-chain/v4/app/upgrades/v420" "github.com/jackalLabs/canine-chain/v4/app/upgrades/v4alpha1" "github.com/jackalLabs/canine-chain/v4/app/upgrades/v4alpha3" "github.com/jackalLabs/canine-chain/v4/app/upgrades/v4alpha5" @@ -38,6 +39,7 @@ func (app *JackalApp) registerMainnetUpgradeHandlers() { app.registerUpgrade(v3.NewUpgrade(app.mm, app.configurator, app.StorageKeeper)) app.registerUpgrade(v4.NewUpgrade(app.mm, app.configurator, &app.StorageKeeper, &app.FileTreeKeeper, app.BankKeeper)) app.registerUpgrade(v410.NewUpgrade(app.mm, app.configurator, &app.StorageKeeper)) + app.registerUpgrade(v420.NewUpgrade(app.mm, app.configurator)) } // registerUpgrade registers the given upgrade to be supported by the app diff --git a/app/upgrades/v420/upgrades.go b/app/upgrades/v420/upgrades.go new file mode 100644 index 00000000..bafb4fba --- /dev/null +++ b/app/upgrades/v420/upgrades.go @@ -0,0 +1,44 @@ +package v420 + +import ( + storetypes "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + "github.com/jackalLabs/canine-chain/v4/app/upgrades" +) + +var _ upgrades.Upgrade = &Upgrade{} + +type Upgrade struct { + mm *module.Manager + configurator module.Configurator +} + +// NewUpgrade returns a new Upgrade instance +func NewUpgrade(mm *module.Manager, configurator module.Configurator) *Upgrade { + return &Upgrade{ + mm: mm, + configurator: configurator, + } +} + +// Name implements upgrades.Upgrade +func (u *Upgrade) Name() string { + return "v420" +} + +// Handler implements upgrades.Upgrade +func (u *Upgrade) Handler() upgradetypes.UpgradeHandler { + return func(_ sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + return fromVM, nil + } +} + +// StoreUpgrades implements upgrades.Upgrade +func (u *Upgrade) StoreUpgrades() *storetypes.StoreUpgrades { + return &storetypes.StoreUpgrades{ + Added: []string{}, + Deleted: []string{}, + } +} diff --git a/go.mod b/go.mod index ddbf6d62..82e0dfb8 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.22.2 require ( github.com/CosmWasm/wasmd v0.32.0 - github.com/CosmWasm/wasmvm v1.2.6 + github.com/CosmWasm/wasmvm v1.2.6 github.com/cosmos/cosmos-sdk v0.45.17 github.com/cosmos/ibc-go/v4 v4.6.0 github.com/ecies/go/v2 v2.0.6 @@ -165,7 +165,7 @@ replace ( github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 // using jackal labs free post proof ante handler - better way to do this in the future. - github.com/cosmos/cosmos-sdk => github.com/JackalLabs/cosmos-sdk-new v0.45.17-0.20230704034202-b88b1fbc9b2f + github.com/cosmos/cosmos-sdk => github.com/JackalLabs/cosmos-sdk-new v0.45.17-0.20241017203511-c9e1d384026b //github.com/cosmos/cosmos-sdk => ../cosmos-sdk diff --git a/go.sum b/go.sum index ff0aeca7..f300172c 100644 --- a/go.sum +++ b/go.sum @@ -84,8 +84,8 @@ github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/JackalLabs/cosmos-sdk-new v0.45.17-0.20230704034202-b88b1fbc9b2f h1:yiMZXfLKf8j60mcc78EGd4JthE23WAwxOC0UgQt6Mww= -github.com/JackalLabs/cosmos-sdk-new v0.45.17-0.20230704034202-b88b1fbc9b2f/go.mod h1:bScuNwWAP0TZJpUf+SHXRU3xGoUPp+X9nAzfeIXts40= +github.com/JackalLabs/cosmos-sdk-new v0.45.17-0.20241017203511-c9e1d384026b h1:/HaA3Wh4Dz8dXHhBX6fBYPnWwuorgXEl/lDIQNL4j60= +github.com/JackalLabs/cosmos-sdk-new v0.45.17-0.20241017203511-c9e1d384026b/go.mod h1:bScuNwWAP0TZJpUf+SHXRU3xGoUPp+X9nAzfeIXts40= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=