Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge releases/v2.0.0 to main #2010

Draft
wants to merge 113 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
6a01abe
chore(perp): remove perp
k-yang Oct 16, 2023
011f1ed
chore(perp): remove perp protos
k-yang Oct 16, 2023
2a250a3
chore(stablecoin): remove stablecoin
k-yang Oct 16, 2023
d713f41
chore(spot): remove spot
k-yang Oct 16, 2023
1976aff
Merge branch 'master' into releases/v1.0.0
k-yang Oct 16, 2023
bc869fa
chore: use large ubuntu runner for goreleaser workflow
k-yang Oct 17, 2023
46cc61c
fix(ledger): bump the hid package to v0.9.2 which fixes ledger on new…
k-yang Oct 23, 2023
2a357ef
chore: update changelog
k-yang Oct 23, 2023
e0d825d
chore: merge master
k-yang Oct 23, 2023
1f79807
feat(wasmbinding)!: whitelisted stargate queries for QueryRequest::St…
Unique-Divine Oct 25, 2023
d5d36f5
chore: reset module consensus versions
k-yang Oct 25, 2023
6a49247
fix(inflation): enable inflationary NIBI (#1655)
k-yang Oct 31, 2023
042e369
fix(keeper): inflation keeper instantiation
k-yang Oct 31, 2023
9c0f4f5
feat(oracle): edit oracle params msg (#1658)
k-yang Nov 2, 2023
42c152f
chore: update changelog
k-yang Nov 2, 2023
cf6acee
Update CHANGELOG.md
k-yang Nov 2, 2023
f1e6859
chore(oracle): curate default oracle whitelist (#1659)
k-yang Nov 2, 2023
3c96eea
chore(deps): Bump github.com/CosmWasm/wasmvm from 1.4.1 to 1.5.0 (#1657)
dependabot[bot] Nov 3, 2023
afd671a
chore(deps): Bump google.golang.org/grpc from 1.58.3 to 1.59.0 (#1643)
dependabot[bot] Oct 27, 2023
10b09c5
chore(deps): Bump github.com/cosmos/ibc-go/v7 from 7.3.0 to 7.3.1 (#1…
dependabot[bot] Oct 27, 2023
2c94aa8
chore(oracle): remove bnb:usd from default whitelist
k-yang Nov 3, 2023
6208cfa
chore(epochs): add month default epoch
k-yang Nov 3, 2023
0a74da1
chore(wasm): bump wasmd dependency to v0.43.0 (#1660)
k-yang Nov 6, 2023
0d4e8de
fix(epochs): fix epoch tests broken by adding month epoch into defaul…
k-yang Nov 6, 2023
db04996
feat: update wasmd to v0.44.0 (#1666)
matthiasmatt Nov 6, 2023
c55185f
chore(inflation)!: remove x/inflation module (#1667)
k-yang Nov 7, 2023
e2011cd
feat(inflation)!: make inflation follow a polynomial distribution (#1…
matthiasmatt Nov 14, 2023
0e58c18
chore: update changelog
k-yang Nov 21, 2023
ef399b4
feat: add inflation events detailed distribution (#1695)
matthiasmatt Dec 7, 2023
a1f0844
fix(inflation): fix default inflation allocation params (#1688)
matthiasmatt Dec 3, 2023
cd4b6d1
feat: add upgrade handler for inflation module (#1684)
jgimeno Dec 1, 2023
776a4af
fix: upgrade handler for v1.1.0 (#1706)
k-yang Dec 13, 2023
3f696de
refactor(inflation): make inflation disabled by default (#1712)
k-yang Dec 15, 2023
bd5c69e
chore: bump librocksdb to v8.9.1 (#1778)
helder-moreira Jan 27, 2024
f200eb5
chore: update changelog
k-yang Feb 9, 2024
d91deb5
ci: fix go mod
k-yang Feb 9, 2024
3b5f772
ci: remove go toolchain directive
k-yang Feb 9, 2024
d29c9ab
feat: make inflation params a collection and add commands to update t…
matthiasmatt Feb 1, 2024
348232d
ci: bump grocksdb to 1.8.12
k-yang Feb 9, 2024
45cc19e
fix: remove verify-dist-temp
k-yang Dec 18, 2023
c739cd0
ci: use new goreleaser image
k-yang Feb 9, 2024
38b26f9
ci: update make build commands
k-yang Feb 9, 2024
49eb665
fix(inflation): fix first epoch's inflation distribution (#1786)
matthiasmatt Feb 2, 2024
cb0afcd
ci: update goreleaser config file
k-yang Feb 9, 2024
1898bc1
feat: upgrade handler for v1.0.1
k-yang Feb 12, 2024
d94f76f
feat(inflation): add inflation tx cmds (#1795)
k-yang Feb 14, 2024
d328064
feat: uncomment amino registering on register legacy amino codec for …
jgimeno Feb 14, 2024
7b2be2c
feat: handle case where skip epoch not aligned with epoch passed (#1796)
matthiasmatt Feb 14, 2024
6efa242
fix(inflation): num skipped epochs tracking (#1797)
matthiasmatt Feb 15, 2024
2eb7182
chore: bump cosmos-sdk to v0.47.9 (#1808)
k-yang Feb 24, 2024
1424193
chore: add v1.0.2 upgrade handler
k-yang Feb 24, 2024
16dbe32
fix(inflation-docs): ① Document inflation + ② delete unused code + ③ …
Unique-Divine Feb 18, 2024
32aa8b7
ci: fix chaosnet build (#1806)
k-yang Feb 21, 2024
3e2d1a3
chore: bump cosmos-sdk to v0.47.9 (#1808)
k-yang Feb 24, 2024
3324bc9
feat: update default inflation rate (#1804)
matthiasmatt Feb 24, 2024
98901bf
ci: remove go toolchain in go.mod file
k-yang Feb 24, 2024
7539228
Merge branch 'releases/v1.0.2' into releases/v1.1.0
k-yang Feb 25, 2024
283989a
ci: revert back to cosmos sdk v0.47.5
k-yang Feb 25, 2024
2533c8e
ci: bump to cosmos-sdk v0.47.6
k-yang Feb 25, 2024
eab04a1
ci: bump to cosmos-sdk v0.47.7
k-yang Feb 25, 2024
a26cbe1
ci: bump to cosmos-sdk v0.47.8
k-yang Feb 25, 2024
bccad37
ci: bump to cosmos-sdk v0.47.9
k-yang Feb 25, 2024
a34b557
ci: revert to cosmos sdk v0.47.5
k-yang Feb 26, 2024
65c06ba
chore: bump cosmos-sdk to v0.47.10
k-yang Mar 3, 2024
7d94d93
chore: add back v1.0.1 files
k-yang Mar 3, 2024
740f161
fix: add back v1.0.2 upgrade handler
k-yang Mar 3, 2024
0fd5a86
fix: wasm ibc transaction panic (#1816)
jgimeno Mar 4, 2024
7fe566f
include upgrade 1.0.3
jgimeno Mar 5, 2024
b3936c1
linter
jgimeno Mar 5, 2024
a7b16a1
update and fix changelog
jgimeno Mar 5, 2024
fc99cdd
feat: base64 decoder for cw3 wasm messages (#1731)
matthiasmatt Dec 27, 2023
bb1d040
refactor(decode-base64): clean code improvements and fn docs (#1754)
Unique-Divine Dec 29, 2023
208012c
add date into changelog for release
jgimeno Mar 18, 2024
cd24abb
Merge branch 'releases/v1.0.3' into releases/v1.1.0
k-yang Mar 19, 2024
3d72b4f
chore: finalize v1.1.0 changelog
k-yang Mar 19, 2024
56f1449
feat(inflation): add burn method (#1823)
k-yang Mar 19, 2024
9178e4f
chore: fix changelog (#1824)
k-yang Mar 20, 2024
2888281
test(inflation): add additional burn test cases (#1828)
k-yang Mar 20, 2024
7d86138
Update CHANGELOG.md
k-yang Mar 28, 2024
b210bf4
feat(tokenfactory): burn native method (#1832)
k-yang Apr 2, 2024
1ba22a7
revert: remove x/inflation burn method
k-yang Apr 3, 2024
f34cc52
feat(ica): ICA Host / Controller integration (#1820)
Segfaultd Apr 23, 2024
9efcccc
refactor(oracle): add oracle slashing events (#1859)
k-yang May 1, 2024
906f9c7
fix(ica): add controller stack (#1864)
k-yang May 7, 2024
1b109f0
feat(wasm)!: increase contract size limit to 3MB (#1906)
k-yang Jun 4, 2024
e286af0
feat: add pebbledb support (#1818)
helder-moreira Mar 5, 2024
7cb8993
chore: make default db backend PebbleDB
k-yang Jun 4, 2024
e024582
chore: update changelog
k-yang Jun 4, 2024
9ff225a
chore: add v1.4.0 upgrade handler
k-yang Jun 4, 2024
0ed9d8a
feat(ibc): add wasm stack to ibc router (#1931)
k-yang Jun 19, 2024
b6c95a8
feat: add v1.5.0 upgrade handler
k-yang Jun 21, 2024
a5279d1
chore: update changelog
k-yang Jun 21, 2024
7e6ad5d
feat: add pebbledb support
onikonychev Aug 15, 2024
ec2b3ac
Merge branch 'main' into releases/v2.0.0
k-yang Aug 19, 2024
01dbb57
chore: remove wasmbinding folder and nibiru/v1 dependency
k-yang Aug 19, 2024
f436b66
fix: remove extra overrideWasmVariables
k-yang Aug 19, 2024
2b8cb36
fix: upgrades
k-yang Aug 19, 2024
da76c39
fix: oracle keeper
k-yang Aug 19, 2024
c74baa0
fix: epochs tests
k-yang Aug 19, 2024
4b47ad3
Merge branch 'main' into releases/v2.0.0
k-yang Aug 19, 2024
3e27632
feat: add v2.0.0 upgrade handler
k-yang Aug 19, 2024
a9fa05e
linter
k-yang Aug 19, 2024
5950a5b
Merge branch 'main' into releases/v2.0.0
k-yang Aug 31, 2024
227e309
Merge branch 'main' into releases/v2.0.0
k-yang Sep 4, 2024
13d9296
Merge branch 'main' into releases/v2.0.0
k-yang Sep 5, 2024
a3d3efb
Merge branch 'main' into releases/v2.0.0
k-yang Oct 3, 2024
bd90938
Merge branch 'main' into releases/v2.0.0
k-yang Oct 29, 2024
45bcbd0
Merge branch 'main' into releases/v2.0.0
k-yang Nov 5, 2024
98c3517
fix: upgrade handlers had wrong function type
k-yang Nov 5, 2024
7b2037a
Revert "feat: enable wasm light clients on IBC (08-wasm) (#2068)"
k-yang Nov 5, 2024
4bc072d
fix: remove v2.1.0 upgrade handler
k-yang Nov 5, 2024
ae2d85e
Merge branch 'main' into releases/v2.0.0
k-yang Nov 12, 2024
479cb05
Merge branch 'main' into releases/v2.0.0
k-yang Nov 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ Zenith](https://code4rena.com/zenith) Audit, running from 2024-10-07 until
period. This section describes code changes that occured after that audit in
preparation for a second audit starting in November 2024.

- [#2068](https://github.com/NibiruChain/nibiru/pull/2068) - feat: enable wasm light clients on IBC (08-wasm)
- [#2074](https://github.com/NibiruChain/nibiru/pull/2074) - fix(evm-keeper): better utilize ERC20 metadata during FunToken creation. The bank metadata for a new FunToken mapping ties a connection between the Bank Coin's `DenomUnit` and the ERC20 contract metadata like the name, decimals, and symbol. This change brings parity between EVM wallets, such as MetaMask, and Interchain wallets like Keplr and Leap.
- [#2076](https://github.com/NibiruChain/nibiru/pull/2076) - fix(evm-gas-fees):
Use effective gas price in RefundGas and make sure that units are properly
Expand Down Expand Up @@ -98,6 +97,12 @@ depend on x/bank, such as the EVM and Wasm modules.
- [#2098](https://github.com/NibiruChain/nibiru/pull/2098) - test(evm): statedb
tests for race conditions within funtoken precompile
- [#2100](https://github.com/NibiruChain/nibiru/pull/2100) - refactor: cleanup statedb and precompile sections
- [#2098](https://github.com/NibiruChain/nibiru/pull/2098) - test(evm): statedb tests for race conditions within funtoken precompile
- [#2090](https://github.com/NibiruChain/nibiru/pull/2090) - fix(evm): Account
for (1) ERC20 transfers with tokens that return false success values instead of
throwing an error and (2) ERC20 transfers with other operations that don't bring
about the expected resulting balance for the transfer recipient.
- [#2092](https://github.com/NibiruChain/nibiru/pull/2092) - feat(evm): add validation for wasm multi message execution
- [#2101](https://github.com/NibiruChain/nibiru/pull/2101) - fix(evm): tx receipt proper marshalling
- [#2105](https://github.com/NibiruChain/nibiru/pull/2105) - test(evm): precompile call with revert
- [#2106](https://github.com/NibiruChain/nibiru/pull/2106) - chore: scheduled basic e2e tests for evm testnet endpoint
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ RUN apk --no-cache add \
COPY --from=builder /nibiru/build/nibid /usr/local/bin/nibid

ENTRYPOINT ["nibid"]
CMD [ "start" ]
CMD [ "start" ]
27 changes: 4 additions & 23 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,10 @@

wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
cmtos "github.com/cometbft/cometbft/libs/os"
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper"

"github.com/NibiruChain/nibiru/v2/app/ante"
"github.com/NibiruChain/nibiru/v2/app/wasmext"
"github.com/NibiruChain/nibiru/v2/x/evm/precompile"

dbm "github.com/cometbft/cometbft-db"
abci "github.com/cometbft/cometbft/abci/types"
"github.com/cometbft/cometbft/libs/log"
tmos "github.com/cometbft/cometbft/libs/os"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
_ "github.com/cosmos/cosmos-sdk/client/docs/statik"
Expand All @@ -46,16 +37,18 @@
capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper"
"github.com/cosmos/cosmos-sdk/x/crisis"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"

ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
ibctesting "github.com/cosmos/ibc-go/v7/testing"
"github.com/cosmos/ibc-go/v7/testing/types"

"github.com/gorilla/mux"
"github.com/prometheus/client_golang/prometheus"
"github.com/rakyll/statik/fs"
"github.com/spf13/cast"

"github.com/NibiruChain/nibiru/v2/app/ante"
"github.com/NibiruChain/nibiru/v2/app/wasmext"
"github.com/NibiruChain/nibiru/v2/x/evm/precompile"

// force call init() of the geth tracers
_ "github.com/ethereum/go-ethereum/eth/tracers/native"
)
Expand Down Expand Up @@ -197,7 +190,6 @@
app.initModuleManager(encodingConfig, skipGenesisInvariants)

app.setupUpgrades()

// NOTE: Any module instantiated in the module manager that is later modified
// must be passed by reference here.

Expand Down Expand Up @@ -238,15 +230,11 @@
app.SetEndBlocker(app.EndBlocker)

if snapshotManager := app.SnapshotManager(); snapshotManager != nil {
if err := snapshotManager.RegisterExtensions(

Check warning on line 233 in app/app.go

View check run for this annotation

Codecov / codecov/patch

app/app.go#L233

Added line #L233 was not covered by tests
wasmkeeper.NewWasmSnapshotter(
app.CommitMultiStore(),
&app.WasmKeeper,
),
ibcwasmkeeper.NewWasmSnapshotter(
app.CommitMultiStore(),
&app.WasmClientKeeper,
),
); err != nil {
panic("failed to add wasm snapshot extension.")
}
Expand All @@ -257,13 +245,6 @@
tmos.Exit(err.Error())
}

ctx := app.BaseApp.NewUncachedContext(true, cmtproto.Header{})

// Initialize pinned codes in wasmvm as they are not persisted there
if err := ibcwasmkeeper.InitializePinnedCodes(ctx, app.appCodec); err != nil {
cmtos.Exit(fmt.Sprintf("failed to initialize pinned codes %s", err))
}

/* Applications that wish to enforce statically created ScopedKeepers should
call `Seal` after creating their scoped modules in `NewApp` with
`capabilityKeeper.ScopeToModule`.
Expand Down
36 changes: 5 additions & 31 deletions app/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import (
"path/filepath"
"strings"

ibcwasm "github.com/cosmos/ibc-go/modules/light-clients/08-wasm"
ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper"
ica "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts"
icacontroller "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller"
icacontrollerkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/keeper"
Expand All @@ -18,7 +16,6 @@ import (
"github.com/CosmWasm/wasmd/x/wasm"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
wasmvm "github.com/CosmWasm/wasmvm"
_ "github.com/cosmos/cosmos-sdk/client/docs/statik"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/codec"
Expand Down Expand Up @@ -87,7 +84,6 @@ import (
// ---------------------------------------------------------------
// IBC imports

ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"
icahostkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/keeper"
ibcfee "github.com/cosmos/ibc-go/v7/modules/apps/29-fee"
ibcfeekeeper "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/keeper"
Expand Down Expand Up @@ -125,21 +121,19 @@ import (
"github.com/NibiruChain/nibiru/v2/x/inflation"
inflationkeeper "github.com/NibiruChain/nibiru/v2/x/inflation/keeper"
inflationtypes "github.com/NibiruChain/nibiru/v2/x/inflation/types"
"github.com/NibiruChain/nibiru/v2/x/oracle"
oracle "github.com/NibiruChain/nibiru/v2/x/oracle"
oraclekeeper "github.com/NibiruChain/nibiru/v2/x/oracle/keeper"
oracletypes "github.com/NibiruChain/nibiru/v2/x/oracle/types"

"github.com/NibiruChain/nibiru/v2/x/sudo"
"github.com/NibiruChain/nibiru/v2/x/sudo/keeper"
sudotypes "github.com/NibiruChain/nibiru/v2/x/sudo/types"

"github.com/NibiruChain/nibiru/v2/x/tokenfactory"
tokenfactory "github.com/NibiruChain/nibiru/v2/x/tokenfactory"
tokenfactorykeeper "github.com/NibiruChain/nibiru/v2/x/tokenfactory/keeper"
tokenfactorytypes "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types"
)

const wasmVmContractMemoryLimit = 32

type AppKeepers struct {
keepers.PublicKeepers
privateKeepers
Expand Down Expand Up @@ -198,7 +192,6 @@ func initStoreKeys() (
ibcexported.StoreKey,
icahosttypes.StoreKey,
icacontrollertypes.StoreKey,
ibcwasmtypes.StoreKey,

// nibiru x/ keys
oracletypes.StoreKey,
Expand Down Expand Up @@ -259,7 +252,7 @@ func (app *NibiruApp) InitKeepers(
// seal capability keeper after scoping modules
// app.capabilityKeeper.Seal()

// TODO: chore(upgrade): Potential breaking change on AccountKeeper due
// TODO: chore(upgrade): Potential breaking change on AccountKeeper dur
// to ProtoBaseAccount replacement.
app.AccountKeeper = authkeeper.NewAccountKeeper(
appCodec,
Expand Down Expand Up @@ -460,13 +453,6 @@ func (app *NibiruApp) InitKeepers(
// For example, if there are bindings for the x/inflation module, then the app
// passed to GetWasmOpts must already have a non-nil InflationKeeper.
supportedFeatures := strings.Join(wasmdapp.AllCapabilities(), ",")

// Create wasm VM outside keeper so it can be re-used in client keeper
wasmVM, err := wasmvm.NewVM(filepath.Join(wasmDir, "wasm"), supportedFeatures, wasmVmContractMemoryLimit, wasmConfig.ContractDebugMode, wasmConfig.MemoryCacheSize)
if err != nil {
panic(err)
}

app.WasmKeeper = wasmkeeper.NewKeeper(
appCodec,
keys[wasmtypes.StoreKey],
Expand All @@ -485,16 +471,7 @@ func (app *NibiruApp) InitKeepers(
wasmConfig,
supportedFeatures,
govModuleAddr,
append(GetWasmOpts(*app, appOpts), wasmkeeper.WithWasmEngine(wasmVM))...,
)

app.WasmClientKeeper = ibcwasmkeeper.NewKeeperWithVM(
appCodec,
keys[ibcwasmtypes.StoreKey],
app.ibcKeeper.ClientKeeper,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
wasmVM,
app.GRPCQueryRouter(),
GetWasmOpts(*app, appOpts)...,
)

// DevGas uses WasmKeeper
Expand Down Expand Up @@ -646,7 +623,7 @@ func (app *NibiruApp) initAppModules(
authzmodule.NewAppModule(appCodec, app.authzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),

// Nibiru modules
oracle.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper),
oracle.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper, app.SudoKeeper),
epochs.NewAppModule(appCodec, app.EpochsKeeper),
inflation.NewAppModule(app.InflationKeeper, app.AccountKeeper, *app.StakingKeeper),
sudo.NewAppModule(appCodec, app.SudoKeeper),
Expand All @@ -658,7 +635,6 @@ func (app *NibiruApp) initAppModules(
ibctransfer.NewAppModule(app.ibcTransferKeeper),
ibcfee.NewAppModule(app.ibcFeeKeeper),
ica.NewAppModule(&app.icaControllerKeeper, &app.icaHostKeeper),
ibcwasm.NewAppModule(app.WasmClientKeeper),

evmmodule.NewAppModule(app.EvmKeeper, app.AccountKeeper),

Expand Down Expand Up @@ -730,7 +706,6 @@ func orderedModuleNames() []string {
ibcexported.ModuleName,
ibcfeetypes.ModuleName,
icatypes.ModuleName,
ibcwasmtypes.ModuleName,

// --------------------------------------------------------------------
evm.ModuleName,
Expand Down Expand Up @@ -837,7 +812,6 @@ func ModuleBasicManager() module.BasicManager {
ibctransfer.AppModuleBasic{},
ibctm.AppModuleBasic{},
ica.AppModuleBasic{},
ibcwasm.AppModuleBasic{},
// native x/
evmmodule.AppModuleBasic{},
oracle.AppModuleBasic{},
Expand Down
2 changes: 0 additions & 2 deletions app/keepers/all_keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper"
feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper"
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper"

stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"

Expand Down Expand Up @@ -69,5 +68,4 @@ type PublicKeepers struct {
// WASM keepers
WasmKeeper wasmkeeper.Keeper
ScopedWasmKeeper capabilitykeeper.ScopedKeeper
WasmClientKeeper ibcwasmkeeper.Keeper
}
14 changes: 11 additions & 3 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,27 @@ import (
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/NibiruChain/nibiru/v2/app/upgrades"
"github.com/NibiruChain/nibiru/v2/app/upgrades/v1_0_1"
"github.com/NibiruChain/nibiru/v2/app/upgrades/v1_0_2"
"github.com/NibiruChain/nibiru/v2/app/upgrades/v1_0_3"
"github.com/NibiruChain/nibiru/v2/app/upgrades/v1_1_0"
"github.com/NibiruChain/nibiru/v2/app/upgrades/v1_2_0"
"github.com/NibiruChain/nibiru/v2/app/upgrades/v1_3_0"
"github.com/NibiruChain/nibiru/v2/app/upgrades/v1_4_0"
"github.com/NibiruChain/nibiru/v2/app/upgrades/v2_1_0"
"github.com/NibiruChain/nibiru/v2/app/upgrades/v1_5_0"
"github.com/NibiruChain/nibiru/v2/app/upgrades/v2_0_0"
)

var Upgrades = []upgrades.Upgrade{
v1_0_1.Upgrade,
v1_0_2.Upgrade,
v1_0_3.Upgrade,
v1_1_0.Upgrade,
v1_2_0.Upgrade,
v1_3_0.Upgrade,
v1_4_0.Upgrade,
v2_1_0.Upgrade,
v1_5_0.Upgrade,
v2_0_0.Upgrade,
}

func (app *NibiruApp) setupUpgrades() {
Expand All @@ -28,7 +36,7 @@ func (app *NibiruApp) setupUpgrades() {

func (app *NibiruApp) setUpgradeHandlers() {
for _, u := range Upgrades {
app.upgradeKeeper.SetUpgradeHandler(u.UpgradeName, u.CreateUpgradeHandler(app.ModuleManager, app.configurator, app.ibcKeeper.ClientKeeper))
app.upgradeKeeper.SetUpgradeHandler(u.UpgradeName, u.CreateUpgradeHandler(app.ModuleManager, app.configurator))
}
}

Expand Down
4 changes: 1 addition & 3 deletions app/upgrades/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ import (
store "github.com/cosmos/cosmos-sdk/store/types"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/x/upgrade/types"

clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper"
)

type Upgrade struct {
UpgradeName string

CreateUpgradeHandler func(*module.Manager, module.Configurator, clientkeeper.Keeper) types.UpgradeHandler
CreateUpgradeHandler func(*module.Manager, module.Configurator) types.UpgradeHandler

StoreUpgrades store.StoreUpgrades
}
23 changes: 23 additions & 0 deletions app/upgrades/v1_0_1/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package v1_0_1

import (
"github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/NibiruChain/nibiru/v2/app/upgrades"
)

const UpgradeName = "v1.0.1"

// pretty much a no-op store upgrade to test the upgrade process and include the newer version of rocksdb
var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, cfg, fromVM)
}
},
StoreUpgrades: types.StoreUpgrades{},
}
23 changes: 23 additions & 0 deletions app/upgrades/v1_0_2/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package v1_0_2

import (
"github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/NibiruChain/nibiru/v2/app/upgrades"
)

const UpgradeName = "v1.0.2"

// a no-op store upgrade to test the upgrade process and include the newer version cosmos-sdk
var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, cfg, fromVM)
}
},
StoreUpgrades: types.StoreUpgrades{},
}
23 changes: 23 additions & 0 deletions app/upgrades/v1_0_3/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package v1_0_3

import (
"github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/NibiruChain/nibiru/v2/app/upgrades"
)

const UpgradeName = "v1.0.3"

// a no-op store upgrade to test the upgrade process and include the newer version cosmos-sdk
var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, cfg, fromVM)
}
},
StoreUpgrades: types.StoreUpgrades{},
}
3 changes: 1 addition & 2 deletions app/upgrades/v1_1_0/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper"

"github.com/NibiruChain/nibiru/v2/app/upgrades"
inflationtypes "github.com/NibiruChain/nibiru/v2/x/inflation/types"
Expand All @@ -15,7 +14,7 @@ const UpgradeName = "v1.1.0"

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) upgradetypes.UpgradeHandler {
CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, cfg, fromVM)
}
Expand Down
Loading
Loading