Skip to content

Commit

Permalink
ci: update setup handler (#653)
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmic-vagabond authored Jul 16, 2024
1 parent d6a3881 commit a5ba1a0
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions app/setup_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func setUpgradeHandler(app *ElysApp) {
func(ctx sdk.Context, plan upgradetypes.Plan, vm m.VersionMap) (m.VersionMap, error) {
app.Logger().Info("Running upgrade handler for " + version.Version)

if version.Version == "v0.38.0" || version.Version == "v999.999.999" {
if version.Version == "v0.38.2" || version.Version == "v999.999.999" {
// Retrieve the wasm module store key
storeKey := app.keys[wasmmodule.StoreKey]

Expand All @@ -33,12 +33,24 @@ func setUpgradeHandler(app *ElysApp) {

// List of prefixes to clear
prefixes := [][]byte{
// Account History contract
wasmtypes.GetContractStorePrefix(sdk.MustAccAddressFromBech32("elys1s37xz7tzrru2cpl96juu9lfqrsd4jh73j9slyv440q5vttx2uyesetjpne")),
wasmtypes.GetContractStorePrefix(sdk.MustAccAddressFromBech32("elys1s37xz7tzrru2cpl96juu9lfqrsd4jh73j9slyv440q5vttx2uyesetjpne")), // AH
wasmtypes.GetContractStorePrefix(sdk.MustAccAddressFromBech32("elys1x8gwn06l85q0lyncy7zsde8zzdn588k2dck00a8j6lkprydcutwqa9tv6n")), // old contract
wasmtypes.GetContractStorePrefix(sdk.MustAccAddressFromBech32("elys1657pee2jhf4jk8pq6yq64e758ngvum45gl866knmjkd83w6jgn3s923j5j")), // old contract
wasmtypes.GetContractStorePrefix(sdk.MustAccAddressFromBech32("elys1xhcxq4fvxth2hn3msmkpftkfpw73um7s4et3lh4r8cfmumk3qsmsmgjjrc")), // old contract
wasmtypes.GetContractStorePrefix(sdk.MustAccAddressFromBech32("elys1wr6vc3g4caz9aclgjacxewr0pjlre9wl2uhq73rp8mawwmqaczsq3ppn83")), // old contract
wasmtypes.GetContractStorePrefix(sdk.MustAccAddressFromBech32("elys15m728qxvtat337jdu2f0uk6pu905kktrxclgy36c0wd822tpxcmqfzew4d")), // old contract
wasmtypes.GetContractStorePrefix(sdk.MustAccAddressFromBech32("elys1ul4msjc3mmaxsscdgdtjds85rg50qrepvrczp0ldgma5mm9xv8yqxhk8nu")), // old contract
wasmtypes.GetContractStorePrefix(sdk.MustAccAddressFromBech32("elys1mx32w9tnfxv0z5j000750h8ver7qf3xpj09w3uzvsr3hq68f4hxqte4gam")), // old contract
wasmtypes.GetContractStorePrefix(sdk.MustAccAddressFromBech32("elys14zykjnz94dr9nj4v2yzpvnlrw5uurk5h7d5w0wug902vxdynm6xsue684e")), // old contract
wasmtypes.GetContractStorePrefix(sdk.MustAccAddressFromBech32("elys175r6y463k8cdcte6dzrxydxnwfkhz9afdghzcjxxhzfmm6rgu64qdp9z37")), // old contract
wasmtypes.GetContractStorePrefix(sdk.MustAccAddressFromBech32("elys1jyhyqjxf3pc7vzwyqhwe53up5pj0e53zw3xu2589uqgkvqngswnqtxfw4e")), // old contract
wasmtypes.GetContractStorePrefix(sdk.MustAccAddressFromBech32("elys14see2dq4nu37yk9qhjn2laqxrmzzjyxwhfgnxw4nuzpm7vc6ztysxjv4p5")), // old contract
wasmtypes.GetContractStorePrefix(sdk.MustAccAddressFromBech32("elys15qe27v4z7j78g5g4ak2ftftky3c078zvtr9qtv5lhxwc54ccf4asggmyyp")), // old contract
wasmtypes.GetContractStorePrefix(sdk.MustAccAddressFromBech32("elys193dzg6ealfymax4pyrkge60swlr2tjupwegdemgalzhkkxc8kzyqh5qw9c")), // old contract
}

// Add old code keys to the list of prefixes to clear
for i := uint64(1); i < 671; i++ {
for i := uint64(1); i < 675; i++ {
codeKey := wasmtypes.GetCodeKey(i)
// append the code key to the prefixes
prefixes = append(prefixes, codeKey)
Expand Down

0 comments on commit a5ba1a0

Please sign in to comment.