Skip to content

Commit

Permalink
build(deps): upgrade rdk v1.1.0-rc01 (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
omritoptix authored Apr 25, 2024
1 parent f4726f1 commit 0ef3a9b
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 41 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export EXECUTABLE="rollapp-evm"
export ROLLAPP_CHAIN_ID="rollappevm_1234-1"
export KEY_NAME_ROLLAPP="rol-user"
export BASE_DENOM="arax"
export BECH32="rol"
export BECH32="ethm"
export DENOM=$(echo "$BASE_DENOM" | sed 's/^.//')
export MONIKER="$ROLLAPP_CHAIN_ID-sequencer"

Expand Down Expand Up @@ -182,7 +182,7 @@ rollapp-evm start
### Install dymension relayer

```shell
git clone https://github.com/dymensionxyz/go-relayer.git --branch v0.2.0-v2.3.1-relayer
git clone https://github.com/dymensionxyz/go-relayer.git --branch v0.3.0-v2.5.2-relayer
cd go-relayer && make install
```

Expand Down
7 changes: 3 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ func NewRollapp(
AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)).
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)).
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)).
AddRoute(seqtypes.RouterKey, sequencers.NewUpdatePermissionProposalHandler(&app.SequencersKeeper)).
AddRoute(erc20types.RouterKey, erc20.NewErc20ProposalHandler(&app.Erc20Keeper))

govConfig := govtypes.DefaultConfig()
Expand Down Expand Up @@ -533,10 +534,10 @@ func NewRollapp(
app.DenomMetadataKeeper = denommetadatamodulekeeper.NewKeeper(
appCodec,
keys[denommetadatamoduletypes.StoreKey],
app.SequencersKeeper,
app.BankKeeper,
app.TransferKeeper,
denomMetadataHooks,
app.GetSubspace(denommetadatamoduletypes.ModuleName),
)

app.TransferKeeper = transferkeeper.NewKeeper(
Expand All @@ -550,8 +551,8 @@ func NewRollapp(
app.HubGenesisKeeper = hubgenkeeper.NewKeeper(
appCodec,
keys[hubgentypes.StoreKey],
app.GetSubspace(hubgentypes.ModuleName),
app.IBCKeeper.ChannelKeeper,
app.SequencersKeeper,
app.BankKeeper,
app.AccountKeeper,
)
Expand Down Expand Up @@ -1023,14 +1024,12 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govv1.ParamKeyTable())
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibchost.ModuleName)
paramsKeeper.Subspace(hubgentypes.ModuleName)

// ethermint subspaces
paramsKeeper.Subspace(evmtypes.ModuleName)
paramsKeeper.Subspace(feemarkettypes.ModuleName)
// evmos subspaces
paramsKeeper.Subspace(erc20types.ModuleName)
paramsKeeper.Subspace(denommetadatamoduletypes.ModuleName)

return paramsKeeper
}
5 changes: 2 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ require (
github.com/bcdevtools/evm-block-explorer-rpc-cosmos v1.1.1-de
github.com/cosmos/cosmos-sdk v0.46.16
github.com/cosmos/ibc-go/v6 v6.2.1
github.com/dymensionxyz/dymension-rdk v1.5.0-beta.0.20240425145314-226329f9f918
github.com/dymensionxyz/dymint v1.0.1-alpha.0.20240421140132-71ee964252d1
github.com/dymensionxyz/dymension-rdk v1.1.0-rc01
github.com/dymensionxyz/dymint v1.1.0-rc01
github.com/ethereum/go-ethereum v1.10.26
github.com/evmos/ethermint v0.22.0
github.com/gorilla/mux v1.8.1
Expand Down Expand Up @@ -262,7 +262,6 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.15.0 // indirect
github.com/status-im/keycard-go v0.2.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/stretchr/testify v1.8.4 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
Expand Down
10 changes: 4 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -549,14 +549,12 @@ 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.0.20240421130646-b8980ec7aade h1:LHbwDuI4hPNGSA+gWQz4ev0xt8p+ztPLEcZWR7e5YzA=
github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20240421130646-b8980ec7aade/go.mod h1:UxhLdtWOWg7l6+5Hpkm39Khd23wcr5H62YxM04rMbh8=
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-rdk v1.5.0-beta.0.20240425145314-226329f9f918 h1:GVG2zs9iAK1vlS0ougDO4wYX+8kte9gbEMB51sBLXPk=
github.com/dymensionxyz/dymension-rdk v1.5.0-beta.0.20240425145314-226329f9f918/go.mod h1:kzNFKt3yfFzZ2u3+47Nlpobub3/UXsICOg1WmGud3DE=
github.com/dymensionxyz/dymension-rdk v1.1.0-rc01 h1:GdJETiqMWTrlW8g7KVeiZ4JvYdbSAx+3TGhvWrzGacc=
github.com/dymensionxyz/dymension-rdk v1.1.0-rc01/go.mod h1:17+Fcqq3VXwWwhBshPxlLe3WzPEwdl4zDEYEiP5SiZ8=
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.20240421140132-71ee964252d1 h1:LfliShxbxcazXnkZIIttsbFukfo5keTXFbsP+DS0sNY=
github.com/dymensionxyz/dymint v1.0.1-alpha.0.20240421140132-71ee964252d1/go.mod h1:QSXwtiNaxGQLguAsDMubrr18fY4ss72sEBVOu+nVLj8=
github.com/dymensionxyz/dymint v1.1.0-rc01 h1:kiN+HSXOMi7V3cVOPvjrWTRIS0kyKJnooJ1T8v/2umk=
github.com/dymensionxyz/dymint v1.1.0-rc01/go.mod h1:QSXwtiNaxGQLguAsDMubrr18fY4ss72sEBVOu+nVLj8=
github.com/dymensionxyz/ethermint v0.22.0-dymension-v0.4.1.0.20240425133751-6d4e0eb538c0 h1:qv+ZyOSgkbKmJ7AZ8Bdznyn6UfGMY70RuBzGwA4QLes=
github.com/dymensionxyz/ethermint v0.22.0-dymension-v0.4.1.0.20240425133751-6d4e0eb538c0/go.mod h1:I4zuwDF3uFyjBpP7EFwc6szdCP9yqOQ/cwjoa0oL6/E=
github.com/dymensionxyz/go-libp2p-pubsub v0.0.0-20231219183151-4504d4995913 h1:sR3nGYRlktL2Xfj5pcOhgG2bvlBOZ14meqdu2TKkSCU=
Expand Down
3 changes: 1 addition & 2 deletions ra_evm_be_rpc/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package backend

import (
"context"

"github.com/bcdevtools/block-explorer-rpc-cosmos/be_rpc/config"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/server"
hubgentypes "github.com/dymensionxyz/dymension-rdk/x/hub-genesis/types"
sequencerstypes "github.com/dymensionxyz/dymension-rdk/x/sequencers/types"
raeberpctypes "github.com/dymensionxyz/rollapp-evm/ra_evm_be_rpc/types"
"github.com/tendermint/tendermint/libs/log"
Expand All @@ -15,7 +15,6 @@ type RollAppEvmBackendI interface {
// Misc

GetSequencersModuleParams() (*sequencerstypes.Params, error)
GetHubGenesisModuleParams() (*hubgentypes.Params, error)
}

var _ RollAppEvmBackendI = (*RollAppEvmBackend)(nil)
Expand Down
13 changes: 0 additions & 13 deletions ra_evm_be_rpc/backend/hub_genesis.go

This file was deleted.

7 changes: 0 additions & 7 deletions ra_evm_be_rpc/backend/rollapp_evm_interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ func (m *RollAppEvmRequestInterceptor) GetModuleParams(moduleName string) (inter
} else {
params = *sequencersParams
}
case "hub-genesis":
hubGenesisParams, errFetch := m.backend.GetHubGenesisModuleParams()
if errFetch != nil {
err = errors.Wrap(errFetch, "failed to get hub genesis params")
} else {
params = *hubGenesisParams
}
default:
return m.defaultInterceptor.GetModuleParams(moduleName)
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/ibc/rollapp.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"type": "cosmos",
"value": {
"key": "relayer-rollapp-key",
"chain-id": "rollappevm_4321-1",
"rpc-addr": "http://127.0.0.1:26657",
"chain-id": "rollappevm_9988-1",
"rpc-addr": "tcp://localhost:26657",
"account-prefix": "ethm",
"keyring-backend": "test",
"gas-adjustment": 1.2,
Expand Down
11 changes: 9 additions & 2 deletions scripts/update_genesis_file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,19 @@ jq '.app_state.bank.supply[0].amount = "2000060000000000000000000000"' "$GENESIS

# ---------------------------- add elevated account ---------------------------- #
elevated_address=$("$EXECUTABLE" keys show "$KEY_NAME_ROLLAPP" --keyring-backend test --output json | jq -r .address)

elevated_address_json=$(jq -n \
--arg address "$elevated_address" \
'[{
"address": $address
"address": $address,
"permission_list": {
"permissions": [
"hubgenesis",
"denommetadata"
]
}
}]')
jq --argjson elevated_address_json "$elevated_address_json" '.app_state.hubgenesis.params.genesis_triggerer_allowlist += $elevated_address_json' "$GENESIS_FILE" >"$tmp" && mv "$tmp" "$GENESIS_FILE"
jq --argjson elevated_address_json "$elevated_address_json" '.app_state.sequencers.address_permissions += $elevated_address_json' "$GENESIS_FILE" >"$tmp" && mv "$tmp" "$GENESIS_FILE"

# ---------------------------- add denom metadata ---------------------------- #
denom_metadata=$(cat "$ROLLAPP_SETTLEMENT_INIT_DIR_PATH"/denommetadata.json)
Expand Down

0 comments on commit 0ef3a9b

Please sign in to comment.