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

chore: synchronize releases/v2.0.0 branch with main branch #2010

Merged
merged 128 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 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
acbf6d7
Merge branch 'main' into releases/v2.0.0
k-yang Jan 3, 2025
82302cc
Merge branch 'main' into releases/v2.0.0
k-yang Jan 18, 2025
63b2be4
Merge branch 'main' into releases/v2.0.0
k-yang Jan 20, 2025
a58899e
Merge branch 'main' into releases/v2.0.0
k-yang Jan 21, 2025
044d70b
Merge branch 'main' into releases/v2.0.0
k-yang Jan 28, 2025
bf7acbc
Merge branch 'main' into releases/v2.0.0
k-yang Jan 31, 2025
1f1d3d3
Merge branch 'main' into releases/v2.0.0
k-yang Feb 4, 2025
d8a1092
chore: update changelog for v2 EVM release
k-yang Feb 4, 2025
533490d
fix: revert testnet-1 chain id to 7210
k-yang Feb 6, 2025
fbcca38
fix: revert wasmvm to v1.5.0
k-yang Feb 10, 2025
91aa264
Merge branch 'main' into releases/v2.0.0
k-yang Feb 11, 2025
af7e317
Merge branch 'main' into releases/v2.0.0
k-yang Feb 19, 2025
5712834
Merge branch 'main' into releases/v2.0.0
k-yang Feb 19, 2025
f6fb48d
feat(ibc): add back 08-wasm client
k-yang Feb 20, 2025
0caad78
chore: minor refactors to resemble main branch
k-yang Feb 20, 2025
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: 3 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,15 @@ Simplify GitHub actions based on conditional paths, removing the need for files
- [#2212](https://github.com/NibiruChain/nibiru/pull/2212) - fix(evm): proper eth tx logs emission for funtoken operations
- [#2213](https://github.com/NibiruChain/nibiru/pull/2213) - chore(build): include lib versions on cache
- [#2214](https://github.com/NibiruChain/nibiru/pull/2214) - chore(wasm): bump wasmvm to `v1.5.8`
- [#2068](https://github.com/NibiruChain/nibiru/pull/2068) - feat: enable wasm light clients on IBC (08-wasm)

## [v2.0.0-p1](https://github.com/NibiruChain/nibiru/releases/tag/v2.0.0-p1) - 2025-02-10

- fbcca386 fix: revert wasmvm to v1.5.0
- 533490d0 fix: revert testnet-1 chain id to 7210
- d8a10921 chore: update changelog for v2 EVM release

### Nibiru EVM
## [v2.0.0](https://github.com/NibiruChain/nibiru/releases/tag/v2.0.0) - 2025-02-10

- [#2119](https://github.com/NibiruChain/nibiru/pull/2119) - fix(evm): Guarantee
that gas consumed during any send operation of the "NibiruBankKeeper" depends
Expand Down Expand Up @@ -122,7 +123,6 @@ Zenith](https://code4rena.com/zenith) Audit, running from 2024-10-07 until
period. This section describes code changes that occurred 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 @@ -167,9 +167,8 @@ preparation for a second audit starting in November 2024.
Bank module. This code change uses the `NibiruBankKeeper` on all modules that
depend on x/bank, such as the EVM and Wasm modules.
- [#2097](https://github.com/NibiruChain/nibiru/pull/2097) - feat(evm): Add new query to get dated price from the oracle precompile
- [#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
- [#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 @@ -30,4 +30,4 @@ RUN apk --no-cache add \
COPY --from=builder /nibiru/build/nibid /usr/local/bin/nibid

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

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"
cmtos "github.com/cometbft/cometbft/libs/os"
tmos "github.com/cometbft/cometbft/libs/os"

cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
_ "github.com/cosmos/cosmos-sdk/client/docs/statik"
Expand All @@ -46,16 +39,19 @@
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"

ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper"
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 @@ -202,7 +198,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 @@ -243,15 +238,15 @@
app.SetEndBlocker(app.EndBlocker)

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

Check warning on line 241 in app/app.go

View check run for this annotation

Codecov / codecov/patch

app/app.go#L241

Added line #L241 was not covered by tests
wasmkeeper.NewWasmSnapshotter(
app.CommitMultiStore(),
&app.WasmKeeper,
),
ibcwasmkeeper.NewWasmSnapshotter(
app.CommitMultiStore(),
&app.WasmClientKeeper,
),

Check warning on line 249 in app/app.go

View check run for this annotation

Codecov / codecov/patch

app/app.go#L246-L249

Added lines #L246 - L249 were not covered by tests
); err != nil {
panic("failed to add wasm snapshot extension.")
}
Expand All @@ -266,8 +261,8 @@

// 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))
}

Check warning on line 265 in app/app.go

View check run for this annotation

Codecov / codecov/patch

app/app.go#L264-L265

Added lines #L264 - L265 were not covered by tests

/* Applications that wish to enforce statically created ScopedKeepers should
call `Seal` after creating their scoped modules in `NewApp` with
Expand Down
4 changes: 2 additions & 2 deletions app/appconst/appconst.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,22 @@
GoArch = runtime.GOARCH
}

func RuntimeVersion() string {
return fmt.Sprintf(
"Version %s (%s)\nCompiled at %s using Go %s (%s)",
AppVersion,
GitCommit,
BuildDate,
GoVersion,
GoArch,
)

Check warning on line 51 in app/appconst/appconst.go

View check run for this annotation

Codecov / codecov/patch

app/appconst/appconst.go#L43-L51

Added lines #L43 - L51 were not covered by tests
}

// EIP 155 Chain IDs exported for tests.
const (
ETH_CHAIN_ID_MAINNET int64 = 6900

ETH_CHAIN_ID_TESTNET_1 int64 = 6910
ETH_CHAIN_ID_TESTNET_1 int64 = 7210
ETH_CHAIN_ID_TESTNET_2 int64 = 6911
ETH_CHAIN_ID_TESTNET_3 int64 = 6912

Expand All @@ -74,7 +74,7 @@
var knownEthChainIDMap = map[string]int64{
"cataclysm-1": 6900,

"nibiru-testnet-1": 6910,
"nibiru-testnet-1": 7210,
"nibiru-testnet-2": 6911,
"nibiru-testnet-3": 6912,

Expand Down
38 changes: 13 additions & 25 deletions app/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@
"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"
icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types"
icahost "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host"
icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types"
icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types"

wasmdapp "github.com/CosmWasm/wasmd/app"
"github.com/CosmWasm/wasmd/x/wasm"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
Expand Down Expand Up @@ -63,30 +53,32 @@
govv1types "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
govv1beta1types "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
groupmodule "github.com/cosmos/cosmos-sdk/x/group/module"

"github.com/cosmos/cosmos-sdk/x/params"
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
paramproposal "github.com/cosmos/cosmos-sdk/x/params/types/proposal"

"github.com/cosmos/cosmos-sdk/x/slashing"
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper"
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
"github.com/cosmos/cosmos-sdk/x/staking"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

"github.com/cosmos/cosmos-sdk/x/upgrade"
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

// ---------------------------------------------------------------
// IBC imports

ibcwasm "github.com/cosmos/ibc-go/modules/light-clients/08-wasm"
ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper"
ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"
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"
icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types"
icahost "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host"
icahostkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/keeper"
icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types"
icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types"
ibcfee "github.com/cosmos/ibc-go/v7/modules/apps/29-fee"
ibcfeekeeper "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/keeper"
ibcfeetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types"
Expand All @@ -104,9 +96,6 @@
ibcmock "github.com/cosmos/ibc-go/v7/testing/mock"
"github.com/spf13/cast"

// ---------------------------------------------------------------
// Nibiru Custom Modules

"github.com/NibiruChain/nibiru/v2/app/keepers"
"github.com/NibiruChain/nibiru/v2/app/wasmext"
"github.com/NibiruChain/nibiru/v2/eth"
Expand All @@ -124,15 +113,13 @@
"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"
)
Expand Down Expand Up @@ -463,7 +450,7 @@
// 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)

Check warning on line 453 in app/keepers.go

View check run for this annotation

Codecov / codecov/patch

app/keepers.go#L453

Added line #L453 was not covered by tests
}

wmha := wasmext.MsgHandlerArgs{
Expand Down Expand Up @@ -654,7 +641,7 @@
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 @@ -668,6 +655,7 @@
ica.NewAppModule(&app.icaControllerKeeper, &app.icaHostKeeper),
ibcwasm.NewAppModule(app.WasmClientKeeper),

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

// wasm
Expand Down
9 changes: 3 additions & 6 deletions app/keepers/all_keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ 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"
ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper"

// ---------------------------------------------------------------
// IBC imports
Expand All @@ -28,9 +27,7 @@ import (
evmkeeper "github.com/NibiruChain/nibiru/v2/x/evm/keeper"
inflationkeeper "github.com/NibiruChain/nibiru/v2/x/inflation/keeper"
oraclekeeper "github.com/NibiruChain/nibiru/v2/x/oracle/keeper"

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

sudokeeper "github.com/NibiruChain/nibiru/v2/x/sudo/keeper"
tokenfactorykeeper "github.com/NibiruChain/nibiru/v2/x/tokenfactory/keeper"
)

Expand Down Expand Up @@ -62,7 +59,7 @@ type PublicKeepers struct {
EpochsKeeper epochskeeper.Keeper
OracleKeeper oraclekeeper.Keeper
InflationKeeper inflationkeeper.Keeper
SudoKeeper keeper.Keeper
SudoKeeper sudokeeper.Keeper
DevGasKeeper devgaskeeper.Keeper
TokenFactoryKeeper tokenfactorykeeper.Keeper
EvmKeeper *evmkeeper.Keeper
Expand Down
10 changes: 10 additions & 0 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,28 @@ 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/v1_5_0"
"github.com/NibiruChain/nibiru/v2/app/upgrades/v2_0_0"
"github.com/NibiruChain/nibiru/v2/app/upgrades/v2_1_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,
v1_5_0.Upgrade,
v2_0_0.Upgrade,
v2_1_0.Upgrade,
}

Expand Down
1 change: 0 additions & 1 deletion app/upgrades/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ 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"
)

Expand Down
24 changes: 24 additions & 0 deletions app/upgrades/v1_0_1/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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"
clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper"

"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, clientKeeper clientkeeper.Keeper) 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{},
}
24 changes: 24 additions & 0 deletions app/upgrades/v1_0_2/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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"
clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper"

"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, clientKeeper clientkeeper.Keeper) 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{},
}
24 changes: 24 additions & 0 deletions app/upgrades/v1_0_3/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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"
clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper"

"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, clientKeeper clientkeeper.Keeper) 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_5_0/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package v1_5_0

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"
clientkeeper "github.com/cosmos/ibc-go/v7/modules/core/02-client/keeper"

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

const UpgradeName = "v1.5.0"

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, clientKeeper clientkeeper.Keeper) 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{},
}
Loading
Loading