Skip to content

Commit 613084e

Browse files
authored
feat: add depinject wiring (#2240)
* formatting * move overrideWasmVariables to init() * change initKeepers visibility * remove initAppModules * move subspace registration to upgrade handler * Create app_config.go * Add depinject * refactor maccPerms * remove initSimulationManager * remove registerNonDepinjectModules * refactor orderedModuleNames * finish adapting newApp constructor * Update .gitignore * add tx config * fix prefixes and app loading time * load app before initializing pinned codes * remove auth module from RegisterModules * register ibc tendermint client types * fix sealed Config bug * fix test encoding * fix crypto encoding and address prefix * Update CHANGELOG.md * remove some duplicate encoding configs * simplify test genesis * fix test default genesis state * bring back default sudo genesis * lint * Delete oracle_genesis.go * Update testapp.go * update integration test name * Update sudo_genesis.go * remove NewNibiruTestAppAndContextAtTime * remove manual sudo overriding * fix linter errors
1 parent 2252962 commit 613084e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+800
-880
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,3 +360,5 @@ playwright/playwright-report/
360360
playwright/playwright/.cache/
361361
playwright/chrome-extensions/keplr/
362362
playwright/yarn.lock
363+
364+
debug_container.dot

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ All notable changes to this project will be documented in this file.
3838
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
3939
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4040

41+
## Unreleased
42+
43+
- [#2240](https://github.com/NibiruChain/nibiru/pull/2240) - feat: add depinject wiring and wire `x/auth` module
44+
4145
## [v2.2.0](https://github.com/NibiruChain/nibiru/releases/tag/v2.2.0) - 2025-03-27
4246

4347
- [#2222](https://github.com/NibiruChain/nibiru/pull/2222) - fix(evm): evm indexer proper stopping of the indexer service
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
1010
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
1111

12-
"github.com/NibiruChain/nibiru/v2/app"
1312
"github.com/NibiruChain/nibiru/v2/app/ante"
1413
"github.com/NibiruChain/nibiru/v2/x/evm"
1514
"github.com/NibiruChain/nibiru/v2/x/evm/evmtest"
@@ -118,10 +117,9 @@ func (s *AnteTestSuite) TestAnteDecoratorAuthzGuard() {
118117
deps := evmtest.NewTestDeps()
119118
anteDec := ante.AnteDecoratorAuthzGuard{}
120119

121-
encCfg := app.MakeEncodingConfig()
122120
txBuilder, err := sdkclienttx.Factory{}.
123121
WithChainID(s.ctx.ChainID()).
124-
WithTxConfig(encCfg.TxConfig).
122+
WithTxConfig(deps.App.GetTxConfig()).
125123
BuildUnsignedTx(tc.txMsg())
126124
s.Require().NoError(err)
127125

app/ante/testutil_test.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
99
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
1010

11+
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
1112
"github.com/cosmos/cosmos-sdk/client"
1213
"github.com/cosmos/cosmos-sdk/client/tx"
1314
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
@@ -16,8 +17,6 @@ import (
1617
xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
1718
"github.com/stretchr/testify/suite"
1819

19-
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
20-
2120
"github.com/NibiruChain/nibiru/v2/app"
2221
nibiruante "github.com/NibiruChain/nibiru/v2/app/ante"
2322
"github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp"
@@ -36,10 +35,8 @@ type AnteTestSuite struct {
3635

3736
// SetupTest setups a new test, with new app, context, and anteHandler.
3837
func (suite *AnteTestSuite) SetupTest() {
39-
// Set up base app and ctx
40-
testapp.EnsureNibiruPrefix()
4138
encodingConfig := app.MakeEncodingConfig()
42-
suite.app = testapp.NewNibiruTestApp(app.NewDefaultGenesisState(encodingConfig.Codec))
39+
suite.app = testapp.NewNibiruTestApp(app.ModuleBasics.DefaultGenesis(encodingConfig.Codec))
4340
chainId := "test-chain-id"
4441
ctx := suite.app.NewContext(true, tmproto.Header{
4542
Height: 1,

0 commit comments

Comments
 (0)