generated from dymensionxyz/rollapp
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into release/v3.0.x
- Loading branch information
Showing
18 changed files
with
744 additions
and
33 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Generate Genesis Template | ||
on: ["push"] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: Generate Genesis Template | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.23.1" | ||
|
||
- name: Install Dasel | ||
run: | | ||
curl -sSLf https://github.com/TomWright/dasel/releases/latest/download/dasel_linux_amd64 -o /usr/local/bin/dasel | ||
chmod +x /usr/local/bin/dasel | ||
- name: Generate genesis template mainnet | ||
run: make generate-genesis env=mainnet | ||
env: | ||
BECH32_PREFIX: ethm | ||
|
||
- name: Generate genesis template testnet | ||
run: make generate-genesis env=testnet | ||
env: | ||
BECH32_PREFIX: ethm |
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
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
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
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
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,17 @@ | ||
package drs3 | ||
|
||
import ( | ||
storetypes "github.com/cosmos/cosmos-sdk/store/types" | ||
|
||
"github.com/dymensionxyz/rollapp-evm/app/upgrades" | ||
) | ||
|
||
const ( | ||
UpgradeName = "drs-3" | ||
) | ||
|
||
var Upgrade = upgrades.Upgrade{ | ||
Name: UpgradeName, | ||
CreateHandler: CreateUpgradeHandler, | ||
StoreUpgrades: storetypes.StoreUpgrades{}, | ||
} |
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,33 @@ | ||
package drs3 | ||
|
||
import ( | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" | ||
rollappparamskeeper "github.com/dymensionxyz/dymension-rdk/x/rollappparams/keeper" | ||
evmkeeper "github.com/evmos/evmos/v12/x/evm/keeper" | ||
|
||
drs2 "github.com/dymensionxyz/rollapp-evm/app/upgrades/drs-2" | ||
) | ||
|
||
func CreateUpgradeHandler( | ||
rpKeeper rollappparamskeeper.Keeper, | ||
evmKeeper *evmkeeper.Keeper, | ||
mm *module.Manager, | ||
configurator module.Configurator, | ||
) upgradetypes.UpgradeHandler { | ||
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { | ||
if rpKeeper.GetParams(ctx).DrsVersion == 1 { | ||
// first run drs-2 migration | ||
if err := drs2.HandleUpgrade(ctx, rpKeeper, evmKeeper); err != nil { | ||
return nil, err | ||
} | ||
} | ||
// upgrade drs to 3 | ||
err := rpKeeper.SetVersion(ctx, uint32(3)) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return mm.RunMigrations(ctx, configurator, fromVM) | ||
} | ||
} |
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
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
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
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
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
Oops, something went wrong.