From 883653af7053450af80719e1cfd93e8309ba7a7d Mon Sep 17 00:00:00 2001 From: Omri Date: Mon, 22 Apr 2024 16:32:44 +0200 Subject: [PATCH 1/5] fix(app): Fixed bech32 on account keeper to not be hardcoded (#54) --- app/app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/app.go b/app/app.go index b303300..a1cbee9 100644 --- a/app/app.go +++ b/app/app.go @@ -334,7 +334,7 @@ func NewRollapp( app.GetSubspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, maccPerms, - sdk.Bech32PrefixAccAddr, //Bech32MainPrefix + sdk.GetConfig().GetBech32AccountAddrPrefix(), ) app.BankKeeper = bankkeeper.NewBaseKeeper( From ed9c6da98f33a9842ae83007b46bc074f67d2152 Mon Sep 17 00:00:00 2001 From: Hoang Do Date: Thu, 25 Apr 2024 18:05:28 +0700 Subject: [PATCH 2/5] feat(ci): Add auto update changelog workflow (#61) Co-authored-by: github-actions --- .github/workflows/changelog.yml | 44 +++++++++++++++++++++ CHANGELOG.md | 69 ++++----------------------------- 2 files changed, 52 insertions(+), 61 deletions(-) create mode 100644 .github/workflows/changelog.yml diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 0000000..5a9a002 --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,44 @@ +# This workflow will add a changelog to the repository when a new commit is pushed to the main branch. +# E.g., manually edit the commit message to align with conventional commit messages, such as: +# feat(database): add new indexing capabilities +# This update introduces advanced indexing options for handling complex queries more efficiently. + +name: Changelog Update + +on: + pull_request: + branches: + - main + types: [opened, synchronize, reopened] + +permissions: write-all + +jobs: + update_changelog: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: "18" + + - name: Install conventional-changelog-cli + run: npm install -g conventional-changelog-cli + + - name: Generate changelog diff + run: | + git fetch origin main:main + conventional-changelog -p angular -i CHANGELOG.md -s -r 0 > changelog_diff.md + echo "::set-output name=changelog::$(cat changelog_diff.md)" + - name: Commit and push changelog update + run: | + git config user.name 'github-actions' + git config user.email 'github-actions@github.com' + git add CHANGELOG.md + git commit -m "Update CHANGELOG.md" + git push origin HEAD:refs/heads/${{ github.head_ref }} diff --git a/CHANGELOG.md b/CHANGELOG.md index c18ccc8..2ca0f8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,71 +1,18 @@ - - - - -# Changelog - -## Unreleased +### Features -### Improvements +* add hub genesis module ([#43](https://github.com/dymensionxyz/rollapp-wasm/issues/43)) ([73b3ceb](https://github.com/dymensionxyz/rollapp-wasm/commit/73b3cebef6c159494f0a4074ef5edb804b82bf0c)) +* Add wasm module for rollapp-wasm ([#10](https://github.com/dymensionxyz/rollapp-wasm/issues/10)) ([9829d4a](https://github.com/dymensionxyz/rollapp-wasm/commit/9829d4a10b9f7928c98151b7295b20f0d54a8ad0)) +* **be:** integrate block explorer Json-RPC server ([#41](https://github.com/dymensionxyz/rollapp-wasm/issues/41)) ([51fd3e3](https://github.com/dymensionxyz/rollapp-wasm/commit/51fd3e36a0404d68325c64f79f65a15afc3be82a)) +* **ci:** add auto update changelog workflow ([25a3ec8](https://github.com/dymensionxyz/rollapp-wasm/commit/25a3ec87506915de2330203bf48c340f3625d983)) -- (deps) [#42](https://github.com/dymensionxyz/rollapp-wasm/issues/42) Bumps `block-explorer-rpc-cosmos v1.0.2` & `wasm-block-explorer-rpc-cosmos v1.0.2` -- (deps) [#45](https://github.com/dymensionxyz/rollapp-wasm/issues/45) Bumps `block-explorer-rpc-cosmos v1.0.3` & `wasm-block-explorer-rpc-cosmos v1.0.3` -### API Breaking -- (deps) [#49](https://github.com/dymensionxyz/rollapp-wasm/issues/49) Bumps `block-explorer-rpc-cosmos v1.1.1` & `wasm-block-explorer-rpc-cosmos v1.1.1` From 5a00d0e42f0bad142b8d9bfa81edd3bceeb695d5 Mon Sep 17 00:00:00 2001 From: ducnt131 <62016666+anhductn2001@users.noreply.github.com> Date: Thu, 25 Apr 2024 18:05:44 +0700 Subject: [PATCH 3/5] feat!: configure bech32prefix in genesis (#59) --- README.md | 1 + app/app.go | 3 +- go.mod | 2 +- go.sum | 6 +-- rollappd/cmd/genaccounts.go | 13 +++-- rollappd/cmd/root.go | 100 +++++++++++++++++++++++++++++++++--- rollappd/cmd/start.go | 1 + 7 files changed, 105 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 45f6611..fdb3f84 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ export the following variables: export EXECUTABLE="rollapp-wasm" export ROLLAPP_CHAIN_ID="rollappwasm_1234-1" export KEY_NAME_ROLLAPP="rol-user" +export BECH32="rol" export BASE_DENOM="awsm" export DENOM=$(echo "$BASE_DENOM" | sed 's/^.//') export MONIKER="$ROLLAPP_CHAIN_ID-sequencer" diff --git a/app/app.go b/app/app.go index a1cbee9..b5dc4fe 100644 --- a/app/app.go +++ b/app/app.go @@ -119,8 +119,7 @@ import ( ) const ( - AccountAddressPrefix = "rol" - Name = "rollapp-wasm" + Name = "rollapp-wasm" ) var ( diff --git a/go.mod b/go.mod index a55287c..6ba33cb 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/bcdevtools/wasm-block-explorer-rpc-cosmos v1.1.1 github.com/cosmos/cosmos-sdk v0.46.16 github.com/cosmos/ibc-go/v6 v6.3.0 - github.com/dymensionxyz/dymension-rdk v1.5.0-beta + github.com/dymensionxyz/dymension-rdk v1.5.0-beta.0.20240423161402-f6997e0d1a5c github.com/dymensionxyz/dymint v1.0.1-alpha.0.20240414124654-eb08e30da2c5 github.com/ethereum/go-ethereum v1.12.0 github.com/gorilla/mux v1.8.1 diff --git a/go.sum b/go.sum index 751e362..41ef9b4 100644 --- a/go.sum +++ b/go.sum @@ -550,12 +550,10 @@ github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQx github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/dymensionxyz/cosmosclient v0.4.2-beta h1:sokBefcN1tIOlUKmB8Q2E9XMJ93LueqtFThiM/kA4DI= github.com/dymensionxyz/cosmosclient v0.4.2-beta/go.mod h1:GQQu3ITEjWfi5ULR2B6X2i2YZNennY1yzcT5qdL4MGI= -github.com/dymensionxyz/dymension-rdk v1.5.0-beta h1:whKxcgcXB3l7rK7F0Vnq0EF0Ri9475CSZTseaUQN6o0= -github.com/dymensionxyz/dymension-rdk v1.5.0-beta/go.mod h1:kzNFKt3yfFzZ2u3+47Nlpobub3/UXsICOg1WmGud3DE= +github.com/dymensionxyz/dymension-rdk v1.5.0-beta.0.20240423161402-f6997e0d1a5c h1:ee4pw3mkuYLQzwhTbiwD5msPvwoDvuCHrEMSBrZMcPc= +github.com/dymensionxyz/dymension-rdk v1.5.0-beta.0.20240423161402-f6997e0d1a5c/go.mod h1:kzNFKt3yfFzZ2u3+47Nlpobub3/UXsICOg1WmGud3DE= github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240411195658-f7cd96f53b56 h1:cmpJYdRviuUfmlJdHrcAND8Jd6JIY4rp63bWAQzPr54= github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240411195658-f7cd96f53b56/go.mod h1:3Pfrr8j/BR9ztNKztGfC5PqDiO6CcrzMLCJtFtPEVW4= -github.com/dymensionxyz/dymint v1.0.1-alpha.0.20240411212116-3cd56c57c597 h1:tIvgP75oCriRaxkOb2KtL8cExX2/QGlZQvY9qxJbr98= -github.com/dymensionxyz/dymint v1.0.1-alpha.0.20240411212116-3cd56c57c597/go.mod h1:0h9bBg5vdTqkAdiWIaKv5UutD98+KUNODDy80dXMW9o= github.com/dymensionxyz/dymint v1.0.1-alpha.0.20240414124654-eb08e30da2c5 h1:7UEyfIyW54zJXUL4hSAJdLol7CkJtD0eL865vLTf9Lg= github.com/dymensionxyz/dymint v1.0.1-alpha.0.20240414124654-eb08e30da2c5/go.mod h1:0h9bBg5vdTqkAdiWIaKv5UutD98+KUNODDy80dXMW9o= github.com/dymensionxyz/evmos/v12 v12.1.6-dymension-v0.3 h1:vmAdUGUc4rTIiO3Phezr7vGq+0uPDVKSA4WAe8+yl6w= diff --git a/rollappd/cmd/genaccounts.go b/rollappd/cmd/genaccounts.go index c9d25a4..43a6f85 100644 --- a/rollappd/cmd/genaccounts.go +++ b/rollappd/cmd/genaccounts.go @@ -16,8 +16,7 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" authvesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/cosmos-sdk/x/genutil" - genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + tmos "github.com/tendermint/tendermint/libs/os" ) const ( @@ -128,7 +127,7 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa } genFile := config.GenesisFile() - appState, genDoc, err := genutiltypes.GenesisStateFromGenFile(genFile) + appState, genDoc, err := GenesisStateFromGenFile(genFile) if err != nil { return fmt.Errorf("failed to unmarshal genesis state: %w", err) } @@ -186,13 +185,13 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa } appState[banktypes.ModuleName] = bankGenStateBz - appStateJSON, err := json.Marshal(appState) + genDoc["app_state"] = appState + genDocBytes, err := json.MarshalIndent(genDoc, "", " ") if err != nil { - return fmt.Errorf("failed to marshal application genesis state: %w", err) + return err } - genDoc.AppState = appStateJSON - return genutil.ExportGenesisFile(genDoc, genFile) + return tmos.WriteFile(genFile, genDocBytes, 0o644) }, } diff --git a/rollappd/cmd/root.go b/rollappd/cmd/root.go index 84f5c34..d6f4af5 100644 --- a/rollappd/cmd/root.go +++ b/rollappd/cmd/root.go @@ -1,7 +1,9 @@ package cmd import ( + "encoding/json" "errors" + "fmt" "io" "os" @@ -28,6 +30,7 @@ import ( tmcfg "github.com/tendermint/tendermint/config" tmcli "github.com/tendermint/tendermint/libs/cli" tmlog "github.com/tendermint/tendermint/libs/log" + tmos "github.com/tendermint/tendermint/libs/os" dbm "github.com/tendermint/tm-db" "github.com/CosmWasm/wasmd/x/wasm" @@ -36,6 +39,7 @@ import ( berpcconfig "github.com/bcdevtools/block-explorer-rpc-cosmos/be_rpc/config" rdkserver "github.com/dymensionxyz/dymension-rdk/server" "github.com/dymensionxyz/dymension-rdk/utils" + rdk_genutilcli "github.com/dymensionxyz/dymension-rdk/x/genutil/client/cli" dymintconf "github.com/dymensionxyz/dymint/config" "github.com/dymensionxyz/rollapp-wasm/app" "github.com/dymensionxyz/rollapp-wasm/app/params" @@ -106,6 +110,18 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { //create Block Explorer Json-RPC toml config file berpcconfig.EnsureRoot(home, berpcconfig.DefaultBeJsonRpcConfig()) + // Set config + sdkconfig := sdk.GetConfig() + cfg := serverCtx.Config + genFile := cfg.GenesisFile() + if tmos.FileExists(genFile) { + genDoc, _ := GenesisDocFromFile(genFile) + utils.SetPrefixes(sdkconfig, genDoc["bech32_prefix"].(string)) + } else { + utils.SetPrefixes(sdkconfig, "rol") + } + sdkconfig.Seal() + return nil }, } @@ -144,17 +160,38 @@ func initRootCmd( rootCmd *cobra.Command, encodingConfig params.EncodingConfig, ) { - // Set config - sdkconfig := sdk.GetConfig() - utils.SetPrefixes(sdkconfig, app.AccountAddressPrefix) - sdkconfig.Seal() - ac := appCreator{ encCfg: encodingConfig, } + + initCmd := genutilcli.InitCmd(app.ModuleBasics, app.DefaultNodeHome) + initCmd.Flags().String(FlagBech32Prefix, "rol", "set bech32 prefix for rollapp, if left blank default value is 'rol'") + + initCmd.PostRunE = func(cmd *cobra.Command, args []string) error { + prefix, _ := initCmd.Flags().GetString(FlagBech32Prefix) + + serverCtx := server.GetServerContextFromCmd(cmd) + config := serverCtx.Config + path := config.GenesisFile() + + genDoc, err := GenesisDocFromFile(path) + if err != nil { + fmt.Println("Failed to read genesis doc from file", err) + } + + genDoc["bech32_prefix"] = prefix + + genDocBytes, err := json.MarshalIndent(genDoc, "", " ") + if err != nil { + return err + } + return tmos.WriteFile(path, genDocBytes, 0o644) + + } + rootCmd.AddCommand( - genutilcli.InitCmd(app.ModuleBasics, app.DefaultNodeHome), - genutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome), + initCmd, + rdk_genutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome), genutilcli.MigrateGenesisCmd(), genutilcli.GenTxCmd(app.ModuleBasics, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome), @@ -306,3 +343,52 @@ func (ac appCreator) appExport( return rollapp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs) } + +// GenesisStateFromGenFile creates the core parameters for genesis initialization +// for the application. +// +// NOTE: The pubkey input is this machines pubkey. +func GenesisStateFromGenFile(genFile string) (genesisState map[string]json.RawMessage, genDoc map[string]interface{}, err error) { + if !tmos.FileExists(genFile) { + return genesisState, genDoc, + fmt.Errorf("%s does not exist, run `init` first", genFile) + } + + genDoc, err = GenesisDocFromFile(genFile) + if err != nil { + return genesisState, genDoc, err + } + + bz, err := json.Marshal(genDoc["app_state"]) + if err != nil { + return genesisState, genDoc, err + } + + err = json.Unmarshal(bz, &genesisState) + return genesisState, genDoc, err +} + +// GenesisDocFromFile reads JSON data from a file and unmarshalls it into a GenesisDoc. +func GenesisDocFromFile(genDocFile string) (map[string]interface{}, error) { + jsonBlob, err := os.ReadFile(genDocFile) + if err != nil { + return nil, fmt.Errorf("couldn't read GenesisDoc file: %w", err) + } + + genDoc, err := GenesisDocFromJSON(jsonBlob) + if err != nil { + return nil, fmt.Errorf("error reading GenesisDoc at %s: %w", genDocFile, err) + } + return genDoc, nil +} + +// GenesisDocFromJSON unmarshalls JSON data into a GenesisDoc. +func GenesisDocFromJSON(jsonBlob []byte) (map[string]interface{}, error) { + genDoc := make(map[string]interface{}) + err := json.Unmarshal(jsonBlob, &genDoc) + if err != nil { + return nil, err + } + + return genDoc, err +} diff --git a/rollappd/cmd/start.go b/rollappd/cmd/start.go index 7179df3..cc6584c 100644 --- a/rollappd/cmd/start.go +++ b/rollappd/cmd/start.go @@ -65,6 +65,7 @@ const ( FlagUnsafeSkipUpgrades = "unsafe-skip-upgrades" FlagTrace = "trace" FlagInvCheckPeriod = "inv-check-period" + FlagBech32Prefix = "bech32-prefix" FlagPruning = "pruning" FlagPruningKeepRecent = "pruning-keep-recent" From a4451eaebd11eb49c89a40c239f6dd8593f201d1 Mon Sep 17 00:00:00 2001 From: zale144 Date: Thu, 25 Apr 2024 13:06:15 +0200 Subject: [PATCH 4/5] feat(app): Add modules authz and feegrant (#60) --- app/app.go | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/app/app.go b/app/app.go index b5dc4fe..2c4c15f 100644 --- a/app/app.go +++ b/app/app.go @@ -8,6 +8,9 @@ import ( "path/filepath" "strings" + "github.com/cosmos/cosmos-sdk/x/authz" + authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" + authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module" "github.com/gorilla/mux" "github.com/rakyll/statik/fs" abci "github.com/tendermint/tendermint/abci/types" @@ -26,7 +29,7 @@ import ( "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" - simapp "github.com/cosmos/cosmos-sdk/simapp" + "github.com/cosmos/cosmos-sdk/simapp" "github.com/cosmos/cosmos-sdk/store/streaming" storetypes "github.com/cosmos/cosmos-sdk/store/types" @@ -51,6 +54,9 @@ import ( capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" distrclient "github.com/cosmos/cosmos-sdk/x/distribution/client" distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + "github.com/cosmos/cosmos-sdk/x/feegrant" + feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper" + feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" @@ -97,7 +103,7 @@ import ( ibckeeper "github.com/cosmos/ibc-go/v6/modules/core/keeper" ibctestingtypes "github.com/cosmos/ibc-go/v6/testing/types" - wasm "github.com/CosmWasm/wasmd/x/wasm" + "github.com/CosmWasm/wasmd/x/wasm" wasmclient "github.com/CosmWasm/wasmd/x/wasm/client" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" @@ -107,7 +113,7 @@ import ( // unnamed import of statik for swagger UI support _ "github.com/cosmos/cosmos-sdk/client/docs/statik" - staking "github.com/dymensionxyz/dymension-rdk/x/staking" + "github.com/dymensionxyz/dymension-rdk/x/staking" stakingkeeper "github.com/dymensionxyz/dymension-rdk/x/staking/keeper" "github.com/dymensionxyz/dymension-rdk/x/sequencers" @@ -124,7 +130,8 @@ const ( var ( kvstorekeys = []string{ - authtypes.StoreKey, banktypes.StoreKey, + authtypes.StoreKey, authzkeeper.StoreKey, + feegrant.StoreKey, banktypes.StoreKey, stakingtypes.StoreKey, seqtypes.StoreKey, minttypes.StoreKey, distrtypes.StoreKey, govtypes.StoreKey, paramstypes.StoreKey, @@ -158,6 +165,7 @@ var ( // and genesis verification. ModuleBasics = module.NewBasicManager( auth.AppModuleBasic{}, + authzmodule.AppModuleBasic{}, genutil.AppModuleBasic{}, bank.AppModuleBasic{}, capability.AppModuleBasic{}, @@ -168,6 +176,7 @@ var ( distr.AppModuleBasic{}, gov.NewAppModuleBasic(getGovProposalHandlers()), params.AppModuleBasic{}, + feegrantmodule.AppModuleBasic{}, upgrade.AppModuleBasic{}, ibc.AppModuleBasic{}, ibctransfer.AppModuleBasic{}, @@ -179,6 +188,7 @@ var ( // module account permissions maccPerms = map[string][]string{ authtypes.FeeCollectorName: nil, + authz.ModuleName: nil, distrtypes.ModuleName: nil, minttypes.ModuleName: {authtypes.Minter}, stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, @@ -223,6 +233,7 @@ type App struct { // keepers AccountKeeper authkeeper.AccountKeeper + AuthzKeeper authzkeeper.Keeper BankKeeper bankkeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper StakingKeeper stakingkeeper.Keeper @@ -237,6 +248,7 @@ type App struct { IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly TransferKeeper ibctransferkeeper.Keeper WasmKeeper wasmkeeper.Keeper + FeeGrantKeeper feegrantkeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper @@ -336,6 +348,13 @@ func NewRollapp( sdk.GetConfig().GetBech32AccountAddrPrefix(), ) + app.AuthzKeeper = authzkeeper.NewKeeper( + keys[authzkeeper.StoreKey], + appCodec, + app.MsgServiceRouter(), + app.AccountKeeper, + ) + app.BankKeeper = bankkeeper.NewBaseKeeper( appCodec, keys[banktypes.StoreKey], @@ -372,6 +391,7 @@ func NewRollapp( &stakingKeeper, &app.SequencersKeeper, authtypes.FeeCollectorName, app.ModuleAccountAddrs(), ) + app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper) app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp, authtypes.NewModuleAddress(govtypes.ModuleName).String()) // register the staking hooks @@ -497,9 +517,11 @@ func NewRollapp( encodingConfig.TxConfig, ), auth.NewAppModule(appCodec, app.AccountKeeper, nil), + authzmodule.NewAppModule(appCodec, app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper), capability.NewAppModule(appCodec, *app.CapabilityKeeper), + feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), gov.NewAppModule(appCodec, app.GovKeeper, app.AccountKeeper, app.BankKeeper), mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, app.BankKeeper), distr.NewAppModule(appCodec, app.DistrKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper), @@ -532,9 +554,11 @@ func NewRollapp( ibchost.ModuleName, ibctransfertypes.ModuleName, authtypes.ModuleName, + authz.ModuleName, banktypes.ModuleName, govtypes.ModuleName, genutiltypes.ModuleName, + feegrant.ModuleName, epochstypes.ModuleName, paramstypes.ModuleName, hubgentypes.ModuleName, @@ -548,11 +572,13 @@ func NewRollapp( seqtypes.ModuleName, capabilitytypes.ModuleName, authtypes.ModuleName, + authz.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, vestingtypes.ModuleName, minttypes.ModuleName, genutiltypes.ModuleName, + feegrant.ModuleName, epochstypes.ModuleName, paramstypes.ModuleName, upgradetypes.ModuleName, @@ -572,6 +598,7 @@ func NewRollapp( initGenesisList := []string{ capabilitytypes.ModuleName, authtypes.ModuleName, + authz.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, stakingtypes.ModuleName, @@ -585,6 +612,7 @@ func NewRollapp( paramstypes.ModuleName, upgradetypes.ModuleName, ibctransfertypes.ModuleName, + feegrant.ModuleName, hubgentypes.ModuleName, wasm.ModuleName, } @@ -671,6 +699,7 @@ func (app *App) setAnteHandler(txConfig client.TxConfig, wasmConfig wasmtypes.Wa HandlerOptions: ante.HandlerOptions{ AccountKeeper: app.AccountKeeper, BankKeeper: app.BankKeeper, + FeegrantKeeper: app.FeeGrantKeeper, SignModeHandler: txConfig.SignModeHandler(), SigGasConsumer: ante.DefaultSigVerificationGasConsumer, }, @@ -717,7 +746,7 @@ func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.Res panic(err) } - //Passing the dymint sequencers to the sequencer module from RequestInitChain + // Passing the dymint sequencers to the sequencer module from RequestInitChain if len(req.Validators) == 0 { panic(fmt.Sprint("Dymint have no sequencers defined on InitChain, req:", req)) } From 6c4a2b674527476ad08e790dfd4b41ef18f086e3 Mon Sep 17 00:00:00 2001 From: Omri Date: Fri, 26 Apr 2024 08:54:11 +0200 Subject: [PATCH 5/5] fix: updated IBC Keeper to use the sequencer keeper. (#63) --- CHANGELOG.md | 3 ++- app/app.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ca0f8f..7cccc53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,8 +11,9 @@ * add hub genesis module ([#43](https://github.com/dymensionxyz/rollapp-wasm/issues/43)) ([73b3ceb](https://github.com/dymensionxyz/rollapp-wasm/commit/73b3cebef6c159494f0a4074ef5edb804b82bf0c)) * Add wasm module for rollapp-wasm ([#10](https://github.com/dymensionxyz/rollapp-wasm/issues/10)) ([9829d4a](https://github.com/dymensionxyz/rollapp-wasm/commit/9829d4a10b9f7928c98151b7295b20f0d54a8ad0)) +* **app:** Add modules authz and feegrant ([#60](https://github.com/dymensionxyz/rollapp-wasm/issues/60)) ([a4451ea](https://github.com/dymensionxyz/rollapp-wasm/commit/a4451eaebd11eb49c89a40c239f6dd8593f201d1)) * **be:** integrate block explorer Json-RPC server ([#41](https://github.com/dymensionxyz/rollapp-wasm/issues/41)) ([51fd3e3](https://github.com/dymensionxyz/rollapp-wasm/commit/51fd3e36a0404d68325c64f79f65a15afc3be82a)) -* **ci:** add auto update changelog workflow ([25a3ec8](https://github.com/dymensionxyz/rollapp-wasm/commit/25a3ec87506915de2330203bf48c340f3625d983)) +* **ci:** Add auto update changelog workflow ([#61](https://github.com/dymensionxyz/rollapp-wasm/issues/61)) ([ed9c6da](https://github.com/dymensionxyz/rollapp-wasm/commit/ed9c6da98f33a9842ae83007b46bc074f67d2152)) diff --git a/app/app.go b/app/app.go index 2c4c15f..df6e3ad 100644 --- a/app/app.go +++ b/app/app.go @@ -410,7 +410,7 @@ func NewRollapp( ) app.IBCKeeper = ibckeeper.NewKeeper( - appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper, + appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), &app.SequencersKeeper, app.UpgradeKeeper, scopedIBCKeeper, ) // Register the proposal types