Skip to content

Commit e799619

Browse files
committed
chore: remove simapp as a dependency
1 parent e449a1b commit e799619

File tree

7 files changed

+15
-20
lines changed

7 files changed

+15
-20
lines changed

app/app.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"time"
88

99
cosmoserrors "cosmossdk.io/errors"
10-
appparams "cosmossdk.io/simapp/params"
1110
dbm "github.com/cometbft/cometbft-db"
1211
abci "github.com/cometbft/cometbft/abci/types"
1312
tmjson "github.com/cometbft/cometbft/libs/json"
@@ -314,7 +313,7 @@ func New(
314313
skipUpgradeHeights map[int64]bool,
315314
homePath string,
316315
invCheckPeriod uint,
317-
encodingConfig appparams.EncodingConfig,
316+
encodingConfig ethermint.EncodingConfig,
318317
appOpts servertypes.AppOptions,
319318
baseAppOptions ...func(*baseapp.BaseApp),
320319
) *App {

app/encoding.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package app
22

33
import (
4-
"cosmossdk.io/simapp/params"
54
evmenc "github.com/zeta-chain/ethermint/encoding"
5+
etherminttypes "github.com/zeta-chain/ethermint/types"
66
)
77

88
// MakeEncodingConfig creates an EncodingConfig for testing
9-
func MakeEncodingConfig() params.EncodingConfig {
9+
func MakeEncodingConfig() etherminttypes.EncodingConfig {
1010
//encodingConfig := params.MakeEncodingConfig()
1111
encodingConfig := evmenc.MakeConfig(ModuleBasics)
1212
//std.RegisterLegacyAminoCodec(encodingConfig.Amino)

cmd/zetacored/root.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"io"
77
"os"
88

9-
appparams "cosmossdk.io/simapp/params"
109
rosettaCmd "cosmossdk.io/tools/rosetta/cmd"
1110
dbm "github.com/cometbft/cometbft-db"
1211
tmcfg "github.com/cometbft/cometbft/config"
@@ -32,6 +31,7 @@ import (
3231
"github.com/spf13/cobra"
3332
ethermintclient "github.com/zeta-chain/ethermint/client"
3433
"github.com/zeta-chain/ethermint/crypto/hd"
34+
"github.com/zeta-chain/ethermint/types"
3535

3636
"github.com/zeta-chain/zetacore/app"
3737
zetacoredconfig "github.com/zeta-chain/zetacore/cmd/zetacored/config"
@@ -45,7 +45,7 @@ const EnvPrefix = "zetacore"
4545
// NewRootCmd creates a new root command for wasmd. It is called once in the
4646
// main function.
4747

48-
func NewRootCmd() (*cobra.Command, appparams.EncodingConfig) {
48+
func NewRootCmd() (*cobra.Command, types.EncodingConfig) {
4949
encodingConfig := app.MakeEncodingConfig()
5050

5151
cfg := sdk.GetConfig()
@@ -119,7 +119,7 @@ func initTmConfig() *tmcfg.Config {
119119
return cfg
120120
}
121121

122-
func initRootCmd(rootCmd *cobra.Command, encodingConfig appparams.EncodingConfig) {
122+
func initRootCmd(rootCmd *cobra.Command, encodingConfig types.EncodingConfig) {
123123
ac := appCreator{
124124
encCfg: encodingConfig,
125125
}
@@ -236,7 +236,7 @@ func txCommand() *cobra.Command {
236236
}
237237

238238
type appCreator struct {
239-
encCfg appparams.EncodingConfig
239+
encCfg types.EncodingConfig
240240
}
241241

242242
func (ac appCreator) newApp(

go.mod

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ toolchain go1.22.5
77
require (
88
cosmossdk.io/errors v1.0.1
99
cosmossdk.io/math v1.3.0
10-
cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d
1110
cosmossdk.io/tools/rosetta v0.2.1
1211
github.com/99designs/keyring v1.2.1
1312
github.com/btcsuite/btcd v0.23.4

go.sum

-2
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,6 @@ cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI=
201201
cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM=
202202
cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE=
203203
cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k=
204-
cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d h1:E/8y0oG3u9hBR8l4F9MtC0LdZIamPCUwUoLlrHrX86I=
205-
cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d/go.mod h1:xbjky3L3DJEylaho6gXplkrMvJ5sFgv+qNX+Nn47bzY=
206204
cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw=
207205
cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw=
208206
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=

testutil/keeper/keeper.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import (
4040
ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported"
4141
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
4242
"github.com/stretchr/testify/require"
43-
ethermint "github.com/zeta-chain/ethermint/types"
43+
etherminttypes "github.com/zeta-chain/ethermint/types"
4444
evmmodule "github.com/zeta-chain/ethermint/x/evm"
4545
evmkeeper "github.com/zeta-chain/ethermint/x/evm/keeper"
4646
evmtypes "github.com/zeta-chain/ethermint/x/evm/types"
@@ -201,7 +201,7 @@ func AccountKeeper(
201201
return authkeeper.NewAccountKeeper(
202202
cdc,
203203
storeKey,
204-
ethermint.ProtoAccount,
204+
etherminttypes.ProtoAccount,
205205
moduleAccountPerms,
206206
"zeta",
207207
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
@@ -404,7 +404,7 @@ func NewSDKKeepersWithKeys(
404404
authKeeper := authkeeper.NewAccountKeeper(
405405
cdc,
406406
keys[authtypes.StoreKey],
407-
ethermint.ProtoAccount,
407+
etherminttypes.ProtoAccount,
408408
moduleAccountPerms,
409409
"zeta",
410410
authtypes.NewModuleAddress(govtypes.ModuleName).String(),

zetaclient/zetacore/client.go

+5-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"sync"
99
"time"
1010

11-
"cosmossdk.io/simapp/params"
1211
rpchttp "github.com/cometbft/cometbft/rpc/client/http"
1312
cosmosclient "github.com/cosmos/cosmos-sdk/client"
1413
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
@@ -17,10 +16,8 @@ import (
1716
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
1817
"github.com/pkg/errors"
1918
"github.com/rs/zerolog"
19+
etherminttypes "github.com/zeta-chain/ethermint/types"
2020
feemarkettypes "github.com/zeta-chain/ethermint/x/feemarket/types"
21-
"google.golang.org/grpc"
22-
"google.golang.org/grpc/credentials/insecure"
23-
2421
"github.com/zeta-chain/zetacore/app"
2522
"github.com/zeta-chain/zetacore/pkg/authz"
2623
"github.com/zeta-chain/zetacore/pkg/chains"
@@ -32,6 +29,8 @@ import (
3229
"github.com/zeta-chain/zetacore/zetaclient/config"
3330
zctx "github.com/zeta-chain/zetacore/zetaclient/context"
3431
keyinterfaces "github.com/zeta-chain/zetacore/zetaclient/keys/interfaces"
32+
"google.golang.org/grpc"
33+
"google.golang.org/grpc/credentials/insecure"
3534
)
3635

3736
var _ interfaces.ZetacoreClient = &Client{}
@@ -48,7 +47,7 @@ type Client struct {
4847
accountNumber map[authz.KeyType]uint64
4948
seqNumber map[authz.KeyType]uint64
5049

51-
encodingCfg params.EncodingConfig
50+
encodingCfg etherminttypes.EncodingConfig
5251
keys keyinterfaces.ObserverKeys
5352
chainID string
5453
chain chains.Chain
@@ -178,7 +177,7 @@ func buildCosmosClientContext(
178177
chainID string,
179178
keys keyinterfaces.ObserverKeys,
180179
config config.ClientConfiguration,
181-
encodingConfig params.EncodingConfig,
180+
encodingConfig etherminttypes.EncodingConfig,
182181
opts constructOpts,
183182
) (cosmosclient.Context, error) {
184183
if keys == nil {

0 commit comments

Comments
 (0)