From d005d8097d6233799cbbf1bcdee98429ee01796b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 05:52:13 -0500 Subject: [PATCH 1/8] chore(deps): bump bufbuild/buf-setup-action from 1.35.1 to 1.36.0 (#1988) * chore(deps): bump bufbuild/buf-setup-action from 1.35.1 to 1.36.0 Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.35.1 to 1.36.0. - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.35.1...v1.36.0) --- updated-dependencies: - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Updated changelog - dependabot --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> Co-authored-by: Unique-Divine --- .github/workflows/proto-lint.yml | 4 ++-- CHANGELOG.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/proto-lint.yml b/.github/workflows/proto-lint.yml index 9ca71af07..1151f2994 100644 --- a/.github/workflows/proto-lint.yml +++ b/.github/workflows/proto-lint.yml @@ -22,7 +22,7 @@ jobs: # timeout-minutes: 5 # steps: # - uses: actions/checkout@v4 - # - uses: bufbuild/buf-setup-action@v1.35.1 + # - uses: bufbuild/buf-setup-action@v1.36.0 # - uses: bufbuild/buf-lint-action@v1 # with: # input: "proto" @@ -31,7 +31,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: bufbuild/buf-setup-action@v1.35.1 + - uses: bufbuild/buf-setup-action@v1.36.0 with: github_token: ${{ github.token }} - uses: bufbuild/buf-breaking-action@v1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d139fce3..d38860ccd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -153,7 +153,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bump `github.com/hashicorp/go-getter` from 1.7.1 to 1.7.5 ([#1858](https://github.com/NibiruChain/nibiru/pull/1858), [#1938](https://github.com/NibiruChain/nibiru/pull/1938)) - Bump `github.com/btcsuite/btcd` from 0.23.3 to 0.24.0 ([#1862](https://github.com/NibiruChain/nibiru/pull/1862)) - Bump `pozetroninc/github-action-get-latest-release` from 0.7.0 to 0.8.0 ([#1863](https://github.com/NibiruChain/nibiru/pull/1863)) -- Bump `bufbuild/buf-setup-action` from 1.30.1 to 1.35.1 ([#1891](https://github.com/NibiruChain/nibiru/pull/1891), [#1900](https://github.com/NibiruChain/nibiru/pull/1900), [#1923](https://github.com/NibiruChain/nibiru/pull/1923), [#1972](https://github.com/NibiruChain/nibiru/pull/1972), [#1974](https://github.com/NibiruChain/nibiru/pull/1974)) +- Bump `bufbuild/buf-setup-action` from 1.30.1 to 1.36.0 ([#1891](https://github.com/NibiruChain/nibiru/pull/1891), [#1900](https://github.com/NibiruChain/nibiru/pull/1900), [#1923](https://github.com/NibiruChain/nibiru/pull/1923), [#1972](https://github.com/NibiruChain/nibiru/pull/1972), [#1974](https://github.com/NibiruChain/nibiru/pull/1974), [#1988](https://github.com/NibiruChain/nibiru/pull/1988)) ## [v1.5.0](https://github.com/NibiruChain/nibiru/releases/tag/v1.5.0) - 2024-06-21 From 53a2d71b89328884f479a333dd40e720f33c0d7c Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Mon, 12 Aug 2024 04:12:35 -0700 Subject: [PATCH 2/8] refactor(test): rename test deps Chain to App (#1998) * refactor: rename test deps Chain to App * fix(e2e): increase localnet timeout because JSON-RPC server takes a little while longer to startup --------- Co-authored-by: Unique Divine <51418232+Unique-Divine@users.noreply.github.com> --- .github/workflows/e2e-evm.yml | 2 +- app/evmante/evmante_can_transfer_test.go | 8 +++---- app/evmante/evmante_emit_event_test.go | 2 +- app/evmante/evmante_gas_consume_test.go | 2 +- app/evmante/evmante_handler_test.go | 12 +++++----- .../evmante_increment_sender_seq_test.go | 4 ++-- app/evmante/evmante_mempool_fees_test.go | 2 +- app/evmante/evmante_setup_ctx_test.go | 6 ++--- app/evmante/evmante_sigverify_test.go | 4 ++-- app/evmante/evmante_validate_basic_test.go | 12 +++++----- app/evmante/evmante_verify_eth_acc_test.go | 2 +- contrib/scripts/localnet.sh | 1 + x/evm/evmmodule/genesis_test.go | 12 +++++----- x/evm/evmtest/erc20.go | 6 ++--- x/evm/evmtest/evmante.go | 4 ++-- x/evm/evmtest/test_deps.go | 12 +++++----- x/evm/evmtest/tx.go | 16 ++++++------- x/evm/keeper/erc20_test.go | 24 +++++++++---------- x/evm/keeper/grpc_query_test.go | 20 ++++++++-------- x/evm/keeper/msg_ethereum_tx_test.go | 14 +++++------ x/evm/keeper/statedb_test.go | 8 +++---- x/evm/precompile/funtoken_test.go | 6 ++--- x/evm/precompile/precompile_test.go | 2 +- x/evm/statedb/statedb_test.go | 2 +- 24 files changed, 92 insertions(+), 91 deletions(-) diff --git a/.github/workflows/e2e-evm.yml b/.github/workflows/e2e-evm.yml index 20ef7be07..5c6a4b1d3 100644 --- a/.github/workflows/e2e-evm.yml +++ b/.github/workflows/e2e-evm.yml @@ -74,7 +74,7 @@ jobs: - name: "Launch localnet" run: | just localnet --no-build & - sleep 6 + sleep 10 - name: "Run tests (just test)" run: just test diff --git a/app/evmante/evmante_can_transfer_test.go b/app/evmante/evmante_can_transfer_test.go index 31cfa3443..5863a0890 100644 --- a/app/evmante/evmante_can_transfer_test.go +++ b/app/evmante/evmante_can_transfer_test.go @@ -23,7 +23,7 @@ func (s *TestSuite) TestCanTransferDecorator() { beforeTxSetup: func(deps *evmtest.TestDeps, sdb *statedb.StateDB) { s.NoError( testapp.FundAccount( - deps.Chain.BankKeeper, + deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, sdk.NewCoins(sdk.NewInt64Coin(eth.EthBaseDenom, 100)), @@ -34,7 +34,7 @@ func (s *TestSuite) TestCanTransferDecorator() { txMsg := evmtest.HappyTransferTx(deps, 0) txBuilder := deps.EncCfg.TxConfig.NewTxBuilder() - gethSigner := deps.Sender.GethSigner(deps.Chain.EvmKeeper.EthChainID(deps.Ctx)) + gethSigner := deps.Sender.GethSigner(deps.App.EvmKeeper.EthChainID(deps.Ctx)) keyringSigner := deps.Sender.KeyringSigner err := txMsg.Sign(gethSigner, keyringSigner) s.Require().NoError(err) @@ -52,7 +52,7 @@ func (s *TestSuite) TestCanTransferDecorator() { txMsg := evmtest.HappyTransferTx(deps, 0) txBuilder := deps.EncCfg.TxConfig.NewTxBuilder() - gethSigner := deps.Sender.GethSigner(deps.Chain.EvmKeeper.EthChainID(deps.Ctx)) + gethSigner := deps.Sender.GethSigner(deps.App.EvmKeeper.EthChainID(deps.Ctx)) keyringSigner := deps.Sender.KeyringSigner err := txMsg.Sign(gethSigner, keyringSigner) s.Require().NoError(err) @@ -90,7 +90,7 @@ func (s *TestSuite) TestCanTransferDecorator() { s.Run(tc.name, func() { deps := evmtest.NewTestDeps() stateDB := deps.StateDB() - anteDec := evmante.NewCanTransferDecorator(&deps.Chain.AppKeepers.EvmKeeper) + anteDec := evmante.NewCanTransferDecorator(&deps.App.AppKeepers.EvmKeeper) tx := tc.txSetup(&deps) if tc.ctxSetup != nil { diff --git a/app/evmante/evmante_emit_event_test.go b/app/evmante/evmante_emit_event_test.go index 366fbd3b9..b1873f06c 100644 --- a/app/evmante/evmante_emit_event_test.go +++ b/app/evmante/evmante_emit_event_test.go @@ -42,7 +42,7 @@ func (s *TestSuite) TestEthEmitEventDecorator() { s.Run(tc.name, func() { deps := evmtest.NewTestDeps() stateDB := deps.StateDB() - anteDec := evmante.NewEthEmitEventDecorator(&deps.Chain.AppKeepers.EvmKeeper) + anteDec := evmante.NewEthEmitEventDecorator(&deps.App.AppKeepers.EvmKeeper) tx := tc.txSetup(&deps) s.Require().NoError(stateDB.Commit()) diff --git a/app/evmante/evmante_gas_consume_test.go b/app/evmante/evmante_gas_consume_test.go index 04f85c5e8..3688ba046 100644 --- a/app/evmante/evmante_gas_consume_test.go +++ b/app/evmante/evmante_gas_consume_test.go @@ -61,7 +61,7 @@ func (s *TestSuite) TestAnteDecEthGasConsume() { deps := evmtest.NewTestDeps() stateDB := deps.StateDB() anteDec := evmante.NewAnteDecEthGasConsume( - &deps.Chain.AppKeepers.EvmKeeper, tc.maxGasWanted, + &deps.App.AppKeepers.EvmKeeper, tc.maxGasWanted, ) tc.beforeTxSetup(&deps, stateDB) diff --git a/app/evmante/evmante_handler_test.go b/app/evmante/evmante_handler_test.go index c1fa5c8d0..edf3c51f3 100644 --- a/app/evmante/evmante_handler_test.go +++ b/app/evmante/evmante_handler_test.go @@ -52,7 +52,7 @@ func (s *TestSuite) TestAnteHandlerEVM() { txMsg := evmtest.HappyTransferTx(deps, 0) txBuilder := deps.EncCfg.TxConfig.NewTxBuilder() - gethSigner := deps.Sender.GethSigner(deps.Chain.EvmKeeper.EthChainID(deps.Ctx)) + gethSigner := deps.Sender.GethSigner(deps.App.EvmKeeper.EthChainID(deps.Ctx)) keyringSigner := deps.Sender.KeyringSigner err := txMsg.Sign(gethSigner, keyringSigner) s.Require().NoError(err) @@ -74,15 +74,15 @@ func (s *TestSuite) TestAnteHandlerEVM() { anteHandlerEVM := evmante.NewAnteHandlerEVM( ante.AnteHandlerOptions{ HandlerOptions: authante.HandlerOptions{ - AccountKeeper: deps.Chain.AccountKeeper, - BankKeeper: deps.Chain.BankKeeper, - FeegrantKeeper: deps.Chain.FeeGrantKeeper, + AccountKeeper: deps.App.AccountKeeper, + BankKeeper: deps.App.BankKeeper, + FeegrantKeeper: deps.App.FeeGrantKeeper, SignModeHandler: deps.EncCfg.TxConfig.SignModeHandler(), SigGasConsumer: authante.DefaultSigVerificationGasConsumer, ExtensionOptionChecker: func(*codectypes.Any) bool { return true }, }, - EvmKeeper: deps.Chain.EvmKeeper, - AccountKeeper: deps.Chain.AccountKeeper, + EvmKeeper: deps.App.EvmKeeper, + AccountKeeper: deps.App.AccountKeeper, }) tx := tc.txSetup(&deps) diff --git a/app/evmante/evmante_increment_sender_seq_test.go b/app/evmante/evmante_increment_sender_seq_test.go index 800327e6f..00f19afd3 100644 --- a/app/evmante/evmante_increment_sender_seq_test.go +++ b/app/evmante/evmante_increment_sender_seq_test.go @@ -67,7 +67,7 @@ func (s *TestSuite) TestAnteDecEthIncrementSenderSequence() { s.Run(tc.name, func() { deps := evmtest.NewTestDeps() stateDB := deps.StateDB() - anteDec := evmante.NewAnteDecEthIncrementSenderSequence(&deps.Chain.EvmKeeper, deps.Chain.AccountKeeper) + anteDec := evmante.NewAnteDecEthIncrementSenderSequence(&deps.App.EvmKeeper, deps.App.AccountKeeper) if tc.beforeTxSetup != nil { tc.beforeTxSetup(&deps, stateDB) @@ -85,7 +85,7 @@ func (s *TestSuite) TestAnteDecEthIncrementSenderSequence() { s.Require().NoError(err) if tc.wantSeq > 0 { - seq := deps.Chain.AccountKeeper.GetAccount(deps.Ctx, deps.Sender.NibiruAddr).GetSequence() + seq := deps.App.AccountKeeper.GetAccount(deps.Ctx, deps.Sender.NibiruAddr).GetSequence() s.Require().Equal(tc.wantSeq, seq) } }) diff --git a/app/evmante/evmante_mempool_fees_test.go b/app/evmante/evmante_mempool_fees_test.go index 7dda8ac9f..930939378 100644 --- a/app/evmante/evmante_mempool_fees_test.go +++ b/app/evmante/evmante_mempool_fees_test.go @@ -82,7 +82,7 @@ func (s *TestSuite) TestMempoolGasFeeDecorator() { for _, tc := range testCases { s.Run(tc.name, func() { deps := evmtest.NewTestDeps() - anteDec := evmante.NewMempoolGasPriceDecorator(&deps.Chain.AppKeepers.EvmKeeper) + anteDec := evmante.NewMempoolGasPriceDecorator(&deps.App.AppKeepers.EvmKeeper) tx := tc.txSetup(&deps) diff --git a/app/evmante/evmante_setup_ctx_test.go b/app/evmante/evmante_setup_ctx_test.go index 074358f41..65c6b29f9 100644 --- a/app/evmante/evmante_setup_ctx_test.go +++ b/app/evmante/evmante_setup_ctx_test.go @@ -13,13 +13,13 @@ import ( func (s *TestSuite) TestEthSetupContextDecorator() { deps := evmtest.NewTestDeps() stateDB := deps.StateDB() - anteDec := evmante.NewEthSetUpContextDecorator(&deps.Chain.EvmKeeper) + anteDec := evmante.NewEthSetUpContextDecorator(&deps.App.EvmKeeper) s.Require().NoError(stateDB.Commit()) tx := evmtest.HappyCreateContractTx(&deps) // Set block gas used to non 0 to check that handler resets it - deps.Chain.EvmKeeper.EvmState.BlockGasUsed.Set(deps.Ctx, 1000) + deps.App.EvmKeeper.EvmState.BlockGasUsed.Set(deps.Ctx, 1000) // Ante handler returns new context newCtx, err := anteDec.AnteHandle( @@ -37,7 +37,7 @@ func (s *TestSuite) TestEthSetupContextDecorator() { s.Require().Equal(defaultGasConfig, newCtx.TransientKVGasConfig()) // Check that block gas used is reset to 0 - gas, err := deps.Chain.EvmKeeper.EvmState.BlockGasUsed.Get(newCtx) + gas, err := deps.App.EvmKeeper.EvmState.BlockGasUsed.Get(newCtx) s.Require().NoError(err) s.Require().Equal(gas, uint64(0)) } diff --git a/app/evmante/evmante_sigverify_test.go b/app/evmante/evmante_sigverify_test.go index 989ece7ce..908bd19f7 100644 --- a/app/evmante/evmante_sigverify_test.go +++ b/app/evmante/evmante_sigverify_test.go @@ -54,7 +54,7 @@ func (s *TestSuite) TestEthSigVerificationDecorator() { name: "happy: signed ethereum tx", txSetup: func(deps *evmtest.TestDeps) sdk.Tx { tx := evmtest.HappyCreateContractTx(deps) - gethSigner := deps.Sender.GethSigner(deps.Chain.EvmKeeper.EthChainID(deps.Ctx)) + gethSigner := deps.Sender.GethSigner(deps.App.EvmKeeper.EthChainID(deps.Ctx)) keyringSigner := deps.Sender.KeyringSigner err := tx.Sign(gethSigner, keyringSigner) s.Require().NoError(err) @@ -68,7 +68,7 @@ func (s *TestSuite) TestEthSigVerificationDecorator() { s.Run(tc.name, func() { deps := evmtest.NewTestDeps() stateDB := deps.StateDB() - anteDec := evmante.NewEthSigVerificationDecorator(&deps.Chain.AppKeepers.EvmKeeper) + anteDec := evmante.NewEthSigVerificationDecorator(&deps.App.AppKeepers.EvmKeeper) tx := tc.txSetup(&deps) s.Require().NoError(stateDB.Commit()) diff --git a/app/evmante/evmante_validate_basic_test.go b/app/evmante/evmante_validate_basic_test.go index 60ea82a4c..51d3b9390 100644 --- a/app/evmante/evmante_validate_basic_test.go +++ b/app/evmante/evmante_validate_basic_test.go @@ -113,7 +113,7 @@ func (s *TestSuite) TestEthValidateBasicDecorator() { s.Require().NoError(err) txMsg := evmtest.HappyCreateContractTx(deps) - gethSigner := deps.Sender.GethSigner(deps.Chain.EvmKeeper.EthChainID(deps.Ctx)) + gethSigner := deps.Sender.GethSigner(deps.App.EvmKeeper.EthChainID(deps.Ctx)) keyringSigner := deps.Sender.KeyringSigner err = txMsg.Sign(gethSigner, keyringSigner) s.Require().NoError(err) @@ -127,7 +127,7 @@ func (s *TestSuite) TestEthValidateBasicDecorator() { { name: "sad: tx without extension options should fail", txSetup: func(deps *evmtest.TestDeps) sdk.Tx { - chainID := deps.Chain.EvmKeeper.EthChainID(deps.Ctx) + chainID := deps.App.EvmKeeper.EthChainID(deps.Ctx) gasLimit := uint64(10) fees := sdk.NewCoins(sdk.NewInt64Coin("unibi", int64(gasLimit))) msg := buildEthMsg(chainID, gasLimit, deps.Sender.NibiruAddr.String(), nil) @@ -152,7 +152,7 @@ func (s *TestSuite) TestEthValidateBasicDecorator() { { name: "sad: tx with from value set should fail", txSetup: func(deps *evmtest.TestDeps) sdk.Tx { - chainID := deps.Chain.EvmKeeper.EthChainID(deps.Ctx) + chainID := deps.App.EvmKeeper.EthChainID(deps.Ctx) gasLimit := uint64(10) fees := sdk.NewCoins(sdk.NewInt64Coin("unibi", int64(gasLimit))) msg := buildEthMsg(chainID, gasLimit, deps.Sender.NibiruAddr.String(), nil) @@ -163,7 +163,7 @@ func (s *TestSuite) TestEthValidateBasicDecorator() { { name: "sad: tx with fee <> msg fee", txSetup: func(deps *evmtest.TestDeps) sdk.Tx { - chainID := deps.Chain.EvmKeeper.EthChainID(deps.Ctx) + chainID := deps.App.EvmKeeper.EthChainID(deps.Ctx) gasLimit := uint64(10) fees := sdk.NewCoins(sdk.NewInt64Coin("unibi", 5)) msg := buildEthMsg(chainID, gasLimit, "", nil) @@ -174,7 +174,7 @@ func (s *TestSuite) TestEthValidateBasicDecorator() { { name: "sad: tx with gas limit <> msg gas limit", txSetup: func(deps *evmtest.TestDeps) sdk.Tx { - chainID := deps.Chain.EvmKeeper.EthChainID(deps.Ctx) + chainID := deps.App.EvmKeeper.EthChainID(deps.Ctx) gasLimit := uint64(10) fees := sdk.NewCoins(sdk.NewInt64Coin("unibi", int64(gasLimit))) msg := buildEthMsg(chainID, gasLimit, "", nil) @@ -188,7 +188,7 @@ func (s *TestSuite) TestEthValidateBasicDecorator() { s.Run(tc.name, func() { deps := evmtest.NewTestDeps() stateDB := deps.StateDB() - anteDec := evmante.NewEthValidateBasicDecorator(&deps.Chain.AppKeepers.EvmKeeper) + anteDec := evmante.NewEthValidateBasicDecorator(&deps.App.AppKeepers.EvmKeeper) tx := tc.txSetup(&deps) s.Require().NoError(stateDB.Commit()) diff --git a/app/evmante/evmante_verify_eth_acc_test.go b/app/evmante/evmante_verify_eth_acc_test.go index f0fc05c08..0e5a03ae3 100644 --- a/app/evmante/evmante_verify_eth_acc_test.go +++ b/app/evmante/evmante_verify_eth_acc_test.go @@ -65,7 +65,7 @@ func (s *TestSuite) TestAnteDecoratorVerifyEthAcc_CheckTx() { s.Run(tc.name, func() { deps := evmtest.NewTestDeps() stateDB := deps.StateDB() - anteDec := evmante.NewAnteDecVerifyEthAcc(&deps.Chain.AppKeepers.EvmKeeper, &deps.Chain.AppKeepers.AccountKeeper) + anteDec := evmante.NewAnteDecVerifyEthAcc(&deps.App.AppKeepers.EvmKeeper, &deps.App.AppKeepers.AccountKeeper) tc.beforeTxSetup(&deps, stateDB) tx := tc.txSetup(&deps) diff --git a/contrib/scripts/localnet.sh b/contrib/scripts/localnet.sh index d61c3ecdf..cc32dd28b 100755 --- a/contrib/scripts/localnet.sh +++ b/contrib/scripts/localnet.sh @@ -185,6 +185,7 @@ val_address=${val_address:-"nibi1zaavvzxez0elundtn32qnk9lkm8kmcsz44g7xl"} $BINARY add-genesis-account $val_address $GENESIS_COINS # EVM encoded nibi address for the same account $BINARY add-genesis-account nibi1cr6tg4cjvux00pj6zjqkh6d0jzg7mksaywxyl3 $GENESIS_COINS +$BINARY add-genesis-account nibi1ltez0kkshywzm675rkh8rj2eaf8et78cqjqrhc $GENESIS_COINS echo_success "Successfully added genesis account: $val_key_name" # ------------------------------------------------------------------------ diff --git a/x/evm/evmmodule/genesis_test.go b/x/evm/evmmodule/genesis_test.go index 6b3a502c7..d0eed611e 100644 --- a/x/evm/evmmodule/genesis_test.go +++ b/x/evm/evmmodule/genesis_test.go @@ -68,9 +68,9 @@ func (s *Suite) TestExportInitGenesis() { // Fund sender's wallet spendableCoins := sdk.NewCoins(sdk.NewInt64Coin("unibi", totalSupply.Int64())) - err = deps.Chain.BankKeeper.MintCoins(deps.Ctx, evm.ModuleName, spendableCoins) + err = deps.App.BankKeeper.MintCoins(deps.Ctx, evm.ModuleName, spendableCoins) s.Require().NoError(err) - err = deps.Chain.BankKeeper.SendCoinsFromModuleToAccount( + err = deps.App.BankKeeper.SendCoinsFromModuleToAccount( deps.Ctx, evm.ModuleName, deps.Sender.NibiruAddr, spendableCoins, ) s.Require().NoError(err) @@ -87,13 +87,13 @@ func (s *Suite) TestExportInitGenesis() { s.Require().NoError(err) // Export genesis - evmGenesisState := evmmodule.ExportGenesis(deps.Ctx, &deps.EvmKeeper, deps.Chain.AccountKeeper) - authGenesisState := deps.Chain.AccountKeeper.ExportGenesis(deps.Ctx) + evmGenesisState := evmmodule.ExportGenesis(deps.Ctx, &deps.EvmKeeper, deps.App.AccountKeeper) + authGenesisState := deps.App.AccountKeeper.ExportGenesis(deps.Ctx) // Init genesis from the exported state deps = evmtest.NewTestDeps() - deps.Chain.AccountKeeper.InitGenesis(deps.Ctx, *authGenesisState) - evmmodule.InitGenesis(deps.Ctx, &deps.EvmKeeper, deps.Chain.AccountKeeper, *evmGenesisState) + deps.App.AccountKeeper.InitGenesis(deps.Ctx, *authGenesisState) + evmmodule.InitGenesis(deps.Ctx, &deps.EvmKeeper, deps.App.AccountKeeper, *evmGenesisState) // Verify erc20 balances for users A, B and sender balance, err := deps.EvmKeeper.ERC20().BalanceOf(erc20Addr, toUserA, deps.Ctx) diff --git a/x/evm/evmtest/erc20.go b/x/evm/evmtest/erc20.go index ce2d1c1e8..4ce8070b3 100644 --- a/x/evm/evmtest/erc20.go +++ b/x/evm/evmtest/erc20.go @@ -51,14 +51,14 @@ func CreateFunTokenForBankCoin( Name: bankDenom, Symbol: bankDenom, } - if deps.Chain.BankKeeper.HasDenomMetaData(deps.Ctx, bankDenom) { + if deps.App.BankKeeper.HasDenomMetaData(deps.Ctx, bankDenom) { s.Failf("setting bank.DenomMetadata would overwrite existing denom \"%s\"", bankDenom) } - deps.Chain.BankKeeper.SetDenomMetaData(deps.Ctx, bankMetadata) + deps.App.BankKeeper.SetDenomMetaData(deps.Ctx, bankMetadata) // Give the sender funds for the fee err := testapp.FundAccount( - deps.Chain.BankKeeper, + deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), diff --git a/x/evm/evmtest/evmante.go b/x/evm/evmtest/evmante.go index c874a8e75..6143f36f3 100644 --- a/x/evm/evmtest/evmante.go +++ b/x/evm/evmtest/evmante.go @@ -21,7 +21,7 @@ var NextNoOpAnteHandler sdk.AnteHandler = func( func HappyTransferTx(deps *TestDeps, nonce uint64) *evm.MsgEthereumTx { to := NewEthAccInfo().EthAddr ethContractCreationTxParams := &evm.EvmTxArgs{ - ChainID: deps.Chain.EvmKeeper.EthChainID(deps.Ctx), + ChainID: deps.App.EvmKeeper.EthChainID(deps.Ctx), Nonce: nonce, Amount: big.NewInt(10), GasLimit: GasLimitCreateContract().Uint64(), @@ -68,7 +68,7 @@ func buildTx( func HappyCreateContractTx(deps *TestDeps) *evm.MsgEthereumTx { ethContractCreationTxParams := &evm.EvmTxArgs{ - ChainID: deps.Chain.EvmKeeper.EthChainID(deps.Ctx), + ChainID: deps.App.EvmKeeper.EthChainID(deps.Ctx), Nonce: 1, Amount: big.NewInt(10), GasLimit: GasLimitCreateContract().Uint64(), diff --git a/x/evm/evmtest/test_deps.go b/x/evm/evmtest/test_deps.go index 1ad239c73..10aa7b788 100644 --- a/x/evm/evmtest/test_deps.go +++ b/x/evm/evmtest/test_deps.go @@ -19,7 +19,7 @@ import ( ) type TestDeps struct { - Chain *app.NibiruApp + App *app.NibiruApp Ctx sdk.Context EncCfg codec.EncodingConfig EvmKeeper keeper.Keeper @@ -36,21 +36,21 @@ func NewTestDeps() TestDeps { encCfg := app.MakeEncodingConfig() evm.RegisterInterfaces(encCfg.InterfaceRegistry) eth.RegisterInterfaces(encCfg.InterfaceRegistry) - chain, ctx := testapp.NewNibiruTestAppAndContext() + app, ctx := testapp.NewNibiruTestAppAndContext() ctx = ctx.WithChainID(eth.EIP155ChainID_Testnet) ethAcc := NewEthAccInfo() return TestDeps{ - Chain: chain, + App: app, Ctx: ctx, EncCfg: encCfg, - EvmKeeper: chain.EvmKeeper, + EvmKeeper: app.EvmKeeper, GenState: evm.DefaultGenesisState(), Sender: ethAcc, } } func (deps TestDeps) StateDB() *statedb.StateDB { - return statedb.New(deps.Ctx, &deps.Chain.EvmKeeper, + return statedb.New(deps.Ctx, &deps.App.EvmKeeper, statedb.NewEmptyTxConfig( gethcommon.BytesToHash(deps.Ctx.HeaderHash().Bytes()), ), @@ -59,5 +59,5 @@ func (deps TestDeps) StateDB() *statedb.StateDB { func (deps *TestDeps) GethSigner() gethcore.Signer { ctx := deps.Ctx - return deps.Sender.GethSigner(deps.Chain.EvmKeeper.EthChainID(ctx)) + return deps.Sender.GethSigner(deps.App.EvmKeeper.EthChainID(ctx)) } diff --git a/x/evm/evmtest/tx.go b/x/evm/evmtest/tx.go index f196b8d1c..187292b7c 100644 --- a/x/evm/evmtest/tx.go +++ b/x/evm/evmtest/tx.go @@ -123,7 +123,7 @@ func ExecuteNibiTransfer(deps *TestDeps, t *testing.T) *evm.MsgEthereumTx { ethTxMsg, err := GenerateAndSignEthTxMsg(txArgs, deps) require.NoError(t, err) - resp, err := deps.Chain.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) + resp, err := deps.App.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) require.NoError(t, err) require.Empty(t, resp.VmError) return ethTxMsg @@ -160,7 +160,7 @@ func DeployContract( ethTxMsg, err := GenerateAndSignEthTxMsg(jsonTxArgs, deps) require.NoError(t, err) - resp, err := deps.Chain.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) + resp, err := deps.App.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) require.NoError(t, err) require.Empty(t, resp.VmError) @@ -187,7 +187,7 @@ func DeployAndExecuteERC20Transfer( // Contract address is deterministic contractAddress := crypto.CreateAddress(deps.Sender.EthAddr, nonce) - deps.Chain.Commit() + deps.App.Commit() predecessors := []*evm.MsgEthereumTx{ deployResp.EthTxMsg, } @@ -207,7 +207,7 @@ func DeployAndExecuteERC20Transfer( ethTxMsg, err := GenerateAndSignEthTxMsg(txArgs, deps) require.NoError(t, err) - resp, err := deps.Chain.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) + resp, err := deps.App.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) require.NoError(t, err) require.Empty(t, resp.VmError) @@ -222,11 +222,11 @@ func GenerateAndSignEthTxMsg( if err != nil { return nil, err } - res, err := deps.Chain.EvmKeeper.EstimateGas(deps.GoCtx(), &evm.EthCallRequest{ + res, err := deps.App.EvmKeeper.EstimateGas(deps.GoCtx(), &evm.EthCallRequest{ Args: estimateArgs, GasCap: srvconfig.DefaultEthCallGasLimit, ProposerAddress: []byte{}, - ChainId: deps.Chain.EvmKeeper.EthChainID(deps.Ctx).Int64(), + ChainId: deps.App.EvmKeeper.EthChainID(deps.Ctx).Int64(), }) if err != nil { return nil, err @@ -234,7 +234,7 @@ func GenerateAndSignEthTxMsg( txArgs.Gas = (*hexutil.Uint64)(&res.Gas) txMsg := txArgs.ToTransaction() - gethSigner := deps.Sender.GethSigner(deps.Chain.EvmKeeper.EthChainID(deps.Ctx)) + gethSigner := deps.Sender.GethSigner(deps.App.EvmKeeper.EthChainID(deps.Ctx)) keyringSigner := deps.Sender.KeyringSigner return txMsg, txMsg.Sign(gethSigner, keyringSigner) } @@ -261,7 +261,7 @@ func TransferWei( return fmt.Errorf("error while transferring wei: %w", err) } - _, err = deps.Chain.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) + _, err = deps.App.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) if err != nil { return fmt.Errorf("error while transferring wei: %w", err) } diff --git a/x/evm/keeper/erc20_test.go b/x/evm/keeper/erc20_test.go index f61fbf930..3784ede3f 100644 --- a/x/evm/keeper/erc20_test.go +++ b/x/evm/keeper/erc20_test.go @@ -79,7 +79,7 @@ func (s *Suite) TestCreateFunTokenFromERC20() { // Give the sender funds for the fee err = testapp.FundAccount( - deps.Chain.BankKeeper, + deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), @@ -118,7 +118,7 @@ func (s *Suite) TestCreateFunTokenFromERC20() { s.T().Log("sad: CreateFunToken for the ERC20: already registered") // Give the sender funds for the fee err = testapp.FundAccount( - deps.Chain.BankKeeper, + deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), @@ -197,12 +197,12 @@ func (s *Suite) TestCreateFunTokenFromCoin() { s.T().Log("Setup: Create a coin in the bank state") bankDenom := "sometoken" - setBankDenomMetadata(deps.Ctx, deps.Chain.BankKeeper, bankDenom) + setBankDenomMetadata(deps.Ctx, deps.App.BankKeeper, bankDenom) s.T().Log("happy: CreateFunToken for the bank coin") // Give the sender funds for the fee err = testapp.FundAccount( - deps.Chain.BankKeeper, + deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), @@ -260,7 +260,7 @@ func (s *Suite) TestCreateFunTokenFromCoin() { s.T().Log("sad: CreateFunToken for the bank coin: already registered") // Give the sender funds for the fee err = testapp.FundAccount( - deps.Chain.BankKeeper, + deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), @@ -314,24 +314,24 @@ func (s *Suite) TestSendFunTokenToEvm() { deps := evmtest.NewTestDeps() bankDenom := "unibi" recipientEVMAddr := eth.MustNewHexAddrFromStr("0x1234500000000000000000000000000000000000") - evmModuleAddr := deps.Chain.AccountKeeper.GetModuleAddress(evm.ModuleName) + evmModuleAddr := deps.App.AccountKeeper.GetModuleAddress(evm.ModuleName) spendableAmount := tc.senderBalanceBefore.Int64() spendableCoins := sdk.NewCoins(sdk.NewInt64Coin(bankDenom, spendableAmount)) ctx := deps.GoCtx() - setBankDenomMetadata(deps.Ctx, deps.Chain.BankKeeper, bankDenom) + setBankDenomMetadata(deps.Ctx, deps.App.BankKeeper, bankDenom) // Fund sender's wallet - err := deps.Chain.BankKeeper.MintCoins(deps.Ctx, evm.ModuleName, spendableCoins) + err := deps.App.BankKeeper.MintCoins(deps.Ctx, evm.ModuleName, spendableCoins) s.Require().NoError(err) - err = deps.Chain.BankKeeper.SendCoinsFromModuleToAccount( + err = deps.App.BankKeeper.SendCoinsFromModuleToAccount( deps.Ctx, evm.ModuleName, deps.Sender.NibiruAddr, spendableCoins, ) s.Require().NoError(err) // Give the sender funds for the fee err = testapp.FundAccount( - deps.Chain.BankKeeper, + deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), @@ -378,7 +378,7 @@ func (s *Suite) TestSendFunTokenToEvm() { ) // Check 1: coins are stored on a module balance - moduleBalance, err := deps.Chain.BankKeeper.Balance(ctx, &bank.QueryBalanceRequest{ + moduleBalance, err := deps.App.BankKeeper.Balance(ctx, &bank.QueryBalanceRequest{ Address: evmModuleAddr.String(), Denom: bankDenom, }) @@ -386,7 +386,7 @@ func (s *Suite) TestSendFunTokenToEvm() { s.Equal(tc.amountToSend, moduleBalance.Balance.Amount) // Check 2: Sender balance reduced by send amount - senderBalance, err := deps.Chain.BankKeeper.Balance(ctx, &bank.QueryBalanceRequest{ + senderBalance, err := deps.App.BankKeeper.Balance(ctx, &bank.QueryBalanceRequest{ Address: deps.Sender.NibiruAddr.String(), Denom: bankDenom, }) diff --git a/x/evm/keeper/grpc_query_test.go b/x/evm/keeper/grpc_query_test.go index cb697b45d..403468e78 100644 --- a/x/evm/keeper/grpc_query_test.go +++ b/x/evm/keeper/grpc_query_test.go @@ -77,7 +77,7 @@ func (s *Suite) TestQueryEvmAccount() { // fund account with 420 tokens ethAddr := deps.Sender.EthAddr coins := sdk.Coins{sdk.NewInt64Coin(evm.DefaultEVMDenom, 420)} - err := testapp.FundAccount(deps.Chain.BankKeeper, deps.Ctx, ethAddr.Bytes(), coins) + err := testapp.FundAccount(deps.App.BankKeeper, deps.Ctx, ethAddr.Bytes(), coins) s.Require().NoError(err) }, scenario: func(deps *evmtest.TestDeps) (req In, wantResp Out) { @@ -102,7 +102,7 @@ func (s *Suite) TestQueryEvmAccount() { // fund account with 420 tokens ethAddr := deps.Sender.EthAddr coins := sdk.Coins{sdk.NewInt64Coin(evm.DefaultEVMDenom, 420)} - err := testapp.FundAccount(deps.Chain.BankKeeper, deps.Ctx, ethAddr.Bytes(), coins) + err := testapp.FundAccount(deps.App.BankKeeper, deps.Ctx, ethAddr.Bytes(), coins) s.Require().NoError(err) }, scenario: func(deps *evmtest.TestDeps) (req In, wantResp Out) { @@ -211,7 +211,7 @@ func (s *Suite) TestQueryValidatorAccount() { name: "happy: default values", setup: func(deps *evmtest.TestDeps) {}, scenario: func(deps *evmtest.TestDeps) (req In, wantResp Out) { - valopers := deps.Chain.StakingKeeper.GetValidators(deps.Ctx, 1) + valopers := deps.App.StakingKeeper.GetValidators(deps.Ctx, 1) valAddrBz := valopers[0].GetOperator().Bytes() _, err := sdk.ConsAddressFromBech32(valopers[0].OperatorAddress) s.ErrorContains(err, "expected nibivalcons, got nibivaloper") @@ -233,7 +233,7 @@ func (s *Suite) TestQueryValidatorAccount() { name: "happy: with nonce", setup: func(deps *evmtest.TestDeps) {}, scenario: func(deps *evmtest.TestDeps) (req In, wantResp Out) { - valopers := deps.Chain.StakingKeeper.GetValidators(deps.Ctx, 1) + valopers := deps.App.StakingKeeper.GetValidators(deps.Ctx, 1) valAddrBz := valopers[0].GetOperator().Bytes() consAddr := sdk.ConsAddress(valAddrBz) @@ -242,7 +242,7 @@ func (s *Suite) TestQueryValidatorAccount() { coinsToSend := sdk.NewCoins(sdk.NewCoin(eth.EthBaseDenom, math.NewInt(69420))) valAddr := sdk.AccAddress(valAddrBz) s.NoError(testapp.FundAccount( - deps.Chain.BankKeeper, + deps.App.BankKeeper, deps.Ctx, valAddr, coinsToSend, )) @@ -251,7 +251,7 @@ func (s *Suite) TestQueryValidatorAccount() { ConsAddress: consAddr.String(), } - ak := deps.Chain.AccountKeeper + ak := deps.App.AccountKeeper acc := ak.GetAccount(deps.Ctx, valAddr) s.NoError(acc.SetAccountNumber(420), "acc: ", acc.String()) s.NoError(acc.SetSequence(69), "acc: ", acc.String()) @@ -491,7 +491,7 @@ func (s *Suite) TestQueryEthCall() { tc.setup(&deps) } req, wantResp := tc.scenario(&deps) - gotResp, err := deps.Chain.EvmKeeper.EthCall(deps.GoCtx(), req) + gotResp, err := deps.App.EvmKeeper.EthCall(deps.GoCtx(), req) if tc.wantErr != "" { s.Require().ErrorContains(err, tc.wantErr) return @@ -537,7 +537,7 @@ func (s *Suite) TestQueryBalance() { { name: "happy: non zero balance", setup: func(deps *evmtest.TestDeps) { - chain := deps.Chain + chain := deps.App ethAddr := deps.Sender.EthAddr // fund account with 420 tokens @@ -656,7 +656,7 @@ func (s *Suite) TestEstimateGasForEvmCallType() { name: "happy: estimate gas for transfer", scenario: func(deps *evmtest.TestDeps) (req In, wantResp Out) { // fund the account - chain := deps.Chain + chain := deps.App ethAddr := deps.Sender.EthAddr coins := sdk.Coins{sdk.NewInt64Coin(evm.DefaultEVMDenom, 1000)} err := chain.BankKeeper.MintCoins(deps.Ctx, evm.ModuleName, coins) @@ -666,7 +666,7 @@ func (s *Suite) TestEstimateGasForEvmCallType() { s.Require().NoError(err) // assert balance of 1000 * 10^12 wei - resp, _ := deps.Chain.EvmKeeper.Balance(deps.GoCtx(), &evm.QueryBalanceRequest{ + resp, _ := deps.App.EvmKeeper.Balance(deps.GoCtx(), &evm.QueryBalanceRequest{ Address: deps.Sender.EthAddr.Hex(), }) s.Equal("1000", resp.Balance) diff --git a/x/evm/keeper/msg_ethereum_tx_test.go b/x/evm/keeper/msg_ethereum_tx_test.go index f65028b10..2a5dc776b 100644 --- a/x/evm/keeper/msg_ethereum_tx_test.go +++ b/x/evm/keeper/msg_ethereum_tx_test.go @@ -35,7 +35,7 @@ func (s *Suite) TestMsgEthereumTx_CreateContract() { // Leftover gas fee is refunded within ApplyEvmTx from the FeeCollector // so, the module must have some coins err := testapp.FundModuleAccount( - deps.Chain.BankKeeper, + deps.App.BankKeeper, deps.Ctx, authtypes.FeeCollectorName, sdk.NewCoins(sdk.NewCoin("unibi", math.NewInt(1000_000))), @@ -55,7 +55,7 @@ func (s *Suite) TestMsgEthereumTx_CreateContract() { s.Require().NoError(ethTxMsg.ValidateBasic()) s.Equal(ethTxMsg.GetGas(), gasLimit.Uint64()) - resp, err := deps.Chain.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) + resp, err := deps.App.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) s.Require().NoError( err, "resp: %s\nblock header: %s", @@ -94,7 +94,7 @@ func (s *Suite) TestMsgEthereumTx_CreateContract() { s.Require().NoError(ethTxMsg.ValidateBasic()) s.Equal(ethTxMsg.GetGas(), gasLimit) - resp, err := deps.Chain.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) + resp, err := deps.App.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) s.Require().ErrorContains( err, core.ErrIntrinsicGas.Error(), @@ -118,7 +118,7 @@ func (s *Suite) TestMsgEthereumTx_ExecuteContract() { // Leftover gas fee is refunded within ApplyEvmTx from the FeeCollector // so, the module must have some coins err := testapp.FundModuleAccount( - deps.Chain.BankKeeper, + deps.App.BankKeeper, deps.Ctx, authtypes.FeeCollectorName, sdk.NewCoins(sdk.NewCoin("unibi", math.NewInt(1000_000))), @@ -148,7 +148,7 @@ func (s *Suite) TestMsgEthereumTx_ExecuteContract() { s.NoError(err) s.Require().NoError(ethTxMsg.ValidateBasic()) s.Equal(ethTxMsg.GetGas(), gasLimit.Uint64()) - resp, err := deps.Chain.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) + resp, err := deps.App.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) s.Require().NoError( err, "resp: %s\nblock header: %s", @@ -189,7 +189,7 @@ func (s *Suite) TestMsgEthereumTx_SimpleTransfer() { fundedAmount := evm.NativeToWei(big.NewInt(123)).Int64() err := testapp.FundAccount( - deps.Chain.BankKeeper, + deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, sdk.NewCoins(sdk.NewInt64Coin("unibi", fundedAmount)), @@ -213,7 +213,7 @@ func (s *Suite) TestMsgEthereumTx_SimpleTransfer() { ) s.NoError(err) - resp, err := deps.Chain.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) + resp, err := deps.App.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) s.Require().NoError(err) s.Require().Empty(resp.VmError) diff --git a/x/evm/keeper/statedb_test.go b/x/evm/keeper/statedb_test.go index 903dee7d1..3563e8d75 100644 --- a/x/evm/keeper/statedb_test.go +++ b/x/evm/keeper/statedb_test.go @@ -26,7 +26,7 @@ func (s *Suite) TestStateDBBalance() { s.T().Log("fund account in unibi. See expected wei amount.") err := testapp.FundAccount( - deps.Chain.BankKeeper, + deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, sdk.NewCoins(sdk.NewInt64Coin(evm.DefaultEVMDenom, 42)), @@ -38,7 +38,7 @@ func (s *Suite) TestStateDBBalance() { ) s.Equal( "42", - deps.Chain.BankKeeper.GetBalance(deps.Ctx, deps.Sender.NibiruAddr, evm.DefaultEVMDenom).Amount.String(), + deps.App.BankKeeper.GetBalance(deps.Ctx, deps.Sender.NibiruAddr, evm.DefaultEVMDenom).Amount.String(), ) } @@ -67,13 +67,13 @@ func (s *Suite) TestStateDBBalance() { deps := evmtest.NewTestDeps() toNibiAddr := eth.EthAddrToNibiruAddr(to) err := testapp.FundAccount( - deps.Chain.BankKeeper, + deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, sdk.NewCoins(sdk.NewInt64Coin(evm.DefaultEVMDenom, 8)), ) s.NoError(err) - err = deps.Chain.BankKeeper.SendCoins( + err = deps.App.BankKeeper.SendCoins( deps.Ctx, deps.Sender.NibiruAddr, toNibiAddr, sdk.NewCoins(sdk.NewInt64Coin(evm.DefaultEVMDenom, 3)), diff --git a/x/evm/precompile/funtoken_test.go b/x/evm/precompile/funtoken_test.go index f3e26cb51..1d425d52b 100644 --- a/x/evm/precompile/funtoken_test.go +++ b/x/evm/precompile/funtoken_test.go @@ -122,7 +122,7 @@ func (s *Suite) FunToken_HappyPath() { evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theUser, big.NewInt(69_419)) evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theEvm, big.NewInt(1)) s.Equal("0", - deps.Chain.BankKeeper.GetBalance(deps.Ctx, randomAcc, funtoken.BankDenom).Amount.String(), + deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, funtoken.BankDenom).Amount.String(), ) } @@ -140,12 +140,12 @@ func (s *Suite) FunToken_HappyPath() { evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theUser, big.NewInt(69_419-amtToSend)) evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theEvm, big.NewInt(1)) s.Equal(fmt.Sprintf("%d", amtToSend), - deps.Chain.BankKeeper.GetBalance(deps.Ctx, randomAcc, funtoken.BankDenom).Amount.String(), + deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, funtoken.BankDenom).Amount.String(), ) evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theUser, big.NewInt(69_000)) evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theEvm, big.NewInt(1)) s.Equal("419", - deps.Chain.BankKeeper.GetBalance(deps.Ctx, randomAcc, funtoken.BankDenom).Amount.String(), + deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, funtoken.BankDenom).Amount.String(), ) } diff --git a/x/evm/precompile/precompile_test.go b/x/evm/precompile/precompile_test.go index 387820687..3f1efa81c 100644 --- a/x/evm/precompile/precompile_test.go +++ b/x/evm/precompile/precompile_test.go @@ -27,7 +27,7 @@ func (s *Suite) TestOrderedPrecompileAddresses() { // Note that orderedKeys must be set after InitPrecompiles to mirror the // behavior of the Nibiru BaseApp. deps := evmtest.NewTestDeps() - var unorderedMap map[gethcommon.Address]vm.PrecompiledContract = precompile.InitPrecompiles(deps.Chain.PublicKeepers) + var unorderedMap map[gethcommon.Address]vm.PrecompiledContract = precompile.InitPrecompiles(deps.App.PublicKeepers) var orderedKeys []gethcommon.Address = vm.PrecompiledAddressesBerlin s.T().Log("2 | Compute ordered keys from VM") diff --git a/x/evm/statedb/statedb_test.go b/x/evm/statedb/statedb_test.go index 56e3cddc4..e8b7d3b94 100644 --- a/x/evm/statedb/statedb_test.go +++ b/x/evm/statedb/statedb_test.go @@ -520,7 +520,7 @@ func (s *Suite) TestLog() { ) deps := evmtest.NewTestDeps() - db := statedb.New(deps.Ctx, &deps.Chain.EvmKeeper, txConfig) + db := statedb.New(deps.Ctx, &deps.App.EvmKeeper, txConfig) logData := []byte("hello world") log := &gethcore.Log{ From 7a2038957779ae656b32ed345ce7dc12473e3869 Mon Sep 17 00:00:00 2001 From: Ruslan Shakirov Date: Tue, 13 Aug 2024 16:30:20 +0200 Subject: [PATCH 3/8] chore: bump nibi go package version to v2 (#1999) * chore: bump nibi go package version to v2 * chore: update changelog * chore: update nibi imports * chore: proto files - upgrade to version v2 --- CHANGELOG.md | 1 + app/ante.go | 6 +- app/ante/commission_test.go | 6 +- app/ante/fixed_gas.go | 2 +- app/ante/fixed_gas_test.go | 10 +- app/ante/gas_wanted.go | 2 +- app/ante/gas_wanted_test.go | 4 +- app/ante/handler_opts.go | 6 +- app/ante/reject_ethereum_tx_msgs.go | 2 +- app/ante/reject_ethereum_tx_msgs_test.go | 4 +- app/ante/testutil_test.go | 6 +- app/app.go | 6 +- app/appconst/appconst_test.go | 2 +- app/encoding.go | 2 +- app/evmante/evmante_can_transfer.go | 4 +- app/evmante/evmante_can_transfer_test.go | 10 +- app/evmante/evmante_emit_event.go | 2 +- app/evmante/evmante_emit_event_test.go | 8 +- app/evmante/evmante_gas_consume.go | 6 +- app/evmante/evmante_gas_consume_test.go | 10 +- app/evmante/evmante_handler.go | 2 +- app/evmante/evmante_handler_test.go | 12 +- app/evmante/evmante_increment_sender_seq.go | 2 +- .../evmante_increment_sender_seq_test.go | 6 +- app/evmante/evmante_mempool_fees.go | 2 +- app/evmante/evmante_mempool_fees_test.go | 4 +- app/evmante/evmante_setup_ctx_test.go | 4 +- app/evmante/evmante_sigverify.go | 2 +- app/evmante/evmante_sigverify_test.go | 6 +- app/evmante/evmante_validate_basic.go | 2 +- app/evmante/evmante_validate_basic_test.go | 10 +- app/evmante/evmante_verify_eth_acc.go | 6 +- app/evmante/evmante_verify_eth_acc_test.go | 8 +- app/evmante/interfaces.go | 6 +- app/evmante/suite_test.go | 2 +- app/ibc_test.go | 4 +- app/keepers.go | 54 ++--- app/keepers/all_keepers.go | 14 +- app/modules.go | 2 +- app/modules_test.go | 2 +- app/server/json_rpc.go | 6 +- app/server/start.go | 6 +- app/server/util.go | 2 +- app/upgrades.go | 10 +- app/upgrades/v1_1_0/constants.go | 4 +- app/upgrades/v1_2_0/constants.go | 2 +- app/upgrades/v1_3_0/constants.go | 2 +- app/upgrades/v1_4_0/constants.go | 2 +- app/wasmext/stargate_query.go | 12 +- app/wasmext/stargate_query_test.go | 16 +- app/wasmext/wasm_cli_test/cli_test.go | 12 +- cmd/nibid/cmd/decode_base64_test.go | 4 +- cmd/nibid/cmd/genaccounts_test.go | 6 +- cmd/nibid/cmd/init.go | 2 +- cmd/nibid/cmd/root.go | 12 +- cmd/nibid/cmd/root_test.go | 4 +- cmd/nibid/cmd/testnet.go | 2 +- cmd/nibid/cmd/testnet_test.go | 2 +- cmd/nibid/main.go | 4 +- contrib/scripts/protocgen.sh | 2 +- eth/account.pb.go | 11 +- eth/assert_test.go | 4 +- eth/chain_id.go | 2 +- eth/codec.go | 2 +- eth/crypto/codec/amino.go | 2 +- eth/crypto/codec/codec.go | 2 +- eth/crypto/ethsecp256k1/ethsecp256k1.go | 2 +- eth/crypto/hd/algorithm.go | 2 +- eth/crypto/hd/algorithm_test.go | 6 +- eth/crypto/hd/benchmark_test.go | 2 +- eth/crypto/keyring/options.go | 4 +- eth/eip712/eip712_fuzzer_test.go | 2 +- eth/eip712/eip712_test.go | 14 +- eth/eip712/encoding.go | 2 +- eth/eip712/encoding_legacy.go | 2 +- eth/encoding/codec/codec.go | 4 +- eth/encoding/config.go | 2 +- eth/encoding/config_test.go | 8 +- eth/eth_account_test.go | 4 +- eth/gas_limit_test.go | 4 +- eth/hex_test.go | 4 +- eth/indexer.pb.go | 40 ++-- eth/indexer/kv_indexer.go | 6 +- eth/indexer/kv_indexer_test.go | 14 +- eth/rpc/addrlocker_test.go | 2 +- eth/rpc/backend/account_info.go | 4 +- eth/rpc/backend/account_info_test.go | 8 +- eth/rpc/backend/backend.go | 8 +- eth/rpc/backend/backend_suite_test.go | 18 +- eth/rpc/backend/blocks.go | 4 +- eth/rpc/backend/blocks_test.go | 8 +- eth/rpc/backend/call_tx.go | 6 +- eth/rpc/backend/call_tx_test.go | 8 +- eth/rpc/backend/chain_info.go | 6 +- eth/rpc/backend/chain_info_test.go | 10 +- eth/rpc/backend/client_test.go | 6 +- eth/rpc/backend/evm_query_client_test.go | 10 +- eth/rpc/backend/filters_test.go | 6 +- eth/rpc/backend/mocks/evm_query_client.go | 2 +- eth/rpc/backend/node_info.go | 4 +- eth/rpc/backend/node_info_test.go | 4 +- eth/rpc/backend/sign_tx.go | 2 +- eth/rpc/backend/sign_tx_test.go | 8 +- eth/rpc/backend/tracing.go | 4 +- eth/rpc/backend/tracing_test.go | 8 +- eth/rpc/backend/tx_info.go | 6 +- eth/rpc/backend/tx_info_test.go | 10 +- eth/rpc/backend/utils.go | 4 +- eth/rpc/block.go | 2 +- eth/rpc/events.go | 4 +- eth/rpc/events_test.go | 2 +- eth/rpc/query_client.go | 2 +- eth/rpc/rpc.go | 2 +- eth/rpc/rpc_test.go | 4 +- eth/rpc/rpcapi/apis.go | 8 +- eth/rpc/rpcapi/debugapi/api.go | 6 +- eth/rpc/rpcapi/eth_api.go | 8 +- eth/rpc/rpcapi/eth_api_test.go | 22 +- eth/rpc/rpcapi/filtersapi/api.go | 4 +- eth/rpc/rpcapi/filtersapi/filter_system.go | 4 +- .../rpcapi/filtersapi/filter_system_test.go | 2 +- eth/rpc/rpcapi/filtersapi/filters.go | 4 +- eth/rpc/rpcapi/net_api.go | 4 +- eth/rpc/rpcapi/txpool_api.go | 2 +- eth/rpc/rpcapi/web3_api.go | 2 +- eth/rpc/rpcapi/websockets.go | 10 +- eth/safe_math_test.go | 2 +- eth/state_encoder_test.go | 2 +- go.mod | 2 +- gosdk/broadcast.go | 4 +- gosdk/clientctx.go | 2 +- gosdk/export_test.go | 6 +- gosdk/gosdk.go | 4 +- gosdk/gosdk_test.go | 8 +- gosdk/keys.go | 4 +- gosdk/keys_test.go | 2 +- gosdk/querier.go | 12 +- proto/eth/evm/v1/events.proto | 2 +- proto/eth/evm/v1/evm.proto | 4 +- proto/eth/evm/v1/genesis.proto | 2 +- proto/eth/evm/v1/query.proto | 2 +- proto/eth/evm/v1/tx.proto | 6 +- proto/eth/types/v1/account.proto | 2 +- proto/eth/types/v1/indexer.proto | 2 +- proto/nibiru/devgas/v1/devgas.proto | 2 +- proto/nibiru/devgas/v1/event.proto | 2 +- proto/nibiru/devgas/v1/genesis.proto | 2 +- proto/nibiru/devgas/v1/query.proto | 2 +- proto/nibiru/devgas/v1/tx.proto | 2 +- proto/nibiru/epochs/v1/event.proto | 2 +- proto/nibiru/epochs/v1/genesis.proto | 2 +- proto/nibiru/epochs/v1/query.proto | 2 +- proto/nibiru/epochs/v1/state.proto | 2 +- proto/nibiru/genmsg/v1/genmsg.proto | 2 +- proto/nibiru/inflation/v1/event.proto | 2 +- proto/nibiru/inflation/v1/genesis.proto | 2 +- proto/nibiru/inflation/v1/inflation.proto | 2 +- proto/nibiru/inflation/v1/query.proto | 2 +- proto/nibiru/inflation/v1/tx.proto | 4 +- proto/nibiru/oracle/v1/event.proto | 4 +- proto/nibiru/oracle/v1/genesis.proto | 4 +- proto/nibiru/oracle/v1/oracle.proto | 6 +- proto/nibiru/oracle/v1/query.proto | 8 +- proto/nibiru/oracle/v1/state.proto | 6 +- proto/nibiru/oracle/v1/tx.proto | 2 +- proto/nibiru/sudo/v1/event.proto | 2 +- proto/nibiru/sudo/v1/query.proto | 2 +- proto/nibiru/sudo/v1/state.proto | 2 +- proto/nibiru/sudo/v1/tx.proto | 4 +- proto/nibiru/tokenfactory/v1/event.proto | 2 +- proto/nibiru/tokenfactory/v1/query.proto | 2 +- proto/nibiru/tokenfactory/v1/state.proto | 2 +- proto/nibiru/tokenfactory/v1/tx.proto | 4 +- simapp/sim_test.go | 14 +- simapp/state_test.go | 4 +- x/common/address_test.go | 4 +- x/common/asset/pair_test.go | 6 +- x/common/asset/registry.go | 4 +- x/common/asset/registry_test.go | 2 +- x/common/dec_test.go | 2 +- x/common/error_test.go | 8 +- x/common/omap/impl.go | 2 +- x/common/omap/omap_test.go | 4 +- x/common/paginate_test.go | 2 +- x/common/testutil/action/account.go | 4 +- x/common/testutil/action/block.go | 2 +- x/common/testutil/action/testcase.go | 4 +- x/common/testutil/assertion/balances.go | 4 +- x/common/testutil/assertion/gas.go | 4 +- x/common/testutil/cases_test.go | 2 +- x/common/testutil/events.go | 2 +- x/common/testutil/events_test.go | 6 +- x/common/testutil/genesis/genesis.go | 6 +- x/common/testutil/genesis/oracle_genesis.go | 8 +- x/common/testutil/genesis/sudo_genesis.go | 8 +- x/common/testutil/testapp/test_util.go | 2 +- x/common/testutil/testapp/testapp.go | 16 +- x/common/testutil/testnetwork/network.go | 14 +- .../testutil/testnetwork/network_config.go | 2 +- x/common/testutil/testnetwork/network_test.go | 10 +- x/common/testutil/testnetwork/query.go | 10 +- x/common/testutil/testnetwork/tx.go | 4 +- x/common/testutil/testnetwork/tx_test.go | 6 +- x/common/testutil/testnetwork/util.go | 4 +- .../testutil/testnetwork/validator_node.go | 2 +- x/common/testutil/testutil_test.go | 4 +- x/devgas/v1/ante/ante.go | 2 +- x/devgas/v1/ante/ante_test.go | 10 +- x/devgas/v1/ante/expected_keepers.go | 2 +- x/devgas/v1/client/cli/cli_test.go | 6 +- x/devgas/v1/client/cli/query.go | 2 +- x/devgas/v1/client/cli/tx.go | 2 +- x/devgas/v1/genesis.go | 4 +- x/devgas/v1/genesis_test.go | 10 +- x/devgas/v1/keeper/feeshare.go | 2 +- x/devgas/v1/keeper/grpc_query.go | 2 +- x/devgas/v1/keeper/grpc_query_test.go | 6 +- x/devgas/v1/keeper/keeper.go | 2 +- x/devgas/v1/keeper/keeper_test.go | 8 +- x/devgas/v1/keeper/msg_server.go | 2 +- x/devgas/v1/keeper/msg_server_test.go | 2 +- x/devgas/v1/keeper/params.go | 2 +- x/devgas/v1/keeper/store.go | 2 +- x/devgas/v1/module.go | 10 +- x/devgas/v1/module_test.go | 6 +- x/devgas/v1/simulation/genesis.go | 2 +- x/devgas/v1/types/devgas.pb.go | 12 +- x/devgas/v1/types/event.pb.go | 11 +- x/devgas/v1/types/genesis.pb.go | 48 ++--- x/devgas/v1/types/query.pb.go | 74 +++---- x/devgas/v1/types/tx.pb.go | 74 +++---- x/epochs/abci.go | 4 +- x/epochs/abci_test.go | 8 +- x/epochs/client/cli/query.go | 2 +- x/epochs/client/cli/tx.go | 2 +- x/epochs/genesis.go | 4 +- x/epochs/genesis_test.go | 10 +- x/epochs/integration/action/epoch.go | 4 +- x/epochs/keeper/epoch.go | 2 +- x/epochs/keeper/grpc_query.go | 2 +- x/epochs/keeper/grpc_query_test.go | 6 +- x/epochs/keeper/hooks_test.go | 2 +- x/epochs/keeper/keeper.go | 2 +- x/epochs/keeper/keeper_test.go | 4 +- x/epochs/module.go | 8 +- x/epochs/simulation/genesis.go | 2 +- x/epochs/types/event.pb.go | 11 +- x/epochs/types/genesis.pb.go | 12 +- x/epochs/types/hooks_test.go | 2 +- x/epochs/types/query.pb.go | 52 ++--- x/epochs/types/state.pb.go | 58 +++--- x/evm/access_list.go | 2 +- x/evm/access_list_test.go | 2 +- x/evm/cli/query.go | 2 +- x/evm/cli/tx.go | 4 +- x/evm/embeds/embeds_test.go | 2 +- x/evm/events.pb.go | 86 ++++---- x/evm/evm.go | 2 +- x/evm/evm.pb.go | 146 ++++++------- x/evm/evm_test.go | 6 +- x/evm/evmmodule/genesis.go | 6 +- x/evm/evmmodule/genesis_test.go | 10 +- x/evm/evmmodule/module.go | 8 +- x/evm/evmtest/erc20.go | 4 +- x/evm/evmtest/eth.go | 8 +- x/evm/evmtest/eth_test.go | 2 +- x/evm/evmtest/evmante.go | 2 +- x/evm/evmtest/signer.go | 2 +- x/evm/evmtest/smart_contract.go | 4 +- x/evm/evmtest/smart_contract_test.go | 4 +- x/evm/evmtest/test_deps.go | 14 +- x/evm/evmtest/tx.go | 6 +- x/evm/genesis.go | 2 +- x/evm/genesis.pb.go | 42 ++-- x/evm/genesis_test.go | 4 +- x/evm/json_tx_args_test.go | 2 +- x/evm/keeper/erc20.go | 10 +- x/evm/keeper/erc20_test.go | 16 +- x/evm/keeper/evm_state.go | 4 +- x/evm/keeper/funtoken_from_coin.go | 6 +- x/evm/keeper/funtoken_from_erc20.go | 8 +- x/evm/keeper/funtoken_state.go | 4 +- x/evm/keeper/funtoken_state_test.go | 6 +- x/evm/keeper/gas_fees.go | 2 +- x/evm/keeper/grpc_query.go | 6 +- x/evm/keeper/grpc_query_test.go | 10 +- x/evm/keeper/keeper.go | 8 +- x/evm/keeper/msg_ethereum_tx_test.go | 10 +- x/evm/keeper/msg_server.go | 8 +- x/evm/keeper/msg_update_params.go | 2 +- x/evm/keeper/precompiles.go | 2 +- x/evm/keeper/statedb.go | 6 +- x/evm/keeper/statedb_test.go | 8 +- x/evm/keeper/vm_config.go | 4 +- x/evm/legacy_tx.go | 2 +- x/evm/legacy_tx_test.go | 2 +- x/evm/logs.go | 2 +- x/evm/logs_test.go | 4 +- x/evm/msg.go | 2 +- x/evm/msg_test.go | 10 +- x/evm/params.go | 2 +- x/evm/precompile/funtoken.go | 8 +- x/evm/precompile/funtoken_test.go | 10 +- x/evm/precompile/precompile.go | 6 +- x/evm/precompile/precompile_test.go | 6 +- x/evm/query.go | 4 +- x/evm/query.pb.go | 196 +++++++++--------- x/evm/statedb/config.go | 2 +- x/evm/statedb/state_object.go | 2 +- x/evm/statedb/statedb_test.go | 6 +- x/evm/tx.go | 2 +- x/evm/tx.pb.go | 166 +++++++-------- x/evm/tx_test.go | 4 +- x/genmsg/genesis.go | 2 +- x/genmsg/genesis_test.go | 2 +- x/genmsg/integration_test.go | 8 +- x/genmsg/module.go | 2 +- x/genmsg/v1/genmsg.pb.go | 10 +- x/inflation/client/cli/query.go | 2 +- x/inflation/client/cli/tx.go | 2 +- x/inflation/genesis.go | 4 +- x/inflation/keeper/grpc_query.go | 4 +- x/inflation/keeper/grpc_query_test.go | 8 +- x/inflation/keeper/hooks.go | 6 +- x/inflation/keeper/hooks_test.go | 10 +- x/inflation/keeper/inflation.go | 4 +- x/inflation/keeper/inflation_test.go | 10 +- x/inflation/keeper/keeper.go | 2 +- x/inflation/keeper/keeper_test.go | 6 +- x/inflation/keeper/msg_server.go | 2 +- x/inflation/keeper/msg_server_test.go | 8 +- x/inflation/keeper/params.go | 2 +- x/inflation/keeper/sudo.go | 2 +- x/inflation/keeper/sudo_test.go | 6 +- x/inflation/module.go | 8 +- x/inflation/simulation/genesis.go | 2 +- x/inflation/types/event.pb.go | 44 ++-- x/inflation/types/genesis.pb.go | 60 +++--- x/inflation/types/inflation.pb.go | 10 +- x/inflation/types/params_test.go | 2 +- x/inflation/types/query.pb.go | 89 ++++---- x/inflation/types/tx.pb.go | 86 ++++---- x/oracle/abci.go | 4 +- x/oracle/abci_test.go | 8 +- .../client/cli/gen_pricefeeder_delegation.go | 2 +- .../cli/gen_pricefeeder_delegation_test.go | 8 +- x/oracle/client/cli/query.go | 4 +- x/oracle/client/cli/tx.go | 2 +- x/oracle/genesis.go | 6 +- x/oracle/genesis_test.go | 6 +- x/oracle/integration/action/price.go | 8 +- x/oracle/keeper/app_test.go | 14 +- x/oracle/keeper/ballot.go | 8 +- x/oracle/keeper/ballot_test.go | 10 +- x/oracle/keeper/hooks.go | 4 +- x/oracle/keeper/keeper.go | 4 +- x/oracle/keeper/msg_server.go | 2 +- x/oracle/keeper/msg_server_test.go | 6 +- x/oracle/keeper/params.go | 4 +- x/oracle/keeper/params_test.go | 6 +- x/oracle/keeper/querier.go | 4 +- x/oracle/keeper/querier_test.go | 8 +- x/oracle/keeper/reward.go | 2 +- x/oracle/keeper/reward_test.go | 8 +- x/oracle/keeper/slash_test.go | 6 +- x/oracle/keeper/sudo.go | 4 +- x/oracle/keeper/sudo_test.go | 8 +- x/oracle/keeper/test_utils.go | 10 +- x/oracle/keeper/update_exchange_rates.go | 8 +- x/oracle/keeper/update_exchange_rates_test.go | 8 +- x/oracle/keeper/whitelist.go | 4 +- x/oracle/keeper/whitelist_test.go | 6 +- x/oracle/module.go | 8 +- x/oracle/simulation/decoder.go | 2 +- x/oracle/simulation/decoder_test.go | 10 +- x/oracle/simulation/genesis.go | 6 +- x/oracle/simulation/operations.go | 8 +- x/oracle/types/ballot.go | 4 +- x/oracle/types/ballot_test.go | 6 +- x/oracle/types/event.pb.go | 67 +++--- x/oracle/types/genesis.go | 2 +- x/oracle/types/genesis.pb.go | 92 ++++---- x/oracle/types/genesis_test.go | 4 +- x/oracle/types/hash_test.go | 2 +- x/oracle/types/msgs_test.go | 4 +- x/oracle/types/oracle.pb.go | 135 ++++++------ x/oracle/types/params.go | 4 +- x/oracle/types/params_test.go | 2 +- x/oracle/types/query.pb.go | 154 +++++++------- x/oracle/types/state.pb.go | 50 ++--- x/oracle/types/tx.pb.go | 112 +++++----- x/oracle/types/vote.go | 4 +- x/oracle/types/vote_test.go | 2 +- x/sudo/cli/cli.go | 2 +- x/sudo/cli/cli_test.go | 20 +- x/sudo/cli/gen_root.go | 2 +- x/sudo/cli/gen_root_test.go | 6 +- x/sudo/genesis.go | 4 +- x/sudo/keeper/keeper.go | 4 +- x/sudo/keeper/keeper_test.go | 4 +- x/sudo/keeper/msg_server.go | 4 +- x/sudo/keeper/msg_server_test.go | 14 +- x/sudo/keeper/querier.go | 2 +- x/sudo/keeper/querier_test.go | 4 +- x/sudo/module.go | 8 +- x/sudo/simulation/genesis.go | 2 +- x/sudo/types/actions.go | 2 +- x/sudo/types/event.pb.go | 12 +- x/sudo/types/query.pb.go | 12 +- x/sudo/types/state.pb.go | 36 ++-- x/sudo/types/tx.pb.go | 47 +++-- x/tokenfactory/cli/cli_test.go | 14 +- x/tokenfactory/cli/query.go | 2 +- x/tokenfactory/cli/tx.go | 2 +- x/tokenfactory/keeper/genesis.go | 2 +- x/tokenfactory/keeper/genesis_test.go | 4 +- x/tokenfactory/keeper/grpc_query.go | 2 +- x/tokenfactory/keeper/grpc_query_test.go | 4 +- x/tokenfactory/keeper/keeper.go | 2 +- x/tokenfactory/keeper/keeper_test.go | 8 +- x/tokenfactory/keeper/msg_server.go | 4 +- x/tokenfactory/keeper/msg_server_test.go | 8 +- x/tokenfactory/keeper/store.go | 2 +- x/tokenfactory/keeper/store_test.go | 4 +- x/tokenfactory/keeper/wasm_test.go | 12 +- x/tokenfactory/module.go | 8 +- x/tokenfactory/module_test.go | 8 +- x/tokenfactory/simulation/genesis.go | 2 +- x/tokenfactory/types/codec_test.go | 2 +- x/tokenfactory/types/event.pb.go | 57 ++--- x/tokenfactory/types/genesis.go | 2 +- x/tokenfactory/types/query.pb.go | 65 +++--- x/tokenfactory/types/state.pb.go | 64 +++--- x/tokenfactory/types/state_test.go | 4 +- x/tokenfactory/types/tx.pb.go | 102 ++++----- x/tokenfactory/types/tx_msgs_test.go | 4 +- 436 files changed, 2177 insertions(+), 2167 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d38860ccd..4e03ad41a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -131,6 +131,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#1899](https://github.com/NibiruChain/nibiru/pull/1899) - build(deps): cometbft v0.37.5, cosmos-sdk v0.47.11, proto-builder v0.14.0 - [#1913](https://github.com/NibiruChain/nibiru/pull/1913) - fix(tests): race condition from heavy Network tests - [#1992](https://github.com/NibiruChain/nibiru/pull/1992) - chore: enabled grpc for localnet +- [#1999](https://github.com/NibiruChain/nibiru/pull/1999) - chore: update nibi go package version to v2 ### Dependencies diff --git a/app/ante.go b/app/ante.go index df8ecce92..f8c661163 100644 --- a/app/ante.go +++ b/app/ante.go @@ -9,9 +9,9 @@ import ( authante "github.com/cosmos/cosmos-sdk/x/auth/ante" - "github.com/NibiruChain/nibiru/app/ante" - "github.com/NibiruChain/nibiru/app/evmante" - devgasante "github.com/NibiruChain/nibiru/x/devgas/v1/ante" + "github.com/NibiruChain/nibiru/v2/app/ante" + "github.com/NibiruChain/nibiru/v2/app/evmante" + devgasante "github.com/NibiruChain/nibiru/v2/x/devgas/v1/ante" ) // NewAnteHandler returns and AnteHandler that checks and increments sequence diff --git a/app/ante/commission_test.go b/app/ante/commission_test.go index db96b5776..9cbd18982 100644 --- a/app/ante/commission_test.go +++ b/app/ante/commission_test.go @@ -10,9 +10,9 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/app/ante" - "github.com/NibiruChain/nibiru/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/app/ante" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" ) func (s *AnteTestSuite) TestAnteDecoratorStakingCommission() { diff --git a/app/ante/fixed_gas.go b/app/ante/fixed_gas.go index 5d31b30b8..fbb416d43 100644 --- a/app/ante/fixed_gas.go +++ b/app/ante/fixed_gas.go @@ -4,7 +4,7 @@ import ( sdkerrors "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - oracletypes "github.com/NibiruChain/nibiru/x/oracle/types" + oracletypes "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) const OracleMessageGas = 500 diff --git a/app/ante/fixed_gas_test.go b/app/ante/fixed_gas_test.go index 264a66ab6..0d11b3b2d 100644 --- a/app/ante/fixed_gas_test.go +++ b/app/ante/fixed_gas_test.go @@ -13,11 +13,11 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/signing" "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/NibiruChain/nibiru/app/ante" - "github.com/NibiruChain/nibiru/app/appconst" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - oracletypes "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/app/ante" + "github.com/NibiruChain/nibiru/v2/app/appconst" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + oracletypes "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) func (suite *AnteTestSuite) TestOraclePostPriceTransactionsHaveFixedPrice() { diff --git a/app/ante/gas_wanted.go b/app/ante/gas_wanted.go index 1ef4e9752..01bc88fa3 100644 --- a/app/ante/gas_wanted.go +++ b/app/ante/gas_wanted.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/NibiruChain/nibiru/eth" + "github.com/NibiruChain/nibiru/v2/eth" ) // AnteDecoratorGasWanted keeps track of the gasWanted amount on the current block in diff --git a/app/ante/gas_wanted_test.go b/app/ante/gas_wanted_test.go index af22b6aae..d892a8217 100644 --- a/app/ante/gas_wanted_test.go +++ b/app/ante/gas_wanted_test.go @@ -5,8 +5,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" - "github.com/NibiruChain/nibiru/app/ante" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/app/ante" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) func (s *AnteTestSuite) TestGasWantedDecorator() { diff --git a/app/ante/handler_opts.go b/app/ante/handler_opts.go index 2a9cd2408..b516653c8 100644 --- a/app/ante/handler_opts.go +++ b/app/ante/handler_opts.go @@ -10,9 +10,9 @@ import ( authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" - devgasante "github.com/NibiruChain/nibiru/x/devgas/v1/ante" - devgaskeeper "github.com/NibiruChain/nibiru/x/devgas/v1/keeper" - evmkeeper "github.com/NibiruChain/nibiru/x/evm/keeper" + devgasante "github.com/NibiruChain/nibiru/v2/x/devgas/v1/ante" + devgaskeeper "github.com/NibiruChain/nibiru/v2/x/devgas/v1/keeper" + evmkeeper "github.com/NibiruChain/nibiru/v2/x/evm/keeper" ) type AnteHandlerOptions struct { diff --git a/app/ante/reject_ethereum_tx_msgs.go b/app/ante/reject_ethereum_tx_msgs.go index fb8f4d39d..7b65da403 100644 --- a/app/ante/reject_ethereum_tx_msgs.go +++ b/app/ante/reject_ethereum_tx_msgs.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // AnteDecoratorPreventEtheruemTxMsgs prevents invalid msg types from being executed diff --git a/app/ante/reject_ethereum_tx_msgs_test.go b/app/ante/reject_ethereum_tx_msgs_test.go index 7d7e23742..e51ab129b 100644 --- a/app/ante/reject_ethereum_tx_msgs_test.go +++ b/app/ante/reject_ethereum_tx_msgs_test.go @@ -3,8 +3,8 @@ package ante_test import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/app/ante" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/app/ante" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) func (s *AnteTestSuite) TestAnteDecoratorPreventEtheruemTxMsgs() { diff --git a/app/ante/testutil_test.go b/app/ante/testutil_test.go index 72d0747c5..bc47bd0f0 100644 --- a/app/ante/testutil_test.go +++ b/app/ante/testutil_test.go @@ -18,9 +18,9 @@ import ( tmproto "github.com/cometbft/cometbft/proto/tendermint/types" - "github.com/NibiruChain/nibiru/app" - nibiruante "github.com/NibiruChain/nibiru/app/ante" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/app" + nibiruante "github.com/NibiruChain/nibiru/v2/app/ante" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" ) // AnteTestSuite is a test suite to be used with ante handler tests. diff --git a/app/app.go b/app/app.go index 305d8b7ea..94abf46e9 100644 --- a/app/app.go +++ b/app/app.go @@ -11,9 +11,9 @@ import ( wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" - "github.com/NibiruChain/nibiru/app/ante" - "github.com/NibiruChain/nibiru/app/wasmext" - "github.com/NibiruChain/nibiru/x/evm/precompile" + "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" diff --git a/app/appconst/appconst_test.go b/app/appconst/appconst_test.go index fca0f5f1a..caa3e5823 100644 --- a/app/appconst/appconst_test.go +++ b/app/appconst/appconst_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/app/appconst" + "github.com/NibiruChain/nibiru/v2/app/appconst" ) type TestSuite struct { diff --git a/app/encoding.go b/app/encoding.go index 1f8e27495..5278ffd8d 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -3,7 +3,7 @@ package app import ( "github.com/cosmos/cosmos-sdk/std" - "github.com/NibiruChain/nibiru/app/codec" + "github.com/NibiruChain/nibiru/v2/app/codec" ) // EncodingConfig specifies the concrete encoding types to use for a given app. diff --git a/app/evmante/evmante_can_transfer.go b/app/evmante/evmante_can_transfer.go index 62196c794..86aea2765 100644 --- a/app/evmante/evmante_can_transfer.go +++ b/app/evmante/evmante_can_transfer.go @@ -10,8 +10,8 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" gethcore "github.com/ethereum/go-ethereum/core/types" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/statedb" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) // CanTransferDecorator checks if the sender is allowed to transfer funds according to the EVM block diff --git a/app/evmante/evmante_can_transfer_test.go b/app/evmante/evmante_can_transfer_test.go index 5863a0890..6602b1dfd 100644 --- a/app/evmante/evmante_can_transfer_test.go +++ b/app/evmante/evmante_can_transfer_test.go @@ -3,11 +3,11 @@ package evmante_test import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/app/evmante" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/evm/evmtest" - "github.com/NibiruChain/nibiru/x/evm/statedb" + "github.com/NibiruChain/nibiru/v2/app/evmante" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) func (s *TestSuite) TestCanTransferDecorator() { diff --git a/app/evmante/evmante_emit_event.go b/app/evmante/evmante_emit_event.go index 0470965bb..5c81b6b9e 100644 --- a/app/evmante/evmante_emit_event.go +++ b/app/evmante/evmante_emit_event.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // EthEmitEventDecorator emit events in ante handler in case of tx execution failed (out of block gas limit). diff --git a/app/evmante/evmante_emit_event_test.go b/app/evmante/evmante_emit_event_test.go index b1873f06c..ff501e5ec 100644 --- a/app/evmante/evmante_emit_event_test.go +++ b/app/evmante/evmante_emit_event_test.go @@ -4,11 +4,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" - "github.com/NibiruChain/nibiru/app/evmante" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/app/evmante" + "github.com/NibiruChain/nibiru/v2/x/evm" - "github.com/NibiruChain/nibiru/x/evm/evmtest" - tf "github.com/NibiruChain/nibiru/x/tokenfactory/types" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" + tf "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) func (s *TestSuite) TestEthEmitEventDecorator() { diff --git a/app/evmante/evmante_gas_consume.go b/app/evmante/evmante_gas_consume.go index af0ac423c..94cf3bbda 100644 --- a/app/evmante/evmante_gas_consume.go +++ b/app/evmante/evmante_gas_consume.go @@ -9,9 +9,9 @@ import ( errortypes "github.com/cosmos/cosmos-sdk/types/errors" gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/keeper" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/keeper" ) // AnteDecEthGasConsume validates enough intrinsic gas for the transaction and diff --git a/app/evmante/evmante_gas_consume_test.go b/app/evmante/evmante_gas_consume_test.go index 3688ba046..1e3c6b1fe 100644 --- a/app/evmante/evmante_gas_consume_test.go +++ b/app/evmante/evmante_gas_consume_test.go @@ -5,11 +5,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/app/evmante" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/evmtest" - "github.com/NibiruChain/nibiru/x/evm/statedb" + "github.com/NibiruChain/nibiru/v2/app/evmante" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) func (s *TestSuite) TestAnteDecEthGasConsume() { diff --git a/app/evmante/evmante_handler.go b/app/evmante/evmante_handler.go index 1dd660174..f7fb5ba17 100644 --- a/app/evmante/evmante_handler.go +++ b/app/evmante/evmante_handler.go @@ -4,7 +4,7 @@ package evmante import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/app/ante" + "github.com/NibiruChain/nibiru/v2/app/ante" ) // NewAnteHandlerEVM creates the default ante handler for Ethereum transactions diff --git a/app/evmante/evmante_handler_test.go b/app/evmante/evmante_handler_test.go index edf3c51f3..cb09c60cd 100644 --- a/app/evmante/evmante_handler_test.go +++ b/app/evmante/evmante_handler_test.go @@ -8,12 +8,12 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authante "github.com/cosmos/cosmos-sdk/x/auth/ante" - "github.com/NibiruChain/nibiru/app/ante" - "github.com/NibiruChain/nibiru/app/evmante" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/evmtest" - "github.com/NibiruChain/nibiru/x/evm/statedb" + "github.com/NibiruChain/nibiru/v2/app/ante" + "github.com/NibiruChain/nibiru/v2/app/evmante" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) func (s *TestSuite) TestAnteHandlerEVM() { diff --git a/app/evmante/evmante_increment_sender_seq.go b/app/evmante/evmante_increment_sender_seq.go index d033b66a8..94daa2999 100644 --- a/app/evmante/evmante_increment_sender_seq.go +++ b/app/evmante/evmante_increment_sender_seq.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/ante" gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // AnteDecEthIncrementSenderSequence increments the sequence of the signers. diff --git a/app/evmante/evmante_increment_sender_seq_test.go b/app/evmante/evmante_increment_sender_seq_test.go index 00f19afd3..ac358cbb0 100644 --- a/app/evmante/evmante_increment_sender_seq_test.go +++ b/app/evmante/evmante_increment_sender_seq_test.go @@ -5,9 +5,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/app/evmante" - "github.com/NibiruChain/nibiru/x/evm/evmtest" - "github.com/NibiruChain/nibiru/x/evm/statedb" + "github.com/NibiruChain/nibiru/v2/app/evmante" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) func (s *TestSuite) TestAnteDecEthIncrementSenderSequence() { diff --git a/app/evmante/evmante_mempool_fees.go b/app/evmante/evmante_mempool_fees.go index c03059e4f..421215381 100644 --- a/app/evmante/evmante_mempool_fees.go +++ b/app/evmante/evmante_mempool_fees.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) var _ sdk.AnteDecorator = MempoolGasPriceDecorator{} diff --git a/app/evmante/evmante_mempool_fees_test.go b/app/evmante/evmante_mempool_fees_test.go index 930939378..d2d52646e 100644 --- a/app/evmante/evmante_mempool_fees_test.go +++ b/app/evmante/evmante_mempool_fees_test.go @@ -4,8 +4,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/NibiruChain/nibiru/app/evmante" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/app/evmante" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) func (s *TestSuite) TestMempoolGasFeeDecorator() { diff --git a/app/evmante/evmante_setup_ctx_test.go b/app/evmante/evmante_setup_ctx_test.go index 65c6b29f9..9df86ba17 100644 --- a/app/evmante/evmante_setup_ctx_test.go +++ b/app/evmante/evmante_setup_ctx_test.go @@ -6,8 +6,8 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/app/evmante" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/app/evmante" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) func (s *TestSuite) TestEthSetupContextDecorator() { diff --git a/app/evmante/evmante_sigverify.go b/app/evmante/evmante_sigverify.go index 2c41da448..6b858066e 100644 --- a/app/evmante/evmante_sigverify.go +++ b/app/evmante/evmante_sigverify.go @@ -9,7 +9,7 @@ import ( errortypes "github.com/cosmos/cosmos-sdk/types/errors" gethcore "github.com/ethereum/go-ethereum/core/types" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // EthSigVerificationDecorator validates an ethereum signatures diff --git a/app/evmante/evmante_sigverify_test.go b/app/evmante/evmante_sigverify_test.go index 908bd19f7..0a898bea9 100644 --- a/app/evmante/evmante_sigverify_test.go +++ b/app/evmante/evmante_sigverify_test.go @@ -6,9 +6,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" - "github.com/NibiruChain/nibiru/app/evmante" - "github.com/NibiruChain/nibiru/x/evm/evmtest" - tf "github.com/NibiruChain/nibiru/x/tokenfactory/types" + "github.com/NibiruChain/nibiru/v2/app/evmante" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" + tf "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) var InvalidChainID = big.NewInt(987654321) diff --git a/app/evmante/evmante_validate_basic.go b/app/evmante/evmante_validate_basic.go index d4bcf99d4..4074efc0c 100644 --- a/app/evmante/evmante_validate_basic.go +++ b/app/evmante/evmante_validate_basic.go @@ -10,7 +10,7 @@ import ( errortypes "github.com/cosmos/cosmos-sdk/types/errors" gethcore "github.com/ethereum/go-ethereum/core/types" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // EthValidateBasicDecorator is adapted from ValidateBasicDecorator from cosmos-sdk, it ignores ErrNoSignatures diff --git a/app/evmante/evmante_validate_basic_test.go b/app/evmante/evmante_validate_basic_test.go index 51d3b9390..94d7aa1a0 100644 --- a/app/evmante/evmante_validate_basic_test.go +++ b/app/evmante/evmante_validate_basic_test.go @@ -10,11 +10,11 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/ethereum/go-ethereum/common" - "github.com/NibiruChain/nibiru/app/evmante" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/app/evmante" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) func (s *TestSuite) TestEthValidateBasicDecorator() { diff --git a/app/evmante/evmante_verify_eth_acc.go b/app/evmante/evmante_verify_eth_acc.go index 80f591926..7eccff3f6 100644 --- a/app/evmante/evmante_verify_eth_acc.go +++ b/app/evmante/evmante_verify_eth_acc.go @@ -7,9 +7,9 @@ import ( errortypes "github.com/cosmos/cosmos-sdk/types/errors" gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/keeper" - "github.com/NibiruChain/nibiru/x/evm/statedb" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/keeper" + "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) // AnteDecVerifyEthAcc validates an account balance checks diff --git a/app/evmante/evmante_verify_eth_acc_test.go b/app/evmante/evmante_verify_eth_acc_test.go index 0e5a03ae3..6d7f9aeda 100644 --- a/app/evmante/evmante_verify_eth_acc_test.go +++ b/app/evmante/evmante_verify_eth_acc_test.go @@ -5,10 +5,10 @@ import ( gethparams "github.com/ethereum/go-ethereum/params" - "github.com/NibiruChain/nibiru/app/evmante" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/evmtest" - "github.com/NibiruChain/nibiru/x/evm/statedb" + "github.com/NibiruChain/nibiru/v2/app/evmante" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) func (s *TestSuite) TestAnteDecoratorVerifyEthAcc_CheckTx() { diff --git a/app/evmante/interfaces.go b/app/evmante/interfaces.go index 09b10dab7..9c21b0412 100644 --- a/app/evmante/interfaces.go +++ b/app/evmante/interfaces.go @@ -10,9 +10,9 @@ import ( "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/vm" - "github.com/NibiruChain/nibiru/x/evm" - evmkeeper "github.com/NibiruChain/nibiru/x/evm/keeper" - "github.com/NibiruChain/nibiru/x/evm/statedb" + "github.com/NibiruChain/nibiru/v2/x/evm" + evmkeeper "github.com/NibiruChain/nibiru/v2/x/evm/keeper" + "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) // EVMKeeper defines the expected keeper interface used on the AnteHandler diff --git a/app/evmante/suite_test.go b/app/evmante/suite_test.go index fac4157a8..2150aebe3 100644 --- a/app/evmante/suite_test.go +++ b/app/evmante/suite_test.go @@ -7,7 +7,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/app" + "github.com/NibiruChain/nibiru/v2/app" ) type TestSuite struct { diff --git a/app/ibc_test.go b/app/ibc_test.go index 5e16338c1..369eb88da 100644 --- a/app/ibc_test.go +++ b/app/ibc_test.go @@ -10,8 +10,8 @@ import ( ibctesting "github.com/cosmos/ibc-go/v7/testing" "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" ) // init changes the value of 'DefaultTestingAppInit' to use custom initialization. diff --git a/app/keepers.go b/app/keepers.go index 9c6c0e513..6695a6194 100644 --- a/app/keepers.go +++ b/app/keepers.go @@ -105,33 +105,33 @@ import ( // --------------------------------------------------------------- // Nibiru Custom Modules - "github.com/NibiruChain/nibiru/app/keepers" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/common" - "github.com/NibiruChain/nibiru/x/devgas/v1" - devgaskeeper "github.com/NibiruChain/nibiru/x/devgas/v1/keeper" - devgastypes "github.com/NibiruChain/nibiru/x/devgas/v1/types" - "github.com/NibiruChain/nibiru/x/epochs" - epochskeeper "github.com/NibiruChain/nibiru/x/epochs/keeper" - epochstypes "github.com/NibiruChain/nibiru/x/epochs/types" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/evmmodule" - evmkeeper "github.com/NibiruChain/nibiru/x/evm/keeper" - "github.com/NibiruChain/nibiru/x/genmsg" - "github.com/NibiruChain/nibiru/x/inflation" - inflationkeeper "github.com/NibiruChain/nibiru/x/inflation/keeper" - inflationtypes "github.com/NibiruChain/nibiru/x/inflation/types" - oracle "github.com/NibiruChain/nibiru/x/oracle" - oraclekeeper "github.com/NibiruChain/nibiru/x/oracle/keeper" - oracletypes "github.com/NibiruChain/nibiru/x/oracle/types" - - "github.com/NibiruChain/nibiru/x/sudo" - "github.com/NibiruChain/nibiru/x/sudo/keeper" - sudotypes "github.com/NibiruChain/nibiru/x/sudo/types" - - tokenfactory "github.com/NibiruChain/nibiru/x/tokenfactory" - tokenfactorykeeper "github.com/NibiruChain/nibiru/x/tokenfactory/keeper" - tokenfactorytypes "github.com/NibiruChain/nibiru/x/tokenfactory/types" + "github.com/NibiruChain/nibiru/v2/app/keepers" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/common" + "github.com/NibiruChain/nibiru/v2/x/devgas/v1" + devgaskeeper "github.com/NibiruChain/nibiru/v2/x/devgas/v1/keeper" + devgastypes "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" + "github.com/NibiruChain/nibiru/v2/x/epochs" + epochskeeper "github.com/NibiruChain/nibiru/v2/x/epochs/keeper" + epochstypes "github.com/NibiruChain/nibiru/v2/x/epochs/types" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/evmmodule" + evmkeeper "github.com/NibiruChain/nibiru/v2/x/evm/keeper" + "github.com/NibiruChain/nibiru/v2/x/genmsg" + "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" + 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" + + 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" ) type AppKeepers struct { diff --git a/app/keepers/all_keepers.go b/app/keepers/all_keepers.go index b0ea44922..7bbdc9c10 100644 --- a/app/keepers/all_keepers.go +++ b/app/keepers/all_keepers.go @@ -21,15 +21,15 @@ import ( // --------------------------------------------------------------- // Nibiru Custom Modules - devgaskeeper "github.com/NibiruChain/nibiru/x/devgas/v1/keeper" - epochskeeper "github.com/NibiruChain/nibiru/x/epochs/keeper" - evmkeeper "github.com/NibiruChain/nibiru/x/evm/keeper" - inflationkeeper "github.com/NibiruChain/nibiru/x/inflation/keeper" - oraclekeeper "github.com/NibiruChain/nibiru/x/oracle/keeper" + devgaskeeper "github.com/NibiruChain/nibiru/v2/x/devgas/v1/keeper" + epochskeeper "github.com/NibiruChain/nibiru/v2/x/epochs/keeper" + 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/x/sudo/keeper" + "github.com/NibiruChain/nibiru/v2/x/sudo/keeper" - tokenfactorykeeper "github.com/NibiruChain/nibiru/x/tokenfactory/keeper" + tokenfactorykeeper "github.com/NibiruChain/nibiru/v2/x/tokenfactory/keeper" ) type PublicKeepers struct { diff --git a/app/modules.go b/app/modules.go index 58017de4e..c597c94a9 100644 --- a/app/modules.go +++ b/app/modules.go @@ -19,7 +19,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/staking" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/NibiruChain/nibiru/app/appconst" + "github.com/NibiruChain/nibiru/v2/app/appconst" ) // BankModule defines a custom wrapper around the x/bank module's AppModuleBasic diff --git a/app/modules_test.go b/app/modules_test.go index 4fe32f3ce..5abd63267 100644 --- a/app/modules_test.go +++ b/app/modules_test.go @@ -7,7 +7,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/app" + "github.com/NibiruChain/nibiru/v2/app" ) type TestSuite struct { diff --git a/app/server/json_rpc.go b/app/server/json_rpc.go index 6baf8f06f..7baa9cc9d 100644 --- a/app/server/json_rpc.go +++ b/app/server/json_rpc.go @@ -5,8 +5,8 @@ import ( "net/http" "time" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/eth/rpc/rpcapi" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/eth/rpc/rpcapi" "github.com/gorilla/mux" "github.com/rs/cors" @@ -17,7 +17,7 @@ import ( ethlog "github.com/ethereum/go-ethereum/log" ethrpc "github.com/ethereum/go-ethereum/rpc" - srvconfig "github.com/NibiruChain/nibiru/app/server/config" + srvconfig "github.com/NibiruChain/nibiru/v2/app/server/config" ) // StartJSONRPC starts the JSON-RPC server diff --git a/app/server/start.go b/app/server/start.go index f1d56829e..680673bb1 100644 --- a/app/server/start.go +++ b/app/server/start.go @@ -13,9 +13,9 @@ import ( "syscall" "time" - "github.com/NibiruChain/nibiru/app/server/config" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/eth/indexer" + "github.com/NibiruChain/nibiru/v2/app/server/config" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/eth/indexer" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keyring" diff --git a/app/server/util.go b/app/server/util.go index 633396e16..8e223abd7 100644 --- a/app/server/util.go +++ b/app/server/util.go @@ -7,7 +7,7 @@ import ( "github.com/spf13/cobra" "golang.org/x/net/netutil" - srvconfig "github.com/NibiruChain/nibiru/app/server/config" + srvconfig "github.com/NibiruChain/nibiru/v2/app/server/config" sdkserver "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/types" diff --git a/app/upgrades.go b/app/upgrades.go index 1eebc5ae9..3f9851fd4 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -5,11 +5,11 @@ import ( upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/NibiruChain/nibiru/app/upgrades" - "github.com/NibiruChain/nibiru/app/upgrades/v1_1_0" - "github.com/NibiruChain/nibiru/app/upgrades/v1_2_0" - "github.com/NibiruChain/nibiru/app/upgrades/v1_3_0" - "github.com/NibiruChain/nibiru/app/upgrades/v1_4_0" + "github.com/NibiruChain/nibiru/v2/app/upgrades" + "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" ) var Upgrades = []upgrades.Upgrade{ diff --git a/app/upgrades/v1_1_0/constants.go b/app/upgrades/v1_1_0/constants.go index 257ef77c5..4fdebdf6c 100644 --- a/app/upgrades/v1_1_0/constants.go +++ b/app/upgrades/v1_1_0/constants.go @@ -6,8 +6,8 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/NibiruChain/nibiru/app/upgrades" - inflationtypes "github.com/NibiruChain/nibiru/x/inflation/types" + "github.com/NibiruChain/nibiru/v2/app/upgrades" + inflationtypes "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) const UpgradeName = "v1.1.0" diff --git a/app/upgrades/v1_2_0/constants.go b/app/upgrades/v1_2_0/constants.go index fea9289a7..63718c21d 100644 --- a/app/upgrades/v1_2_0/constants.go +++ b/app/upgrades/v1_2_0/constants.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/NibiruChain/nibiru/app/upgrades" + "github.com/NibiruChain/nibiru/v2/app/upgrades" ) const UpgradeName = "v1.2.0" diff --git a/app/upgrades/v1_3_0/constants.go b/app/upgrades/v1_3_0/constants.go index 4788dbdd6..320bdae7c 100644 --- a/app/upgrades/v1_3_0/constants.go +++ b/app/upgrades/v1_3_0/constants.go @@ -15,7 +15,7 @@ import ( icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" - "github.com/NibiruChain/nibiru/app/upgrades" + "github.com/NibiruChain/nibiru/v2/app/upgrades" ) const UpgradeName = "v1.3.0" diff --git a/app/upgrades/v1_4_0/constants.go b/app/upgrades/v1_4_0/constants.go index 5043704eb..fbfa766ea 100644 --- a/app/upgrades/v1_4_0/constants.go +++ b/app/upgrades/v1_4_0/constants.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/NibiruChain/nibiru/app/upgrades" + "github.com/NibiruChain/nibiru/v2/app/upgrades" ) const UpgradeName = "v1.4.0" diff --git a/app/wasmext/stargate_query.go b/app/wasmext/stargate_query.go index 3a08dd327..2d90b6d58 100644 --- a/app/wasmext/stargate_query.go +++ b/app/wasmext/stargate_query.go @@ -3,12 +3,12 @@ package wasmext import ( wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - devgas "github.com/NibiruChain/nibiru/x/devgas/v1/types" - epochs "github.com/NibiruChain/nibiru/x/epochs/types" - inflation "github.com/NibiruChain/nibiru/x/inflation/types" - oracle "github.com/NibiruChain/nibiru/x/oracle/types" - sudotypes "github.com/NibiruChain/nibiru/x/sudo/types" - tokenfactory "github.com/NibiruChain/nibiru/x/tokenfactory/types" + devgas "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" + epochs "github.com/NibiruChain/nibiru/v2/x/epochs/types" + inflation "github.com/NibiruChain/nibiru/v2/x/inflation/types" + oracle "github.com/NibiruChain/nibiru/v2/x/oracle/types" + sudotypes "github.com/NibiruChain/nibiru/v2/x/sudo/types" + tokenfactory "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" auth "github.com/cosmos/cosmos-sdk/x/auth/types" bank "github.com/cosmos/cosmos-sdk/x/bank/types" diff --git a/app/wasmext/stargate_query_test.go b/app/wasmext/stargate_query_test.go index 330ccf765..948310790 100644 --- a/app/wasmext/stargate_query_test.go +++ b/app/wasmext/stargate_query_test.go @@ -9,16 +9,16 @@ import ( "github.com/stretchr/testify/assert" "google.golang.org/grpc" - wasmbinding "github.com/NibiruChain/nibiru/app/wasmext" + wasmbinding "github.com/NibiruChain/nibiru/v2/app/wasmext" - "github.com/NibiruChain/nibiru/x/common/set" + "github.com/NibiruChain/nibiru/v2/x/common/set" - devgas "github.com/NibiruChain/nibiru/x/devgas/v1/types" - epochs "github.com/NibiruChain/nibiru/x/epochs/types" - inflation "github.com/NibiruChain/nibiru/x/inflation/types" - oracle "github.com/NibiruChain/nibiru/x/oracle/types" - sudotypes "github.com/NibiruChain/nibiru/x/sudo/types" - tokenfactory "github.com/NibiruChain/nibiru/x/tokenfactory/types" + devgas "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" + epochs "github.com/NibiruChain/nibiru/v2/x/epochs/types" + inflation "github.com/NibiruChain/nibiru/v2/x/inflation/types" + oracle "github.com/NibiruChain/nibiru/v2/x/oracle/types" + sudotypes "github.com/NibiruChain/nibiru/v2/x/sudo/types" + tokenfactory "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) /* diff --git a/app/wasmext/wasm_cli_test/cli_test.go b/app/wasmext/wasm_cli_test/cli_test.go index 401af370e..2edc2fbb7 100644 --- a/app/wasmext/wasm_cli_test/cli_test.go +++ b/app/wasmext/wasm_cli_test/cli_test.go @@ -15,12 +15,12 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/genesis" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/common/testutil/testnetwork" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/genesis" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testnetwork" ) // commonArgs is args for CLI test commands. diff --git a/cmd/nibid/cmd/decode_base64_test.go b/cmd/nibid/cmd/decode_base64_test.go index 5711d8cf6..96c136608 100644 --- a/cmd/nibid/cmd/decode_base64_test.go +++ b/cmd/nibid/cmd/decode_base64_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/NibiruChain/nibiru/app" + "github.com/NibiruChain/nibiru/v2/app" "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/client" @@ -13,7 +13,7 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/require" - nibid "github.com/NibiruChain/nibiru/cmd/nibid/cmd" + nibid "github.com/NibiruChain/nibiru/v2/cmd/nibid/cmd" ) func TestBase64Decode(t *testing.T) { diff --git a/cmd/nibid/cmd/genaccounts_test.go b/cmd/nibid/cmd/genaccounts_test.go index d451673bd..060f0ce4d 100644 --- a/cmd/nibid/cmd/genaccounts_test.go +++ b/cmd/nibid/cmd/genaccounts_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/NibiruChain/nibiru/app" + "github.com/NibiruChain/nibiru/v2/app" "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/client" @@ -17,9 +17,9 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" - nibid "github.com/NibiruChain/nibiru/cmd/nibid/cmd" + nibid "github.com/NibiruChain/nibiru/v2/cmd/nibid/cmd" ) var testModuleBasicManager = module.NewBasicManager(genutil.AppModuleBasic{}) diff --git a/cmd/nibid/cmd/init.go b/cmd/nibid/cmd/init.go index 0f84ec8a4..1d8c439a9 100644 --- a/cmd/nibid/cmd/init.go +++ b/cmd/nibid/cmd/init.go @@ -9,7 +9,7 @@ import ( tmcfg "github.com/cometbft/cometbft/config" - "github.com/NibiruChain/nibiru/app/appconst" + "github.com/NibiruChain/nibiru/v2/app/appconst" tmcli "github.com/cometbft/cometbft/libs/cli" tmrand "github.com/cometbft/cometbft/libs/rand" diff --git a/cmd/nibid/cmd/root.go b/cmd/nibid/cmd/root.go index f4ca78e60..7c8dbea5b 100644 --- a/cmd/nibid/cmd/root.go +++ b/cmd/nibid/cmd/root.go @@ -5,11 +5,11 @@ import ( "io" "os" - "github.com/NibiruChain/nibiru/app/server" - srvconfig "github.com/NibiruChain/nibiru/app/server/config" + "github.com/NibiruChain/nibiru/v2/app/server" + srvconfig "github.com/NibiruChain/nibiru/v2/app/server/config" - "github.com/NibiruChain/nibiru/app/appconst" - "github.com/NibiruChain/nibiru/x/sudo/cli" + "github.com/NibiruChain/nibiru/v2/app/appconst" + "github.com/NibiruChain/nibiru/v2/x/sudo/cli" dbm "github.com/cometbft/cometbft-db" tmcli "github.com/cometbft/cometbft/libs/cli" @@ -30,8 +30,8 @@ import ( genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" "github.com/spf13/cobra" - "github.com/NibiruChain/nibiru/app" - oraclecli "github.com/NibiruChain/nibiru/x/oracle/client/cli" + "github.com/NibiruChain/nibiru/v2/app" + oraclecli "github.com/NibiruChain/nibiru/v2/x/oracle/client/cli" ) // NewRootCmd creates a new root command for nibid. It is called once in the diff --git a/cmd/nibid/cmd/root_test.go b/cmd/nibid/cmd/root_test.go index 8cff73aa8..cd4ef7be7 100644 --- a/cmd/nibid/cmd/root_test.go +++ b/cmd/nibid/cmd/root_test.go @@ -4,8 +4,8 @@ import ( "testing" // Nibiru - "github.com/NibiruChain/nibiru/app" - nibid "github.com/NibiruChain/nibiru/cmd/nibid/cmd" + "github.com/NibiruChain/nibiru/v2/app" + nibid "github.com/NibiruChain/nibiru/v2/cmd/nibid/cmd" // Cosmos-SDK svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" diff --git a/cmd/nibid/cmd/testnet.go b/cmd/nibid/cmd/testnet.go index 106babf8a..cb998e0f5 100644 --- a/cmd/nibid/cmd/testnet.go +++ b/cmd/nibid/cmd/testnet.go @@ -34,7 +34,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/spf13/cobra" - "github.com/NibiruChain/nibiru/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" ) var ( diff --git a/cmd/nibid/cmd/testnet_test.go b/cmd/nibid/cmd/testnet_test.go index fa2892689..6c141124f 100644 --- a/cmd/nibid/cmd/testnet_test.go +++ b/cmd/nibid/cmd/testnet_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/NibiruChain/nibiru/app" + "github.com/NibiruChain/nibiru/v2/app" "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/client" diff --git a/cmd/nibid/main.go b/cmd/nibid/main.go index b34315c2f..381e603f1 100644 --- a/cmd/nibid/main.go +++ b/cmd/nibid/main.go @@ -6,8 +6,8 @@ import ( "github.com/cosmos/cosmos-sdk/server" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/cmd/nibid/cmd" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/cmd/nibid/cmd" ) func main() { diff --git a/contrib/scripts/protocgen.sh b/contrib/scripts/protocgen.sh index f3ffbfb8b..55c3c071e 100755 --- a/contrib/scripts/protocgen.sh +++ b/contrib/scripts/protocgen.sh @@ -16,5 +16,5 @@ done cd .. # move proto files to the right places -cp -r github.com/NibiruChain/nibiru/* ./ +cp -r github.com/NibiruChain/nibiru/v2/* ./ rm -rf github.com diff --git a/eth/account.pb.go b/eth/account.pb.go index 7cea10a19..b081e47d5 100644 --- a/eth/account.pb.go +++ b/eth/account.pb.go @@ -74,7 +74,7 @@ func init() { func init() { proto.RegisterFile("eth/types/v1/account.proto", fileDescriptor_33844e397ad0a9a0) } var fileDescriptor_33844e397ad0a9a0 = []byte{ - // 318 bytes of a gzipped FileDescriptorProto + // 321 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0x2d, 0xc9, 0xd0, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, 0x4f, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x49, 0x2d, 0xc9, 0xd0, 0x03, 0xcb, 0xe9, 0x95, @@ -90,11 +90,12 @@ var fileDescriptor_33844e397ad0a9a0 = []byte{ 0x11, 0x2e, 0xa5, 0x14, 0xc4, 0x01, 0x62, 0x7b, 0x24, 0x16, 0x67, 0x58, 0x05, 0x75, 0x2c, 0x90, 0x67, 0x78, 0xb1, 0x40, 0x9e, 0xe1, 0xd4, 0x16, 0x5d, 0xb7, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xa8, 0xf7, 0xa0, 0x94, 0x6e, 0x71, 0x4a, 0xb6, 0x7e, 0x05, 0x24, 0x60, - 0x20, 0xc1, 0x85, 0xcd, 0xcd, 0x50, 0x57, 0x78, 0x3a, 0x59, 0x9f, 0x78, 0x24, 0xc7, 0x78, 0xe1, + 0x20, 0xc1, 0x85, 0xcd, 0xcd, 0x50, 0x57, 0x78, 0x3a, 0xd9, 0x9d, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, - 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x22, 0x92, 0x0d, 0x7e, 0x99, 0x49, 0x99, 0x45, 0xa5, 0xce, 0x19, - 0x89, 0x99, 0x79, 0xfa, 0x79, 0x60, 0xb6, 0x7e, 0x6a, 0x49, 0x46, 0x12, 0x1b, 0x38, 0xec, 0x8c, - 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x66, 0xb4, 0x6d, 0xb8, 0x01, 0x00, 0x00, + 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x0a, 0x92, 0x0d, 0x7e, 0x99, 0x49, 0x99, 0x45, 0xa5, 0xce, 0x19, + 0x89, 0x99, 0x79, 0xfa, 0x79, 0x60, 0xb6, 0x7e, 0x99, 0x91, 0x7e, 0x6a, 0x49, 0x46, 0x12, 0x1b, + 0x38, 0xf8, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb0, 0x45, 0x85, 0x83, 0xbb, 0x01, 0x00, + 0x00, } func (m *EthAccount) Marshal() (dAtA []byte, err error) { diff --git a/eth/assert_test.go b/eth/assert_test.go index 0a57487ed..39045d8a0 100644 --- a/eth/assert_test.go +++ b/eth/assert_test.go @@ -6,8 +6,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) func TestIsEmptyHash(t *testing.T) { diff --git a/eth/chain_id.go b/eth/chain_id.go index d6d09dab4..3c5491594 100644 --- a/eth/chain_id.go +++ b/eth/chain_id.go @@ -7,7 +7,7 @@ import ( "regexp" "strings" - "github.com/NibiruChain/nibiru/app/appconst" + "github.com/NibiruChain/nibiru/v2/app/appconst" ) var ( diff --git a/eth/codec.go b/eth/codec.go index 61ff36905..e8d006a93 100644 --- a/eth/codec.go +++ b/eth/codec.go @@ -5,7 +5,7 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/NibiruChain/nibiru/app/appconst" + "github.com/NibiruChain/nibiru/v2/app/appconst" ) const ( diff --git a/eth/crypto/codec/amino.go b/eth/crypto/codec/amino.go index feffe70e1..380b8e5cd 100644 --- a/eth/crypto/codec/amino.go +++ b/eth/crypto/codec/amino.go @@ -7,7 +7,7 @@ import ( cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/NibiruChain/nibiru/eth/crypto/ethsecp256k1" + "github.com/NibiruChain/nibiru/v2/eth/crypto/ethsecp256k1" ) // RegisterCrypto registers all crypto dependency types with the provided Amino diff --git a/eth/crypto/codec/codec.go b/eth/crypto/codec/codec.go index cfd001ad2..c888f7b2c 100644 --- a/eth/crypto/codec/codec.go +++ b/eth/crypto/codec/codec.go @@ -5,7 +5,7 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/NibiruChain/nibiru/eth/crypto/ethsecp256k1" + "github.com/NibiruChain/nibiru/v2/eth/crypto/ethsecp256k1" ) // RegisterInterfaces register the cryptographic key concrete types. diff --git a/eth/crypto/ethsecp256k1/ethsecp256k1.go b/eth/crypto/ethsecp256k1/ethsecp256k1.go index cd5cdd0f5..7a341931e 100644 --- a/eth/crypto/ethsecp256k1/ethsecp256k1.go +++ b/eth/crypto/ethsecp256k1/ethsecp256k1.go @@ -15,7 +15,7 @@ import ( errortypes "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/crypto" - "github.com/NibiruChain/nibiru/eth/eip712" + "github.com/NibiruChain/nibiru/v2/eth/eip712" ) const ( diff --git a/eth/crypto/hd/algorithm.go b/eth/crypto/hd/algorithm.go index 9949b363f..f4370c387 100644 --- a/eth/crypto/hd/algorithm.go +++ b/eth/crypto/hd/algorithm.go @@ -13,7 +13,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/NibiruChain/nibiru/eth/crypto/ethsecp256k1" + "github.com/NibiruChain/nibiru/v2/eth/crypto/ethsecp256k1" ) const ( diff --git a/eth/crypto/hd/algorithm_test.go b/eth/crypto/hd/algorithm_test.go index 2d46d51c7..23eee7ae7 100644 --- a/eth/crypto/hd/algorithm_test.go +++ b/eth/crypto/hd/algorithm_test.go @@ -13,9 +13,9 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/NibiruChain/nibiru/eth" - cryptocodec "github.com/NibiruChain/nibiru/eth/crypto/codec" - enccodec "github.com/NibiruChain/nibiru/eth/encoding/codec" + "github.com/NibiruChain/nibiru/v2/eth" + cryptocodec "github.com/NibiruChain/nibiru/v2/eth/crypto/codec" + enccodec "github.com/NibiruChain/nibiru/v2/eth/encoding/codec" ) var TestCodec amino.Codec diff --git a/eth/crypto/hd/benchmark_test.go b/eth/crypto/hd/benchmark_test.go index 0c2246904..976cf6f87 100644 --- a/eth/crypto/hd/benchmark_test.go +++ b/eth/crypto/hd/benchmark_test.go @@ -5,7 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/NibiruChain/nibiru/eth" + "github.com/NibiruChain/nibiru/v2/eth" ) func BenchmarkEthSecp256k1Algo_Derive(b *testing.B) { diff --git a/eth/crypto/keyring/options.go b/eth/crypto/keyring/options.go index a53ad75a5..86c384db2 100644 --- a/eth/crypto/keyring/options.go +++ b/eth/crypto/keyring/options.go @@ -6,8 +6,8 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/NibiruChain/nibiru/eth/crypto/ethsecp256k1" - "github.com/NibiruChain/nibiru/eth/crypto/hd" + "github.com/NibiruChain/nibiru/v2/eth/crypto/ethsecp256k1" + "github.com/NibiruChain/nibiru/v2/eth/crypto/hd" ) // AppName defines the Ledger app used for signing. diff --git a/eth/eip712/eip712_fuzzer_test.go b/eth/eip712/eip712_fuzzer_test.go index 319c28e3d..a7e096eae 100644 --- a/eth/eip712/eip712_fuzzer_test.go +++ b/eth/eip712/eip712_fuzzer_test.go @@ -9,7 +9,7 @@ import ( "github.com/tidwall/gjson" "github.com/tidwall/sjson" - "github.com/NibiruChain/nibiru/eth/eip712" + "github.com/NibiruChain/nibiru/v2/eth/eip712" ) type EIP712FuzzTestParams struct { diff --git a/eth/eip712/eip712_test.go b/eth/eip712/eip712_test.go index dd8a44595..1ce492583 100644 --- a/eth/eip712/eip712_test.go +++ b/eth/eip712/eip712_test.go @@ -17,24 +17,24 @@ import ( "github.com/tidwall/gjson" "github.com/tidwall/sjson" - "github.com/NibiruChain/nibiru/app/appconst" - "github.com/NibiruChain/nibiru/eth/eip712" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/app/appconst" + "github.com/NibiruChain/nibiru/v2/eth/eip712" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/evm" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/eth/crypto/ethsecp256k1" + "github.com/NibiruChain/nibiru/v2/eth/crypto/ethsecp256k1" - "github.com/NibiruChain/nibiru/app" + "github.com/NibiruChain/nibiru/v2/app" sdktx "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/NibiruChain/nibiru/eth/encoding" + "github.com/NibiruChain/nibiru/v2/eth/encoding" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" diff --git a/eth/eip712/encoding.go b/eth/eip712/encoding.go index b7f54114a..2c2b8ea0b 100644 --- a/eth/eip712/encoding.go +++ b/eth/eip712/encoding.go @@ -13,7 +13,7 @@ import ( apitypes "github.com/ethereum/go-ethereum/signer/core/apitypes" - "github.com/NibiruChain/nibiru/eth" + "github.com/NibiruChain/nibiru/v2/eth" "github.com/cosmos/cosmos-sdk/codec" ) diff --git a/eth/eip712/encoding_legacy.go b/eth/eip712/encoding_legacy.go index 8bf5fc486..751be9a4b 100644 --- a/eth/eip712/encoding_legacy.go +++ b/eth/eip712/encoding_legacy.go @@ -13,7 +13,7 @@ import ( apitypes "github.com/ethereum/go-ethereum/signer/core/apitypes" - "github.com/NibiruChain/nibiru/eth" + "github.com/NibiruChain/nibiru/v2/eth" ) type aminoMessage struct { diff --git a/eth/encoding/codec/codec.go b/eth/encoding/codec/codec.go index 19916af90..702274696 100644 --- a/eth/encoding/codec/codec.go +++ b/eth/encoding/codec/codec.go @@ -7,8 +7,8 @@ import ( "github.com/cosmos/cosmos-sdk/std" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/eth" - cryptocodec "github.com/NibiruChain/nibiru/eth/crypto/codec" + "github.com/NibiruChain/nibiru/v2/eth" + cryptocodec "github.com/NibiruChain/nibiru/v2/eth/crypto/codec" ) // RegisterLegacyAminoCodec registers Interfaces from types, crypto, and SDK std. diff --git a/eth/encoding/config.go b/eth/encoding/config.go index ac8962c31..72d03ae05 100644 --- a/eth/encoding/config.go +++ b/eth/encoding/config.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/auth/tx" - enccodec "github.com/NibiruChain/nibiru/eth/encoding/codec" + enccodec "github.com/NibiruChain/nibiru/v2/eth/encoding/codec" ) // MakeConfig creates an EncodingConfig for testing diff --git a/eth/encoding/config_test.go b/eth/encoding/config_test.go index 06ffa0a4d..37ec3b29f 100644 --- a/eth/encoding/config_test.go +++ b/eth/encoding/config_test.go @@ -8,10 +8,10 @@ import ( gethcore "github.com/ethereum/go-ethereum/core/types" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/eth/encoding" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/eth/encoding" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) func TestTxEncoding(t *testing.T) { diff --git a/eth/eth_account_test.go b/eth/eth_account_test.go index 3777f086d..f42608b65 100644 --- a/eth/eth_account_test.go +++ b/eth/eth_account_test.go @@ -1,8 +1,8 @@ package eth_test import ( - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) func (s *Suite) TestEthAddrToNibiruAddr() { diff --git a/eth/gas_limit_test.go b/eth/gas_limit_test.go index fc126a758..5e0f68ccb 100644 --- a/eth/gas_limit_test.go +++ b/eth/gas_limit_test.go @@ -5,8 +5,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" ) diff --git a/eth/hex_test.go b/eth/hex_test.go index 0fef9f855..28694b6f9 100644 --- a/eth/hex_test.go +++ b/eth/hex_test.go @@ -7,8 +7,8 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/common/set" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/common/set" ) var threeValidAddrs []eth.HexAddr = []eth.HexAddr{ diff --git a/eth/indexer.pb.go b/eth/indexer.pb.go index 93a3ddb8c..31ba6aa32 100644 --- a/eth/indexer.pb.go +++ b/eth/indexer.pb.go @@ -84,26 +84,26 @@ func init() { func init() { proto.RegisterFile("eth/types/v1/indexer.proto", fileDescriptor_6eb4a496a6639a52) } var fileDescriptor_6eb4a496a6639a52 = []byte{ - // 300 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x90, 0xb1, 0x4e, 0xeb, 0x30, - 0x18, 0x85, 0xe3, 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xf2, 0x19, 0x49, 0xba, 0xa2, 0x2f, 0x73, - 0xf3, 0x64, 0xa0, 0x08, 0x53, 0x7a, 0x3c, 0xb5, 0xa5, 0x9d, 0xe5, 0xa8, 0x57, 0x90, 0xed, 0xad, - 0xbe, 0xb3, 0x8e, 0xfe, 0xd0, 0xfd, 0xce, 0xbf, 0xee, 0xbe, 0x7d, 0x9c, 0x7b, 0xb7, 0x37, 0x9f, - 0x9b, 0x98, 0xac, 0x37, 0x31, 0xf9, 0xde, 0xc4, 0xe4, 0x7d, 0x1b, 0x7b, 0xeb, 0x6d, 0xec, 0x7d, - 0x6d, 0x63, 0xef, 0xf9, 0x42, 0x6a, 0x54, 0x76, 0x92, 0x4e, 0xab, 0x92, 0x3f, 0xea, 0x89, 0x5e, - 0xda, 0x3b, 0x95, 0xeb, 0x39, 0x9f, 0xbb, 0xcc, 0x01, 0xd5, 0xc4, 0x77, 0x7f, 0x75, 0xf5, 0x1b, - 0x00, 0x00, 0xff, 0xff, 0xd4, 0xa8, 0xcc, 0x00, 0x6d, 0x01, 0x00, 0x00, + // 303 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x90, 0x31, 0x4e, 0xc3, 0x30, + 0x18, 0x85, 0x63, 0xda, 0xa6, 0xc1, 0x82, 0x81, 0x80, 0xaa, 0x50, 0xa4, 0x10, 0x21, 0x86, 0x4c, + 0xb1, 0x0a, 0x1b, 0x03, 0x03, 0x0c, 0x88, 0x85, 0xc1, 0x2a, 0x0b, 0x4b, 0x94, 0x36, 0x3f, 0xb6, + 0xa5, 0xa6, 0xa9, 0xea, 0xdf, 0x51, 0xb8, 0x01, 0x23, 0x47, 0xe0, 0x38, 0x8c, 0x1d, 0x19, 0x51, + 0x2b, 0xee, 0x81, 0xe2, 0x46, 0x65, 0x7b, 0x4f, 0xdf, 0xf7, 0x6c, 0xcb, 0x74, 0x08, 0x28, 0x19, + 0xbe,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 0x50, 0x9a, 0x49, 0x32, 0x2d, 0x0b, 0xf6, 0xa4, 0x26, 0x6a, + 0x69, 0xee, 0x65, 0xa6, 0xe6, 0x6c, 0x6e, 0x33, 0xab, 0xae, 0x18, 0xa0, 0x9c, 0xb8, 0xf6, 0xbb, + 0xae, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd0, 0x30, 0x91, 0xa4, 0x70, 0x01, 0x00, 0x00, } func (m *TxResult) Marshal() (dAtA []byte, err error) { diff --git a/eth/indexer/kv_indexer.go b/eth/indexer/kv_indexer.go index cb3054aef..7f3384a4a 100644 --- a/eth/indexer/kv_indexer.go +++ b/eth/indexer/kv_indexer.go @@ -15,9 +15,9 @@ import ( authante "github.com/cosmos/cosmos-sdk/x/auth/ante" "github.com/ethereum/go-ethereum/common" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/x/evm" ) const ( diff --git a/eth/indexer/kv_indexer_test.go b/eth/indexer/kv_indexer_test.go index bb446aa71..b1b222027 100644 --- a/eth/indexer/kv_indexer_test.go +++ b/eth/indexer/kv_indexer_test.go @@ -14,13 +14,13 @@ import ( gethcore "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/eth/crypto/ethsecp256k1" - evmenc "github.com/NibiruChain/nibiru/eth/encoding" - "github.com/NibiruChain/nibiru/eth/indexer" - "github.com/NibiruChain/nibiru/x/evm" - evmtest "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/eth/crypto/ethsecp256k1" + evmenc "github.com/NibiruChain/nibiru/v2/eth/encoding" + "github.com/NibiruChain/nibiru/v2/eth/indexer" + "github.com/NibiruChain/nibiru/v2/x/evm" + evmtest "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) func TestKVIndexer(t *testing.T) { diff --git a/eth/rpc/addrlocker_test.go b/eth/rpc/addrlocker_test.go index f215a507b..97b9bea94 100644 --- a/eth/rpc/addrlocker_test.go +++ b/eth/rpc/addrlocker_test.go @@ -8,7 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/suite" - rpc "github.com/NibiruChain/nibiru/eth/rpc" + rpc "github.com/NibiruChain/nibiru/v2/eth/rpc" ) type SuiteAddrLocker struct { diff --git a/eth/rpc/backend/account_info.go b/eth/rpc/backend/account_info.go index f27e3c70d..94478a259 100644 --- a/eth/rpc/backend/account_info.go +++ b/eth/rpc/backend/account_info.go @@ -16,8 +16,8 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/pkg/errors" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // GetCode returns the contract code at the given address and block number. diff --git a/eth/rpc/backend/account_info_test.go b/eth/rpc/backend/account_info_test.go index a4112bbad..623fa4d54 100644 --- a/eth/rpc/backend/account_info_test.go +++ b/eth/rpc/backend/account_info_test.go @@ -11,10 +11,10 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "google.golang.org/grpc/metadata" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/eth/rpc/backend/mocks" - "github.com/NibiruChain/nibiru/x/evm" - evmtest "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/eth/rpc/backend/mocks" + "github.com/NibiruChain/nibiru/v2/x/evm" + evmtest "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) func (s *BackendSuite) TestGetCode() { diff --git a/eth/rpc/backend/backend.go b/eth/rpc/backend/backend.go index bebf53c10..776c4b0a6 100644 --- a/eth/rpc/backend/backend.go +++ b/eth/rpc/backend/backend.go @@ -18,10 +18,10 @@ import ( gethrpc "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/signer/core/apitypes" - "github.com/NibiruChain/nibiru/app/server/config" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/app/server/config" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // BackendI implements the Cosmos and EVM backend. diff --git a/eth/rpc/backend/backend_suite_test.go b/eth/rpc/backend/backend_suite_test.go index b42fe2de1..1bf7e2efb 100644 --- a/eth/rpc/backend/backend_suite_test.go +++ b/eth/rpc/backend/backend_suite_test.go @@ -18,15 +18,15 @@ import ( gethcore "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/eth/crypto/hd" - "github.com/NibiruChain/nibiru/eth/encoding" - "github.com/NibiruChain/nibiru/eth/indexer" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/eth/rpc/backend/mocks" - "github.com/NibiruChain/nibiru/x/evm" - evmtest "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/eth/crypto/hd" + "github.com/NibiruChain/nibiru/v2/eth/encoding" + "github.com/NibiruChain/nibiru/v2/eth/indexer" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/eth/rpc/backend/mocks" + "github.com/NibiruChain/nibiru/v2/x/evm" + evmtest "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) type BackendSuite struct { diff --git a/eth/rpc/backend/blocks.go b/eth/rpc/backend/blocks.go index 1e5f1fc3e..dda1affef 100644 --- a/eth/rpc/backend/blocks.go +++ b/eth/rpc/backend/blocks.go @@ -19,8 +19,8 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/metadata" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // BlockNumber returns the current block number in abci app state. Because abci diff --git a/eth/rpc/backend/blocks_test.go b/eth/rpc/backend/blocks_test.go index b65607494..3d19f072f 100644 --- a/eth/rpc/backend/blocks_test.go +++ b/eth/rpc/backend/blocks_test.go @@ -16,10 +16,10 @@ import ( "github.com/ethereum/go-ethereum/trie" "google.golang.org/grpc/metadata" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/eth/rpc/backend/mocks" - "github.com/NibiruChain/nibiru/x/evm" - evmtest "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/eth/rpc/backend/mocks" + "github.com/NibiruChain/nibiru/v2/x/evm" + evmtest "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) func (s *BackendSuite) TestBlockNumber() { diff --git a/eth/rpc/backend/call_tx.go b/eth/rpc/backend/call_tx.go index 7172a643c..98c2342c9 100644 --- a/eth/rpc/backend/call_tx.go +++ b/eth/rpc/backend/call_tx.go @@ -19,9 +19,9 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // Resend accepts an existing transaction and a new gas price and limit. It will remove diff --git a/eth/rpc/backend/call_tx_test.go b/eth/rpc/backend/call_tx_test.go index 9a87546bf..e8aa98a86 100644 --- a/eth/rpc/backend/call_tx_test.go +++ b/eth/rpc/backend/call_tx_test.go @@ -12,10 +12,10 @@ import ( "github.com/ethereum/go-ethereum/rlp" "google.golang.org/grpc/metadata" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/eth/rpc/backend/mocks" - "github.com/NibiruChain/nibiru/x/evm" - evmtest "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/eth/rpc/backend/mocks" + "github.com/NibiruChain/nibiru/v2/x/evm" + evmtest "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) func (s *BackendSuite) TestResend() { diff --git a/eth/rpc/backend/chain_info.go b/eth/rpc/backend/chain_info.go index 1368d02ca..6b478a577 100644 --- a/eth/rpc/backend/chain_info.go +++ b/eth/rpc/backend/chain_info.go @@ -15,9 +15,9 @@ import ( gethrpc "github.com/ethereum/go-ethereum/rpc" "github.com/pkg/errors" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // ChainID is the EIP-155 replay-protection chain id for the current ethereum chain config. diff --git a/eth/rpc/backend/chain_info_test.go b/eth/rpc/backend/chain_info_test.go index f745a6c40..74a91655f 100644 --- a/eth/rpc/backend/chain_info_test.go +++ b/eth/rpc/backend/chain_info_test.go @@ -15,11 +15,11 @@ import ( "github.com/cometbft/cometbft/abci/types" tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/eth/rpc/backend/mocks" - "github.com/NibiruChain/nibiru/x/evm" - evmtest "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/eth/rpc/backend/mocks" + "github.com/NibiruChain/nibiru/v2/x/evm" + evmtest "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) func (s *BackendSuite) TestBaseFee() { diff --git a/eth/rpc/backend/client_test.go b/eth/rpc/backend/client_test.go index 642a473df..53a34e799 100644 --- a/eth/rpc/backend/client_test.go +++ b/eth/rpc/backend/client_test.go @@ -15,9 +15,9 @@ import ( mock "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/eth/rpc/backend/mocks" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/eth/rpc/backend/mocks" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // Client defines a mocked object that implements the Tendermint JSON-RPC Client diff --git a/eth/rpc/backend/evm_query_client_test.go b/eth/rpc/backend/evm_query_client_test.go index 3a5481a9e..9b5ab9c85 100644 --- a/eth/rpc/backend/evm_query_client_test.go +++ b/eth/rpc/backend/evm_query_client_test.go @@ -20,11 +20,11 @@ import ( "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/eth/rpc/backend/mocks" - "github.com/NibiruChain/nibiru/x/evm" - evmtest "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/eth/rpc/backend/mocks" + "github.com/NibiruChain/nibiru/v2/x/evm" + evmtest "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) // QueryClient defines a mocked object that implements the ethermint GRPC diff --git a/eth/rpc/backend/filters_test.go b/eth/rpc/backend/filters_test.go index 831a2c1bf..e9c414648 100644 --- a/eth/rpc/backend/filters_test.go +++ b/eth/rpc/backend/filters_test.go @@ -7,9 +7,9 @@ import ( "github.com/ethereum/go-ethereum/common" gethcore "github.com/ethereum/go-ethereum/core/types" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/eth/rpc/backend/mocks" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/eth/rpc/backend/mocks" + "github.com/NibiruChain/nibiru/v2/x/evm" ) func (s *BackendSuite) TestGetLogs() { diff --git a/eth/rpc/backend/mocks/evm_query_client.go b/eth/rpc/backend/mocks/evm_query_client.go index e7b536508..52eceb18e 100644 --- a/eth/rpc/backend/mocks/evm_query_client.go +++ b/eth/rpc/backend/mocks/evm_query_client.go @@ -9,7 +9,7 @@ import ( mock "github.com/stretchr/testify/mock" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // EVMQueryClient is an autogenerated mock type for the EVMQueryClient type diff --git a/eth/rpc/backend/node_info.go b/eth/rpc/backend/node_info.go index 266da954d..93f3cc32b 100644 --- a/eth/rpc/backend/node_info.go +++ b/eth/rpc/backend/node_info.go @@ -7,8 +7,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // Accounts returns the list of accounts available to this node. diff --git a/eth/rpc/backend/node_info_test.go b/eth/rpc/backend/node_info_test.go index 8bebeb429..9949defb1 100644 --- a/eth/rpc/backend/node_info_test.go +++ b/eth/rpc/backend/node_info_test.go @@ -6,8 +6,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/eth/rpc/backend/mocks" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/eth/rpc/backend/mocks" ) func (s *BackendSuite) TestRPCMinGasPrice() { diff --git a/eth/rpc/backend/sign_tx.go b/eth/rpc/backend/sign_tx.go index 806df48d4..3d6379d97 100644 --- a/eth/rpc/backend/sign_tx.go +++ b/eth/rpc/backend/sign_tx.go @@ -16,7 +16,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/signer/core/apitypes" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // SendTransaction sends transaction based on received args using Node's key to sign it diff --git a/eth/rpc/backend/sign_tx_test.go b/eth/rpc/backend/sign_tx_test.go index 9d4c80b5a..dceb47bce 100644 --- a/eth/rpc/backend/sign_tx_test.go +++ b/eth/rpc/backend/sign_tx_test.go @@ -14,10 +14,10 @@ import ( "github.com/ethereum/go-ethereum/signer/core/apitypes" "google.golang.org/grpc/metadata" - "github.com/NibiruChain/nibiru/eth/crypto/ethsecp256k1" - "github.com/NibiruChain/nibiru/eth/rpc/backend/mocks" - "github.com/NibiruChain/nibiru/x/evm" - evmtest "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/eth/crypto/ethsecp256k1" + "github.com/NibiruChain/nibiru/v2/eth/rpc/backend/mocks" + "github.com/NibiruChain/nibiru/v2/x/evm" + evmtest "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) func (s *BackendSuite) TestSendTransaction() { diff --git a/eth/rpc/backend/tracing.go b/eth/rpc/backend/tracing.go index eb823d823..fc19c7d32 100644 --- a/eth/rpc/backend/tracing.go +++ b/eth/rpc/backend/tracing.go @@ -12,8 +12,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // TraceTransaction returns the structured logs created during the execution of EVM diff --git a/eth/rpc/backend/tracing_test.go b/eth/rpc/backend/tracing_test.go index 53f7b9f85..f80f60f84 100644 --- a/eth/rpc/backend/tracing_test.go +++ b/eth/rpc/backend/tracing_test.go @@ -12,10 +12,10 @@ import ( "github.com/ethereum/go-ethereum/common" gethcore "github.com/ethereum/go-ethereum/core/types" - "github.com/NibiruChain/nibiru/eth/crypto/ethsecp256k1" - "github.com/NibiruChain/nibiru/eth/indexer" - "github.com/NibiruChain/nibiru/eth/rpc/backend/mocks" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth/crypto/ethsecp256k1" + "github.com/NibiruChain/nibiru/v2/eth/indexer" + "github.com/NibiruChain/nibiru/v2/eth/rpc/backend/mocks" + "github.com/NibiruChain/nibiru/v2/x/evm" ) func (s *BackendSuite) TestTraceTransaction() { diff --git a/eth/rpc/backend/tx_info.go b/eth/rpc/backend/tx_info.go index afbf523ca..bd6d3474a 100644 --- a/eth/rpc/backend/tx_info.go +++ b/eth/rpc/backend/tx_info.go @@ -17,9 +17,9 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/pkg/errors" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // GetTransactionByHash returns the Ethereum format transaction identified by Ethereum transaction hash diff --git a/eth/rpc/backend/tx_info_test.go b/eth/rpc/backend/tx_info_test.go index beb708047..28f345eba 100644 --- a/eth/rpc/backend/tx_info_test.go +++ b/eth/rpc/backend/tx_info_test.go @@ -14,11 +14,11 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "google.golang.org/grpc/metadata" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/eth/indexer" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/eth/rpc/backend/mocks" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/eth/indexer" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/eth/rpc/backend/mocks" + "github.com/NibiruChain/nibiru/v2/x/evm" ) func (s *BackendSuite) TestGetTransactionByHash() { diff --git a/eth/rpc/backend/utils.go b/eth/rpc/backend/utils.go index 025fce754..e436297bd 100644 --- a/eth/rpc/backend/utils.go +++ b/eth/rpc/backend/utils.go @@ -24,8 +24,8 @@ import ( "github.com/cometbft/cometbft/proto/tendermint/crypto" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/x/evm" ) type txGasAndReward struct { diff --git a/eth/rpc/block.go b/eth/rpc/block.go index 7b58efb92..0d456455e 100644 --- a/eth/rpc/block.go +++ b/eth/rpc/block.go @@ -18,7 +18,7 @@ import ( grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" - "github.com/NibiruChain/nibiru/eth" + "github.com/NibiruChain/nibiru/v2/eth" ) // BlockNumber represents a decoded hex string for a block number. diff --git a/eth/rpc/events.go b/eth/rpc/events.go index 8bd4ac6e8..8c0d8cacf 100644 --- a/eth/rpc/events.go +++ b/eth/rpc/events.go @@ -10,8 +10,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // EventFormat is an enum type for an ethereum tx event. Each event format diff --git a/eth/rpc/events_test.go b/eth/rpc/events_test.go index 56d9191e2..c9d48e84e 100644 --- a/eth/rpc/events_test.go +++ b/eth/rpc/events_test.go @@ -8,7 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) func TestParseTxResult(t *testing.T) { diff --git a/eth/rpc/query_client.go b/eth/rpc/query_client.go index bc30fd19b..e55be81a3 100644 --- a/eth/rpc/query_client.go +++ b/eth/rpc/query_client.go @@ -11,7 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // QueryClient defines a gRPC Client used for: diff --git a/eth/rpc/rpc.go b/eth/rpc/rpc.go index 88b9f579d..4ca1d8393 100644 --- a/eth/rpc/rpc.go +++ b/eth/rpc/rpc.go @@ -15,7 +15,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" errortypes "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" diff --git a/eth/rpc/rpc_test.go b/eth/rpc/rpc_test.go index 9543400f2..89321c65d 100644 --- a/eth/rpc/rpc_test.go +++ b/eth/rpc/rpc_test.go @@ -10,8 +10,8 @@ import ( gethcore "github.com/ethereum/go-ethereum/core/types" "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) type SuiteRPC struct { diff --git a/eth/rpc/rpcapi/apis.go b/eth/rpc/rpcapi/apis.go index 2a8f376ad..f3f33ae76 100644 --- a/eth/rpc/rpcapi/apis.go +++ b/eth/rpc/rpcapi/apis.go @@ -7,10 +7,10 @@ import ( "github.com/ethereum/go-ethereum/rpc" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/eth/rpc/backend" - "github.com/NibiruChain/nibiru/eth/rpc/rpcapi/debugapi" - "github.com/NibiruChain/nibiru/eth/rpc/rpcapi/filtersapi" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/eth/rpc/backend" + "github.com/NibiruChain/nibiru/v2/eth/rpc/rpcapi/debugapi" + "github.com/NibiruChain/nibiru/v2/eth/rpc/rpcapi/filtersapi" rpcclient "github.com/cometbft/cometbft/rpc/jsonrpc/client" ) diff --git a/eth/rpc/rpcapi/debugapi/api.go b/eth/rpc/rpcapi/debugapi/api.go index 7b0bf65d6..b8708eadc 100644 --- a/eth/rpc/rpcapi/debugapi/api.go +++ b/eth/rpc/rpcapi/debugapi/api.go @@ -15,7 +15,7 @@ import ( "github.com/davecgh/go-spew/spew" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" stderrors "github.com/pkg/errors" @@ -27,8 +27,8 @@ import ( "github.com/ethereum/go-ethereum/consensus/ethash" "github.com/ethereum/go-ethereum/rlp" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/eth/rpc/backend" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/eth/rpc/backend" ) // HandlerT keeps track of the cpu profiler and trace execution diff --git a/eth/rpc/rpcapi/eth_api.go b/eth/rpc/rpcapi/eth_api.go index e81468193..9b59be6bc 100644 --- a/eth/rpc/rpcapi/eth_api.go +++ b/eth/rpc/rpcapi/eth_api.go @@ -14,11 +14,11 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" gethcore "github.com/ethereum/go-ethereum/core/types" - "github.com/NibiruChain/nibiru/eth/rpc/backend" + "github.com/NibiruChain/nibiru/v2/eth/rpc/backend" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // Ethereum API: Allows connection to a full node of the Nibiru blockchain diff --git a/eth/rpc/rpcapi/eth_api_test.go b/eth/rpc/rpcapi/eth_api_test.go index 6664bd6a4..cac42bea1 100644 --- a/eth/rpc/rpcapi/eth_api_test.go +++ b/eth/rpc/rpcapi/eth_api_test.go @@ -17,21 +17,21 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/params" - "github.com/NibiruChain/nibiru/app/appconst" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/gosdk" + "github.com/NibiruChain/nibiru/v2/app/appconst" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/gosdk" - nibirucommon "github.com/NibiruChain/nibiru/x/common" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/embeds" + nibirucommon "github.com/NibiruChain/nibiru/v2/x/common" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/genesis" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/common/testutil/testnetwork" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/genesis" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testnetwork" ) var ( diff --git a/eth/rpc/rpcapi/filtersapi/api.go b/eth/rpc/rpcapi/filtersapi/api.go index bb9f5ea69..7d0985433 100644 --- a/eth/rpc/rpcapi/filtersapi/api.go +++ b/eth/rpc/rpcapi/filtersapi/api.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" - "github.com/NibiruChain/nibiru/eth/rpc" + "github.com/NibiruChain/nibiru/v2/eth/rpc" "github.com/cometbft/cometbft/libs/log" @@ -23,7 +23,7 @@ import ( "github.com/ethereum/go-ethereum/eth/filters" gethrpc "github.com/ethereum/go-ethereum/rpc" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // IFilterAPI diff --git a/eth/rpc/rpcapi/filtersapi/filter_system.go b/eth/rpc/rpcapi/filtersapi/filter_system.go index 5d91c0963..d54e1afb7 100644 --- a/eth/rpc/rpcapi/filtersapi/filter_system.go +++ b/eth/rpc/rpcapi/filtersapi/filter_system.go @@ -23,8 +23,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/eth/rpc/pubsub" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth/rpc/pubsub" + "github.com/NibiruChain/nibiru/v2/x/evm" ) var ( diff --git a/eth/rpc/rpcapi/filtersapi/filter_system_test.go b/eth/rpc/rpcapi/filtersapi/filter_system_test.go index d55b2c188..cd887c897 100644 --- a/eth/rpc/rpcapi/filtersapi/filter_system_test.go +++ b/eth/rpc/rpcapi/filtersapi/filter_system_test.go @@ -14,7 +14,7 @@ import ( "github.com/ethereum/go-ethereum/eth/filters" "github.com/ethereum/go-ethereum/rpc" - "github.com/NibiruChain/nibiru/eth/rpc/pubsub" + "github.com/NibiruChain/nibiru/v2/eth/rpc/pubsub" ) func makeSubscription(id, event string) *Subscription { diff --git a/eth/rpc/rpcapi/filtersapi/filters.go b/eth/rpc/rpcapi/filtersapi/filters.go index 4710dff8c..e49d61e57 100644 --- a/eth/rpc/rpcapi/filtersapi/filters.go +++ b/eth/rpc/rpcapi/filtersapi/filters.go @@ -7,8 +7,8 @@ import ( "fmt" "math/big" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/eth/rpc/backend" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/eth/rpc/backend" "github.com/cometbft/cometbft/libs/log" tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" diff --git a/eth/rpc/rpcapi/net_api.go b/eth/rpc/rpcapi/net_api.go index 284ef7108..cc63bd303 100644 --- a/eth/rpc/rpcapi/net_api.go +++ b/eth/rpc/rpcapi/net_api.go @@ -8,13 +8,13 @@ import ( rpcclient "github.com/cometbft/cometbft/rpc/client" "github.com/cosmos/cosmos-sdk/client" - "github.com/NibiruChain/nibiru/eth" + "github.com/NibiruChain/nibiru/v2/eth" ) // NetAPI is the eth_ prefixed set of APIs in the Web3 JSON-RPC spec. type NetAPI struct { networkVersion uint64 - // TODO: epic: test(eth-rpc): "github.com/NibiruChain/nibiru/x/common/testutil/cli" + // TODO: epic: test(eth-rpc): "github.com/NibiruChain/nibiru/v2/x/common/testutil/cli" // Validator.RPCClient should be used to test APIs that depend on the CometBFT // RPC client. tmClient rpcclient.Client diff --git a/eth/rpc/rpcapi/txpool_api.go b/eth/rpc/rpcapi/txpool_api.go index ab2bc0055..ff672d6fe 100644 --- a/eth/rpc/rpcapi/txpool_api.go +++ b/eth/rpc/rpcapi/txpool_api.go @@ -6,7 +6,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/NibiruChain/nibiru/eth/rpc" + "github.com/NibiruChain/nibiru/v2/eth/rpc" ) // TxPoolAPI offers and API for the transaction pool. It only operates on data diff --git a/eth/rpc/rpcapi/web3_api.go b/eth/rpc/rpcapi/web3_api.go index 1cdc3030b..aefd3d059 100644 --- a/eth/rpc/rpcapi/web3_api.go +++ b/eth/rpc/rpcapi/web3_api.go @@ -2,7 +2,7 @@ package rpcapi import ( - appconst "github.com/NibiruChain/nibiru/app/appconst" + appconst "github.com/NibiruChain/nibiru/v2/app/appconst" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" diff --git a/eth/rpc/rpcapi/websockets.go b/eth/rpc/rpcapi/websockets.go index c168b9054..e9447acd8 100644 --- a/eth/rpc/rpcapi/websockets.go +++ b/eth/rpc/rpcapi/websockets.go @@ -30,11 +30,11 @@ import ( "github.com/NibiruChain/collections" - "github.com/NibiruChain/nibiru/app/server/config" - "github.com/NibiruChain/nibiru/eth/rpc" - "github.com/NibiruChain/nibiru/eth/rpc/pubsub" - rpcfilters "github.com/NibiruChain/nibiru/eth/rpc/rpcapi/filtersapi" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/app/server/config" + "github.com/NibiruChain/nibiru/v2/eth/rpc" + "github.com/NibiruChain/nibiru/v2/eth/rpc/pubsub" + rpcfilters "github.com/NibiruChain/nibiru/v2/eth/rpc/rpcapi/filtersapi" + "github.com/NibiruChain/nibiru/v2/x/evm" ) type WebsocketsServer interface { diff --git a/eth/safe_math_test.go b/eth/safe_math_test.go index 655622ded..9be278637 100644 --- a/eth/safe_math_test.go +++ b/eth/safe_math_test.go @@ -8,7 +8,7 @@ import ( "cosmossdk.io/math" "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/eth" + "github.com/NibiruChain/nibiru/v2/eth" ) const maxInt64 = 9223372036854775807 diff --git a/eth/state_encoder_test.go b/eth/state_encoder_test.go index be1bf36e4..a732d4027 100644 --- a/eth/state_encoder_test.go +++ b/eth/state_encoder_test.go @@ -7,7 +7,7 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/eth" + "github.com/NibiruChain/nibiru/v2/eth" ) func assertBijectiveKey[T any](t *testing.T, encoder collections.KeyEncoder[T], key T) { diff --git a/go.mod b/go.mod index 2984a00cc..3476119b5 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/NibiruChain/nibiru +module github.com/NibiruChain/nibiru/v2 go 1.21 diff --git a/gosdk/broadcast.go b/gosdk/broadcast.go index 4d1d3e63b..636225ad8 100644 --- a/gosdk/broadcast.go +++ b/gosdk/broadcast.go @@ -12,8 +12,8 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "google.golang.org/grpc" - "github.com/NibiruChain/nibiru/x/common" - "github.com/NibiruChain/nibiru/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" ) func BroadcastMsgsWithSeq( diff --git a/gosdk/clientctx.go b/gosdk/clientctx.go index 27c3c007d..1cf81ec61 100644 --- a/gosdk/clientctx.go +++ b/gosdk/clientctx.go @@ -1,7 +1,7 @@ package gosdk // import ( -// "github.com/NibiruChain/nibiru/app" +// "github.com/NibiruChain/nibiru/v2/app" // sdkclient "github.com/cosmos/cosmos-sdk/client" // authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" // ) diff --git a/gosdk/export_test.go b/gosdk/export_test.go index 6c20a050d..d5361367a 100644 --- a/gosdk/export_test.go +++ b/gosdk/export_test.go @@ -5,9 +5,9 @@ import ( "google.golang.org/grpc" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/testutil/genesis" - "github.com/NibiruChain/nibiru/x/common/testutil/testnetwork" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/genesis" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testnetwork" tmconfig "github.com/cometbft/cometbft/config" serverconfig "github.com/cosmos/cosmos-sdk/server/config" diff --git a/gosdk/gosdk.go b/gosdk/gosdk.go index 8014afb50..e46f60cc6 100644 --- a/gosdk/gosdk.go +++ b/gosdk/gosdk.go @@ -8,8 +8,8 @@ import ( cmtcoretypes "github.com/cometbft/cometbft/rpc/core/types" "google.golang.org/grpc" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/app/appconst" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/app/appconst" "github.com/cosmos/cosmos-sdk/crypto/keyring" csdk "github.com/cosmos/cosmos-sdk/types" diff --git a/gosdk/gosdk_test.go b/gosdk/gosdk_test.go index c76fb3999..36acc1488 100644 --- a/gosdk/gosdk_test.go +++ b/gosdk/gosdk_test.go @@ -8,10 +8,10 @@ import ( "github.com/stretchr/testify/suite" "google.golang.org/grpc" - "github.com/NibiruChain/nibiru/gosdk" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/testnetwork" + "github.com/NibiruChain/nibiru/v2/gosdk" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testnetwork" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" diff --git a/gosdk/keys.go b/gosdk/keys.go index b61c2f6a4..5c0f23abb 100644 --- a/gosdk/keys.go +++ b/gosdk/keys.go @@ -7,8 +7,8 @@ import ( sdktestutil "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/app/codec" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/app/codec" "github.com/cosmos/cosmos-sdk/crypto/hd" ) diff --git a/gosdk/keys_test.go b/gosdk/keys_test.go index e45b27d58..c8fb5d6c5 100644 --- a/gosdk/keys_test.go +++ b/gosdk/keys_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/gosdk" + "github.com/NibiruChain/nibiru/v2/gosdk" ) const LOCALNET_VALIDATOR_MNEMONIC = "guard cream sadness conduct invite crumble clock pudding hole grit liar hotel maid produce squeeze return argue turtle know drive eight casino maze host" diff --git a/gosdk/querier.go b/gosdk/querier.go index a9da79c4f..1ce1522b3 100644 --- a/gosdk/querier.go +++ b/gosdk/querier.go @@ -6,12 +6,12 @@ import ( wasm "github.com/CosmWasm/wasmd/x/wasm/types" "google.golang.org/grpc" - devgas "github.com/NibiruChain/nibiru/x/devgas/v1/types" - epochs "github.com/NibiruChain/nibiru/x/epochs/types" - "github.com/NibiruChain/nibiru/x/evm" - inflation "github.com/NibiruChain/nibiru/x/inflation/types" - xoracle "github.com/NibiruChain/nibiru/x/oracle/types" - tokenfactory "github.com/NibiruChain/nibiru/x/tokenfactory/types" + devgas "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" + epochs "github.com/NibiruChain/nibiru/v2/x/epochs/types" + "github.com/NibiruChain/nibiru/v2/x/evm" + inflation "github.com/NibiruChain/nibiru/v2/x/inflation/types" + xoracle "github.com/NibiruChain/nibiru/v2/x/oracle/types" + tokenfactory "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) type Querier struct { diff --git a/proto/eth/evm/v1/events.proto b/proto/eth/evm/v1/events.proto index b32ecfb8c..f4468f7b5 100644 --- a/proto/eth/evm/v1/events.proto +++ b/proto/eth/evm/v1/events.proto @@ -5,7 +5,7 @@ package eth.evm.v1; import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/evm"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/evm"; // EventEthereumTx defines the event for an Ethereum transaction message EventEthereumTx { diff --git a/proto/eth/evm/v1/evm.proto b/proto/eth/evm/v1/evm.proto index ef0ceced5..9bc560a52 100644 --- a/proto/eth/evm/v1/evm.proto +++ b/proto/eth/evm/v1/evm.proto @@ -4,7 +4,7 @@ package eth.evm.v1; import "gogoproto/gogo.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/evm"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/evm"; // FunToken is a fungible token mapping between a bank coin and a corresponding // ERC-20 smart contract. Bank coins here refer to tokens like NIBI, IBC @@ -13,7 +13,7 @@ option go_package = "github.com/NibiruChain/nibiru/x/evm"; message FunToken { // Hexadecimal address of the ERC20 token to which the `FunToken` maps string erc20_addr = 1 [ - (gogoproto.customtype) = "github.com/NibiruChain/nibiru/eth.HexAddr", + (gogoproto.customtype) = "github.com/NibiruChain/nibiru/v2/eth.HexAddr", (gogoproto.nullable) = false ]; diff --git a/proto/eth/evm/v1/genesis.proto b/proto/eth/evm/v1/genesis.proto index 384fdfa5b..c46771685 100644 --- a/proto/eth/evm/v1/genesis.proto +++ b/proto/eth/evm/v1/genesis.proto @@ -5,7 +5,7 @@ package eth.evm.v1; import "eth/evm/v1/evm.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/evm"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/evm"; // GenesisState defines the evm module's genesis state. message GenesisState { diff --git a/proto/eth/evm/v1/query.proto b/proto/eth/evm/v1/query.proto index cb9a6d8a3..b0a5a8a24 100644 --- a/proto/eth/evm/v1/query.proto +++ b/proto/eth/evm/v1/query.proto @@ -9,7 +9,7 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/evm"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/evm"; // Query defines the gRPC querier service. service Query { diff --git a/proto/eth/evm/v1/tx.proto b/proto/eth/evm/v1/tx.proto index 1ef1d7f29..ee801ed7e 100644 --- a/proto/eth/evm/v1/tx.proto +++ b/proto/eth/evm/v1/tx.proto @@ -10,7 +10,7 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "google/protobuf/any.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/evm"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/evm"; // Msg defines the evm Msg service. service Msg { @@ -194,7 +194,7 @@ message MsgUpdateParamsResponse {} message MsgCreateFunToken { // Hexadecimal address of the ERC20 token to which the `FunToken` maps string from_erc20 = 1 [ - (gogoproto.customtype) = "github.com/NibiruChain/nibiru/eth.HexAddr", + (gogoproto.customtype) = "github.com/NibiruChain/nibiru/v2/eth.HexAddr", (gogoproto.nullable) = true ]; @@ -214,7 +214,7 @@ message MsgCreateFunTokenResponse { message MsgSendFunTokenToEvm { // Hexadecimal address of the ERC20 token to which the `FunToken` maps string to_eth_addr = 1 [ - (gogoproto.customtype) = "github.com/NibiruChain/nibiru/eth.HexAddr", + (gogoproto.customtype) = "github.com/NibiruChain/nibiru/v2/eth.HexAddr", (gogoproto.nullable) = false ]; diff --git a/proto/eth/types/v1/account.proto b/proto/eth/types/v1/account.proto index ada2d316b..093614343 100644 --- a/proto/eth/types/v1/account.proto +++ b/proto/eth/types/v1/account.proto @@ -6,7 +6,7 @@ import "cosmos/auth/v1beta1/auth.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/NibiruChain/nibiru/eth"; +option go_package = "github.com/NibiruChain/nibiru/v2/eth"; // EthAccount implements the authtypes.AccountI interface and embeds an // authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. diff --git a/proto/eth/types/v1/indexer.proto b/proto/eth/types/v1/indexer.proto index ff8b9ef5f..9840795e5 100644 --- a/proto/eth/types/v1/indexer.proto +++ b/proto/eth/types/v1/indexer.proto @@ -4,7 +4,7 @@ package eth.types.v1; import "gogoproto/gogo.proto"; -option go_package = "github.com/NibiruChain/nibiru/eth"; +option go_package = "github.com/NibiruChain/nibiru/v2/eth"; // TxResult is the value stored in eth tx indexer message TxResult { diff --git a/proto/nibiru/devgas/v1/devgas.proto b/proto/nibiru/devgas/v1/devgas.proto index f18ceca01..38711a7ee 100644 --- a/proto/nibiru/devgas/v1/devgas.proto +++ b/proto/nibiru/devgas/v1/devgas.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package nibiru.devgas.v1; -option go_package = "github.com/NibiruChain/nibiru/x/devgas/v1/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types"; // FeeShare defines an instance that organizes fee distribution conditions for // the owner of a given smart contract diff --git a/proto/nibiru/devgas/v1/event.proto b/proto/nibiru/devgas/v1/event.proto index 6d3f04cb5..10a67045b 100644 --- a/proto/nibiru/devgas/v1/event.proto +++ b/proto/nibiru/devgas/v1/event.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package nibiru.devgas.v1; -option go_package = "github.com/NibiruChain/nibiru/x/devgas/v1/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types"; // ABCI event emitted when a deployer registers a contract to receive fee // sharing payouts, specifying the deployer, contract, and withdrawer addresses. diff --git a/proto/nibiru/devgas/v1/genesis.proto b/proto/nibiru/devgas/v1/genesis.proto index ed28cb9bd..bd72093f5 100644 --- a/proto/nibiru/devgas/v1/genesis.proto +++ b/proto/nibiru/devgas/v1/genesis.proto @@ -3,7 +3,7 @@ package nibiru.devgas.v1; import "nibiru/devgas/v1/devgas.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/devgas/v1/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types"; // GenesisState defines the module's genesis state. message GenesisState { diff --git a/proto/nibiru/devgas/v1/query.proto b/proto/nibiru/devgas/v1/query.proto index a7bd65f96..c9a26c991 100644 --- a/proto/nibiru/devgas/v1/query.proto +++ b/proto/nibiru/devgas/v1/query.proto @@ -7,7 +7,7 @@ import "nibiru/devgas/v1/devgas.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/devgas/v1/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types"; // Query defines the gRPC querier service. service Query { diff --git a/proto/nibiru/devgas/v1/tx.proto b/proto/nibiru/devgas/v1/tx.proto index ca72c9963..33f798a7c 100644 --- a/proto/nibiru/devgas/v1/tx.proto +++ b/proto/nibiru/devgas/v1/tx.proto @@ -8,7 +8,7 @@ import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; import "nibiru/devgas/v1/genesis.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/devgas/v1/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types"; // Msg defines the fees Msg service. service Msg { diff --git a/proto/nibiru/epochs/v1/event.proto b/proto/nibiru/epochs/v1/event.proto index bb481cab8..b61945c71 100644 --- a/proto/nibiru/epochs/v1/event.proto +++ b/proto/nibiru/epochs/v1/event.proto @@ -4,7 +4,7 @@ package nibiru.epochs.v1; import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/epochs/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/epochs/types"; message EventEpochStart { // Epoch number, starting from 1. diff --git a/proto/nibiru/epochs/v1/genesis.proto b/proto/nibiru/epochs/v1/genesis.proto index 0ce843e10..83433100f 100644 --- a/proto/nibiru/epochs/v1/genesis.proto +++ b/proto/nibiru/epochs/v1/genesis.proto @@ -6,7 +6,7 @@ import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "nibiru/epochs/v1/state.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/epochs/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/epochs/types"; // GenesisState defines the epochs module's genesis state. message GenesisState { diff --git a/proto/nibiru/epochs/v1/query.proto b/proto/nibiru/epochs/v1/query.proto index 76ed2054a..f3e472101 100644 --- a/proto/nibiru/epochs/v1/query.proto +++ b/proto/nibiru/epochs/v1/query.proto @@ -6,7 +6,7 @@ import "google/api/annotations.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "nibiru/epochs/v1/state.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/epochs/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/epochs/types"; // Query defines the gRPC querier service. service Query { diff --git a/proto/nibiru/epochs/v1/state.proto b/proto/nibiru/epochs/v1/state.proto index c2395d33a..502130da9 100644 --- a/proto/nibiru/epochs/v1/state.proto +++ b/proto/nibiru/epochs/v1/state.proto @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/epochs/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/epochs/types"; message EpochInfo { // A string identifier for the epoch. e.g. "15min" or "1hour" diff --git a/proto/nibiru/genmsg/v1/genmsg.proto b/proto/nibiru/genmsg/v1/genmsg.proto index 54d02d2b9..06f45c719 100644 --- a/proto/nibiru/genmsg/v1/genmsg.proto +++ b/proto/nibiru/genmsg/v1/genmsg.proto @@ -3,7 +3,7 @@ package nibiru.genmsg.v1; import "google/protobuf/any.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/genmsg/v1"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/genmsg/v1"; // GenesisState represents the messages to be processed during genesis by the genmsg module. message GenesisState { diff --git a/proto/nibiru/inflation/v1/event.proto b/proto/nibiru/inflation/v1/event.proto index ef321ee22..20a211e7f 100644 --- a/proto/nibiru/inflation/v1/event.proto +++ b/proto/nibiru/inflation/v1/event.proto @@ -4,7 +4,7 @@ package nibiru.inflation.v1; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/inflation/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/inflation/types"; // EventInflationDistribution: Emitted when NIBI tokens are minted on the // network based on Nibiru's inflation schedule. diff --git a/proto/nibiru/inflation/v1/genesis.proto b/proto/nibiru/inflation/v1/genesis.proto index 773bfaef5..fdea6bbf0 100644 --- a/proto/nibiru/inflation/v1/genesis.proto +++ b/proto/nibiru/inflation/v1/genesis.proto @@ -5,7 +5,7 @@ package nibiru.inflation.v1; import "gogoproto/gogo.proto"; import "nibiru/inflation/v1/inflation.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/inflation/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/inflation/types"; // GenesisState defines the inflation module's genesis state. message GenesisState { diff --git a/proto/nibiru/inflation/v1/inflation.proto b/proto/nibiru/inflation/v1/inflation.proto index cad921ede..44cda080c 100644 --- a/proto/nibiru/inflation/v1/inflation.proto +++ b/proto/nibiru/inflation/v1/inflation.proto @@ -3,7 +3,7 @@ package nibiru.inflation.v1; import "gogoproto/gogo.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/inflation/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/inflation/types"; // InflationDistribution defines the distribution in which inflation is // allocated through minting on each epoch (staking, community, strategic). It diff --git a/proto/nibiru/inflation/v1/query.proto b/proto/nibiru/inflation/v1/query.proto index e7b6ec57a..ebf2a5c1e 100644 --- a/proto/nibiru/inflation/v1/query.proto +++ b/proto/nibiru/inflation/v1/query.proto @@ -6,7 +6,7 @@ import "nibiru/inflation/v1/genesis.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/inflation/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/inflation/types"; // Query provides defines the gRPC querier service. service Query { diff --git a/proto/nibiru/inflation/v1/tx.proto b/proto/nibiru/inflation/v1/tx.proto index 36626a3f9..829b97775 100644 --- a/proto/nibiru/inflation/v1/tx.proto +++ b/proto/nibiru/inflation/v1/tx.proto @@ -6,7 +6,7 @@ import "google/api/annotations.proto"; import "nibiru/inflation/v1/inflation.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/inflation/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/inflation/types"; service Msg { // ToggleInflation defines a method to enable or disable inflation. @@ -68,4 +68,4 @@ message MsgBurn { [ (gogoproto.moretags) = "yaml:\"coin\"", (gogoproto.nullable) = false ]; } -message MsgBurnResponse {} \ No newline at end of file +message MsgBurnResponse {} diff --git a/proto/nibiru/oracle/v1/event.proto b/proto/nibiru/oracle/v1/event.proto index 82284e9b1..24106088e 100644 --- a/proto/nibiru/oracle/v1/event.proto +++ b/proto/nibiru/oracle/v1/event.proto @@ -6,7 +6,7 @@ import "nibiru/oracle/v1/oracle.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/oracle/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/oracle/types"; // Emitted when a price is posted message EventPriceUpdate { @@ -74,4 +74,4 @@ message EventValidatorPerformance{ // Number of invalid/punishable votes int64 miss_count = 6; -} \ No newline at end of file +} diff --git a/proto/nibiru/oracle/v1/genesis.proto b/proto/nibiru/oracle/v1/genesis.proto index 1ff78bbfb..c5603729c 100644 --- a/proto/nibiru/oracle/v1/genesis.proto +++ b/proto/nibiru/oracle/v1/genesis.proto @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto"; import "nibiru/oracle/v1/oracle.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/oracle/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/oracle/types"; // GenesisState defines the oracle module's genesis state. message GenesisState { @@ -24,7 +24,7 @@ message GenesisState { aggregate_exchange_rate_votes = 6 [ (gogoproto.nullable) = false ]; repeated string pairs = 7 [ (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", + "github.com/NibiruChain/nibiru/v2/x/common/asset.Pair", (gogoproto.nullable) = false ]; repeated nibiru.oracle.v1.Rewards rewards = 8 diff --git a/proto/nibiru/oracle/v1/oracle.proto b/proto/nibiru/oracle/v1/oracle.proto index e9f545623..6978d3bc7 100644 --- a/proto/nibiru/oracle/v1/oracle.proto +++ b/proto/nibiru/oracle/v1/oracle.proto @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto"; import "google/protobuf/duration.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/oracle/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/oracle/types"; // Params defines the module parameters for the x/oracle module. message Params { @@ -38,7 +38,7 @@ message Params { // Ex. '["unibi:uusd","ubtc:uusd"]' repeated string whitelist = 4 [ (gogoproto.moretags) = "yaml:\"whitelist\"", - (gogoproto.customtype) = "github.com/NibiruChain/nibiru/x/common/asset.Pair" + (gogoproto.customtype) = "github.com/NibiruChain/nibiru/v2/x/common/asset.Pair" ]; // SlashFraction returns the proportion of an oracle's stake that gets // slashed in the event of slashing. `SlashFraction` specifies the exact @@ -119,7 +119,7 @@ message ExchangeRateTuple { string pair = 1 [ (gogoproto.moretags) = "yaml:\"pair\"", (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", + "github.com/NibiruChain/nibiru/v2/x/common/asset.Pair", (gogoproto.nullable) = false ]; diff --git a/proto/nibiru/oracle/v1/query.proto b/proto/nibiru/oracle/v1/query.proto index 993640b40..62e1f40be 100644 --- a/proto/nibiru/oracle/v1/query.proto +++ b/proto/nibiru/oracle/v1/query.proto @@ -6,7 +6,7 @@ import "google/api/annotations.proto"; import "nibiru/oracle/v1/oracle.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/oracle/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/oracle/types"; // Query defines the gRPC querier service. service Query { @@ -95,7 +95,7 @@ message QueryExchangeRateRequest { // pair defines the pair to query for. string pair = 1 [ (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", + "github.com/NibiruChain/nibiru/v2/x/common/asset.Pair", (gogoproto.nullable) = false ]; } @@ -134,7 +134,7 @@ message QueryActivesResponse { // actives defines a list of the pair which oracle prices agreed upon. repeated string actives = 1 [ (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", + "github.com/NibiruChain/nibiru/v2/x/common/asset.Pair", (gogoproto.nullable) = false ]; } @@ -150,7 +150,7 @@ message QueryVoteTargetsResponse { // should vote in the current vote period. repeated string vote_targets = 1 [ (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", + "github.com/NibiruChain/nibiru/v2/x/common/asset.Pair", (gogoproto.nullable) = false ]; } diff --git a/proto/nibiru/oracle/v1/state.proto b/proto/nibiru/oracle/v1/state.proto index 96d9bd959..ac7828fd2 100644 --- a/proto/nibiru/oracle/v1/state.proto +++ b/proto/nibiru/oracle/v1/state.proto @@ -6,14 +6,14 @@ import "google/api/annotations.proto"; import "nibiru/oracle/v1/oracle.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/oracle/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/oracle/types"; // a snapshot of the prices at a given point in time message PriceSnapshot { string pair = 1 [ (gogoproto.moretags) = "yaml:\"pair\"", (gogoproto.customtype) = - "github.com/NibiruChain/nibiru/x/common/asset.Pair", + "github.com/NibiruChain/nibiru/v2/x/common/asset.Pair", (gogoproto.nullable) = false ]; @@ -24,4 +24,4 @@ message PriceSnapshot { // milliseconds since unix epoch int64 timestamp_ms = 3; -} \ No newline at end of file +} diff --git a/proto/nibiru/oracle/v1/tx.proto b/proto/nibiru/oracle/v1/tx.proto index 299023008..4baa5402e 100644 --- a/proto/nibiru/oracle/v1/tx.proto +++ b/proto/nibiru/oracle/v1/tx.proto @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "nibiru/oracle/v1/oracle.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/oracle/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/oracle/types"; // Msg defines the oracle Msg service. service Msg { diff --git a/proto/nibiru/sudo/v1/event.proto b/proto/nibiru/sudo/v1/event.proto index eeb8a7e8e..15c949d1c 100644 --- a/proto/nibiru/sudo/v1/event.proto +++ b/proto/nibiru/sudo/v1/event.proto @@ -6,7 +6,7 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "nibiru/sudo/v1/state.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/sudo/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/sudo/types"; // EventUpdateSudoers: ABCI event emitted upon execution of "MsgEditSudoers". message EventUpdateSudoers { diff --git a/proto/nibiru/sudo/v1/query.proto b/proto/nibiru/sudo/v1/query.proto index 240f63c4e..18e69ea0e 100644 --- a/proto/nibiru/sudo/v1/query.proto +++ b/proto/nibiru/sudo/v1/query.proto @@ -7,7 +7,7 @@ import "google/api/annotations.proto"; import "nibiru/sudo/v1/state.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/sudo/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/sudo/types"; // Query defines the gRPC querier service. service Query { diff --git a/proto/nibiru/sudo/v1/state.proto b/proto/nibiru/sudo/v1/state.proto index bce368185..9d01589f4 100644 --- a/proto/nibiru/sudo/v1/state.proto +++ b/proto/nibiru/sudo/v1/state.proto @@ -5,7 +5,7 @@ package nibiru.sudo.v1; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/sudo/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/sudo/types"; message Sudoers { diff --git a/proto/nibiru/sudo/v1/tx.proto b/proto/nibiru/sudo/v1/tx.proto index 95c719962..79be3fa4e 100644 --- a/proto/nibiru/sudo/v1/tx.proto +++ b/proto/nibiru/sudo/v1/tx.proto @@ -5,7 +5,7 @@ package nibiru.sudo.v1; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/sudo/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/sudo/types"; // Msg defines the x/sudo module's Msg service. Protobuf `Msg` services are // called from `BaseApp` instances during `DeliverTx`. The `Msg` service will be @@ -53,4 +53,4 @@ message MsgChangeRoot { } // MsgChangeRootResponse indicates the successful execution of MsgChangeRoot. -message MsgChangeRootResponse {} \ No newline at end of file +message MsgChangeRootResponse {} diff --git a/proto/nibiru/tokenfactory/v1/event.proto b/proto/nibiru/tokenfactory/v1/event.proto index 5364da5db..22e389762 100644 --- a/proto/nibiru/tokenfactory/v1/event.proto +++ b/proto/nibiru/tokenfactory/v1/event.proto @@ -6,7 +6,7 @@ import "cosmos/bank/v1beta1/bank.proto"; import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/tokenfactory/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types"; message EventCreateDenom { string denom = 1; diff --git a/proto/nibiru/tokenfactory/v1/query.proto b/proto/nibiru/tokenfactory/v1/query.proto index 2e3150d09..4fbd5e657 100644 --- a/proto/nibiru/tokenfactory/v1/query.proto +++ b/proto/nibiru/tokenfactory/v1/query.proto @@ -7,7 +7,7 @@ import "google/api/annotations.proto"; import "cosmos/bank/v1beta1/bank.proto"; import "nibiru/tokenfactory/v1/state.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/tokenfactory/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types"; // Query defines the gRPC querier service. service Query { diff --git a/proto/nibiru/tokenfactory/v1/state.proto b/proto/nibiru/tokenfactory/v1/state.proto index e476ddbb5..7c457bc63 100644 --- a/proto/nibiru/tokenfactory/v1/state.proto +++ b/proto/nibiru/tokenfactory/v1/state.proto @@ -6,7 +6,7 @@ import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/tokenfactory/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types"; // DenomAuthorityMetadata specifies metadata foraddresses that have specific // capabilities over a token factory denom. Right now there is only one Admin diff --git a/proto/nibiru/tokenfactory/v1/tx.proto b/proto/nibiru/tokenfactory/v1/tx.proto index 8f984d17b..2eeacce46 100644 --- a/proto/nibiru/tokenfactory/v1/tx.proto +++ b/proto/nibiru/tokenfactory/v1/tx.proto @@ -9,7 +9,7 @@ import "cosmos_proto/cosmos.proto"; import "cosmos/bank/v1beta1/bank.proto"; import "nibiru/tokenfactory/v1/state.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/tokenfactory/types"; +option go_package = "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types"; // Msg defines the gRPC Msg service for transactions. service Msg { @@ -125,4 +125,4 @@ message MsgBurnNative { [ (gogoproto.moretags) = "yaml:\"coin\"", (gogoproto.nullable) = false ]; } -message MsgBurnNativeResponse {} \ No newline at end of file +message MsgBurnNativeResponse {} diff --git a/simapp/sim_test.go b/simapp/sim_test.go index 52466eac9..3163428bd 100644 --- a/simapp/sim_test.go +++ b/simapp/sim_test.go @@ -35,13 +35,13 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/app" - devgastypes "github.com/NibiruChain/nibiru/x/devgas/v1/types" - epochstypes "github.com/NibiruChain/nibiru/x/epochs/types" - inflationtypes "github.com/NibiruChain/nibiru/x/inflation/types" - oracletypes "github.com/NibiruChain/nibiru/x/oracle/types" - sudotypes "github.com/NibiruChain/nibiru/x/sudo/types" - tokenfactorytypes "github.com/NibiruChain/nibiru/x/tokenfactory/types" + "github.com/NibiruChain/nibiru/v2/app" + devgastypes "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" + epochstypes "github.com/NibiruChain/nibiru/v2/x/epochs/types" + inflationtypes "github.com/NibiruChain/nibiru/v2/x/inflation/types" + oracletypes "github.com/NibiruChain/nibiru/v2/x/oracle/types" + sudotypes "github.com/NibiruChain/nibiru/v2/x/sudo/types" + tokenfactorytypes "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) // SimAppChainID hardcoded chainID for simulation diff --git a/simapp/state_test.go b/simapp/state_test.go index bd7dde960..e48ff7865 100644 --- a/simapp/state_test.go +++ b/simapp/state_test.go @@ -19,8 +19,8 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/NibiruChain/nibiru/app" - appsim "github.com/NibiruChain/nibiru/app/sim" + "github.com/NibiruChain/nibiru/v2/app" + appsim "github.com/NibiruChain/nibiru/v2/app/sim" ) // AppStateFn returns the initial application state using a genesis or the simulation parameters. diff --git a/x/common/address_test.go b/x/common/address_test.go index 031a55918..3d02903ec 100644 --- a/x/common/address_test.go +++ b/x/common/address_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/common" - "github.com/NibiruChain/nibiru/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" ) func TestAddress(t *testing.T) { diff --git a/x/common/asset/pair_test.go b/x/common/asset/pair_test.go index 6cce699d1..442f0f7ee 100644 --- a/x/common/asset/pair_test.go +++ b/x/common/asset/pair_test.go @@ -7,9 +7,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/app/codec" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/app/codec" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" ) func TestTryNewPair(t *testing.T) { diff --git a/x/common/asset/registry.go b/x/common/asset/registry.go index 0db86b2d7..2dca04fab 100644 --- a/x/common/asset/registry.go +++ b/x/common/asset/registry.go @@ -1,8 +1,8 @@ package asset import ( - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/common/set" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/set" ) type registry map[string]set.Set[string] diff --git a/x/common/asset/registry_test.go b/x/common/asset/registry_test.go index abbf52f02..ad60df42e 100644 --- a/x/common/asset/registry_test.go +++ b/x/common/asset/registry_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" ) func TestIsSupportedPair(t *testing.T) { diff --git a/x/common/dec_test.go b/x/common/dec_test.go index 70f0a892a..5e79864b4 100644 --- a/x/common/dec_test.go +++ b/x/common/dec_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/NibiruChain/nibiru/x/common" + "github.com/NibiruChain/nibiru/v2/x/common" ) func TestSqrtBigInt(t *testing.T) { diff --git a/x/common/error_test.go b/x/common/error_test.go index 264502981..058237633 100644 --- a/x/common/error_test.go +++ b/x/common/error_test.go @@ -8,10 +8,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/NibiruChain/nibiru/x/common" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" ) func newErrors(strs ...string) []error { diff --git a/x/common/omap/impl.go b/x/common/omap/impl.go index 992ffa3bd..60400eaee 100644 --- a/x/common/omap/impl.go +++ b/x/common/omap/impl.go @@ -5,7 +5,7 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/NibiruChain/nibiru/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/asset" ) func stringIsLess(a, b string) bool { diff --git a/x/common/omap/omap_test.go b/x/common/omap/omap_test.go index 66559533c..04c6bec5e 100644 --- a/x/common/omap/omap_test.go +++ b/x/common/omap/omap_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/omap" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/omap" ) type Suite struct { diff --git a/x/common/paginate_test.go b/x/common/paginate_test.go index 84197393b..4aa410041 100644 --- a/x/common/paginate_test.go +++ b/x/common/paginate_test.go @@ -6,7 +6,7 @@ import ( sdkquery "github.com/cosmos/cosmos-sdk/types/query" "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/x/common" + "github.com/NibiruChain/nibiru/v2/x/common" ) type paginateSuite struct { diff --git a/x/common/testutil/action/account.go b/x/common/testutil/action/account.go index 9670faf6c..84a61708d 100644 --- a/x/common/testutil/action/account.go +++ b/x/common/testutil/action/account.go @@ -3,8 +3,8 @@ package action import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/app" - inflationtypes "github.com/NibiruChain/nibiru/x/inflation/types" + "github.com/NibiruChain/nibiru/v2/app" + inflationtypes "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) type fundAccount struct { diff --git a/x/common/testutil/action/block.go b/x/common/testutil/action/block.go index bb19c4629..9b82c7f7f 100644 --- a/x/common/testutil/action/block.go +++ b/x/common/testutil/action/block.go @@ -7,7 +7,7 @@ import ( tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/app" + "github.com/NibiruChain/nibiru/v2/app" ) type increaseBlockNumberBy struct { diff --git a/x/common/testutil/action/testcase.go b/x/common/testutil/action/testcase.go index 4deb15952..753669111 100644 --- a/x/common/testutil/action/testcase.go +++ b/x/common/testutil/action/testcase.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/common/testutil/assertion/balances.go b/x/common/testutil/assertion/balances.go index 309505c4c..e98d78d71 100644 --- a/x/common/testutil/assertion/balances.go +++ b/x/common/testutil/assertion/balances.go @@ -3,13 +3,13 @@ package assertion import ( "fmt" - "github.com/NibiruChain/nibiru/x/common/testutil/action" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/action" sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/app" + "github.com/NibiruChain/nibiru/v2/app" ) func AllBalancesEqual(account sdk.AccAddress, amount sdk.Coins) action.Action { diff --git a/x/common/testutil/assertion/gas.go b/x/common/testutil/assertion/gas.go index 98419320e..55cd4c5d9 100644 --- a/x/common/testutil/assertion/gas.go +++ b/x/common/testutil/assertion/gas.go @@ -5,8 +5,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/testutil/action" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/action" ) type gasConsumedShouldBe struct { diff --git a/x/common/testutil/cases_test.go b/x/common/testutil/cases_test.go index 3cef90842..fbaa72a51 100644 --- a/x/common/testutil/cases_test.go +++ b/x/common/testutil/cases_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" ) func TestRunFunctionTests(t *testing.T) { diff --git a/x/common/testutil/events.go b/x/common/testutil/events.go index 020a09af5..74408dd8b 100644 --- a/x/common/testutil/events.go +++ b/x/common/testutil/events.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/gogoproto/proto" - "github.com/NibiruChain/nibiru/x/common/set" + "github.com/NibiruChain/nibiru/v2/x/common/set" abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/common/testutil/events_test.go b/x/common/testutil/events_test.go index 5b3b69a16..85f612c85 100644 --- a/x/common/testutil/events_test.go +++ b/x/common/testutil/events_test.go @@ -3,9 +3,9 @@ package testutil_test import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" ) func (s *TestSuite) TestEventsUtils() { diff --git a/x/common/testutil/genesis/genesis.go b/x/common/testutil/genesis/genesis.go index 8ed74dcdd..fb0f30fd0 100644 --- a/x/common/testutil/genesis/genesis.go +++ b/x/common/testutil/genesis/genesis.go @@ -7,9 +7,9 @@ import ( gov "github.com/cosmos/cosmos-sdk/x/gov/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" ) /* diff --git a/x/common/testutil/genesis/oracle_genesis.go b/x/common/testutil/genesis/oracle_genesis.go index 024fca05c..77faea59b 100644 --- a/x/common/testutil/genesis/oracle_genesis.go +++ b/x/common/testutil/genesis/oracle_genesis.go @@ -3,10 +3,10 @@ package genesis import ( "cosmossdk.io/math" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/denoms" - oracletypes "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + oracletypes "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) func AddOracleGenesis(gen app.GenesisState) app.GenesisState { diff --git a/x/common/testutil/genesis/sudo_genesis.go b/x/common/testutil/genesis/sudo_genesis.go index 475a2649c..84771dd83 100644 --- a/x/common/testutil/genesis/sudo_genesis.go +++ b/x/common/testutil/genesis/sudo_genesis.go @@ -3,14 +3,14 @@ package genesis import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/app" + "github.com/NibiruChain/nibiru/v2/app" - "github.com/NibiruChain/nibiru/x/sudo" - sudotypes "github.com/NibiruChain/nibiru/x/sudo/types" + "github.com/NibiruChain/nibiru/v2/x/sudo" + sudotypes "github.com/NibiruChain/nibiru/v2/x/sudo/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - "github.com/NibiruChain/nibiru/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" ) func AddSudoGenesis(gen app.GenesisState) ( diff --git a/x/common/testutil/testapp/test_util.go b/x/common/testutil/testapp/test_util.go index 84518568d..c4eecceea 100644 --- a/x/common/testutil/testapp/test_util.go +++ b/x/common/testutil/testapp/test_util.go @@ -15,7 +15,7 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - nibiruapp "github.com/NibiruChain/nibiru/app" + nibiruapp "github.com/NibiruChain/nibiru/v2/app" ) // GenesisStateWithSingleValidator initializes GenesisState with a single validator and genesis accounts diff --git a/x/common/testutil/testapp/testapp.go b/x/common/testutil/testapp/testapp.go index f77c3bfbe..feb6e52b5 100644 --- a/x/common/testutil/testapp/testapp.go +++ b/x/common/testutil/testapp/testapp.go @@ -14,14 +14,14 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/app/appconst" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/common/testutil" - epochstypes "github.com/NibiruChain/nibiru/x/epochs/types" - inflationtypes "github.com/NibiruChain/nibiru/x/inflation/types" - sudotypes "github.com/NibiruChain/nibiru/x/sudo/types" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/app/appconst" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + epochstypes "github.com/NibiruChain/nibiru/v2/x/epochs/types" + inflationtypes "github.com/NibiruChain/nibiru/v2/x/inflation/types" + sudotypes "github.com/NibiruChain/nibiru/v2/x/sudo/types" ) func init() { diff --git a/x/common/testutil/testnetwork/network.go b/x/common/testutil/testnetwork/network.go index 44a14cc59..774824f9a 100644 --- a/x/common/testutil/testnetwork/network.go +++ b/x/common/testutil/testnetwork/network.go @@ -15,8 +15,8 @@ import ( srvconfig "github.com/cosmos/cosmos-sdk/server/config" "github.com/ethereum/go-ethereum/common" - "github.com/NibiruChain/nibiru/app/appconst" - serverconfig "github.com/NibiruChain/nibiru/app/server/config" + "github.com/NibiruChain/nibiru/v2/app/appconst" + serverconfig "github.com/NibiruChain/nibiru/v2/app/server/config" "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/store/pruning/types" @@ -41,9 +41,9 @@ import ( "github.com/cosmos/cosmos-sdk/x/genutil" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/NibiruChain/nibiru/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" - "github.com/NibiruChain/nibiru/app" + "github.com/NibiruChain/nibiru/v2/app" ) // package-wide network lock to only allow one test network at a time @@ -132,9 +132,9 @@ Example: import ( "suite" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/testutil/genesis" - "github.com/NibiruChain/nibiru/x/common/testutil/testnetwork" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/genesis" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testnetwork" ) var s *suite.Suite // For some test suite... diff --git a/x/common/testutil/testnetwork/network_config.go b/x/common/testutil/testnetwork/network_config.go index 152e4c03c..bf46c7cc0 100644 --- a/x/common/testutil/testnetwork/network_config.go +++ b/x/common/testutil/testnetwork/network_config.go @@ -12,7 +12,7 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" - serverconfig "github.com/NibiruChain/nibiru/app/server/config" + serverconfig "github.com/NibiruChain/nibiru/v2/app/server/config" ) // Config: Defines the parameters needed to start a local test [Network]. diff --git a/x/common/testutil/testnetwork/network_test.go b/x/common/testutil/testnetwork/network_test.go index 3ad801498..fa9fe2d8b 100644 --- a/x/common/testutil/testnetwork/network_test.go +++ b/x/common/testutil/testnetwork/network_test.go @@ -11,14 +11,14 @@ import ( sdktestutil "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/app/codec" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/app/codec" "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/genesis" - "github.com/NibiruChain/nibiru/x/common/testutil/testnetwork" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/genesis" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testnetwork" ) func TestIntegrationTestSuite_RunAll(t *testing.T) { diff --git a/x/common/testutil/testnetwork/query.go b/x/common/testutil/testnetwork/query.go index 3a7bf3b1d..3599ac2e4 100644 --- a/x/common/testutil/testnetwork/query.go +++ b/x/common/testutil/testnetwork/query.go @@ -13,11 +13,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/spf13/cobra" - "github.com/NibiruChain/nibiru/x/common/asset" - oraclecli "github.com/NibiruChain/nibiru/x/oracle/client/cli" - oracletypes "github.com/NibiruChain/nibiru/x/oracle/types" - sudocli "github.com/NibiruChain/nibiru/x/sudo/cli" - sudotypes "github.com/NibiruChain/nibiru/x/sudo/types" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + oraclecli "github.com/NibiruChain/nibiru/v2/x/oracle/client/cli" + oracletypes "github.com/NibiruChain/nibiru/v2/x/oracle/types" + sudocli "github.com/NibiruChain/nibiru/v2/x/sudo/cli" + sudotypes "github.com/NibiruChain/nibiru/v2/x/sudo/types" ) // ExecQueryOption defines a type which customizes a CLI query operation. diff --git a/x/common/testutil/testnetwork/tx.go b/x/common/testutil/testnetwork/tx.go index 524d2f8dc..a368c8a86 100644 --- a/x/common/testutil/testnetwork/tx.go +++ b/x/common/testutil/testnetwork/tx.go @@ -13,8 +13,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/spf13/cobra" - "github.com/NibiruChain/nibiru/x/common" - "github.com/NibiruChain/nibiru/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" ) type ExecTxOption func(*execTxOptions) diff --git a/x/common/testutil/testnetwork/tx_test.go b/x/common/testutil/testnetwork/tx_test.go index 89fb87702..c3fdf9a46 100644 --- a/x/common/testutil/testnetwork/tx_test.go +++ b/x/common/testutil/testnetwork/tx_test.go @@ -9,9 +9,9 @@ import ( bankcli "github.com/cosmos/cosmos-sdk/x/bank/client/cli" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/testnetwork" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testnetwork" ) func (s *TestSuite) TestSendTx() { diff --git a/x/common/testutil/testnetwork/util.go b/x/common/testutil/testnetwork/util.go index 0a092d918..0e48c3188 100644 --- a/x/common/testutil/testnetwork/util.go +++ b/x/common/testutil/testnetwork/util.go @@ -11,14 +11,14 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" - "github.com/NibiruChain/nibiru/app/server" + "github.com/NibiruChain/nibiru/v2/app/server" tmtypes "github.com/cometbft/cometbft/abci/types" sdkcodec "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/NibiruChain/nibiru/app/codec" + "github.com/NibiruChain/nibiru/v2/app/codec" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server/api" diff --git a/x/common/testutil/testnetwork/validator_node.go b/x/common/testutil/testnetwork/validator_node.go index 9062cd43d..6d851f4ce 100644 --- a/x/common/testutil/testnetwork/validator_node.go +++ b/x/common/testutil/testnetwork/validator_node.go @@ -10,7 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" - serverconfig "github.com/NibiruChain/nibiru/app/server/config" + serverconfig "github.com/NibiruChain/nibiru/v2/app/server/config" "github.com/cometbft/cometbft/node" tmclient "github.com/cometbft/cometbft/rpc/client" diff --git a/x/common/testutil/testutil_test.go b/x/common/testutil/testutil_test.go index ec08e2a07..405f6c0b6 100644 --- a/x/common/testutil/testutil_test.go +++ b/x/common/testutil/testutil_test.go @@ -11,8 +11,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/common/set" - "github.com/NibiruChain/nibiru/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/set" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" ) type TestSuite struct { diff --git a/x/devgas/v1/ante/ante.go b/x/devgas/v1/ante/ante.go index 1583138bd..697a46698 100644 --- a/x/devgas/v1/ante/ante.go +++ b/x/devgas/v1/ante/ante.go @@ -9,7 +9,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - devgastypes "github.com/NibiruChain/nibiru/x/devgas/v1/types" + devgastypes "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) var _ sdk.AnteDecorator = (*DevGasPayoutDecorator)(nil) diff --git a/x/devgas/v1/ante/ante_test.go b/x/devgas/v1/ante/ante_test.go index fe520bca7..8e9a6f5c8 100644 --- a/x/devgas/v1/ante/ante_test.go +++ b/x/devgas/v1/ante/ante_test.go @@ -14,11 +14,11 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - devgasante "github.com/NibiruChain/nibiru/x/devgas/v1/ante" - devgastypes "github.com/NibiruChain/nibiru/x/devgas/v1/types" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + devgasante "github.com/NibiruChain/nibiru/v2/x/devgas/v1/ante" + devgastypes "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) type AnteTestSuite struct { diff --git a/x/devgas/v1/ante/expected_keepers.go b/x/devgas/v1/ante/expected_keepers.go index 6f49b0dc4..f961e9705 100644 --- a/x/devgas/v1/ante/expected_keepers.go +++ b/x/devgas/v1/ante/expected_keepers.go @@ -5,7 +5,7 @@ package ante import ( sdk "github.com/cosmos/cosmos-sdk/types" - devgastypes "github.com/NibiruChain/nibiru/x/devgas/v1/types" + devgastypes "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) type BankKeeper interface { diff --git a/x/devgas/v1/client/cli/cli_test.go b/x/devgas/v1/client/cli/cli_test.go index e2209046e..544948f95 100644 --- a/x/devgas/v1/client/cli/cli_test.go +++ b/x/devgas/v1/client/cli/cli_test.go @@ -20,9 +20,9 @@ import ( "github.com/cosmos/cosmos-sdk/crypto/keyring" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" - "github.com/NibiruChain/nibiru/x/common/testutil" - devgas "github.com/NibiruChain/nibiru/x/devgas/v1" - "github.com/NibiruChain/nibiru/x/devgas/v1/client/cli" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + devgas "github.com/NibiruChain/nibiru/v2/x/devgas/v1" + "github.com/NibiruChain/nibiru/v2/x/devgas/v1/client/cli" ) // CLITestSuite: Tests all tx commands for the module. diff --git a/x/devgas/v1/client/cli/query.go b/x/devgas/v1/client/cli/query.go index 4dcda6481..740441331 100644 --- a/x/devgas/v1/client/cli/query.go +++ b/x/devgas/v1/client/cli/query.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/version" - "github.com/NibiruChain/nibiru/x/devgas/v1/types" + "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) // GetQueryCmd returns the cli query commands for this module diff --git a/x/devgas/v1/client/cli/tx.go b/x/devgas/v1/client/cli/tx.go index e059af0dc..f5fb65065 100644 --- a/x/devgas/v1/client/cli/tx.go +++ b/x/devgas/v1/client/cli/tx.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/devgas/v1/types" + "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) // NewTxCmd returns a root CLI command handler for certain modules/FeeShare diff --git a/x/devgas/v1/genesis.go b/x/devgas/v1/genesis.go index f0e877ec2..7b95912ed 100644 --- a/x/devgas/v1/genesis.go +++ b/x/devgas/v1/genesis.go @@ -5,8 +5,8 @@ import ( "github.com/NibiruChain/collections" - "github.com/NibiruChain/nibiru/x/devgas/v1/keeper" - "github.com/NibiruChain/nibiru/x/devgas/v1/types" + "github.com/NibiruChain/nibiru/v2/x/devgas/v1/keeper" + "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) // InitGenesis import module genesis diff --git a/x/devgas/v1/genesis_test.go b/x/devgas/v1/genesis_test.go index cf2a017a9..332f10f2b 100644 --- a/x/devgas/v1/genesis_test.go +++ b/x/devgas/v1/genesis_test.go @@ -9,11 +9,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - devgas "github.com/NibiruChain/nibiru/x/devgas/v1" - devgastypes "github.com/NibiruChain/nibiru/x/devgas/v1/types" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + devgas "github.com/NibiruChain/nibiru/v2/x/devgas/v1" + devgastypes "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) type GenesisTestSuite struct { diff --git a/x/devgas/v1/keeper/feeshare.go b/x/devgas/v1/keeper/feeshare.go index cd1493469..477a481f8 100644 --- a/x/devgas/v1/keeper/feeshare.go +++ b/x/devgas/v1/keeper/feeshare.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/devgas/v1/types" + "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) // GetFeeShare returns the FeeShare for a registered contract diff --git a/x/devgas/v1/keeper/grpc_query.go b/x/devgas/v1/keeper/grpc_query.go index ae7a5a6c9..5a668cc94 100644 --- a/x/devgas/v1/keeper/grpc_query.go +++ b/x/devgas/v1/keeper/grpc_query.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/devgas/v1/types" + "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) var _ types.QueryServer = Querier{} diff --git a/x/devgas/v1/keeper/grpc_query_test.go b/x/devgas/v1/keeper/grpc_query_test.go index e8eaef55f..a48ec9b74 100644 --- a/x/devgas/v1/keeper/grpc_query_test.go +++ b/x/devgas/v1/keeper/grpc_query_test.go @@ -6,9 +6,9 @@ import ( "cosmossdk.io/math" - "github.com/NibiruChain/nibiru/x/common/testutil" - devgaskeeper "github.com/NibiruChain/nibiru/x/devgas/v1/keeper" - devgastypes "github.com/NibiruChain/nibiru/x/devgas/v1/types" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + devgaskeeper "github.com/NibiruChain/nibiru/v2/x/devgas/v1/keeper" + devgastypes "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) func (s *KeeperTestSuite) TestQueryFeeShares() { diff --git a/x/devgas/v1/keeper/keeper.go b/x/devgas/v1/keeper/keeper.go index 908854cf4..83ce8e770 100644 --- a/x/devgas/v1/keeper/keeper.go +++ b/x/devgas/v1/keeper/keeper.go @@ -13,7 +13,7 @@ import ( "github.com/NibiruChain/collections" - devgastypes "github.com/NibiruChain/nibiru/x/devgas/v1/types" + devgastypes "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) // Keeper of this module maintains collections of feeshares for contracts diff --git a/x/devgas/v1/keeper/keeper_test.go b/x/devgas/v1/keeper/keeper_test.go index 9be7553eb..9dd4382ab 100644 --- a/x/devgas/v1/keeper/keeper_test.go +++ b/x/devgas/v1/keeper/keeper_test.go @@ -10,10 +10,10 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - devgaskeeper "github.com/NibiruChain/nibiru/x/devgas/v1/keeper" - devgastypes "github.com/NibiruChain/nibiru/x/devgas/v1/types" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + devgaskeeper "github.com/NibiruChain/nibiru/v2/x/devgas/v1/keeper" + devgastypes "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) // BankKeeper defines the expected interface needed to retrieve account balances. diff --git a/x/devgas/v1/keeper/msg_server.go b/x/devgas/v1/keeper/msg_server.go index 0976557e4..50cd7e984 100644 --- a/x/devgas/v1/keeper/msg_server.go +++ b/x/devgas/v1/keeper/msg_server.go @@ -9,7 +9,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/NibiruChain/nibiru/x/devgas/v1/types" + "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) var _ types.MsgServer = &Keeper{} diff --git a/x/devgas/v1/keeper/msg_server_test.go b/x/devgas/v1/keeper/msg_server_test.go index d0add9498..d79f1e5cf 100644 --- a/x/devgas/v1/keeper/msg_server_test.go +++ b/x/devgas/v1/keeper/msg_server_test.go @@ -15,7 +15,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/NibiruChain/nibiru/x/devgas/v1/types" + "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) //go:embed testdata/reflect.wasm diff --git a/x/devgas/v1/keeper/params.go b/x/devgas/v1/keeper/params.go index 3760136e5..658558ae0 100644 --- a/x/devgas/v1/keeper/params.go +++ b/x/devgas/v1/keeper/params.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/devgas/v1/types" + "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) // GetParams returns the total set of fees parameters. diff --git a/x/devgas/v1/keeper/store.go b/x/devgas/v1/keeper/store.go index 93a2ff2db..9327504bf 100644 --- a/x/devgas/v1/keeper/store.go +++ b/x/devgas/v1/keeper/store.go @@ -5,7 +5,7 @@ import ( sdkcodec "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" - devgastypes "github.com/NibiruChain/nibiru/x/devgas/v1/types" + devgastypes "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) type DevGasIndexes struct { diff --git a/x/devgas/v1/module.go b/x/devgas/v1/module.go index b76044225..6f3ca969e 100644 --- a/x/devgas/v1/module.go +++ b/x/devgas/v1/module.go @@ -16,11 +16,11 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "github.com/NibiruChain/nibiru/x/devgas/v1/client/cli" - "github.com/NibiruChain/nibiru/x/devgas/v1/exported" - "github.com/NibiruChain/nibiru/x/devgas/v1/keeper" - "github.com/NibiruChain/nibiru/x/devgas/v1/simulation" - "github.com/NibiruChain/nibiru/x/devgas/v1/types" + "github.com/NibiruChain/nibiru/v2/x/devgas/v1/client/cli" + "github.com/NibiruChain/nibiru/v2/x/devgas/v1/exported" + "github.com/NibiruChain/nibiru/v2/x/devgas/v1/keeper" + "github.com/NibiruChain/nibiru/v2/x/devgas/v1/simulation" + "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) // type check to ensure the interface is properly implemented diff --git a/x/devgas/v1/module_test.go b/x/devgas/v1/module_test.go index 4ab9d8929..7723c59c0 100644 --- a/x/devgas/v1/module_test.go +++ b/x/devgas/v1/module_test.go @@ -3,9 +3,9 @@ package devgas_test import ( abci "github.com/cometbft/cometbft/abci/types" - "github.com/NibiruChain/nibiru/app/codec" - devgas "github.com/NibiruChain/nibiru/x/devgas/v1" - devgastypes "github.com/NibiruChain/nibiru/x/devgas/v1/types" + "github.com/NibiruChain/nibiru/v2/app/codec" + devgas "github.com/NibiruChain/nibiru/v2/x/devgas/v1" + devgastypes "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) func (s *GenesisTestSuite) TestAppModule() { diff --git a/x/devgas/v1/simulation/genesis.go b/x/devgas/v1/simulation/genesis.go index 24f2c7ba2..a32fa8cbd 100644 --- a/x/devgas/v1/simulation/genesis.go +++ b/x/devgas/v1/simulation/genesis.go @@ -11,7 +11,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/NibiruChain/nibiru/x/devgas/v1/types" + "github.com/NibiruChain/nibiru/v2/x/devgas/v1/types" ) const ( diff --git a/x/devgas/v1/types/devgas.pb.go b/x/devgas/v1/types/devgas.pb.go index 8d007c067..bbcf512e8 100644 --- a/x/devgas/v1/types/devgas.pb.go +++ b/x/devgas/v1/types/devgas.pb.go @@ -97,7 +97,7 @@ func init() { func init() { proto.RegisterFile("nibiru/devgas/v1/devgas.proto", fileDescriptor_f71dc4524d1e4ffb) } var fileDescriptor_f71dc4524d1e4ffb = []byte{ - // 210 bytes of a gzipped FileDescriptorProto + // 213 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcd, 0xcb, 0x4c, 0xca, 0x2c, 0x2a, 0xd5, 0x4f, 0x49, 0x2d, 0x4b, 0x4f, 0x2c, 0xd6, 0x2f, 0x33, 0x84, 0xb2, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x04, 0x20, 0xd2, 0x7a, 0x50, 0xc1, 0x32, 0x43, 0xa5, 0x7e, 0x46, @@ -106,12 +106,12 @@ var fileDescriptor_f71dc4524d1e4ffb = []byte{ 0x05, 0x46, 0x0d, 0xce, 0x20, 0x7e, 0x98, 0xb8, 0x23, 0x44, 0x18, 0xa4, 0x34, 0x25, 0xb5, 0x20, 0x27, 0xbf, 0x32, 0xb5, 0x08, 0xae, 0x94, 0x09, 0xa2, 0x14, 0x26, 0x0e, 0x53, 0xaa, 0xcb, 0x25, 0x54, 0x9e, 0x59, 0x92, 0x91, 0x52, 0x94, 0x58, 0x8e, 0xa4, 0x98, 0x19, 0xac, 0x58, 0x10, 0x21, - 0x03, 0x55, 0xee, 0xe4, 0x79, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, - 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0xfa, + 0x03, 0x55, 0xee, 0xe4, 0x73, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, + 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x46, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x7e, 0x60, 0x8f, 0x38, 0x67, - 0x24, 0x66, 0xe6, 0xe9, 0x43, 0xfd, 0x5c, 0x81, 0xe4, 0xeb, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, - 0x36, 0xb0, 0xaf, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x2b, 0xbb, 0x00, 0xe8, 0x16, 0x01, - 0x00, 0x00, + 0x24, 0x66, 0xe6, 0xe9, 0x43, 0xfd, 0x5c, 0x66, 0xa4, 0x5f, 0x81, 0xe4, 0xf1, 0x92, 0xca, 0x82, + 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0xc7, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x1b, 0x82, + 0x7a, 0x19, 0x01, 0x00, 0x00, } func (m *FeeShare) Marshal() (dAtA []byte, err error) { diff --git a/x/devgas/v1/types/event.pb.go b/x/devgas/v1/types/event.pb.go index 6bc5c33c4..dcb56d85c 100644 --- a/x/devgas/v1/types/event.pb.go +++ b/x/devgas/v1/types/event.pb.go @@ -274,7 +274,7 @@ func init() { func init() { proto.RegisterFile("nibiru/devgas/v1/event.proto", fileDescriptor_dd3ce94d3a226edf) } var fileDescriptor_dd3ce94d3a226edf = []byte{ - // 256 bytes of a gzipped FileDescriptorProto + // 259 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xc9, 0xcb, 0x4c, 0xca, 0x2c, 0x2a, 0xd5, 0x4f, 0x49, 0x2d, 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, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x32, 0xd6, 0x7e, 0xdb, 0x01, 0x00, 0x00, + 0x99, 0xa7, 0x0f, 0x8d, 0xb8, 0x32, 0x23, 0xfd, 0x0a, 0xa4, 0xd8, 0x2b, 0xa9, 0x2c, 0x48, 0x2d, + 0x4e, 0x62, 0x03, 0x47, 0x9f, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x57, 0x64, 0x78, 0xde, + 0x01, 0x00, 0x00, } func (m *EventRegisterDevGas) Marshal() (dAtA []byte, err error) { diff --git a/x/devgas/v1/types/genesis.pb.go b/x/devgas/v1/types/genesis.pb.go index d31dd8b53..7f0056694 100644 --- a/x/devgas/v1/types/genesis.pb.go +++ b/x/devgas/v1/types/genesis.pb.go @@ -148,30 +148,30 @@ func init() { func init() { proto.RegisterFile("nibiru/devgas/v1/genesis.proto", fileDescriptor_86a5066ce5bd7311) } var fileDescriptor_86a5066ce5bd7311 = []byte{ - // 358 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xb1, 0x6e, 0xe2, 0x40, - 0x10, 0x86, 0xbd, 0x70, 0x42, 0xb0, 0x70, 0x1c, 0xb2, 0xae, 0xb0, 0x90, 0x6e, 0xb1, 0x90, 0xee, - 0xe4, 0xe6, 0x76, 0x05, 0xd7, 0x5e, 0x1a, 0x82, 0x12, 0xa5, 0x48, 0x14, 0x99, 0x2a, 0x69, 0xd0, - 0x1a, 0x0f, 0xc6, 0x8a, 0xed, 0xb5, 0xbc, 0xc6, 0x49, 0x9e, 0x21, 0x4d, 0x9e, 0x27, 0x4f, 0x40, - 0x49, 0x19, 0xa5, 0x40, 0x11, 0xbc, 0x48, 0xe4, 0xb5, 0x93, 0xa0, 0x50, 0x79, 0xfc, 0xcf, 0xfc, - 0xdf, 0x8c, 0xf6, 0xc7, 0x24, 0xf2, 0x1d, 0x3f, 0x59,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xfd, - 0xe3, 0x83, 0xa3, 0xc8, 0x52, 0xff, 0x8d, 0xdb, 0x3c, 0x08, 0xc4, 0x2d, 0xb8, 0x53, 0x17, 0x22, - 0x11, 0x4a, 0xa3, 0x6a, 0x56, 0xad, 0x86, 0xfd, 0xbd, 0x54, 0xc7, 0x4a, 0x1c, 0x9d, 0xad, 0xb6, - 0x04, 0xad, 0xb7, 0x04, 0xbd, 0x6e, 0x09, 0x7a, 0xdc, 0x11, 0x6d, 0xbd, 0x23, 0xda, 0xf3, 0x8e, - 0x68, 0xd7, 0x6c, 0x6f, 0xf3, 0x85, 0x7a, 0x8c, 0xe3, 0x05, 0xf7, 0x23, 0x56, 0x06, 0x76, 0xb7, - 0x17, 0x99, 0x3a, 0xc3, 0xa9, 0xa9, 0x70, 0xfe, 0xbd, 0x05, 0x00, 0x00, 0xff, 0xff, 0x24, 0xf2, - 0x7e, 0x8d, 0x05, 0x02, 0x00, 0x00, + // 361 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xc1, 0x6e, 0xda, 0x40, + 0x10, 0x86, 0xbd, 0x50, 0x21, 0x58, 0x28, 0x45, 0x56, 0x0f, 0x16, 0x52, 0x17, 0x0b, 0xa9, 0x95, + 0x2f, 0xdd, 0x15, 0xee, 0xb5, 0xbd, 0x50, 0xd4, 0x5e, 0x92, 0x28, 0x32, 0xa7, 0xe4, 0x82, 0xd6, + 0x78, 0x30, 0x56, 0x6c, 0xaf, 0xe5, 0x35, 0x4e, 0xf2, 0x0c, 0xb9, 0xe4, 0x79, 0xf2, 0x04, 0x1c, + 0x39, 0x46, 0x39, 0xa0, 0x08, 0x5e, 0x24, 0xf2, 0xda, 0x49, 0x50, 0x38, 0x79, 0xfc, 0xcf, 0xfc, + 0xdf, 0x8c, 0xf6, 0xc7, 0x24, 0x0e, 0xdc, 0x20, 0x5d, 0x31, 0x0f, 0x72, 0x9f, 0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, 0x91, 0xa5, 0xfe, 0x1d, 0x77, 0x79, 0x18, 0x8a, 0x6b, 0xf0, 0x66, 0x1e, 0xc4, + 0x22, 0x92, 0x46, 0xdd, 0xac, 0x5b, 0x2d, 0xe7, 0x73, 0xa5, 0x4e, 0x94, 0x38, 0x3e, 0x59, 0xef, + 0x08, 0xda, 0xec, 0x08, 0x7a, 0xde, 0x11, 0x74, 0xbf, 0x27, 0xda, 0x66, 0x4f, 0xb4, 0xc7, 0x3d, + 0xd1, 0x2e, 0xed, 0x83, 0xcd, 0x67, 0xea, 0x31, 0xfe, 0x2e, 0x79, 0x10, 0xb3, 0x2a, 0xb0, 0xdc, + 0x66, 0x37, 0x07, 0xa9, 0xa9, 0x4b, 0xdc, 0x86, 0xca, 0xe7, 0xd7, 0x4b, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x90, 0xf4, 0xd8, 0xe7, 0x08, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/devgas/v1/types/query.pb.go b/x/devgas/v1/types/query.pb.go index fad0f6db7..ec6ccc97c 100644 --- a/x/devgas/v1/types/query.pb.go +++ b/x/devgas/v1/types/query.pb.go @@ -406,43 +406,43 @@ func init() { func init() { proto.RegisterFile("nibiru/devgas/v1/query.proto", fileDescriptor_b68d3a02185e7c52) } var fileDescriptor_b68d3a02185e7c52 = []byte{ - // 567 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x4f, 0x8b, 0xd3, 0x5c, - 0x14, 0xc6, 0x9b, 0xf7, 0x1d, 0x4b, 0xe7, 0xba, 0x70, 0xbc, 0x76, 0xa4, 0x84, 0x31, 0xd6, 0xa0, - 0xb6, 0x23, 0x98, 0x4b, 0xa6, 0x82, 0x08, 0x6e, 0xa6, 0x82, 0xe0, 0x42, 0xd1, 0x0e, 0x2a, 0xb8, - 0x19, 0x6e, 0x9a, 0x33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, - 0xbc, 0x8e, 0xf1, 0x67, 0x03, 0x95, 0xf4, 0x1a, 0x7c, 0x3b, 0xc7, 0x47, 0xf3, 0xd4, 0x72, 0xe7, - 0x14, 0xce, 0x7d, 0x81, 0xe3, 0x62, 0xb2, 0x1e, 0x67, 0x39, 0xc2, 0x63, 0x3c, 0x44, 0x45, 0x19, - 0x01, 0x7c, 0xf3, 0x0c, 0xaf, 0x85, 0xbc, 0x99, 0xb7, 0x72, 0xa6, 0x14, 0x4f, 0x55, 0xf0, 0x98, - 0xb8, 0x92, 0xe5, 0x91, 0x19, 0xc3, 0x5f, 0x0c, 0xb4, 0xbd, 0x32, 0x0b, 0xb8, 0x91, 0xf7, 0x12, - 0x56, 0xa4, 0xd1, 0xbc, 0x77, 0x3e, 0x91, 0xc2, 0x7c, 0x20, 0x30, 0x1b, 0xd8, 0x5d, 0x7f, 0xb6, - 0x6c, 0xce, 0xc7, 0xcd, 0x27, 0x27, 0x13, 0xcb, 0x38, 0x9d, 0x58, 0xc6, 0x8f, 0x89, 0x65, 0x7c, - 0x9c, 0x5a, 0x85, 0xd3, 0xa9, 0x55, 0xf8, 0x36, 0xb5, 0x0a, 0x6f, 0x48, 0x10, 0xa6, 0x9d, 0xbe, - 0xe7, 0xb4, 0x59, 0x8f, 0x3c, 0x13, 0x6b, 0x1f, 0x75, 0x68, 0x18, 0x69, 0x8b, 0xb7, 0x7f, 0x99, - 0xa4, 0xa3, 0x18, 0xb8, 0x57, 0x14, 0xff, 0x83, 0x8d, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x72, - 0x1e, 0xa0, 0x89, 0xd8, 0x05, 0x00, 0x00, + // 568 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xcf, 0x8e, 0xd2, 0x50, + 0x14, 0xc6, 0xa9, 0x8e, 0x84, 0xb9, 0x2e, 0x1c, 0xaf, 0x8c, 0x21, 0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0x28, 0x41, 0x6d, 0xf2, 0xf1, 0xfb, 0xef, 0x2f, 0x17, + 0x76, 0x71, 0x85, 0x64, 0x7e, 0x10, 0x87, 0x00, 0x07, 0x82, 0x87, 0x93, 0x0f, 0x3a, 0xaf, 0x23, + 0xfc, 0xd5, 0x40, 0x05, 0xbd, 0x06, 0xdf, 0x5d, 0xe3, 0xa3, 0x79, 0x2a, 0x6b, 0xe7, 0x14, 0xce, + 0x43, 0x81, 0xe3, 0x62, 0xb2, 0x1a, 0x67, 0x31, 0xc2, 0x23, 0x3c, 0x40, 0x79, 0x19, 0x01, 0x7c, + 0xfb, 0x14, 0xaf, 0xb9, 0xbc, 0x99, 0x77, 0xd6, 0x4c, 0x29, 0x9e, 0xb2, 0xe0, 0x31, 0x71, 0x29, + 0xcb, 0x23, 0x33, 0x86, 0xbf, 0x19, 0x68, 0x7b, 0x69, 0x16, 0x70, 0x7d, 0xdd, 0x4b, 0x58, 0x92, + 0x46, 0xf3, 0xc1, 0xd9, 0x44, 0x0a, 0xf3, 0x91, 0xc0, 0xac, 0x63, 0x77, 0xf5, 0xd9, 0xb2, 0x39, + 0x1f, 0x35, 0x9e, 0x1d, 0x8f, 0x2d, 0xe3, 0x64, 0x6c, 0x19, 0xbf, 0xc6, 0x96, 0xf1, 0x79, 0x62, + 0xe5, 0x4e, 0x26, 0x56, 0xee, 0xc7, 0xc4, 0xca, 0xbd, 0xab, 0x05, 0x61, 0xda, 0xee, 0x79, 0x4e, + 0x8b, 0x75, 0xc9, 0x0b, 0xb1, 0xf6, 0x49, 0x9b, 0x86, 0x91, 0xb6, 0xe8, 0xd7, 0xc8, 0xfb, 0xff, + 0x7c, 0xd2, 0x61, 0x0c, 0xdc, 0xcb, 0x8b, 0xbf, 0xc2, 0xfa, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xa5, 0xe5, 0x49, 0x1c, 0xdb, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/devgas/v1/types/tx.pb.go b/x/devgas/v1/types/tx.pb.go index a034bea94..90fd5d17f 100644 --- a/x/devgas/v1/types/tx.pb.go +++ b/x/devgas/v1/types/tx.pb.go @@ -445,43 +445,43 @@ func init() { func init() { proto.RegisterFile("nibiru/devgas/v1/tx.proto", fileDescriptor_72949c99a02cd615) } var fileDescriptor_72949c99a02cd615 = []byte{ - // 565 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x94, 0x41, 0x6b, 0x13, 0x4d, - 0x18, 0xc7, 0xb3, 0x6d, 0x28, 0x74, 0xde, 0x97, 0x36, 0x5d, 0x0b, 0x6d, 0x52, 0xdd, 0xea, 0xaa, - 0xa5, 0x55, 0xb3, 0x43, 0x2b, 0x78, 0x28, 0x5e, 0x4c, 0x41, 0xf0, 0x10, 0x91, 0x14, 0x2f, 0x22, - 0x84, 0xc9, 0xee, 0x30, 0x19, 0x48, 0x76, 0x96, 0x99, 0xd9, 0xb4, 0xb9, 0xf6, 0x13, 0x14, 0x3c, - 0xe8, 0x49, 0x7a, 0xf0, 0x03, 0x78, 0xf0, 0x43, 0xf4, 0x58, 0xf4, 0xe2, 0x49, 0x24, 0x11, 0xf4, - 0x63, 0x48, 0x66, 0x66, 0x37, 0xdd, 0x64, 0x5b, 0x7b, 0x11, 0xbc, 0x25, 0xf3, 0xff, 0x3d, 0xcf, - 0xf3, 0xdb, 0xe5, 0x99, 0x05, 0xe5, 0x90, 0xb6, 0x28, 0x8f, 0x61, 0x80, 0x7b, 0x04, 0x09, 0xd8, - 0xdb, 0x86, 0xf2, 0xd0, 0x8b, 0x38, 0x93, 0xcc, 0x2e, 0xe9, 0xc8, 0xd3, 0x91, 0xd7, 0xdb, 0xae, - 0x2c, 0x13, 0x46, 0x98, 0x0a, 0xe1, 0xe8, 0x97, 0xe6, 0x2a, 0xd7, 0x09, 0x63, 0xa4, 0x83, 0x21, - 0x8a, 0x28, 0x44, 0x61, 0xc8, 0x24, 0x92, 0x94, 0x85, 0xc2, 0xa4, 0x2b, 0x3e, 0x13, 0x5d, 0x26, - 0x60, 0x57, 0x90, 0x51, 0xf7, 0xae, 0x20, 0x26, 0x28, 0xeb, 0xa0, 0xa9, 0xfb, 0xe9, 0x3f, 0x26, - 0x72, 0xa6, 0xa4, 0x08, 0x0e, 0xb1, 0xa0, 0x26, 0x77, 0x4f, 0x2c, 0x70, 0xad, 0x2e, 0x48, 0x03, - 0x13, 0x2a, 0x24, 0xe6, 0x4f, 0x31, 0xde, 0x6f, 0x23, 0x8e, 0xed, 0x2d, 0x50, 0xf2, 0x59, 0x28, - 0x39, 0xf2, 0x65, 0x13, 0x05, 0x01, 0xc7, 0x42, 0xac, 0x5a, 0x37, 0xad, 0xcd, 0xf9, 0xc6, 0x62, - 0x72, 0xfe, 0x44, 0x1f, 0x8f, 0xd0, 0x00, 0x47, 0x1d, 0xd6, 0xc7, 0x3c, 0x45, 0x67, 0x34, 0x9a, - 0x9c, 0x27, 0x68, 0x15, 0xd8, 0x07, 0x54, 0xb6, 0x03, 0x8e, 0x0e, 0xce, 0xc1, 0xb3, 0x0a, 0x5e, - 0x1a, 0x27, 0x06, 0xdf, 0x2d, 0xfe, 0x3a, 0x59, 0x2f, 0xb8, 0x37, 0xc0, 0x5a, 0x8e, 0x61, 0x03, - 0x8b, 0x88, 0x85, 0x02, 0xbb, 0xef, 0x2d, 0xb0, 0x54, 0x17, 0xe4, 0x65, 0x14, 0x20, 0x89, 0xff, - 0x45, 0xff, 0x35, 0x50, 0x9e, 0xf2, 0x4b, 0xed, 0x99, 0x92, 0xdf, 0x43, 0xa1, 0x8f, 0x3b, 0x7f, - 0x57, 0x3e, 0x63, 0x93, 0x1d, 0x98, 0xda, 0xbc, 0xb5, 0xc0, 0x62, 0xea, 0xfa, 0x02, 0x71, 0xd4, - 0x15, 0xf6, 0x23, 0x30, 0x8f, 0x62, 0xd9, 0x66, 0x9c, 0xca, 0xbe, 0xb6,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0x29, 0x9c, 0x0d, 0x9d, 0xc2, 0xd7, 0xa1, 0x53, 0x78, 0x05, 0x09, 0x95, 0xed, 0xb8, 0xe5, - 0xf9, 0xac, 0x0b, 0x9f, 0xab, 0x76, 0x7b, 0x6d, 0x44, 0xc3, 0xc4, 0xf9, 0xf0, 0xbc, 0x75, 0x3f, - 0xc2, 0xa2, 0x35, 0xa7, 0xbe, 0x9d, 0x0f, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x24, 0xc1, - 0x45, 0xf2, 0x05, 0x00, 0x00, + // 566 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x94, 0xc1, 0x6a, 0x13, 0x41, + 0x18, 0xc7, 0xb3, 0x6d, 0x28, 0x74, 0x94, 0x36, 0x5d, 0x0b, 0x6d, 0x52, 0xdd, 0xea, 0xaa, 0xa5, + 0x55, 0xb3, 0x43, 0x23, 0x78, 0x28, 0x5e, 0x4c, 0xc1, 0x93, 0x11, 0x49, 0xf1, 0x22, 0x42, 0x98, + 0xec, 0x0e, 0x93, 0x81, 0x64, 0x67, 0x99, 0x99, 0xa4, 0xcd, 0xb5, 0x4f, 0x50, 0xf0, 0xa0, 0x27, + 0xe9, 0xc1, 0x07, 0xf0, 0xe0, 0x43, 0xf4, 0x58, 0xf4, 0xe2, 0x49, 0x24, 0x11, 0xf4, 0x31, 0x24, + 0x33, 0xb3, 0x9b, 0x6e, 0xb2, 0xad, 0xbd, 0x08, 0xbd, 0x25, 0xf3, 0xff, 0x7d, 0xdf, 0xf7, 0xdb, + 0xe5, 0x9b, 0x05, 0xc5, 0x90, 0x36, 0x29, 0xef, 0xc2, 0x00, 0xf7, 0x08, 0x12, 0xb0, 0xb7, 0x0d, + 0xe5, 0x81, 0x17, 0x71, 0x26, 0x99, 0x5d, 0xd0, 0x91, 0xa7, 0x23, 0xaf, 0xb7, 0x5d, 0x5a, 0x26, +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4, 0xb4, 0xf5, 0x4f, 0x24, 0x76, + 0xa9, 0xbe, 0x38, 0x19, 0x38, 0xd6, 0xe9, 0xc0, 0xb1, 0x7e, 0x0e, 0x1c, 0xeb, 0x68, 0xe8, 0xe4, + 0x4e, 0x87, 0x4e, 0xee, 0xfb, 0xd0, 0xc9, 0xbd, 0xa9, 0x10, 0x2a, 0x5b, 0xdd, 0xa6, 0xe7, 0xb3, + 0x0e, 0x7c, 0xa9, 0xda, 0xed, 0xb6, 0x10, 0x0d, 0x63, 0xe7, 0x5e, 0x05, 0x1e, 0x9c, 0x15, 0xef, + 0x47, 0x58, 0x34, 0xe7, 0xd4, 0xe7, 0xf3, 0xf1, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x64, 0x69, + 0x77, 0x65, 0xf5, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/epochs/abci.go b/x/epochs/abci.go index 319999944..b318a2254 100644 --- a/x/epochs/abci.go +++ b/x/epochs/abci.go @@ -6,8 +6,8 @@ import ( "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/epochs/keeper" - "github.com/NibiruChain/nibiru/x/epochs/types" + "github.com/NibiruChain/nibiru/v2/x/epochs/keeper" + "github.com/NibiruChain/nibiru/v2/x/epochs/types" ) // BeginBlocker of epochs module. diff --git a/x/epochs/abci_test.go b/x/epochs/abci_test.go index 483e56ee4..1b667a4ae 100644 --- a/x/epochs/abci_test.go +++ b/x/epochs/abci_test.go @@ -8,10 +8,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/epochs" - "github.com/NibiruChain/nibiru/x/epochs/types" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/epochs" + "github.com/NibiruChain/nibiru/v2/x/epochs/types" ) func TestEpochInfoChangesBeginBlockerAndInitGenesis(t *testing.T) { diff --git a/x/epochs/client/cli/query.go b/x/epochs/client/cli/query.go index 4cf75f50e..2dd951ab7 100644 --- a/x/epochs/client/cli/query.go +++ b/x/epochs/client/cli/query.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/spf13/cobra" - "github.com/NibiruChain/nibiru/x/epochs/types" + "github.com/NibiruChain/nibiru/v2/x/epochs/types" ) // GetQueryCmd returns the cli query commands for this module. diff --git a/x/epochs/client/cli/tx.go b/x/epochs/client/cli/tx.go index c00148ecc..7372d4c63 100644 --- a/x/epochs/client/cli/tx.go +++ b/x/epochs/client/cli/tx.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" // "github.com/cosmos/cosmos-sdk/client/flags". - "github.com/NibiruChain/nibiru/x/epochs/types" + "github.com/NibiruChain/nibiru/v2/x/epochs/types" ) // GetTxCmd returns the transaction commands for this module. diff --git a/x/epochs/genesis.go b/x/epochs/genesis.go index bffe0dfa7..5d1dc42ca 100644 --- a/x/epochs/genesis.go +++ b/x/epochs/genesis.go @@ -3,8 +3,8 @@ package epochs import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/epochs/keeper" - "github.com/NibiruChain/nibiru/x/epochs/types" + "github.com/NibiruChain/nibiru/v2/x/epochs/keeper" + "github.com/NibiruChain/nibiru/v2/x/epochs/types" ) // InitGenesis sets epoch info from genesis diff --git a/x/epochs/genesis_test.go b/x/epochs/genesis_test.go index 88eda5256..d35c31db9 100644 --- a/x/epochs/genesis_test.go +++ b/x/epochs/genesis_test.go @@ -7,11 +7,11 @@ import ( "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/testutil/genesis" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/epochs" - "github.com/NibiruChain/nibiru/x/epochs/types" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/genesis" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/epochs" + "github.com/NibiruChain/nibiru/v2/x/epochs/types" ) func TestEpochsExportGenesis(t *testing.T) { diff --git a/x/epochs/integration/action/epoch.go b/x/epochs/integration/action/epoch.go index daacf217c..2e7058e00 100644 --- a/x/epochs/integration/action/epoch.go +++ b/x/epochs/integration/action/epoch.go @@ -3,8 +3,8 @@ package action import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/testutil/action" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/action" ) type startEpoch struct { diff --git a/x/epochs/keeper/epoch.go b/x/epochs/keeper/epoch.go index 48510df30..46f45714d 100644 --- a/x/epochs/keeper/epoch.go +++ b/x/epochs/keeper/epoch.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/epochs/types" + "github.com/NibiruChain/nibiru/v2/x/epochs/types" ) // GetEpochInfo returns epoch info by identifier. diff --git a/x/epochs/keeper/grpc_query.go b/x/epochs/keeper/grpc_query.go index 3ecf1833a..f6c2d4772 100644 --- a/x/epochs/keeper/grpc_query.go +++ b/x/epochs/keeper/grpc_query.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/epochs/types" + "github.com/NibiruChain/nibiru/v2/x/epochs/types" ) var _ types.QueryServer = Querier{} diff --git a/x/epochs/keeper/grpc_query_test.go b/x/epochs/keeper/grpc_query_test.go index d8d820757..00cf0e69e 100644 --- a/x/epochs/keeper/grpc_query_test.go +++ b/x/epochs/keeper/grpc_query_test.go @@ -9,10 +9,10 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/epochs/keeper" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/epochs/keeper" - epochstypes "github.com/NibiruChain/nibiru/x/epochs/types" + epochstypes "github.com/NibiruChain/nibiru/v2/x/epochs/types" ) func TestQueryEpochInfos(t *testing.T) { diff --git a/x/epochs/keeper/hooks_test.go b/x/epochs/keeper/hooks_test.go index 5e4d1d477..ce253cf2f 100644 --- a/x/epochs/keeper/hooks_test.go +++ b/x/epochs/keeper/hooks_test.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/mock" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" ) type MockHooks struct { diff --git a/x/epochs/keeper/keeper.go b/x/epochs/keeper/keeper.go index a1d997938..b6dbc8614 100644 --- a/x/epochs/keeper/keeper.go +++ b/x/epochs/keeper/keeper.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" - "github.com/NibiruChain/nibiru/x/epochs/types" + "github.com/NibiruChain/nibiru/v2/x/epochs/types" ) type Keeper struct { diff --git a/x/epochs/keeper/keeper_test.go b/x/epochs/keeper/keeper_test.go index 74e11e5dd..7fa8120d2 100644 --- a/x/epochs/keeper/keeper_test.go +++ b/x/epochs/keeper/keeper_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/epochs/types" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/epochs/types" ) func TestUpsertEpochInfo_HappyPath(t *testing.T) { diff --git a/x/epochs/module.go b/x/epochs/module.go index 1bbd0a53b..c80517852 100644 --- a/x/epochs/module.go +++ b/x/epochs/module.go @@ -15,10 +15,10 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "github.com/NibiruChain/nibiru/x/epochs/client/cli" - "github.com/NibiruChain/nibiru/x/epochs/keeper" - "github.com/NibiruChain/nibiru/x/epochs/simulation" - "github.com/NibiruChain/nibiru/x/epochs/types" + "github.com/NibiruChain/nibiru/v2/x/epochs/client/cli" + "github.com/NibiruChain/nibiru/v2/x/epochs/keeper" + "github.com/NibiruChain/nibiru/v2/x/epochs/simulation" + "github.com/NibiruChain/nibiru/v2/x/epochs/types" ) var ( diff --git a/x/epochs/simulation/genesis.go b/x/epochs/simulation/genesis.go index 8a8da4ef1..66adb5fcd 100644 --- a/x/epochs/simulation/genesis.go +++ b/x/epochs/simulation/genesis.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" - "github.com/NibiruChain/nibiru/x/epochs/types" + "github.com/NibiruChain/nibiru/v2/x/epochs/types" ) // RandomizedGenState generates a random GenesisState for mint. diff --git a/x/epochs/types/event.pb.go b/x/epochs/types/event.pb.go index b05dc493b..d6dce4a5e 100644 --- a/x/epochs/types/event.pb.go +++ b/x/epochs/types/event.pb.go @@ -134,7 +134,7 @@ func init() { func init() { proto.RegisterFile("nibiru/epochs/v1/event.proto", fileDescriptor_7af14d87a2487e5d) } var fileDescriptor_7af14d87a2487e5d = []byte{ - // 270 bytes of a gzipped FileDescriptorProto + // 273 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xc9, 0xcb, 0x4c, 0xca, 0x2c, 0x2a, 0xd5, 0x4f, 0x2d, 0xc8, 0x4f, 0xce, 0x28, 0xd6, 0x2f, 0x33, 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0xc8, 0xea, 0x41, 0x64, 0xf5, @@ -147,11 +147,12 @@ var fileDescriptor_7af14d87a2487e5d = []byte{ 0x93, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x94, 0x1e, 0xc4, 0x4a, 0x3d, 0x98, 0x95, 0x7a, 0x21, 0x30, 0x2b, 0x9d, 0x38, 0x4e, 0xdc, 0x93, 0x67, 0x98, 0x70, 0x5f, 0x9e, 0x31, 0x88, 0x2f, 0x15, 0x6e, 0x1d, 0x48, 0x5a, 0xc9, 0x88, 0x8b, 0x17, 0xe1, 0x0a, 0xd7, 0xbc, 0x14, 0x22, 0xdc, 0xe0, 0xe4, - 0x76, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, - 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x3a, 0xe9, 0x99, 0x25, 0x19, + 0x79, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, + 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0xfa, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x7e, 0xe0, 0x80, 0x72, 0xce, 0x48, 0xcc, 0xcc, 0xd3, - 0x87, 0x06, 0x69, 0x05, 0x2c, 0x50, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x2e, 0x35, - 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x58, 0xd4, 0xcd, 0xf7, 0x72, 0x01, 0x00, 0x00, + 0x87, 0x06, 0x69, 0x99, 0x91, 0x7e, 0x05, 0x2c, 0x5c, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, + 0xc0, 0x8e, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x87, 0x6a, 0xdc, 0x59, 0x75, 0x01, 0x00, + 0x00, } func (m *EventEpochStart) Marshal() (dAtA []byte, err error) { diff --git a/x/epochs/types/genesis.pb.go b/x/epochs/types/genesis.pb.go index 84b413ce0..0c61021ed 100644 --- a/x/epochs/types/genesis.pb.go +++ b/x/epochs/types/genesis.pb.go @@ -77,7 +77,7 @@ func init() { func init() { proto.RegisterFile("nibiru/epochs/v1/genesis.proto", fileDescriptor_0e52385b95ea69b9) } var fileDescriptor_0e52385b95ea69b9 = []byte{ - // 237 bytes of a gzipped FileDescriptorProto + // 240 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0xcb, 0x4c, 0xca, 0x2c, 0x2a, 0xd5, 0x4f, 0x2d, 0xc8, 0x4f, 0xce, 0x28, 0xd6, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0xc8, 0xeb, 0x41, @@ -87,12 +87,12 @@ var fileDescriptor_0e52385b95ea69b9 = []byte{ 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0x80, 0x2a, 0x90, 0xc1, 0x70, 0x48, 0x71, 0x49, 0x62, 0x49, 0x2a, 0x44, 0x56, 0xc9, 0x93, 0x8b, 0xc7, 0x1d, 0xe2, 0xae, 0x60, 0x90, 0xa8, 0x90, 0x25, 0x17, 0x1b, 0x44, 0xa1, 0x04, 0xa3, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0xb4, 0x1e, 0xba, 0x3b, 0xf5, 0x5c, 0x41, - 0x2c, 0xcf, 0xbc, 0xb4, 0x7c, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0xa0, 0x1a, 0x9c, 0xdc, - 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, - 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x27, 0x3d, 0xb3, 0x24, 0xa3, + 0x2c, 0xcf, 0xbc, 0xb4, 0x7c, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0xa0, 0x1a, 0x9c, 0x3c, + 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, + 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x3f, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0xdf, 0x0f, 0x6c, 0x9c, 0x73, 0x46, 0x62, 0x66, 0x9e, 0x3e, - 0xd4, 0x65, 0x15, 0x30, 0xb7, 0x95, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x5d, 0x66, 0x0c, - 0x08, 0x00, 0x00, 0xff, 0xff, 0x9e, 0x99, 0x59, 0x11, 0x42, 0x01, 0x00, 0x00, + 0xd4, 0x65, 0x65, 0x46, 0xfa, 0x15, 0x30, 0xe7, 0x95, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, + 0x1d, 0x67, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x86, 0xe6, 0x4b, 0x7e, 0x45, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/epochs/types/hooks_test.go b/x/epochs/types/hooks_test.go index 063843533..57e9f7183 100644 --- a/x/epochs/types/hooks_test.go +++ b/x/epochs/types/hooks_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/mock" - "github.com/NibiruChain/nibiru/x/epochs/types" + "github.com/NibiruChain/nibiru/v2/x/epochs/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/epochs/types/query.pb.go b/x/epochs/types/query.pb.go index bab7018fb..7928dfb7f 100644 --- a/x/epochs/types/query.pb.go +++ b/x/epochs/types/query.pb.go @@ -208,33 +208,33 @@ func init() { func init() { proto.RegisterFile("nibiru/epochs/v1/query.proto", fileDescriptor_2d273c3d69b40555) } var fileDescriptor_2d273c3d69b40555 = []byte{ - // 412 bytes of a gzipped FileDescriptorProto + // 413 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x4d, 0x8b, 0xd3, 0x40, - 0x18, 0xce, 0xd4, 0x5a, 0x70, 0xac, 0x20, 0x83, 0x68, 0x8c, 0x35, 0x2d, 0xf1, 0x83, 0x5a, 0x4b, - 0x86, 0xd4, 0x93, 0x9e, 0xa4, 0x45, 0xc1, 0x8b, 0x60, 0xf0, 0xe4, 0x45, 0x26, 0x71, 0x9a, 0x0e, - 0xd8, 0x99, 0x34, 0x33, 0x29, 0xf6, 0xea, 0xc9, 0xa3, 0xb0, 0xec, 0x9f, 0xd8, 0x5f, 0xd2, 0x63, - 0x61, 0x2f, 0x7b, 0x5a, 0x96, 0x76, 0x7f, 0xc8, 0xd2, 0x99, 0x74, 0xb7, 0xdb, 0x0f, 0xe8, 0x2d, - 0x99, 0xe7, 0xe3, 0x7d, 0x9e, 0x77, 0x06, 0xd6, 0x38, 0x8b, 0x58, 0x96, 0x63, 0x9a, 0x8a, 0x78, - 0x20, 0xf1, 0x38, 0xc0, 0xa3, 0x9c, 0x66, 0x13, 0x3f, 0xcd, 0x84, 0x12, 0xe8, 0xa1, 0x41, 0x7d, - 0x83, 0xfa, 0xe3, 0xc0, 0x79, 0x94, 0x88, 0x44, 0x68, 0x10, 0x2f, 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1a, 0xd6, 0xe3, 0x0d, 0x72, 0xf7, 0x7f, 0x05, 0xde, 0xd6, 0x16, 0xe8, 0x37, 0x80, 0xf0, 0xba, + 0x19, 0x6a, 0xef, 0x36, 0xd8, 0xbf, 0x16, 0xe7, 0xd5, 0x11, 0x4c, 0x13, 0xc9, 0x7b, 0xf1, 0xeb, + 0xe4, 0xe2, 0x6f, 0xa5, 0x89, 0x9e, 0xe2, 0xed, 0x2b, 0x30, 0x57, 0x65, 0x7e, 0xd1, 0x3f, 0x00, + 0xeb, 0x9b, 0x95, 0x50, 0xe7, 0xc0, 0x88, 0x3d, 0x3b, 0x73, 0x5e, 0x1f, 0xc5, 0x2d, 0x03, 0xbd, + 0xd1, 0x81, 0x5e, 0xa2, 0xe7, 0x07, 0x02, 0xdd, 0x58, 0x60, 0x6f, 0x30, 0x5b, 0xb8, 0x60, 0xbe, + 0x70, 0xc1, 0xf9, 0xc2, 0x05, 0x7f, 0x96, 0xae, 0x35, 0x5f, 0xba, 0xd6, 0xe9, 0xd2, 0xb5, 0xbe, + 0xe2, 0x84, 0xa9, 0x51, 0x1e, 0xf9, 0xb1, 0x18, 0xe3, 0x4f, 0xda, 0xa9, 0x3f, 0x22, 0x8c, 0xaf, + 0x5d, 0x8b, 0x2e, 0xfe, 0xb9, 0xb6, 0x56, 0xd3, 0x94, 0xca, 0xa8, 0xa6, 0x1f, 0xdb, 0xdb, 0xcb, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x48, 0x31, 0x41, 0xe0, 0x1c, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/epochs/types/state.pb.go b/x/epochs/types/state.pb.go index d4a2c07ac..0209b3c38 100644 --- a/x/epochs/types/state.pb.go +++ b/x/epochs/types/state.pb.go @@ -135,35 +135,35 @@ func init() { func init() { proto.RegisterFile("nibiru/epochs/v1/state.proto", fileDescriptor_8bd50db1722dd5e6) } var fileDescriptor_8bd50db1722dd5e6 = []byte{ - // 433 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xb1, 0x6f, 0xd4, 0x30, - 0x14, 0xc6, 0x63, 0x7a, 0x94, 0x9e, 0x01, 0x01, 0x56, 0x81, 0x10, 0x81, 0x13, 0x85, 0x25, 0x12, - 0x55, 0xac, 0x03, 0x26, 0xd8, 0xae, 0x80, 0x60, 0x61, 0x48, 0x19, 0x10, 0xcb, 0x29, 0xc9, 0xf9, - 0x12, 0x4b, 0x8d, 0x1d, 0x25, 0x2f, 0x15, 0xb7, 0x31, 0x33, 0x75, 0xe4, 0x4f, 0xea, 0xd8, 0x91, - 0x29, 0xa0, 0xbb, 0x8d, 0xb1, 0x7f, 0x01, 0x8a, 0x9d, 0x94, 0x83, 0x82, 0xd8, 0x92, 0xf7, 0xfb, - 0xde, 0xf7, 0xf9, 0x3d, 0x3d, 0x7c, 0x5f, 0x8a, 0x44, 0x54, 0x0d, 0xe3, 0xa5, 0x4a, 0xf3, 0x9a, - 0x1d, 0x4d, 0x58, 0x0d, 0x31, 0xf0, 0xb0, 0xac, 0x14, 0x28, 0x72, 0xd3, 0xd0, 0xd0, 0xd0, 0xf0, - 0x68, 0xe2, 0xec, 0x66, 0x2a, 0x53, 0x1a, 0xb2, 0xee, 0xcb, 0xe8, 0x1c, 0x9a, 0x29, 0x95, 0x1d, - 0x72, 0xa6, 0xff, 0x92, 0x66, 0xc1, 0xe6, 0x4d, 0x15, 0x83, 0x50, 0xb2, 0xe7, 0xee, 0x9f, 0x1c, - 0x44, 0xc1, 0x6b, 0x88, 0x8b, 0xd2, 0x08, 0xfc, 0xcf, 0x23, 0x3c, 0x7e, 0xd9, 0x85, 0xbc, 0x91, - 0x0b, 0x45, 0x28, 0xc6, 0x62, 0xce, 0x25, 0x88, 0x85, 0xe0, 0x95, 0x8d, 0x3c, 0x14, 0x8c, 0xa3, - 0x8d, 0x0a, 0x79, 0x8f, 0x71, 0x0d,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 0x17, 0x02, 0x5f, 0x6b, 0x3c, 0x7d, - 0x75, 0xb2, 0xa2, 0xe8, 0x74, 0x45, 0xd1, 0xf7, 0x15, 0x45, 0xc7, 0x6b, 0x6a, 0x9d, 0xae, 0xa9, - 0xf5, 0x75, 0x4d, 0xad, 0x0f, 0x7b, 0x99, 0x80, 0xbc, 0x49, 0xc2, 0x54, 0x15, 0xec, 0xad, 0x3e, - 0xcd, 0xfd, 0x3c, 0x16, 0x92, 0xf5, 0x47, 0xfc, 0x71, 0x38, 0x63, 0x58, 0x96, 0xbc, 0x4e, 0xb6, - 0xf5, 0x4a, 0x9e, 0xfc, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x02, 0xe6, 0x18, 0x2d, 0xe4, 0x02, 0x00, - 0x00, + // 435 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xb1, 0x6f, 0xd3, 0x40, + 0x14, 0xc6, 0x73, 0x34, 0x94, 0xe6, 0x00, 0x01, 0xa7, 0x02, 0xc6, 0x82, 0xb3, 0x65, 0x16, 0x4b, + 0x20, 0x9f, 0x52, 0x98, 0x60, 0x4b, 0x41, 0xa2, 0x0b, 0x83, 0xcb, 0x80, 0x58, 0x22, 0xdb, 0xb9, + 0xd8, 0x27, 0xd5, 0x77, 0x96, 0xfd, 0x1c, 0x91, 0x8d, 0x99, 0xa9, 0x23, 0x7f, 0x52, 0xc7, 0x8e, + 0x4c, 0x06, 0x25, 0x1b, 0x63, 0xff, 0x02, 0xe4, 0x3b, 0xbb, 0x04, 0x02, 0x62, 0xb3, 0xdf, 0xef, + 0x7b, 0xdf, 0x77, 0xef, 0xe9, 0xe1, 0x87, 0x52, 0xc4, 0xa2, 0xac, 0x19, 0x2f, 0x54, 0x92, 0x55, + 0x6c, 0x31, 0x66, 0x15, 0x44, 0xc0, 0x83, 0xa2, 0x54, 0xa0, 0xc8, 0x6d, 0x43, 0x03, 0x43, 0x83, + 0xc5, 0xd8, 0xde, 0x4f, 0x55, 0xaa, 0x34, 0x64, 0xed, 0x97, 0xd1, 0xd9, 0x34, 0x55, 0x2a, 0x3d, + 0xe1, 0x4c, 0xff, 0xc5, 0xf5, 0x9c, 0xcd, 0xea, 0x32, 0x02, 0xa1, 0x64, 0xc7, 0x9d, 0x3f, 0x39, + 0x88, 0x9c, 0x57, 0x10, 0xe5, 0x85, 0x11, 0x78, 0x9f, 0x87, 0x78, 0xf4, 0xba, 0x0d, 0x39, 0x92, + 0x73, 0x45, 0x28, 0xc6, 0x62, 0xc6, 0x25, 0x88, 0xb9, 0xe0, 0xa5, 0x85, 0x5c, 0xe4, 0x8f, 0xc2, + 0x8d, 0x0a, 0x79, 0x8f, 0x71, 0x05, 0x51, 0x09, 0xd3, 0xd6, 0xc6, 0xba, 0xe2, 0x22, 0xff, 0xfa, + 0x81, 0x1d, 0x98, 0x8c, 0xa0, 0xcf, 0x08, 0xde, 0xf5, 0x19, 0x93, 0x47, 0x67, 0x8d, 0x33, 0xb8, + 0x68, 0x9c, 0x3b, 0xcb, 0x28, 0x3f, 0x79, 0xe1, 0xfd, 0xea, 0xf5, 0x4e, 0xbf, 0x39, 0x28, 0x1c, + 0xe9, 0x42, 0x2b, 0x27, 0x19, 0xde, 0xeb, 0x9f, 0x6e, 0xed, 0x68, 0xdf, 0x07, 0x5b, 0xbe, 0xaf, + 0x3a, 0xc1, 0x64, 0xdc, 0xda, 0xfe, 0x68, 0x1c, 0xd2, 0xb7, 0x3c, 0x55, 0xb9, 0x00, 0x9e, 0x17, + 0xb0, 0xbc, 0x68, 0x9c, 0x5b, 0x26, 0xac, 0x67, 0xde, 0x97, 0x36, 0xea, 0xd2, 0x9d, 0x3c, 0xc6, + 0x37, 0x93, 0xba, 0x2c, 0xb9, 0x84, 0xa9, 0xde, 0xae, 0x35, 0x74, 0x91, 0x3f, 0x0c, 0x6f, 0x74, + 0x45, 0xbd, 0x0c, 0xf2, 0x09, 0x61, 0xeb, 0x37, 0xd5, 0x74, 0x63, 0xee, 0xab, 0xff, 0x9d, 0xfb, + 0x49, 0x37, 0xb7, 0x63, 0x9e, 0xf2, 0x2f, 0x27, 0xb3, 0x85, 0xbb, 0x9b, 0xc9, 0xc7, 0x97, 0x1b, + 0x79, 0x8e, 0xef, 0x19, 0x7d, 0xa2, 0x6a, 0x09, 0x42, 0xa6, 0xa6, 0x91, 0xcf, 0xac, 0x5d, 0x17, + 0xf9, 0x7b, 0xe1, 0xbe, 0xa6, 0x87, 0x1d, 0x3c, 0x36, 0x8c, 0xbc, 0xc4, 0xf6, 0xdf, 0xd2, 0x32, + 0x2e, 0xd2, 0x0c, 0xac, 0x6b, 0x2e, 0xf2, 0x77, 0xc2, 0xfb, 0x5b, 0x81, 0x6f, 0x34, 0x9e, 0x1c, + 0x9d, 0xad, 0x28, 0x3a, 0x5f, 0x51, 0xf4, 0x7d, 0x45, 0xd1, 0xe9, 0x9a, 0x0e, 0xce, 0xd7, 0x74, + 0xf0, 0x75, 0x4d, 0x07, 0x1f, 0x58, 0x2a, 0x20, 0xab, 0xe3, 0x20, 0x51, 0x39, 0x7b, 0xab, 0x4f, + 0xf3, 0x30, 0x8b, 0x84, 0x64, 0xdd, 0x11, 0x2f, 0x0e, 0xd8, 0xc7, 0xfe, 0x92, 0x61, 0x59, 0xf0, + 0x2a, 0xde, 0xd5, 0x5b, 0x79, 0xf6, 0x33, 0x00, 0x00, 0xff, 0xff, 0x11, 0xb3, 0x3e, 0x23, 0xe7, + 0x02, 0x00, 0x00, } func (m *EpochInfo) Marshal() (dAtA []byte, err error) { diff --git a/x/evm/access_list.go b/x/evm/access_list.go index 118679122..ac66aec1f 100644 --- a/x/evm/access_list.go +++ b/x/evm/access_list.go @@ -10,7 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common" gethcore "github.com/ethereum/go-ethereum/core/types" - "github.com/NibiruChain/nibiru/eth" + "github.com/NibiruChain/nibiru/v2/eth" ) // AccessList is an EIP-2930 access list that represents the slice of diff --git a/x/evm/access_list_test.go b/x/evm/access_list_test.go index b3c8df00f..07f7d144b 100644 --- a/x/evm/access_list_test.go +++ b/x/evm/access_list_test.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/common" gethcore "github.com/ethereum/go-ethereum/core/types" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) func (suite *TxDataTestSuite) TestTestNewAccessList() { diff --git a/x/evm/cli/query.go b/x/evm/cli/query.go index 399a75ca8..1c580e49e 100644 --- a/x/evm/cli/query.go +++ b/x/evm/cli/query.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/spf13/cobra" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // GetQueryCmd returns a cli command for this module's queries diff --git a/x/evm/cli/tx.go b/x/evm/cli/tx.go index 3c21bfe07..1688a9e88 100644 --- a/x/evm/cli/tx.go +++ b/x/evm/cli/tx.go @@ -8,8 +8,8 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" "github.com/spf13/cobra" ) diff --git a/x/evm/embeds/embeds_test.go b/x/evm/embeds/embeds_test.go index 848c37900..5aa9a020e 100644 --- a/x/evm/embeds/embeds_test.go +++ b/x/evm/embeds/embeds_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/evm/embeds" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" ) func TestLoadContracts(t *testing.T) { diff --git a/x/evm/events.pb.go b/x/evm/events.pb.go index 6c3c8b6e5..54c9fe9d3 100644 --- a/x/evm/events.pb.go +++ b/x/evm/events.pb.go @@ -600,49 +600,49 @@ func init() { func init() { proto.RegisterFile("eth/evm/v1/events.proto", fileDescriptor_f8bc26b53c788f17) } var fileDescriptor_f8bc26b53c788f17 = []byte{ - // 657 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xcd, 0x6e, 0xd4, 0x3c, - 0x14, 0x9d, 0xf4, 0x67, 0xa6, 0xe3, 0xb6, 0xdf, 0x8f, 0x35, 0xb4, 0x69, 0x05, 0x69, 0x95, 0x0a, - 0x01, 0x9b, 0x84, 0x29, 0xac, 0x90, 0x58, 0x30, 0xd3, 0xa9, 0x58, 0x50, 0x84, 0xca, 0x20, 0x24, - 0x24, 0x14, 0x39, 0xf1, 0x6d, 0x12, 0x35, 0xb1, 0x47, 0xb6, 0x13, 0x65, 0xde, 0x82, 0x47, 0xe1, - 0x31, 0x2a, 0xb1, 0xe9, 0xb2, 0xab, 0x0a, 0xb5, 0x6f, 0xc0, 0x13, 0x20, 0x3b, 0x99, 0xfe, 0x80, - 0xba, 0x81, 0xdd, 0xbd, 0xe7, 0x5e, 0x1f, 0x9f, 0x73, 0x73, 0x63, 0xb4, 0x0e, 0x2a, 0xf1, 0xa1, - 0xcc, 0xfd, 0xb2, 0xef, 0x43, 0x09, 0x4c, 0x49, 0x6f, 0x22, 0xb8, 0xe2, 0x18, 0x81, 0x4a, 0x3c, - 0x28, 0x73, 0xaf, 0xec, 0x6f, 0x3a, 0x11, 0x97, 0x39, 0x97, 0x7e, 0x48, 0x24, 0xf8, 0x65, 0x3f, - 0x04, 0x45, 0xfa, 0x7e, 0xc4, 0x53, 0x56, 0xf7, 0x6e, 0xf6, 0x62, 0x1e, 0x73, 0x13, 0xfa, 0x3a, - 0xaa, 0x51, 0xf7, 0x9b, 0x85, 0xfe, 0x1d, 0x69, 0xca, 0x91, 0x4a, 0x40, 0x40, 0x91, 0x8f, 0x2b, - 0xbc, 0x86, 0xda, 0x24, 0xe7, 0x05, 0x53, 0xb6, 0xb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x04, 0x61, 0xf2, 0x08, 0xc4, 0x9d, 0x86, 0x6e, 0x6d, 0xe8, 0xdc, - 0xaf, 0x1b, 0x7a, 0xfd, 0xdf, 0xcc, 0xdf, 0xfc, 0x6f, 0xdc, 0x31, 0xba, 0x67, 0xe8, 0x67, 0x46, - 0xf7, 0x60, 0x92, 0xf1, 0x29, 0xd0, 0x3b, 0xaf, 0xd9, 0x41, 0xab, 0xb7, 0x26, 0xd6, 0x5c, 0xb5, - 0x12, 0xdd, 0x98, 0xd4, 0x6f, 0xac, 0xa3, 0x0a, 0xa2, 0x42, 0xfd, 0x25, 0xeb, 0xe0, 0xe5, 0xc9, - 0x85, 0x63, 0x9d, 0x5e, 0x38, 0xd6, 0xf7, 0x0b, 0xc7, 0xfa, 0x72, 0xe9, 0xb4, 0x4e, 0x2f, 0x9d, - 0xd6, 0xd9, 0xa5, 0xd3, 0xfa, 0xb4, 0x13, 0xa7, 0x2a, 0x29, 0x42, 0x2f, 0xe2, 0xb9, 0xff, 0x36, - 0x0d, 0x53, 0x51, 0x0c, 0x13, 0x92, 0x32, 0x9f, 0x99, 0xd8, 0xaf, 0xf4, 0x03, 0x15, 0xb6, 0xcd, - 0xab, 0xf2, 0xec, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x58, 0xfa, 0x56, 0x49, 0xb2, 0x04, 0x00, - 0x00, + // 658 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xcb, 0x6e, 0xd4, 0x3c, + 0x14, 0x9e, 0xf4, 0x32, 0xd3, 0x71, 0xdb, 0xff, 0x62, 0x0d, 0x6d, 0x5a, 0x41, 0x5a, 0x05, 0x71, + 0xdb, 0x24, 0x4c, 0x61, 0xc5, 0x0a, 0x66, 0x3a, 0x15, 0x0b, 0x8a, 0x50, 0x19, 0x84, 0x84, 0x84, + 0x22, 0x27, 0x3e, 0x4d, 0xa2, 0x26, 0x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5, 0xc2, 0x69, 0x9d, 0x5c, 0x38, 0xad, + 0xd3, 0x0b, 0xa7, 0xf5, 0xe9, 0x61, 0x9c, 0xaa, 0xa4, 0x08, 0xbd, 0x88, 0xe7, 0xfe, 0xdb, 0x34, + 0x4c, 0x45, 0x31, 0x4c, 0x48, 0xca, 0x7c, 0x66, 0x62, 0xbf, 0xdc, 0xf1, 0x2b, 0xfd, 0x46, 0x85, + 0x6d, 0xf3, 0xb0, 0x3c, 0xfb, 0x19, 0x00, 0x00, 0xff, 0xff, 0x7b, 0x02, 0xe6, 0x45, 0xb5, 0x04, + 0x00, 0x00, } func (m *EventEthereumTx) Marshal() (dAtA []byte, err error) { diff --git a/x/evm/evm.go b/x/evm/evm.go index daaf2c059..b991acaa1 100644 --- a/x/evm/evm.go +++ b/x/evm/evm.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/NibiruChain/nibiru/eth" + "github.com/NibiruChain/nibiru/v2/eth" ) // FIXME: Explore problems arrising from ERC1155 creating multiple fungible diff --git a/x/evm/evm.pb.go b/x/evm/evm.pb.go index 57d7943aa..2136ccecb 100644 --- a/x/evm/evm.pb.go +++ b/x/evm/evm.pb.go @@ -6,7 +6,7 @@ package evm import ( cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" - github_com_NibiruChain_nibiru_eth "github.com/NibiruChain/nibiru/eth" + github_com_NibiruChain_nibiru_v2_eth "github.com/NibiruChain/nibiru/v2/eth" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -31,7 +31,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // "Coin" type in Golang. type FunToken struct { // Hexadecimal address of the ERC20 token to which the `FunToken` maps - Erc20Addr github_com_NibiruChain_nibiru_eth.HexAddr `protobuf:"bytes,1,opt,name=erc20_addr,json=erc20Addr,proto3,customtype=github.com/NibiruChain/nibiru/eth.HexAddr" json:"erc20_addr"` + Erc20Addr github_com_NibiruChain_nibiru_v2_eth.HexAddr `protobuf:"bytes,1,opt,name=erc20_addr,json=erc20Addr,proto3,customtype=github.com/NibiruChain/nibiru/v2/eth.HexAddr" json:"erc20_addr"` // bank_denom: Coin denomination in the Bank Module. BankDenom string `protobuf:"bytes,2,opt,name=bank_denom,json=bankDenom,proto3" json:"bank_denom,omitempty"` // True if the `FunToken` mapping was created from an existing bank coin and @@ -637,77 +637,77 @@ func init() { func init() { proto.RegisterFile("eth/evm/v1/evm.proto", fileDescriptor_98abbdadb327b7d0) } var fileDescriptor_98abbdadb327b7d0 = []byte{ - // 1115 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x55, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0xb6, 0x2c, 0xca, 0xa6, 0x56, 0x4a, 0xc4, 0xac, 0x9d, 0x94, 0x4d, 0x10, 0x53, 0x60, 0x2e, - 0x0a, 0x10, 0x48, 0xb5, 0x8b, 0x5e, 0x52, 0xb4, 0x80, 0xe5, 0xd8, 0x48, 0x54, 0x3b, 0x08, 0x36, - 0x4a, 0x0f, 0xbd, 0x10, 0x2b, 0x72, 0x4c, 0xb1, 0x22, 0xb9, 0x06, 0x77, 0xa9, 0xd2, 0x0f, 0x50, - 0xa0, 0xc7, 0x3e, 0x42, 0x4e, 0x7d, 0x96, 0xa0, 0xa7, 0x00, 0xbd, 0x14, 0x3d, 0x10, 0x85, 0x73, - 0x69, 0x75, 0xf4, 0x13, 0x14, 0xbb, 0x4b, 0x59, 0x8e, 0x0b, 0xe4, 0xc4, 0xf9, 0xbe, 0xd9, 0xf9, - 0xe1, 0xcc, 0xb7, 0x24, 0xda, 0x06, 0x31, 0x1d, 0xc0, 0x3c, 0x19, 0xcc, 0x77, 0xe5, 0xa3, 0x7f, - 0x96, 0x31, 0xc1, 0x30, 0x02, 0x31, 0xed, 0x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, 0x1a, 0x8d, 0x38, 0x4b, 0x35, 0x33, 0x32, 0x4c, - 0xc3, 0x6a, 0xe8, 0xaf, 0xde, 0xc8, 0x30, 0x91, 0xd5, 0xba, 0x1a, 0x44, 0xf5, 0x2e, 0x64, 0x6b, - 0x89, 0xaf, 0x35, 0x39, 0xfc, 0xe6, 0xdd, 0xc5, 0x4e, 0xed, 0xfd, 0xc5, 0x4e, 0xed, 0xef, 0x8b, - 0x9d, 0xda, 0xaf, 0x1f, 0x76, 0xd6, 0xde, 0x7f, 0xd8, 0x59, 0xfb, 0xf3, 0xc3, 0xce, 0xda, 0x0f, - 0x8f, 0x3e, 0xfd, 0x43, 0x2c, 0xe4, 0x6f, 0x78, 0xb2, 0xa1, 0xfe, 0xb2, 0x5f, 0xfe, 0x17, 0x00, - 0x00, 0xff, 0xff, 0x46, 0x10, 0x1a, 0x96, 0x9f, 0x07, 0x00, 0x00, + // 1120 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x55, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0xb6, 0x2c, 0xca, 0xa6, 0x56, 0x4a, 0xc4, 0xac, 0x9d, 0x94, 0x4d, 0x10, 0x53, 0x60, 0x81, + 0x42, 0x05, 0x02, 0xa9, 0x51, 0xdb, 0x4b, 0x0a, 0x14, 0xb5, 0x1c, 0x1b, 0x89, 0x6a, 0x07, 0xc1, + 0x46, 0xe9, 0xa1, 0x17, 0x62, 0x45, 0x8e, 0x29, 0x56, 0x24, 0xd7, 0xe0, 0x2e, 0x55, 0xfa, 0x01, + 0x0a, 0xf4, 0xd8, 0x47, 0xc8, 0xb5, 0x6f, 0x12, 0xf4, 0x14, 0xa0, 0x97, 0xa2, 0x07, 0xa2, 0x70, + 0x2e, 0xad, 0x8e, 0x7e, 0x82, 0x62, 0x77, 0x29, 0xcb, 0x49, 0x81, 0xf6, 0xc4, 0xf9, 0xbe, 0xd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xca, 0xf9, + 0x98, 0x0a, 0x4a, 0xfe, 0xc5, 0xe0, 0xaf, 0x10, 0xd6, 0x63, 0xf5, 0xbe, 0xe7, 0x2c, 0xf5, 0x7c, + 0x35, 0x7a, 0xfb, 0x86, 0x12, 0xb5, 0xaa, 0xaf, 0xbd, 0x7a, 0x25, 0xc4, 0xd2, 0x68, 0xcc, 0x59, + 0xaa, 0x99, 0xb1, 0x61, 0x1a, 0x56, 0x43, 0x7f, 0xf5, 0xc6, 0x86, 0x89, 0xac, 0xd6, 0xd5, 0x20, + 0xaa, 0x77, 0x21, 0x3b, 0x2b, 0x7c, 0xad, 0xc9, 0xd1, 0xd7, 0xaf, 0x2f, 0xf6, 0x6a, 0x6f, 0x2e, + 0xf6, 0x6a, 0x7f, 0x5e, 0xec, 0xd5, 0x7e, 0x7e, 0xbb, 0xb7, 0xf1, 0xe6, 0xed, 0xde, 0xc6, 0xef, + 0x6f, 0xf7, 0x36, 0xbe, 0xfb, 0xf8, 0x7f, 0xff, 0x89, 0x85, 0xfc, 0x19, 0x4f, 0xb7, 0xd4, 0xbf, + 0xf6, 0xb3, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xee, 0x2d, 0x48, 0xa6, 0xa5, 0x07, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { diff --git a/x/evm/evm_test.go b/x/evm/evm_test.go index d0691d89d..d341016ce 100644 --- a/x/evm/evm_test.go +++ b/x/evm/evm_test.go @@ -11,9 +11,9 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) type TestSuite struct { diff --git a/x/evm/evmmodule/genesis.go b/x/evm/evmmodule/genesis.go index 9828f0169..d67a0c18a 100644 --- a/x/evm/evmmodule/genesis.go +++ b/x/evm/evmmodule/genesis.go @@ -11,9 +11,9 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/keeper" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/keeper" ) // InitGenesis initializes genesis state based on exported genesis diff --git a/x/evm/evmmodule/genesis_test.go b/x/evm/evmmodule/genesis_test.go index d0eed611e..15c8dcd66 100644 --- a/x/evm/evmmodule/genesis_test.go +++ b/x/evm/evmmodule/genesis_test.go @@ -10,11 +10,11 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/embeds" - "github.com/NibiruChain/nibiru/x/evm/evmmodule" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" + "github.com/NibiruChain/nibiru/v2/x/evm/evmmodule" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) type Suite struct { diff --git a/x/evm/evmmodule/module.go b/x/evm/evmmodule/module.go index e12366612..5c297688d 100644 --- a/x/evm/evmmodule/module.go +++ b/x/evm/evmmodule/module.go @@ -19,10 +19,10 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/cli" - "github.com/NibiruChain/nibiru/x/evm/keeper" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/cli" + "github.com/NibiruChain/nibiru/v2/x/evm/keeper" ) // consensusVersion: EVM module consensus version for upgrades. diff --git a/x/evm/evmtest/erc20.go b/x/evm/evmtest/erc20.go index 4ce8070b3..056fa207a 100644 --- a/x/evm/evmtest/erc20.go +++ b/x/evm/evmtest/erc20.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/evm" ) func DoEthTx( diff --git a/x/evm/evmtest/eth.go b/x/evm/evmtest/eth.go index a90fd408f..08146dc36 100644 --- a/x/evm/evmtest/eth.go +++ b/x/evm/evmtest/eth.go @@ -12,16 +12,16 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/eth/crypto/ethsecp256k1" + "github.com/NibiruChain/nibiru/v2/eth/crypto/ethsecp256k1" "github.com/cosmos/cosmos-sdk/client" gethcommon "github.com/ethereum/go-ethereum/common" gethcore "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // NewEthAccInfo returns an Ethereum private key, its corresponding Eth address, diff --git a/x/evm/evmtest/eth_test.go b/x/evm/evmtest/eth_test.go index 00ebc7d0d..33b32ff4c 100644 --- a/x/evm/evmtest/eth_test.go +++ b/x/evm/evmtest/eth_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) type Suite struct { diff --git a/x/evm/evmtest/evmante.go b/x/evm/evmtest/evmante.go index 6143f36f3..dd83cec83 100644 --- a/x/evm/evmtest/evmante.go +++ b/x/evm/evmtest/evmante.go @@ -9,7 +9,7 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" gethparams "github.com/ethereum/go-ethereum/params" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) var NextNoOpAnteHandler sdk.AnteHandler = func( diff --git a/x/evm/evmtest/signer.go b/x/evm/evmtest/signer.go index 25fb451fc..c05e16afc 100644 --- a/x/evm/evmtest/signer.go +++ b/x/evm/evmtest/signer.go @@ -7,7 +7,7 @@ import ( cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/eth/crypto/ethsecp256k1" + "github.com/NibiruChain/nibiru/v2/eth/crypto/ethsecp256k1" ) var _ keyring.Signer = &Signer{} diff --git a/x/evm/evmtest/smart_contract.go b/x/evm/evmtest/smart_contract.go index 007592ea6..77476618a 100644 --- a/x/evm/evmtest/smart_contract.go +++ b/x/evm/evmtest/smart_contract.go @@ -8,11 +8,11 @@ import ( "github.com/ethereum/go-ethereum/params" gethparams "github.com/ethereum/go-ethereum/params" - "github.com/NibiruChain/nibiru/x/evm/embeds" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" gethcore "github.com/ethereum/go-ethereum/core/types" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // ArgsCreateContract: Arguments to call with `CreateContractTxMsg` and diff --git a/x/evm/evmtest/smart_contract_test.go b/x/evm/evmtest/smart_contract_test.go index 150ad47b9..cefefebe1 100644 --- a/x/evm/evmtest/smart_contract_test.go +++ b/x/evm/evmtest/smart_contract_test.go @@ -6,8 +6,8 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) func (s *Suite) TestCreateContractTxMsg() { diff --git a/x/evm/evmtest/test_deps.go b/x/evm/evmtest/test_deps.go index 10aa7b788..c00405cf9 100644 --- a/x/evm/evmtest/test_deps.go +++ b/x/evm/evmtest/test_deps.go @@ -9,13 +9,13 @@ import ( gethcore "github.com/ethereum/go-ethereum/core/types" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/app/codec" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/keeper" - "github.com/NibiruChain/nibiru/x/evm/statedb" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/app/codec" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/keeper" + "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) type TestDeps struct { diff --git a/x/evm/evmtest/tx.go b/x/evm/evmtest/tx.go index 187292b7c..e5d1c628c 100644 --- a/x/evm/evmtest/tx.go +++ b/x/evm/evmtest/tx.go @@ -15,10 +15,10 @@ import ( gethparams "github.com/ethereum/go-ethereum/params" "github.com/stretchr/testify/require" - srvconfig "github.com/NibiruChain/nibiru/app/server/config" + srvconfig "github.com/NibiruChain/nibiru/v2/app/server/config" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/embeds" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" ) type GethTxType = uint8 diff --git a/x/evm/genesis.go b/x/evm/genesis.go index e93c6cedd..d5e786356 100644 --- a/x/evm/genesis.go +++ b/x/evm/genesis.go @@ -4,7 +4,7 @@ package evm import ( "fmt" - "github.com/NibiruChain/nibiru/eth" + "github.com/NibiruChain/nibiru/v2/eth" ) // Validate performs a basic validation of a GenesisAccount fields. diff --git a/x/evm/genesis.pb.go b/x/evm/genesis.pb.go index 0f8a9980b..59fd50d09 100644 --- a/x/evm/genesis.pb.go +++ b/x/evm/genesis.pb.go @@ -161,28 +161,28 @@ func init() { func init() { proto.RegisterFile("eth/evm/v1/genesis.proto", fileDescriptor_d41c81841e3983b5) } var fileDescriptor_d41c81841e3983b5 = []byte{ - // 333 bytes of a gzipped FileDescriptorProto + // 336 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0x31, 0x4e, 0xc3, 0x30, - 0x14, 0x86, 0x63, 0x5a, 0xb5, 0xd4, 0x45, 0x40, 0xad, 0x0e, 0x51, 0x87, 0xb4, 0x2a, 0x4b, 0xa7, - 0x98, 0x96, 0xb5, 0x0c, 0x14, 0x89, 0x4e, 0x20, 0x94, 0x32, 0xb1, 0x20, 0x37, 0x35, 0x49, 0x84, - 0x62, 0x47, 0xb1, 0x13, 0x31, 0x70, 0x08, 0xce, 0xc1, 0x45, 0xe8, 0xd8, 0x91, 0x09, 0x50, 0x7b, - 0x11, 0x64, 0xc7, 0x81, 0xb0, 0xfd, 0x7e, 0xfe, 0xbf, 0xf7, 0x3f, 0xfb, 0x41, 0x9b, 0xca, 0x10, - 0xd3, 0x3c, 0xc6, 0xf9, 0x18, 0x07, 0x94, 0x51, 0x11, 0x09, 0x37, 0x49, 0xb9, 0xe4, 0x08, 0x52, - 0x19, 0xba, 0x34, 0x8f, 0xdd, 0x7c, 0xdc, 0xeb, 0x56, 0x5c, 0xaa, 0xa4, 0x1d, 0xbd, 0x6e, 0xc0, - 0x03, 0xae, 0x25, 0x56, 0xaa, 0xa8, 0x0e, 0xdf, 0x01, 0x3c, 0x98, 0x17, 0x9d, 0x16, 0x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66, 0x5a, 0xe3, 0x67, 0xb5, 0xa2, 0x65, 0x43, 0x6f, 0xe3, 0xec, - 0x27, 0x00, 0x00, 0xff, 0xff, 0x43, 0x29, 0x65, 0x1b, 0xe1, 0x01, 0x00, 0x00, + 0x14, 0x86, 0x63, 0x5a, 0xb5, 0xd4, 0x45, 0x40, 0xad, 0x0e, 0x51, 0x87, 0xb4, 0xea, 0x80, 0x3a, + 0xc5, 0xb4, 0xac, 0x1d, 0xa0, 0x48, 0x74, 0x02, 0xa1, 0x94, 0x89, 0x05, 0xb9, 0xa9, 0x49, 0x22, + 0x14, 0x3b, 0x8a, 0x9d, 0x88, 0x81, 0x43, 0x70, 0x0e, 0x2e, 0x42, 0xc7, 0x8e, 0x4c, 0x80, 0xda, + 0x8b, 0x20, 0x3b, 0x0e, 0x84, 0xed, 0xf7, 0xf3, 0xff, 0xbd, 0xff, 0xd9, 0x0f, 0xda, 0x54, 0x86, + 0x98, 0xe6, 0x31, 0xce, 0xc7, 0x38, 0xa0, 0x8c, 0x8a, 0x48, 0xb8, 0x49, 0xca, 0x25, 0x47, 0x90, + 0xca, 0xd0, 0xa5, 0x79, 0xec, 0xe6, 0xe3, 0x5e, 0xb7, 0xe2, 0x52, 0x25, 0xed, 0xe8, 0x75, 0x03, + 0x1e, 0x70, 0x2d, 0xb1, 0x52, 0x45, 0x75, 0xf8, 0x0e, 0xe0, 0xc1, 0xbc, 0xe8, 0xb4, 0x90, 0x44, + 0x52, 0x34, 0x85, 0xfb, 0xc4, 0xf7, 0x79, 0xc6, 0xa4, 0xb0, 0xc1, 0xa0, 0x36, 0x6a, 0x4f, 0x7a, + 0xee, 0x5f, 0x6f, 0xd7, 0x78, 0x2f, 0x0a, 0xcb, 0xac, 0xbe, 0xfe, 0xec, 0x5b, 0xde, 0x2f, 0x81, + 0x4e, 0x61, 0x23, 0x21, 0x29, 0x89, 0x85, 0xbd, 0x37, 0x00, 0xa3, 0xf6, 0x04, 0x55, 0xd9, 0x5b, + 0x7d, 0x63, 0x18, 0xe3, 0x43, 0x73, 0xd8, 0x79, 0xcc, 0x98, 0xe4, 0x4f, 0x94, 0x3d, 0xc4, 0x24, + 0x49, 0x22, 0x16, 0x08, 0xbb, 0xa6, 0x83, 0xbb, 0x55, 0xf8, 0x2a, 0x63, 0x77, 0xca, 0x64, 0xf0, + 0xe3, 0x12, 0xba, 0x36, 0xcc, 0xf0, 0x05, 0x1e, 0xfe, 0x1f, 0x0e, 0xd9, 0xb0, 0x49, 0x56, 0xab, + 0x94, 0x0a, 0xf5, 0x12, 0x30, 0x6a, 0x79, 0xe5, 0x11, 0x21, 0x58, 0xf7, 0xf9, 0x8a, 0xea, 0x21, + 0x5b, 0x9e, 0xd6, 0x68, 0x0a, 0x9b, 0x42, 0xf2, 0x94, 0x04, 0xd4, 0xc4, 0x77, 0xaa, 0xf1, 0xfa, + 0x73, 0x66, 0x47, 0x2a, 0xfb, 0xed, 0xab, 0xdf, 0x5c, 0x14, 0x4e, 0xaf, 0x44, 0x66, 0xe7, 0xeb, + 0xad, 0x03, 0x36, 0x5b, 0x07, 0x7c, 0x6f, 0x1d, 0xf0, 0xba, 0x73, 0xac, 0xcd, 0xce, 0xb1, 0x3e, + 0x76, 0x8e, 0x75, 0x7f, 0x12, 0x44, 0x32, 0xcc, 0x96, 0xae, 0xcf, 0x63, 0x7c, 0x13, 0x2d, 0xa3, + 0x34, 0xbb, 0x0c, 0x49, 0xc4, 0x30, 0xd3, 0x1a, 0xe7, 0x13, 0xfc, 0xac, 0xb6, 0xb4, 0x6c, 0xe8, + 0x85, 0x9c, 0xfd, 0x04, 0x00, 0x00, 0xff, 0xff, 0x72, 0xb9, 0x50, 0x40, 0xe4, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/evm/genesis_test.go b/x/evm/genesis_test.go index 7c1e76a70..4c007fd7b 100644 --- a/x/evm/genesis_test.go +++ b/x/evm/genesis_test.go @@ -6,8 +6,8 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/eth/crypto/ethsecp256k1" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth/crypto/ethsecp256k1" + "github.com/NibiruChain/nibiru/v2/x/evm" ) type GenesisSuite struct { diff --git a/x/evm/json_tx_args_test.go b/x/evm/json_tx_args_test.go index 31d73b6f5..49ade7a6a 100644 --- a/x/evm/json_tx_args_test.go +++ b/x/evm/json_tx_args_test.go @@ -8,7 +8,7 @@ import ( ethcommon "github.com/ethereum/go-ethereum/common" ethcoretypes "github.com/ethereum/go-ethereum/core/types" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) func (suite *TxDataTestSuite) TestTxArgsString() { diff --git a/x/evm/keeper/erc20.go b/x/evm/keeper/erc20.go index 06b500abe..dce823e4a 100644 --- a/x/evm/keeper/erc20.go +++ b/x/evm/keeper/erc20.go @@ -12,10 +12,10 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" gethcore "github.com/ethereum/go-ethereum/core/types" - serverconfig "github.com/NibiruChain/nibiru/app/server/config" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/embeds" - "github.com/NibiruChain/nibiru/x/evm/statedb" + serverconfig "github.com/NibiruChain/nibiru/v2/app/server/config" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" + "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) // ERC20 returns a mutable reference to the keeper with an ERC20 contract ABI and @@ -46,7 +46,7 @@ See [nibiru/x/evm/embeds]. } ``` -[nibiru/x/evm/embeds]: https://github.com/NibiruChain/nibiru/tree/main/x/evm/embeds +[nibiru/x/evm/embeds]: https://github.com/NibiruChain/nibiru/v2/tree/main/x/evm/embeds */ func (e erc20Calls) Mint( contract, from, to gethcommon.Address, amount *big.Int, diff --git a/x/evm/keeper/erc20_test.go b/x/evm/keeper/erc20_test.go index 3784ede3f..d6a60696b 100644 --- a/x/evm/keeper/erc20_test.go +++ b/x/evm/keeper/erc20_test.go @@ -11,14 +11,14 @@ import ( bank "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/NibiruChain/nibiru/x/common/testutil" - - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/embeds" - "github.com/NibiruChain/nibiru/x/evm/evmtest" - "github.com/NibiruChain/nibiru/x/evm/keeper" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/x/evm/keeper" ) func (s *Suite) TestCreateFunTokenFromERC20() { diff --git a/x/evm/keeper/evm_state.go b/x/evm/keeper/evm_state.go index 34a6c8eb0..426e78d8e 100644 --- a/x/evm/keeper/evm_state.go +++ b/x/evm/keeper/evm_state.go @@ -11,8 +11,8 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" gethcore "github.com/ethereum/go-ethereum/core/types" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" ) type ( diff --git a/x/evm/keeper/funtoken_from_coin.go b/x/evm/keeper/funtoken_from_coin.go index 790a5c8e2..87191e52d 100644 --- a/x/evm/keeper/funtoken_from_coin.go +++ b/x/evm/keeper/funtoken_from_coin.go @@ -9,9 +9,9 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/embeds" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" ) func (k *Keeper) CreateFunTokenFromCoin( diff --git a/x/evm/keeper/funtoken_from_erc20.go b/x/evm/keeper/funtoken_from_erc20.go index 6d879395d..9fb333f3b 100644 --- a/x/evm/keeper/funtoken_from_erc20.go +++ b/x/evm/keeper/funtoken_from_erc20.go @@ -10,10 +10,10 @@ import ( gethabi "github.com/ethereum/go-ethereum/accounts/abi" gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/common" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/embeds" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/common" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" ) // FindERC20Metadata retrieves the metadata of an ERC20 token. diff --git a/x/evm/keeper/funtoken_state.go b/x/evm/keeper/funtoken_state.go index 2833eb597..a1966148c 100644 --- a/x/evm/keeper/funtoken_state.go +++ b/x/evm/keeper/funtoken_state.go @@ -8,8 +8,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // FunTokenState isolates the key-value stores (collections) for fungible token diff --git a/x/evm/keeper/funtoken_state_test.go b/x/evm/keeper/funtoken_state_test.go index 73625454f..d16b616b1 100644 --- a/x/evm/keeper/funtoken_state_test.go +++ b/x/evm/keeper/funtoken_state_test.go @@ -3,9 +3,9 @@ package keeper_test import ( gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) func (s *Suite) TestInsertAndGet() { diff --git a/x/evm/keeper/gas_fees.go b/x/evm/keeper/gas_fees.go index 135cb1791..97b0e3678 100644 --- a/x/evm/keeper/gas_fees.go +++ b/x/evm/keeper/gas_fees.go @@ -16,7 +16,7 @@ import ( "github.com/ethereum/go-ethereum/params" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 63a121510..b0f703ae5 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -17,9 +17,9 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/statedb" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/statedb" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" diff --git a/x/evm/keeper/grpc_query_test.go b/x/evm/keeper/grpc_query_test.go index 403468e78..f9f53784c 100644 --- a/x/evm/keeper/grpc_query_test.go +++ b/x/evm/keeper/grpc_query_test.go @@ -13,11 +13,11 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" gethparams "github.com/ethereum/go-ethereum/params" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/embeds" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) type TestCase[In, Out any] struct { diff --git a/x/evm/keeper/keeper.go b/x/evm/keeper/keeper.go index 70902c6a8..d98b12436 100644 --- a/x/evm/keeper/keeper.go +++ b/x/evm/keeper/keeper.go @@ -17,9 +17,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/NibiruChain/nibiru/app/appconst" - "github.com/NibiruChain/nibiru/x/common/omap" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/app/appconst" + "github.com/NibiruChain/nibiru/v2/x/common/omap" + "github.com/NibiruChain/nibiru/v2/x/evm" ) type Keeper struct { @@ -85,7 +85,7 @@ func NewKeeper( } // GetEvmGasBalance: Implements `evm.EVMKeeper` from -// "github.com/NibiruChain/nibiru/app/ante/evm": Load account's balance of gas +// "github.com/NibiruChain/nibiru/v2/app/ante/evm": Load account's balance of gas // tokens for EVM execution in EVM denom units. func (k *Keeper) GetEvmGasBalance(ctx sdk.Context, addr gethcommon.Address) (balance *big.Int) { nibiruAddr := sdk.AccAddress(addr.Bytes()) diff --git a/x/evm/keeper/msg_ethereum_tx_test.go b/x/evm/keeper/msg_ethereum_tx_test.go index 2a5dc776b..883cd94b3 100644 --- a/x/evm/keeper/msg_ethereum_tx_test.go +++ b/x/evm/keeper/msg_ethereum_tx_test.go @@ -12,13 +12,13 @@ import ( gethcore "github.com/ethereum/go-ethereum/core/types" gethparams "github.com/ethereum/go-ethereum/params" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/evm/embeds" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) func (s *Suite) TestMsgEthereumTx_CreateContract() { diff --git a/x/evm/keeper/msg_server.go b/x/evm/keeper/msg_server.go index 9eaf25c63..3bb2cec17 100644 --- a/x/evm/keeper/msg_server.go +++ b/x/evm/keeper/msg_server.go @@ -20,11 +20,11 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" - "github.com/NibiruChain/nibiru/x/evm/embeds" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/statedb" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) var _ evm.MsgServer = &Keeper{} diff --git a/x/evm/keeper/msg_update_params.go b/x/evm/keeper/msg_update_params.go index c4a49c1c3..1098138a3 100644 --- a/x/evm/keeper/msg_update_params.go +++ b/x/evm/keeper/msg_update_params.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) func (k *Keeper) UpdateParams( diff --git a/x/evm/keeper/precompiles.go b/x/evm/keeper/precompiles.go index 9326c30dd..0ee0bbf21 100644 --- a/x/evm/keeper/precompiles.go +++ b/x/evm/keeper/precompiles.go @@ -5,7 +5,7 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" - "github.com/NibiruChain/nibiru/x/common/omap" + "github.com/NibiruChain/nibiru/v2/x/common/omap" ) func (k *Keeper) AddPrecompiles( diff --git a/x/evm/keeper/statedb.go b/x/evm/keeper/statedb.go index 4f718be5f..9c5716d24 100644 --- a/x/evm/keeper/statedb.go +++ b/x/evm/keeper/statedb.go @@ -10,9 +10,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/statedb" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) var _ statedb.Keeper = &Keeper{} diff --git a/x/evm/keeper/statedb_test.go b/x/evm/keeper/statedb_test.go index 3563e8d75..e80d0f501 100644 --- a/x/evm/keeper/statedb_test.go +++ b/x/evm/keeper/statedb_test.go @@ -7,10 +7,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" gethcommon "github.com/ethereum/go-ethereum/common" ) diff --git a/x/evm/keeper/vm_config.go b/x/evm/keeper/vm_config.go index b2111b156..ca62b416c 100644 --- a/x/evm/keeper/vm_config.go +++ b/x/evm/keeper/vm_config.go @@ -11,8 +11,8 @@ import ( "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/vm" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/statedb" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) func (k *Keeper) GetEVMConfig( diff --git a/x/evm/legacy_tx.go b/x/evm/legacy_tx.go index 3ffd6c1b1..e77b03f92 100644 --- a/x/evm/legacy_tx.go +++ b/x/evm/legacy_tx.go @@ -10,7 +10,7 @@ import ( "github.com/ethereum/go-ethereum/common" gethcore "github.com/ethereum/go-ethereum/core/types" - "github.com/NibiruChain/nibiru/eth" + "github.com/NibiruChain/nibiru/v2/eth" ) func NewLegacyTx(tx *gethcore.Transaction) (*LegacyTx, error) { diff --git a/x/evm/legacy_tx_test.go b/x/evm/legacy_tx_test.go index c5aa9dd50..56cf6fc96 100644 --- a/x/evm/legacy_tx_test.go +++ b/x/evm/legacy_tx_test.go @@ -6,7 +6,7 @@ import ( "github.com/ethereum/go-ethereum/common" gethcore "github.com/ethereum/go-ethereum/core/types" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) func (suite *TxDataTestSuite) TestNewLegacyTx() { diff --git a/x/evm/logs.go b/x/evm/logs.go index 12007f591..21bc74db5 100644 --- a/x/evm/logs.go +++ b/x/evm/logs.go @@ -8,7 +8,7 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" gethcore "github.com/ethereum/go-ethereum/core/types" - "github.com/NibiruChain/nibiru/eth" + "github.com/NibiruChain/nibiru/v2/eth" ) // NewTransactionLogs creates a new NewTransactionLogs instance. diff --git a/x/evm/logs_test.go b/x/evm/logs_test.go index 39bbee0a3..467535de5 100644 --- a/x/evm/logs_test.go +++ b/x/evm/logs_test.go @@ -5,8 +5,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" "github.com/ethereum/go-ethereum/common" ) diff --git a/x/evm/msg.go b/x/evm/msg.go index f1201007e..4e101f52a 100644 --- a/x/evm/msg.go +++ b/x/evm/msg.go @@ -20,7 +20,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/signing" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" - "github.com/NibiruChain/nibiru/eth" + "github.com/NibiruChain/nibiru/v2/eth" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" diff --git a/x/evm/msg_test.go b/x/evm/msg_test.go index bdc06d906..c761dd59c 100644 --- a/x/evm/msg_test.go +++ b/x/evm/msg_test.go @@ -18,14 +18,14 @@ import ( gethcore "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/NibiruChain/nibiru/eth/crypto/ethsecp256k1" + "github.com/NibiruChain/nibiru/v2/eth/crypto/ethsecp256k1" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/eth/encoding" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/eth/encoding" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) type MsgsSuite struct { diff --git a/x/evm/params.go b/x/evm/params.go index 74e85a9f6..60545b2aa 100644 --- a/x/evm/params.go +++ b/x/evm/params.go @@ -13,7 +13,7 @@ import ( "github.com/ethereum/go-ethereum/core/vm" "golang.org/x/exp/slices" - "github.com/NibiruChain/nibiru/app/appconst" + "github.com/NibiruChain/nibiru/v2/app/appconst" ) const ( diff --git a/x/evm/precompile/funtoken.go b/x/evm/precompile/funtoken.go index 395703d50..b8f593525 100644 --- a/x/evm/precompile/funtoken.go +++ b/x/evm/precompile/funtoken.go @@ -12,10 +12,10 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" - "github.com/NibiruChain/nibiru/app/keepers" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/embeds" + "github.com/NibiruChain/nibiru/v2/app/keepers" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" ) var ( diff --git a/x/evm/precompile/funtoken_test.go b/x/evm/precompile/funtoken_test.go index 1d425d52b..8353dac9c 100644 --- a/x/evm/precompile/funtoken_test.go +++ b/x/evm/precompile/funtoken_test.go @@ -5,11 +5,11 @@ import ( "math/big" "testing" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/embeds" - "github.com/NibiruChain/nibiru/x/evm/evmtest" - "github.com/NibiruChain/nibiru/x/evm/precompile" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/x/evm/precompile" "github.com/stretchr/testify/suite" ) diff --git a/x/evm/precompile/precompile.go b/x/evm/precompile/precompile.go index 7c874ed4d..bba3c6e8d 100644 --- a/x/evm/precompile/precompile.go +++ b/x/evm/precompile/precompile.go @@ -26,9 +26,9 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" - "github.com/NibiruChain/nibiru/app/keepers" - "github.com/NibiruChain/nibiru/x/common/set" - "github.com/NibiruChain/nibiru/x/evm/statedb" + "github.com/NibiruChain/nibiru/v2/app/keepers" + "github.com/NibiruChain/nibiru/v2/x/common/set" + "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) // InitPrecompiles initializes and returns a map of precompiled contracts for the EVM. diff --git a/x/evm/precompile/precompile_test.go b/x/evm/precompile/precompile_test.go index 3f1efa81c..22dbbc8e6 100644 --- a/x/evm/precompile/precompile_test.go +++ b/x/evm/precompile/precompile_test.go @@ -7,9 +7,9 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" - "github.com/NibiruChain/nibiru/x/common/omap" - "github.com/NibiruChain/nibiru/x/evm/evmtest" - "github.com/NibiruChain/nibiru/x/evm/precompile" + "github.com/NibiruChain/nibiru/v2/x/common/omap" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/x/evm/precompile" ) // This test proves that: diff --git a/x/evm/query.go b/x/evm/query.go index d024813eb..1a5df4cb2 100644 --- a/x/evm/query.go +++ b/x/evm/query.go @@ -9,8 +9,8 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/NibiruChain/nibiru/eth" - "github.com/NibiruChain/nibiru/x/common" + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/common" ) func (m QueryTraceTxRequest) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { diff --git a/x/evm/query.pb.go b/x/evm/query.pb.go index cf8347632..ba4c8e065 100644 --- a/x/evm/query.pb.go +++ b/x/evm/query.pb.go @@ -1342,104 +1342,104 @@ func init() { func init() { proto.RegisterFile("eth/evm/v1/query.proto", fileDescriptor_ffa36cdc5add14ed) } var fileDescriptor_ffa36cdc5add14ed = []byte{ - // 1544 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0x8f, 0x63, 0x27, 0x76, 0x9e, 0xd3, 0x26, 0x4c, 0xd3, 0x26, 0x71, 0x13, 0x3b, 0xd9, 0x40, - 0x92, 0x96, 0x76, 0x97, 0xb8, 0x08, 0x44, 0x45, 0x0f, 0x75, 0x94, 0x86, 0xd2, 0x3f, 0x6a, 0x4d, - 0x04, 0x12, 0x08, 0x59, 0x63, 0x7b, 0xb2, 0x5e, 0xc5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, 0xa8, 0x1e, 0xdf, 0x96, 0x20, 0x9b, 0xa2, 0x9a, - 0x1a, 0xc0, 0xb6, 0x80, 0x2c, 0x8f, 0xcb, 0xda, 0x7f, 0xe9, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x01, 0x8f, 0x68, 0xfa, 0x70, 0x11, 0x00, 0x00, + // 1549 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0x8f, 0x63, 0x27, 0x76, 0xc6, 0x69, 0x93, 0xef, 0x34, 0x6d, 0x12, 0x37, 0xb1, 0x93, 0xcd, + 0x97, 0x24, 0x2d, 0xed, 0x2e, 0x71, 0x11, 0x88, 0x8a, 0x4a, 0xd4, 0x51, 0x1a, 0x4a, 0x7f, 0xa8, + 0x5d, 0x22, 0x90, 0x40, 0xc8, 0x1a, 0xaf, 0x27, 0xbb, 0x2b, 0xdb, 0x3b, 0xee, 0xce, 0xd8, 0x75, + 0x28, 0xb9, 0xd0, 0x0b, 0x12, 0x42, 0xaa, 0xc4, 0x3f, 0xd0, 0x13, 0xff, 0x02, 0x7f, 0x00, 0x97, + 0xde, 0xa8, 0xc4, 0x05, 0x71, 0x28, 0xa8, 0xe5, 0xc0, 0x99, 0x23, 0x27, 0x34, 0xbf, 0xec, 0xb5, + 0xbd, 0x4e, 0xa8, 0x2a, 0x6e, 0x9c, 0x76, 0xf6, 0xcd, 0x9b, 0xcf, 0xfb, 0xcc, 0x9b, 0x99, 0xcf, + 0x7b, 0xe0, 0x0c, 0x66, 0x9e, 0x85, 0xdb, 0x0d, 0xab, 0xbd, 0x65, 0xdd, 0x6b, 0xe1, 0xf0, 0xc0, + 0x6c, 0x86, 0x84, 0x11, 0x08, 0x30, 0xf3, 0x4c, 0xdc, 0x6e, 0x98, 0xed, 0xad, 0xdc, 0x79, 0x87, + 0xd0, 0x06, 0x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, 0x53, 0x2b, 0x89, 0xcd, 0x94, 0x2d, + 0x7f, 0x38, 0x26, 0x66, 0x5e, 0x59, 0x33, 0x9e, 0x90, 0x98, 0x98, 0x79, 0x57, 0xa5, 0x05, 0xbe, + 0x06, 0x4e, 0x56, 0xb0, 0xe3, 0x5d, 0x2a, 0x76, 0x7d, 0x26, 0x85, 0xcf, 0x09, 0x69, 0x55, 0x6e, + 0xc6, 0x0d, 0xb0, 0x24, 0x36, 0xf4, 0x11, 0xaa, 0xfb, 0x55, 0xc4, 0x48, 0x38, 0x90, 0x95, 0x55, + 0x30, 0xed, 0x90, 0x80, 0x96, 0xfb, 0x53, 0x93, 0xe5, 0xb6, 0xab, 0x43, 0xe9, 0xf9, 0x3a, 0x01, + 0x96, 0x47, 0xa0, 0xa9, 0x24, 0x6d, 0x80, 0x19, 0x24, 0x4d, 0x03, 0x88, 0x27, 0x95, 0x59, 0xd3, + 0xcf, 0x81, 0x0c, 0xe5, 0x14, 0xf8, 0xc6, 0xc7, 0xc5, 0xc6, 0xbb, 0xff, 0x7c, 0x6b, 0x1a, 0x24, + 0x68, 0x35, 0x2a, 0x38, 0x14, 0x39, 0x4b, 0xd9, 0x27, 0x94, 0xf5, 0xb6, 0x30, 0x1a, 0xef, 0x80, + 0x53, 0x82, 0x4c, 0x49, 0x26, 0xfa, 0x65, 0xce, 0xf9, 0x2e, 0x98, 0xeb, 0x5f, 0xfa, 0xca, 0x67, + 0x6c, 0xdc, 0x50, 0x6c, 0x3e, 0x64, 0x24, 0x44, 0xee, 0xf1, 0x6c, 0xe0, 0x2c, 0x48, 0xd6, 0xf0, + 0x81, 0x42, 0xe2, 0xc3, 0x08, 0xbf, 0x0b, 0x8a, 0x5f, 0x17, 0x4c, 0xf1, 0x9b, 0x03, 0x13, 0x6d, + 0x54, 0x6f, 0x69, 0x76, 0xf2, 0xc7, 0x78, 0x0b, 0xcc, 0x0a, 0xef, 0x6d, 0x52, 0x7d, 0xa9, 0x2c, + 0x6c, 0x80, 0xff, 0x45, 0xd6, 0xa9, 0x10, 0x10, 0xa4, 0xf8, 0xd5, 0x14, 0xab, 0xa6, 0x6d, 0x31, + 0x36, 0x3e, 0x07, 0x50, 0x38, 0xee, 0x75, 0x6e, 0x12, 0x97, 0xea, 0x10, 0x10, 0xa4, 0xc4, 0x85, + 0x96, 0xf8, 0x62, 0x0c, 0xaf, 0x01, 0xd0, 0x93, 0x04, 0xb1, 0xb7, 0x6c, 0x71, 0xdd, 0x94, 0xfa, + 0x61, 0x72, 0xfd, 0x30, 0xa5, 0xc8, 0x28, 0xfd, 0x30, 0xef, 0xf4, 0x52, 0x65, 0x47, 0x56, 0x46, + 0x48, 0x3e, 0x4c, 0xa8, 0xc4, 0xea, 0xe0, 0x8a, 0xe7, 0x1a, 0x48, 0xd5, 0x89, 0xcb, 0x77, 0x97, + 0xdc, 0xcc, 0x16, 0x67, 0xcc, 0x9e, 0x5e, 0x99, 0x37, 0x89, 0x6b, 0x8b, 0x49, 0xb8, 0x1b, 0x43, + 0x67, 0xe3, 0x58, 0x3a, 0x32, 0x42, 0x94, 0x8f, 0x31, 0xa7, 0x32, 0x70, 0x07, 0x85, 0xa8, 0xa1, + 0x33, 0x60, 0xec, 0x2a, 0x6a, 0xda, 0xaa, 0xa8, 0xbd, 0x01, 0x26, 0x9b, 0xc2, 0x22, 0x52, 0x93, + 0x2d, 0xc2, 0x28, 0x39, 0xe9, 0x5b, 0x4a, 0x3d, 0x79, 0x56, 0x18, 0xb3, 0x95, 0x9f, 0xf1, 0x7d, + 0x02, 0x9c, 0xdc, 0x61, 0xde, 0x36, 0xaa, 0xd7, 0x23, 0xd9, 0x45, 0xa1, 0x4b, 0xf5, 0x39, 0xf0, + 0x31, 0x9c, 0x07, 0x69, 0x17, 0xd1, 0xb2, 0x83, 0x9a, 0xea, 0xcd, 0x4c, 0xba, 0x88, 0x6e, 0xa3, + 0x26, 0xfc, 0x0c, 0xcc, 0x36, 0x43, 0xd2, 0x24, 0x14, 0x87, 0xdd,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, + 0x97, 0x60, 0x2e, 0x36, 0xae, 0x10, 0x7f, 0xbe, 0x53, 0xa5, 0xd5, 0xb1, 0x6f, 0x32, 0x2a, 0xee, + 0xb1, 0x6f, 0xb2, 0x4f, 0xe6, 0x47, 0xee, 0x54, 0x6b, 0x3f, 0xfc, 0x26, 0x01, 0x66, 0x06, 0xe4, + 0x18, 0x6e, 0x0c, 0xc1, 0xc6, 0xeb, 0x7d, 0x6e, 0xf3, 0x78, 0x47, 0xc5, 0x63, 0x43, 0xf0, 0x58, + 0x85, 0x85, 0x01, 0x1e, 0xfb, 0xad, 0x40, 0xa8, 0xbd, 0xf5, 0x40, 0x7c, 0x0e, 0x4b, 0xef, 0x3d, + 0x79, 0x9e, 0x4f, 0x3c, 0x7d, 0x9e, 0x4f, 0xfc, 0xf6, 0x3c, 0x9f, 0x78, 0xf4, 0x22, 0x3f, 0xf6, + 0xf4, 0x45, 0x7e, 0xec, 0xe7, 0x17, 0xf9, 0xb1, 0x4f, 0xd6, 0x23, 0xf5, 0xf8, 0xb6, 0x00, 0xd9, + 0xe6, 0xd5, 0x54, 0x03, 0xb6, 0x8b, 0x56, 0x87, 0xa3, 0x56, 0x26, 0x45, 0xf9, 0xbf, 0xf4, 0x77, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xef, 0x87, 0xa2, 0xb5, 0x73, 0x11, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/evm/statedb/config.go b/x/evm/statedb/config.go index e618c2964..f29385fa5 100644 --- a/x/evm/statedb/config.go +++ b/x/evm/statedb/config.go @@ -7,7 +7,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/params" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) // TxConfig encapsulates the readonly information of current tx for `StateDB`. diff --git a/x/evm/statedb/state_object.go b/x/evm/statedb/state_object.go index b80aecd93..bebbf7b40 100644 --- a/x/evm/statedb/state_object.go +++ b/x/evm/statedb/state_object.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/NibiruChain/nibiru/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm" ) var emptyCodeHash = crypto.Keccak256(nil) diff --git a/x/evm/statedb/statedb_test.go b/x/evm/statedb/statedb_test.go index e8b7d3b94..b8b4d1741 100644 --- a/x/evm/statedb/statedb_test.go +++ b/x/evm/statedb/statedb_test.go @@ -10,9 +10,9 @@ import ( "github.com/ethereum/go-ethereum/crypto" s "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/x/common/set" - "github.com/NibiruChain/nibiru/x/evm/evmtest" - "github.com/NibiruChain/nibiru/x/evm/statedb" + "github.com/NibiruChain/nibiru/v2/x/common/set" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) // emptyCodeHash: The hash for empty contract bytecode, or a blank byte diff --git a/x/evm/tx.go b/x/evm/tx.go index 2907e06ad..64ab143c9 100644 --- a/x/evm/tx.go +++ b/x/evm/tx.go @@ -15,7 +15,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/NibiruChain/nibiru/eth" + "github.com/NibiruChain/nibiru/v2/eth" ) // EvmTxArgs encapsulates all possible params to create all EVM txs types. diff --git a/x/evm/tx.pb.go b/x/evm/tx.pb.go index 329cd8080..af5d865fb 100644 --- a/x/evm/tx.pb.go +++ b/x/evm/tx.pb.go @@ -8,7 +8,7 @@ import ( cosmossdk_io_math "cosmossdk.io/math" encoding_binary "encoding/binary" fmt "fmt" - github_com_NibiruChain_nibiru_eth "github.com/NibiruChain/nibiru/eth" + github_com_NibiruChain_nibiru_v2_eth "github.com/NibiruChain/nibiru/v2/eth" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" types1 "github.com/cosmos/cosmos-sdk/types" @@ -447,7 +447,7 @@ var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo // denomination for a bank coin can be given to create the mapping to an ERC20. type MsgCreateFunToken struct { // Hexadecimal address of the ERC20 token to which the `FunToken` maps - FromErc20 *github_com_NibiruChain_nibiru_eth.HexAddr `protobuf:"bytes,1,opt,name=from_erc20,json=fromErc20,proto3,customtype=github.com/NibiruChain/nibiru/eth.HexAddr" json:"from_erc20,omitempty"` + FromErc20 *github_com_NibiruChain_nibiru_v2_eth.HexAddr `protobuf:"bytes,1,opt,name=from_erc20,json=fromErc20,proto3,customtype=github.com/NibiruChain/nibiru/v2/eth.HexAddr" json:"from_erc20,omitempty"` // Coin denomination in the Bank Module. FromBankDenom string `protobuf:"bytes,2,opt,name=from_bank_denom,json=fromBankDenom,proto3" json:"from_bank_denom,omitempty"` // Sender: Address for the signer of the transaction. @@ -549,7 +549,7 @@ func (m *MsgCreateFunTokenResponse) GetFuntokenMapping() FunToken { // MsgSendFunTokenToEvm: Arguments to send a bank coin to ERC-20 representation type MsgSendFunTokenToEvm struct { // Hexadecimal address of the ERC20 token to which the `FunToken` maps - ToEthAddr github_com_NibiruChain_nibiru_eth.HexAddr `protobuf:"bytes,1,opt,name=to_eth_addr,json=toEthAddr,proto3,customtype=github.com/NibiruChain/nibiru/eth.HexAddr" json:"to_eth_addr"` + ToEthAddr github_com_NibiruChain_nibiru_v2_eth.HexAddr `protobuf:"bytes,1,opt,name=to_eth_addr,json=toEthAddr,proto3,customtype=github.com/NibiruChain/nibiru/v2/eth.HexAddr" json:"to_eth_addr"` // Sender: Address for the signer of the transaction. Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` // Bank coin to get converted to ERC20 @@ -657,85 +657,85 @@ func init() { func init() { proto.RegisterFile("eth/evm/v1/tx.proto", fileDescriptor_82a0bfe4f0bab953) } var fileDescriptor_82a0bfe4f0bab953 = []byte{ - // 1239 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x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, 0x6f, - 0xa6, 0x32, 0x0d, 0xdc, 0xcc, 0x55, 0xab, 0xbe, 0x72, 0xae, 0x6a, 0xd2, 0x55, 0xe6, 0xbd, 0x47, - 0xbf, 0x7f, 0x9d, 0xb9, 0x6e, 0x56, 0x27, 0x28, 0xa4, 0xdf, 0xb1, 0xd4, 0xb4, 0xc3, 0x87, 0xda, - 0x2e, 0x94, 0x67, 0xae, 0xc7, 0x4b, 0xa7, 0xc2, 0x4e, 0x2b, 0xab, 0xcb, 0x17, 0x28, 0x27, 0x6d, - 0xf0, 0x11, 0x2c, 0x9c, 0xea, 0xe3, 0x97, 0x4f, 0xb9, 0xcd, 0xaa, 0xab, 0xaf, 0x5e, 0xa8, 0x9e, - 0xc4, 0xed, 0xc0, 0x95, 0xb3, 0x3d, 0x51, 0x3f, 0xe5, 0x7b, 0xc6, 0xa2, 0xda, 0x78, 0x96, 0xc5, - 0xf8, 0x80, 0xe6, 0xdb, 0x0f, 0x8e, 0x6a, 0xca, 0xc3, 0xa3, 0x9a, 0xf2, 0xdb, 0x51, 0x4d, 0xf9, - 0xf2, 0x49, 0x6d, 0xee, 0xe1, 0x93, 0xda, 0xdc, 0x2f, 0x4f, 0x6a, 0x73, 0x1f, 0x2f, 0x5f, 0xdc, - 0x5c, 0x43, 0x01, 0x6c, 0x37, 0x27, 0xff, 0x98, 0x6f, 0xfe, 0x15, 0x00, 0x00, 0xff, 0xff, 0x5d, - 0xb8, 0xdf, 0xf4, 0x6e, 0x0b, 0x00, 0x00, + // 1240 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xda, 0x8e, 0x3f, 0x9e, 0xdd, 0xa4, 0x5d, 0x52, 0x6a, 0x9b, 0xe2, 0x35, 0x5b, 0x51, + 0x59, 0x88, 0xec, 0x36, 0x06, 0x21, 0x35, 0x27, 0xe2, 0xc4, 0x85, 0xa2, 0x04, 0xa2, 0xad, 0xcb, + 0x81, 0x8b, 0x35, 0xde, 0x9d, 0xac, 0x57, 0xc9, 0xce, 0xac, 0x76, 0xc6, 0x2b, 0x87, 0x13, 0xea, + 0x09, 0x89, 0x03, 0x20, 0xee, 0x88, 0x23, 0xe2, 0xc4, 0xa1, 0x07, 0xfe, 0x84, 0x8a, 0x53, 0x05, + 0x12, 0x42, 0x3d, 0x18, 0x94, 0x22, 0x21, 0xf5, 0xd8, 0x03, 0x67, 0x34, 0xb3, 0x6b, 0xc7, 0x4e, + 0x70, 0x42, 0x2b, 0xc4, 0x6d, 0xde, 0xbc, 0x8f, 0x79, 0xef, 0xf7, 0x7b, 0xf3, 0x66, 0xe0, 0x05, + 0xcc, 0xfb, 0x26, 0x8e, 0x7c, 0x33, 0x5a, 0x33, 0xf9, 0xd0, 0x08, 0x42, 0xca, 0xa9, 0x0a, 0x98, + 0xf7, 0x0d, 0x1c, 0xf9, 0x46, 0xb4, 0x56, 0xbd, 0x62, 0x53, 0xe6, 0x53, 0x66, 0xfa, 0xcc, 0x15, + 0x36, 0x3e, 0x73, 0x63, 0xa3, 0x6a, 0x2d, 0x51, 0xf4, 0x10, 0xc3, 0x66, 0xb4, 0xd6, 0xc3, 0x1c, + 0xad, 0x99, 0x36, 0xf5, 0x48, 0xa2, 0xaf, 0xc4, 0xfa, 0xae, 0x94, 0xcc, 0x58, 0x48, 0x54, 0x2b, + 0x53, 0x87, 0x8a, 0x63, 0x92, 0x5d, 0x97, 0xba, 0x34, 0xb6, 0x16, 0xab, 0x64, 0xf7, 0xaa, 0x4b, + 0xa9, 0x7b, 0x80, 0x4d, 0x14, 0x78, 0x26, 0x22, 0x84, 0x72, 0xc4, 0x3d, 0x4a, 0xc6, 0x91, 0x2a, + 0x89, 0x56, 0x4a, 0xbd, 0xc1, 0x9e, 0x89, 0xc8, 0x61, 0xac, 0xd2, 0x3f, 0x57, 0xe0, 0xc2, 0x0e, + 0x73, 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, 0x85, 0xd2, 0xcc, 0x25, 0x79, 0xe9, 0x44, 0xd8, 0x69, 0x65, 0xf5, 0xda, 0x19, 0xca, 0x49, + 0x27, 0x7c, 0x08, 0x4b, 0x27, 0xba, 0xf9, 0xe5, 0x13, 0x6e, 0xb3, 0xea, 0xea, 0xab, 0x67, 0xaa, + 0x27, 0x71, 0xbb, 0x70, 0xe9, 0x74, 0x5b, 0xd4, 0x4f, 0xf8, 0x9e, 0xb2, 0xa8, 0x36, 0xce, 0xb3, + 0x18, 0x1f, 0xd0, 0x7a, 0xfb, 0xc1, 0x51, 0x4d, 0x79, 0x78, 0x54, 0x53, 0x7e, 0x3f, 0xaa, 0x29, + 0x5f, 0x3c, 0xae, 0x2d, 0x3c, 0x7c, 0x5c, 0x5b, 0xf8, 0xf5, 0x71, 0x6d, 0xe1, 0xa3, 0xeb, 0xe7, + 0xf6, 0xd7, 0x50, 0x60, 0xdb, 0xcb, 0xca, 0xcf, 0xe6, 0x1b, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, + 0x6f, 0xb7, 0x73, 0xdb, 0x77, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3754,7 +3754,7 @@ func (m *MsgCreateFunToken) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_NibiruChain_nibiru_eth.HexAddr + var v github_com_NibiruChain_nibiru_v2_eth.HexAddr m.FromErc20 = &v if err := m.FromErc20.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/evm/tx_test.go b/x/evm/tx_test.go index 12837a51d..638fb585a 100644 --- a/x/evm/tx_test.go +++ b/x/evm/tx_test.go @@ -10,8 +10,8 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" gethcore "github.com/ethereum/go-ethereum/core/types" - "github.com/NibiruChain/nibiru/x/evm" - "github.com/NibiruChain/nibiru/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" "github.com/stretchr/testify/suite" ) diff --git a/x/genmsg/genesis.go b/x/genmsg/genesis.go index b0a46de96..7e1a99415 100644 --- a/x/genmsg/genesis.go +++ b/x/genmsg/genesis.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - v1 "github.com/NibiruChain/nibiru/x/genmsg/v1" + v1 "github.com/NibiruChain/nibiru/v2/x/genmsg/v1" ) func anyToMsg(ir types.InterfaceRegistry, anyMsg *types.Any) (sdk.Msg, error) { diff --git a/x/genmsg/genesis_test.go b/x/genmsg/genesis_test.go index b4e601114..2fff010e3 100644 --- a/x/genmsg/genesis_test.go +++ b/x/genmsg/genesis_test.go @@ -11,7 +11,7 @@ import ( "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/require" - v1 "github.com/NibiruChain/nibiru/x/genmsg/v1" + v1 "github.com/NibiruChain/nibiru/v2/x/genmsg/v1" ) type mockRouter struct { diff --git a/x/genmsg/integration_test.go b/x/genmsg/integration_test.go index e37476649..f85a87fbd 100644 --- a/x/genmsg/integration_test.go +++ b/x/genmsg/integration_test.go @@ -9,10 +9,10 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/genmsg" - v1 "github.com/NibiruChain/nibiru/x/genmsg/v1" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/genmsg" + v1 "github.com/NibiruChain/nibiru/v2/x/genmsg/v1" ) func TestIntegration(t *testing.T) { diff --git a/x/genmsg/module.go b/x/genmsg/module.go index f20ae9b74..98ff076c6 100644 --- a/x/genmsg/module.go +++ b/x/genmsg/module.go @@ -14,7 +14,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - v1 "github.com/NibiruChain/nibiru/x/genmsg/v1" + v1 "github.com/NibiruChain/nibiru/v2/x/genmsg/v1" ) const ( diff --git a/x/genmsg/v1/genmsg.pb.go b/x/genmsg/v1/genmsg.pb.go index 2a056f1aa..e6af4b761 100644 --- a/x/genmsg/v1/genmsg.pb.go +++ b/x/genmsg/v1/genmsg.pb.go @@ -75,7 +75,7 @@ func init() { func init() { proto.RegisterFile("nibiru/genmsg/v1/genmsg.proto", fileDescriptor_861b6a68d8c1c2d0) } var fileDescriptor_861b6a68d8c1c2d0 = []byte{ - // 188 bytes of a gzipped FileDescriptorProto + // 191 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcd, 0xcb, 0x4c, 0xca, 0x2c, 0x2a, 0xd5, 0x4f, 0x4f, 0xcd, 0xcb, 0x2d, 0x4e, 0xd7, 0x2f, 0x33, 0x84, 0xb2, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x04, 0x20, 0xd2, 0x7a, 0x50, 0xc1, 0x32, 0x43, 0x29, 0xc9, 0xf4, @@ -83,11 +83,11 @@ var fileDescriptor_861b6a68d8c1c2d0 = []byte{ 0xb1, 0x92, 0x03, 0x17, 0x8f, 0x7b, 0x6a, 0x5e, 0x6a, 0x71, 0x66, 0x71, 0x70, 0x49, 0x62, 0x49, 0xaa, 0x90, 0x01, 0x17, 0x47, 0x6e, 0x6a, 0x71, 0x71, 0x62, 0x7a, 0x6a, 0xb1, 0x04, 0xa3, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0x88, 0x1e, 0x44, 0xb7, 0x1e, 0x4c, 0xb7, 0x9e, 0x63, 0x5e, 0x65, 0x10, - 0x5c, 0x95, 0x93, 0xf3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, - 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x69, 0xa6, + 0x5c, 0x95, 0x93, 0xdb, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, + 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0xe9, 0xa4, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xfb, 0x81, 0xdd, 0xe4, 0x9c, 0x91, - 0x98, 0x99, 0xa7, 0x0f, 0x75, 0x7e, 0x05, 0xc2, 0x03, 0x49, 0x6c, 0x60, 0xc3, 0x8d, 0x01, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x90, 0xff, 0x3f, 0x5e, 0xdb, 0x00, 0x00, 0x00, + 0x98, 0x99, 0xa7, 0x0f, 0x75, 0x7e, 0x99, 0x91, 0x7e, 0x05, 0xc2, 0x0f, 0x49, 0x6c, 0x60, 0xf3, + 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x87, 0xf8, 0x6c, 0x64, 0xde, 0x00, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/inflation/client/cli/query.go b/x/inflation/client/cli/query.go index 53db6f67c..5da91da1e 100644 --- a/x/inflation/client/cli/query.go +++ b/x/inflation/client/cli/query.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/NibiruChain/nibiru/x/inflation/types" + "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) // GetQueryCmd returns the cli query commands for the inflation module. diff --git a/x/inflation/client/cli/tx.go b/x/inflation/client/cli/tx.go index 5e073a4d3..e3c3b2554 100644 --- a/x/inflation/client/cli/tx.go +++ b/x/inflation/client/cli/tx.go @@ -10,7 +10,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/spf13/cobra" - "github.com/NibiruChain/nibiru/x/inflation/types" + "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) // GetTxCmd returns the transaction commands for this module diff --git a/x/inflation/genesis.go b/x/inflation/genesis.go index b55da1322..07c47b0ec 100644 --- a/x/inflation/genesis.go +++ b/x/inflation/genesis.go @@ -3,8 +3,8 @@ package inflation import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/inflation/keeper" - "github.com/NibiruChain/nibiru/x/inflation/types" + "github.com/NibiruChain/nibiru/v2/x/inflation/keeper" + "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) // InitGenesis import module genesis diff --git a/x/inflation/keeper/grpc_query.go b/x/inflation/keeper/grpc_query.go index 6e9f6dffd..0d065e69f 100644 --- a/x/inflation/keeper/grpc_query.go +++ b/x/inflation/keeper/grpc_query.go @@ -7,8 +7,8 @@ import ( "cosmossdk.io/math" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/inflation/types" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) // querier implements the module's gRPC "QueryServer" interface diff --git a/x/inflation/keeper/grpc_query_test.go b/x/inflation/keeper/grpc_query_test.go index 6c8e666b7..89bede6f9 100644 --- a/x/inflation/keeper/grpc_query_test.go +++ b/x/inflation/keeper/grpc_query_test.go @@ -6,12 +6,12 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/x/inflation/keeper" + "github.com/NibiruChain/nibiru/v2/x/inflation/keeper" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" - inflationtypes "github.com/NibiruChain/nibiru/x/inflation/types" + inflationtypes "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) type QueryServerSuite struct { diff --git a/x/inflation/keeper/hooks.go b/x/inflation/keeper/hooks.go index a83d5149a..5c8dbbe36 100644 --- a/x/inflation/keeper/hooks.go +++ b/x/inflation/keeper/hooks.go @@ -7,9 +7,9 @@ import ( "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/common/denoms" - epochstypes "github.com/NibiruChain/nibiru/x/epochs/types" - "github.com/NibiruChain/nibiru/x/inflation/types" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + epochstypes "github.com/NibiruChain/nibiru/v2/x/epochs/types" + "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) // Hooks implements module-specific calls ([epochstypes.EpochHooks]) that will diff --git a/x/inflation/keeper/hooks_test.go b/x/inflation/keeper/hooks_test.go index 73114a535..6524ebdcd 100644 --- a/x/inflation/keeper/hooks_test.go +++ b/x/inflation/keeper/hooks_test.go @@ -11,11 +11,11 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - epochstypes "github.com/NibiruChain/nibiru/x/epochs/types" - "github.com/NibiruChain/nibiru/x/inflation/types" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + epochstypes "github.com/NibiruChain/nibiru/v2/x/epochs/types" + "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) // TestEpochIdentifierAfterEpochEnd: Ensures that the amount in the community diff --git a/x/inflation/keeper/inflation.go b/x/inflation/keeper/inflation.go index aa52897ac..254262932 100644 --- a/x/inflation/keeper/inflation.go +++ b/x/inflation/keeper/inflation.go @@ -7,8 +7,8 @@ import ( sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/inflation/types" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) // MintAndAllocateInflation mints and allocates tokens based on the polynomial diff --git a/x/inflation/keeper/inflation_test.go b/x/inflation/keeper/inflation_test.go index fe09a54a4..00b8b9870 100644 --- a/x/inflation/keeper/inflation_test.go +++ b/x/inflation/keeper/inflation_test.go @@ -13,11 +13,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/inflation/types" - sudotypes "github.com/NibiruChain/nibiru/x/sudo/types" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/inflation/types" + sudotypes "github.com/NibiruChain/nibiru/v2/x/sudo/types" ) func init() { diff --git a/x/inflation/keeper/keeper.go b/x/inflation/keeper/keeper.go index 026fe67fc..893dcedf2 100644 --- a/x/inflation/keeper/keeper.go +++ b/x/inflation/keeper/keeper.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" - "github.com/NibiruChain/nibiru/x/inflation/types" + "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) // Keeper of the inflation module. Keepers are module-specific "gate keepers" diff --git a/x/inflation/keeper/keeper_test.go b/x/inflation/keeper/keeper_test.go index 06473700c..46f1619fc 100644 --- a/x/inflation/keeper/keeper_test.go +++ b/x/inflation/keeper/keeper_test.go @@ -8,9 +8,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/inflation/types" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) func init() { diff --git a/x/inflation/keeper/msg_server.go b/x/inflation/keeper/msg_server.go index b1cc8048a..431006782 100644 --- a/x/inflation/keeper/msg_server.go +++ b/x/inflation/keeper/msg_server.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/inflation/types" + "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) type msgServer struct { diff --git a/x/inflation/keeper/msg_server_test.go b/x/inflation/keeper/msg_server_test.go index 1823ce85d..41c1bcefd 100644 --- a/x/inflation/keeper/msg_server_test.go +++ b/x/inflation/keeper/msg_server_test.go @@ -6,10 +6,10 @@ import ( "cosmossdk.io/math" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/inflation/keeper" - "github.com/NibiruChain/nibiru/x/inflation/types" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/inflation/keeper" + "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) func TestMsgToggleInflation(t *testing.T) { diff --git a/x/inflation/keeper/params.go b/x/inflation/keeper/params.go index 3068045de..4df4ff3b4 100644 --- a/x/inflation/keeper/params.go +++ b/x/inflation/keeper/params.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/inflation/types" + "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) func (k Keeper) GetParams(ctx sdk.Context) types.Params { diff --git a/x/inflation/keeper/sudo.go b/x/inflation/keeper/sudo.go index aa01e10a8..f1efae0d0 100644 --- a/x/inflation/keeper/sudo.go +++ b/x/inflation/keeper/sudo.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - inflationtypes "github.com/NibiruChain/nibiru/x/inflation/types" + inflationtypes "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) // Sudo extends the Keeper with sudo functions. See [x/sudo]. diff --git a/x/inflation/keeper/sudo_test.go b/x/inflation/keeper/sudo_test.go index 511719352..322464c70 100644 --- a/x/inflation/keeper/sudo_test.go +++ b/x/inflation/keeper/sudo_test.go @@ -7,9 +7,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - inflationKeeper "github.com/NibiruChain/nibiru/x/inflation/keeper" - "github.com/NibiruChain/nibiru/x/inflation/types" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + inflationKeeper "github.com/NibiruChain/nibiru/v2/x/inflation/keeper" + "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) func TestSuiteInflationSudo(t *testing.T) { diff --git a/x/inflation/module.go b/x/inflation/module.go index d0ab48ee3..35d352380 100644 --- a/x/inflation/module.go +++ b/x/inflation/module.go @@ -17,10 +17,10 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "github.com/NibiruChain/nibiru/x/inflation/client/cli" - "github.com/NibiruChain/nibiru/x/inflation/keeper" - "github.com/NibiruChain/nibiru/x/inflation/simulation" - "github.com/NibiruChain/nibiru/x/inflation/types" + "github.com/NibiruChain/nibiru/v2/x/inflation/client/cli" + "github.com/NibiruChain/nibiru/v2/x/inflation/keeper" + "github.com/NibiruChain/nibiru/v2/x/inflation/simulation" + "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) // type check to ensure the interface is properly implemented diff --git a/x/inflation/simulation/genesis.go b/x/inflation/simulation/genesis.go index da5e65c54..edc5d7b0e 100644 --- a/x/inflation/simulation/genesis.go +++ b/x/inflation/simulation/genesis.go @@ -10,7 +10,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/NibiruChain/nibiru/x/inflation/types" + "github.com/NibiruChain/nibiru/v2/x/inflation/types" ) // RandomizedGenState generates a random GenesisState for distribution diff --git a/x/inflation/types/event.pb.go b/x/inflation/types/event.pb.go index c5fd42816..64335efad 100644 --- a/x/inflation/types/event.pb.go +++ b/x/inflation/types/event.pb.go @@ -93,28 +93,28 @@ func init() { func init() { proto.RegisterFile("nibiru/inflation/v1/event.proto", fileDescriptor_18fa0385facaf5d9) } var fileDescriptor_18fa0385facaf5d9 = []byte{ - // 332 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xbd, 0x4e, 0xf3, 0x30, - 0x14, 0x86, 0x93, 0x7e, 0xd2, 0x37, 0x04, 0x51, 0x20, 0xfc, 0x28, 0x54, 0xc2, 0xad, 0x32, 0x31, - 0xd9, 0x0a, 0x6c, 0x8c, 0x2d, 0x0c, 0x5d, 0x10, 0xca, 0xc8, 0x12, 0xd9, 0xc1, 0xa4, 0x16, 0x89, - 0x4f, 0x65, 0x3b, 0x81, 0xde, 0x05, 0x97, 0x55, 0x89, 0xa5, 0x23, 0x53, 0x85, 0xda, 0x3b, 0xe0, - 0x0a, 0x50, 0xea, 0xb4, 0x82, 0x2e, 0xdd, 0x8e, 0xde, 0x73, 0xce, 0xf3, 0x0c, 0xaf, 0xd7, 0x95, - 0x82, 0x09, 0x55, 0x12, 0x21, 0x9f, 0x73, 0x6a, 0x04, 0x48, 0x52, 0x45, 0x84, 0x57, 0x5c, 0x1a, - 0x3c, 0x56, 0x60, 0xc0, 0x3f, 0xb6, 0x07, 0x78, 0x73, 0x80, 0xab, 0xa8, 0x73, 0x92, 0x41, 0x06, - 0xab, 0x3d, 0xa9, 0x27, 0x7b, 0xda, 0x41, 0x29, 0xe8, 0x02, 0x34, 0x61, 0x54, 0x73, 0x52, 0x45, - 0x8c, 0x1b, 0x1a, 0x91, 0x14, 0x84, 0xb4, 0xfb, 0xf0, 0xa3, 0xe5, 0x75, 0xee, 0x6a, 0xf4, 0x70, - 0xcd, 0xba, 0x15, 0xda, 0x28, 0xc1, 0xca, 0x7a, 0xf6, 0x99, 0x77, 0xa0, 0x0d, 0x7d, 0x11, 0x32, - 0x4b, 0x14, 0x7f, 0xa5, 0xea, 0x49, 0x07, 0x6e, 0xcf, 0xbd, 0xdc, 0xbb, 0x3a, 0xc7, 0x16, 0x8c, - 0x6b, 0x30, 0x6e, 0xc0, 0x78, 0x00, 0x42, 0xf6, 0xd1, 0x74, 0xde, 0x75, 0xbe, 0xe7, 0xdd, 0xb3, - 0x09, 0x2d, 0xf2, 0x9b, 0x70, 0xeb, 0x3f, 0x8c, 0xdb, 0x4d, 0x12, 0xdb, 0xc0, 0x1f, 0x79, 0x47, - 0xda, 0x28, 0x6a, 0x78, 0x26, 0xd2, 0x44, 0x71, 0xcd, 0x55, 0xc5, 0x83, 0xd6, 0x2e, 0x4b, 0xaf, - 0xb1, 0x04, 0x6b, 0xcb, 0x16, 0x21, 0x8c, 0x0f, 0x37, 0x59, 0x6c, 0x23, 0x3f, 0xf1, 0xda, 0x29, - 0x14, 0x45, 0x29, 0x85, 0x99, 0x24, 0x63, 0x80, 0x3c, 0xf8, 0xb7, 0x4b, 0x73, 0xd1, 0x68, 0x4e, - 0xad, 0xe6, 0xef, 0x7b, 0x18, 0xef, 0x6f, 0x82, 0x07, 0x80, 0xbc, 0x3f, 0x9c, 0x2e, 0x90, 0x3b, - 0x5b, 0x20, 0xf7, 0x6b, 0x81, 0xdc, 0xf7, 0x25, 0x72, 0x66, 0x4b, 0xe4, 0x7c, 0x2e, 0x91, 0xf3, - 0x48, 0x32, 0x61, 0x46, 0x25, 0xc3, 0x29, 0x14, 0xe4, 0x7e, 0xd5, 0xde, 0x60, 0x44, 0x85, 0x24, - 0x4d, 0xd5, 0x6f, 0xbf, 0xca, 0x36, 0x93, 0x31, 0xd7, 0xec, 0xff, 0xaa, 0x9f, 0xeb, 0x9f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x2c, 0x97, 0xd4, 0x83, 0x0d, 0x02, 0x00, 0x00, + // 336 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xbf, 0x4e, 0xeb, 0x30, + 0x14, 0xc6, 0x93, 0x5e, 0xe9, 0x0e, 0xb9, 0xba, 0x05, 0xc2, 0x1f, 0x85, 0x4a, 0xb8, 0x55, 0x26, + 0x26, 0x5b, 0x29, 0x1b, 0x63, 0x0b, 0x03, 0x12, 0x42, 0x28, 0x23, 0x4b, 0x64, 0x07, 0x93, 0x5a, + 0x24, 0x3e, 0x95, 0xed, 0x04, 0xfa, 0x16, 0x3c, 0x56, 0x25, 0x96, 0x8e, 0x4c, 0x15, 0x6a, 0xdf, + 0x80, 0x27, 0x40, 0xa9, 0xd3, 0x0a, 0xba, 0x74, 0x3b, 0xfa, 0xce, 0x39, 0xbf, 0xdf, 0xf0, 0x79, + 0x5d, 0x29, 0x98, 0x50, 0x25, 0x11, 0xf2, 0x29, 0xa7, 0x46, 0x80, 0x24, 0x55, 0x44, 0x78, 0xc5, + 0xa5, 0xc1, 0x63, 0x05, 0x06, 0xfc, 0x43, 0x7b, 0x80, 0x37, 0x07, 0xb8, 0x8a, 0x3a, 0x47, 0x19, + 0x64, 0xb0, 0xda, 0x93, 0x7a, 0xb2, 0xa7, 0x1d, 0x94, 0x82, 0x2e, 0x40, 0x13, 0x46, 0x35, 0x27, + 0x55, 0xc4, 0xb8, 0xa1, 0x11, 0x49, 0x41, 0x48, 0xbb, 0x0f, 0xdf, 0x5b, 0x5e, 0xe7, 0xba, 0x46, + 0xdf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ff, 0x9b, 0x1d, 0x75, 0xa0, 0x10, 0x02, 0x00, 0x00, } func (m *EventInflationDistribution) Marshal() (dAtA []byte, err error) { diff --git a/x/inflation/types/genesis.pb.go b/x/inflation/types/genesis.pb.go index 522028269..6a4473a0f 100644 --- a/x/inflation/types/genesis.pb.go +++ b/x/inflation/types/genesis.pb.go @@ -196,36 +196,36 @@ func init() { func init() { proto.RegisterFile("nibiru/inflation/v1/genesis.proto", fileDescriptor_2d00e2bb98c08f74) } var fileDescriptor_2d00e2bb98c08f74 = []byte{ - // 461 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xc1, 0x6e, 0x13, 0x31, - 0x10, 0xcd, 0x36, 0x61, 0xa1, 0x2e, 0x94, 0xc6, 0xa5, 0xd5, 0xaa, 0x88, 0x6d, 0x28, 0x02, 0x45, - 0x45, 0xac, 0xd5, 0x70, 0xe2, 0x1a, 0x5a, 0x50, 0x2f, 0x28, 0x4a, 0x4f, 0x20, 0xa1, 0x95, 0x77, - 0x77, 0xba, 0x6b, 0x35, 0xbb, 0xb6, 0x6c, 0xa7, 0x4a, 0xfe, 0x80, 0x23, 0x5f, 0xc1, 0xb7, 0xf4, - 0xd8, 0x23, 0xe2, 0x50, 0xa1, 0xe4, 0x47, 0xaa, 0xd8, 0x6e, 0x92, 0xc3, 0x9e, 0xec, 0x99, 0xf7, - 0xe6, 0xcd, 0xcc, 0xd3, 0xa0, 0xd7, 0x15, 0x4b, 0x98, 0x1c, 0x13, 0x56, 0x5d, 0x8e, 0xa8, 0x66, - 0xbc, 0x22, 0xd7, 0x27, 0x24, 0x87, 0x0a, 0x14, 0x53, 0x91, 0x90, 0x5c, 0x73, 0xbc, 0x6b, 0x29, - 0xd1, 0x92, 0x12, 0x5d, 0x9f, 0x1c, 0xbc, 0xc8, 0x79, 0xce, 0x0d, 0x4e, 0x16, 0x3f, 0x4b, 0x3d, - 0x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, 0xe3, 0x5a, 0x83, 0xce, 0x1f, 0x82, 0xd3, 0xb5, 0x0a, 0xe7, - 0xd7, 0x1e, 0xab, 0x03, 0xf1, 0x31, 0x6a, 0x5b, 0x7b, 0x62, 0x01, 0x32, 0x76, 0x4e, 0xb6, 0x8c, - 0x53, 0xcf, 0x2d, 0x30, 0x00, 0x39, 0xb0, 0x96, 0x76, 0xd1, 0x8e, 0x25, 0x58, 0xf2, 0x14, 0xa8, - 0x0c, 0x1e, 0x19, 0xea, 0xb6, 0xcb, 0x0f, 0x40, 0x7e, 0x07, 0x2a, 0xf1, 0x2b, 0x84, 0x4a, 0x3a, - 0x79, 0x90, 0xf3, 0x0d, 0x67, 0xb3, 0xa4, 0x13, 0x27, 0xd4, 0x43, 0x7b, 0x05, 0x55, 0xf1, 0x6a, - 0x43, 0xa5, 0xa9, 0xd4, 0x90, 0x05, 0x8f, 0x8d, 0xdb, 0xbb, 0x05, 0x55, 0xcb, 0x55, 0x2e, 0x2c, - 0xd4, 0x3f, 0xbf, 0x99, 0x85, 0xde, 0xed, 0x2c, 0xf4, 0xfe, 0xcf, 0x42, 0xef, 0xf7, 0x3c, 0x6c, - 0xdc, 0xce, 0xc3, 0xc6, 0xdf, 0x79, 0xd8, 0xf8, 0x41, 0xd6, 0x6c, 0xfe, 0x66, 0x5c, 0xf9, 0x5c, - 0x50, 0x56, 0x11, 0x77, 0x89, 0x93, 0xb5, 0x5b, 0x34, 0x9e, 0x27, 0xbe, 0xb9, 0xc2, 0x8f, 0xf7, - 0x01, 0x00, 0x00, 0xff, 0xff, 0xc8, 0x43, 0x3a, 0xc4, 0xfa, 0x02, 0x00, 0x00, + // 464 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0x8e, 0x9b, 0x60, 0xe8, 0x16, 0x4a, 0xb3, 0xa5, 0x95, 0x55, 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9, 0x9f, 0x26, 0x72, 0x8d, 0x2e, 0x7e, 0x8b, 0xda, 0xab, 0x76, 0x31, 0x54, 0x24, + 0x19, 0x42, 0xa6, 0xe7, 0x79, 0x34, 0xd8, 0x5b, 0x01, 0x17, 0x26, 0x8f, 0x7f, 0x22, 0xcc, 0xd9, + 0x70, 0x5a, 0xb1, 0x92, 0x92, 0x61, 0x7c, 0x45, 0x52, 0xc5, 0x84, 0xf4, 0xb6, 0x3a, 0xcd, 0xee, + 0x76, 0x2f, 0x58, 0x0c, 0xf8, 0xef, 0xee, 0xf8, 0x4d, 0x4e, 0x55, 0x31, 0x4a, 0x82, 0x94, 0x95, + 0x61, 0xca, 0x64, 0xc9, 0xa4, 0x7d, 0xde, 0xc9, 0xec, 0x3a, 0x54, 0x53, 0x0e, 0x32, 0x38, 0x87, + 0x74, 0xd0, 0x5e, 0x2b, 0x7d, 0x32, 0x42, 0x38, 0x47, 0x87, 0xeb, 0x59, 0x32, 0x2a, 0x95, 0xa0, + 0xc9, 0x68, 0x11, 0xe8, 0x2d, 0x76, 0xa2, 0xd3, 0x5a, 0x83, 0xbe, 0x2c, 0x83, 0xf3, 0x8d, 0x0a, + 0xeb, 0xd7, 0x01, 0xad, 0x03, 0xf1, 0x29, 0x6a, 0x1b, 0x7b, 0x62, 0x0e, 0x22, 0xb6, 0x4e, 0xb6, + 0xb4, 0x53, 0x4f, 0x0d, 0xd0, 0x07, 0xd1, 0x37, 0x96, 0x76, 0xd1, 0x9e, 0x21, 0x18, 0xf2, 0x14, + 0x88, 0xf0, 0x1e, 0x68, 0xea, 0xae, 0xcd, 0xf7, 0x41, 0x7c, 0x07, 0x22, 0xf0, 0x0b, 0x84, 0x4a, + 0x32, 0x59, 0xca, 0xb9, 0x9a, 0xb3, 0x5d, 0x92, 0x89, 0x15, 0x8a, 0xd0, 0x41, 0x41, 0x64, 0xbc, + 0xde, 0x50, 0x2a, 0x22, 0x14, 0x64, 0xde, 0x43, 0xed, 0xf6, 0x7e, 0x41, 0xe4, 0x6a, 0x95, 0x4b, + 0x03, 0xf5, 0xbe, 0xde, 0xcc, 0x7c, 0xe7, 0x76, 0xe6, 0x3b, 0xff, 0x67, 0xbe, 0xf3, 0x7b, 0xee, + 0x37, 0x6e, 0xe7, 0x7e, 0xe3, 0xef, 0xdc, 0x6f, 0xfc, 0x88, 0x36, 0x6c, 0xfe, 0xa6, 0x5d, 0xf9, + 0x58, 0x10, 0x5a, 0x85, 0xf6, 0x12, 0xc7, 0x51, 0x38, 0xd9, 0x38, 0x47, 0x6d, 0x7b, 0xe2, 0xea, + 0x43, 0x7c, 0x7f, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xc4, 0xaa, 0x78, 0xac, 0xfd, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/inflation/types/inflation.pb.go b/x/inflation/types/inflation.pb.go index 632c86ebf..b1970945b 100644 --- a/x/inflation/types/inflation.pb.go +++ b/x/inflation/types/inflation.pb.go @@ -81,7 +81,7 @@ func init() { } var fileDescriptor_37da805e9a324a97 = []byte{ - // 284 bytes of a gzipped FileDescriptorProto + // 287 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xce, 0xcb, 0x4c, 0xca, 0x2c, 0x2a, 0xd5, 0xcf, 0xcc, 0x4b, 0xcb, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x2f, 0x33, 0x44, 0x70, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x84, 0x21, 0x8a, 0xf4, 0x10, 0xe2, 0x65, 0x86, @@ -95,11 +95,11 @@ var fileDescriptor_37da805e9a324a97 = []byte{ 0xdc, 0xdc, 0xd2, 0xbc, 0xcc, 0x92, 0xca, 0xf8, 0x82, 0xfc, 0xfc, 0x1c, 0x09, 0x26, 0xb2, 0xcc, 0xe5, 0x85, 0x9b, 0x12, 0x90, 0x9f, 0x9f, 0x23, 0x14, 0xcb, 0x25, 0x54, 0x5c, 0x52, 0x94, 0x58, 0x92, 0x9a, 0x9e, 0x99, 0x1c, 0x5f, 0x94, 0x5a, 0x9c, 0x5a, 0x54, 0x96, 0x5a, 0x2c, 0xc1, 0x4c, - 0x96, 0xd1, 0x82, 0x70, 0x93, 0x82, 0xa0, 0x06, 0x39, 0x79, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, + 0x96, 0xd1, 0x82, 0x70, 0x93, 0x82, 0xa0, 0x06, 0x39, 0xf9, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, - 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x3e, 0x92, 0xa1, 0x7e, 0xe0, 0x80, 0x77, 0xce, 0x48, 0xcc, 0xcc, - 0xd3, 0x87, 0xc6, 0x54, 0x05, 0x52, 0x5c, 0x81, 0x6d, 0x48, 0x62, 0x03, 0x07, 0xbd, 0x31, 0x20, - 0x00, 0x00, 0xff, 0xff, 0x75, 0xbf, 0x6b, 0xae, 0xcc, 0x01, 0x00, 0x00, + 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x11, 0x92, 0xa1, 0x7e, 0xe0, 0x80, 0x77, 0xce, 0x48, 0xcc, 0xcc, + 0xd3, 0x87, 0xc6, 0x54, 0x99, 0x91, 0x7e, 0x05, 0x52, 0x74, 0x81, 0x2d, 0x49, 0x62, 0x03, 0x87, + 0xbe, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x08, 0x9b, 0xc5, 0xcf, 0x01, 0x00, 0x00, } func (m *InflationDistribution) Marshal() (dAtA []byte, err error) { diff --git a/x/inflation/types/params_test.go b/x/inflation/types/params_test.go index 054dcc19a..d2d0fd91b 100644 --- a/x/inflation/types/params_test.go +++ b/x/inflation/types/params_test.go @@ -5,7 +5,7 @@ import ( "cosmossdk.io/math" - inflationtypes "github.com/NibiruChain/nibiru/x/inflation/types" + inflationtypes "github.com/NibiruChain/nibiru/v2/x/inflation/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" diff --git a/x/inflation/types/query.pb.go b/x/inflation/types/query.pb.go index 4b15226dc..609ff196e 100644 --- a/x/inflation/types/query.pb.go +++ b/x/inflation/types/query.pb.go @@ -549,50 +549,51 @@ func init() { func init() { proto.RegisterFile("nibiru/inflation/v1/query.proto", fileDescriptor_9cef9ea5e4d20e5e) } var fileDescriptor_9cef9ea5e4d20e5e = []byte{ - // 686 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x95, 0x4f, 0x4f, 0x14, 0x3d, - 0x1c, 0xc7, 0xb7, 0x4f, 0x78, 0xd6, 0x58, 0x03, 0x09, 0x85, 0x18, 0x1d, 0x60, 0x16, 0x97, 0x20, - 0x10, 0x42, 0x9b, 0x65, 0xbd, 0x78, 0x65, 0xf5, 0xc0, 0x41, 0x83, 0x43, 0xbc, 0x78, 0xd9, 0xcc, - 0x0e, 0x75, 0x68, 0x60, 0xdb, 0x32, 0x9d, 0xd9, 0xc8, 0xcd, 0xe8, 0x1b, 0x30, 0xf1, 0xec, 0xc9, - 0x83, 0x89, 0x89, 0x17, 0x5e, 0x05, 0x47, 0x12, 0x2f, 0xc6, 0x03, 0x1a, 0xf0, 0x85, 0x98, 0xe9, - 0x74, 0x96, 0x1d, 0xb6, 0xb3, 0xc0, 0xc1, 0xd3, 0xce, 0xf6, 0xf7, 0xef, 0xdb, 0x6f, 0xfb, 0x99, - 0x81, 0x35, 0xce, 0x3a, 0x2c, 0x4a, 0x08, 0xe3, 0xaf, 0xf7, 0xfd, 0x98, 0x09, 0x4e, 0x7a, 0x0d, - 0x72, 0x90, 0xd0, 0xe8, 0x10, 0xcb, 0x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x5f, 0x3d, 0x9d, 0xaa, 0xfe, 0x74, 0x36, - 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x40, 0x82, 0x21, 0x19, 0xe9, 0x07, 0x00, 0x00, + // 689 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x95, 0x4f, 0x4f, 0x13, 0x4d, + 0x1c, 0xc7, 0x3b, 0x4f, 0x78, 0x6a, 0x1c, 0x03, 0x09, 0x03, 0x31, 0xba, 0xc0, 0x16, 0x4b, 0x10, + 0x08, 0x61, 0x26, 0x6d, 0xbd, 0x78, 0xa5, 0x7a, 0x30, 0x51, 0x83, 0x25, 0x5e, 0xbc, 0x34, 0xdb, + 0x65, 0x5c, 0x26, 0xd0, 0x99, 0x61, 0x67, 0xb7, 0x91, 0x9b, 0xd1, 0x37, 0x60, 0xe2, 0xd9, 0x93, + 0x07, 0x13, 0x13, 0x2f, 0xbc, 0x0a, 0x8e, 0x24, 0x5e, 0x8c, 0x07, 0x34, 0xe0, 0x0b, 0x31, 0x3b, + 0x3b, 0x5b, 0xba, 0x74, 0xb6, 0x85, 0x83, 0xa7, 0x6e, 0xe7, 0xf7, 0xef, 0x3b, 0xdf, 0x99, 0xcf, + 0x2e, 0xac, 0x70, 0xd6, 0x61, 0x61, 0x4c, 0x18, 0x7f, 0xbd, 0xef, 0x45, 0x4c, 0x70, 0xd2, 0xab, + 0x91, 0x83, 0x98, 0x86, 0x87, 0x58, 0x86, 0x22, 0x12, 0x68, 0x26, 0x4d, 0xc0, 0xfd, 0x04, 0xdc, + 0xab, 0x39, 0xae, 0x2f, 0x54, 0x57, 0x28, 0xd2, 0xf1, 0x14, 0x25, 0xbd, 0x5a, 0x87, 0x46, 0x5e, + 0x8d, 0xf8, 0x82, 0xf1, 0xb4, 0xc8, 0xb9, 0x67, 0xeb, 0x1a, 0x50, 0x4e, 0x15, 0x53, 0x26, 0x65, + 0x36, 0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, + 0x6b, 0x5a, 0xe6, 0x3a, 0x5a, 0xb3, 0xca, 0xb4, 0x11, 0x8d, 0x3e, 0x01, 0x38, 0x99, 0x63, 0x08, + 0xe1, 0xe2, 0xd1, 0x36, 0x12, 0x1d, 0x72, 0xe5, 0x7c, 0xa3, 0x72, 0x5d, 0xab, 0x5c, 0x46, 0x4b, + 0x56, 0x95, 0x79, 0x6e, 0xd1, 0x37, 0x00, 0xa7, 0x87, 0xe0, 0x43, 0xf5, 0xe2, 0x99, 0x45, 0x2c, + 0x3b, 0x8d, 0x6b, 0xd5, 0x18, 0xad, 0x44, 0x6b, 0x5d, 0x43, 0x2b, 0x56, 0xad, 0xc3, 0xdc, 0x6b, + 0x3f, 0x73, 0xa8, 0x8d, 0xf2, 0xd3, 0x06, 0xec, 0x28, 0x3f, 0xad, 0x0c, 0x8f, 0xf1, 0x33, 0x8f, + 0x77, 0xca, 0x89, 0x86, 0x67, 0x24, 0x27, 0x83, 0xdc, 0x8e, 0xe4, 0x24, 0x87, 0xf2, 0x38, 0x4e, + 0x52, 0x84, 0x9f, 0x1e, 0x9f, 0xb9, 0xe0, 0xe4, 0xcc, 0x05, 0xbf, 0xcf, 0x5c, 0xf0, 0xe1, 0xdc, + 0x2d, 0x9d, 0x9c, 0xbb, 0xa5, 0x1f, 0xe7, 0x6e, 0xe9, 0x55, 0x7d, 0xe0, 0x6d, 0xf3, 0x5c, 0x37, + 0x68, 0xee, 0x7a, 0x8c, 0x67, 0xcd, 0x7a, 0x75, 0xf2, 0x66, 0xa0, 0xa3, 0x7e, 0xfb, 0x74, 0xca, + 0xfa, 0xeb, 0xd9, 0xf8, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xc2, 0xcf, 0xda, 0x1b, 0xec, 0x07, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/inflation/types/tx.pb.go b/x/inflation/types/tx.pb.go index ab332dea7..78d8f2131 100644 --- a/x/inflation/types/tx.pb.go +++ b/x/inflation/types/tx.pb.go @@ -286,49 +286,49 @@ func init() { func init() { proto.RegisterFile("nibiru/inflation/v1/tx.proto", fileDescriptor_9f6843f876608d76) } var fileDescriptor_9f6843f876608d76 = []byte{ - // 660 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x31, 0x4f, 0xdb, 0x40, - 0x14, 0x8e, 0x21, 0x0d, 0x70, 0xa8, 0x85, 0x98, 0x16, 0xa5, 0x29, 0xb5, 0x23, 0x23, 0x95, 0x50, - 0x84, 0x4f, 0x81, 0x8d, 0xd1, 0x40, 0x25, 0x86, 0x54, 0x91, 0xd5, 0xa1, 0x45, 0xaa, 0xd0, 0x39, - 0x3e, 0xcc, 0xa9, 0xf6, 0x9d, 0x75, 0x77, 0x41, 0xc9, 0xda, 0xa9, 0x23, 0x52, 0xff, 0x00, 0x63, - 0x7f, 0x40, 0xff, 0x41, 0x17, 0x46, 0xa4, 0x2e, 0x55, 0x87, 0xa8, 0x82, 0x0e, 0x9d, 0xf9, 0x05, - 0x95, 0x7d, 0x8e, 0x89, 0x8a, 0x91, 0x0a, 0x83, 0x65, 0xdf, 0xbd, 0xef, 0x7d, 0xef, 0x7b, 0xe7, - 0xef, 0x1d, 0x58, 0xa2, 0xc4, 0x23, 0xbc, 0x07, 0x09, 0x3d, 0x0c, 0x91, 0x24, 0x8c, 0xc2, 0xe3, - 0x16, 0x94, 0x7d, 0x3b, 0xe6, 0x4c, 0x32, 0x7d, 0x41, 0x45, 0xed, 0x3c, 0x6a, 0x1f, 0xb7, 0xea, - 0x8f, 0x03, 0x16, 0xb0, 0x34, 0x0e, 0x93, 0x2f, 0x05, 0xad, 0x2f, 0x05, 0x8c, 0x05, 0x21, 0x86, - 0x28, 0x26, 0x10, 0x51, 0xca, 0x64, 0x8a, 0x17, 0x59, 0x74, 0xb9, 0xa8, 0xcc, 0x35, 0xab, 0x02, - 0x19, 0x5d, 0x26, 0x22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 0xb2, 0x2d, 0x02, 0xfd, 0x44, 0x03, 0x73, 0xff, 0x0e, 0xdb, 0x4a, 0xa1, 0x81, 0x6e, 0xf6, - 0x5e, 0x87, 0xff, 0x09, 0xcc, 0x8f, 0x60, 0xf9, 0xe3, 0xf7, 0xdf, 0x9f, 0x27, 0x9e, 0x5b, 0xcf, - 0x60, 0xe1, 0x8d, 0x94, 0x66, 0xe9, 0x5f, 0x34, 0xb0, 0x50, 0x34, 0x9b, 0x6b, 0xb7, 0x55, 0x2b, - 0x00, 0xd7, 0x37, 0xef, 0x00, 0xce, 0xe5, 0xc1, 0x54, 0xde, 0xaa, 0xb5, 0x72, 0x53, 0x1e, 0xf6, - 0x89, 0x5c, 0xcf, 0x97, 0xeb, 0x71, 0x9a, 0xe8, 0xec, 0x9d, 0x5d, 0x18, 0xda, 0xf9, 0x85, 0xa1, - 0xfd, 0xba, 0x30, 0xb4, 0x93, 0x4b, 0xa3, 0x74, 0x7e, 0x69, 0x94, 0x7e, 0x5c, 0x1a, 0xa5, 0x7d, - 0x38, 0xe6, 0xb4, 0xd7, 0x29, 0xd9, 0xf6, 0x11, 0x22, 0x74, 0x44, 0xdc, 0x1f, 0xa3, 0x4e, 0x6d, - 0xe7, 0x55, 0xd2, 0xeb, 0x6f, 0xf3, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4c, 0x43, 0x97, 0xb5, - 0xac, 0x05, 0x00, 0x00, + // 664 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xc1, 0x4e, 0xdb, 0x4a, + 0x14, 0x8d, 0x21, 0x2f, 0xc0, 0xa0, 0x57, 0x88, 0x69, 0x51, 0x9a, 0x52, 0x3b, 0x32, 0x52, 0x09, + 0x45, 0x78, 0x94, 0xb0, 0x63, 0x69, 0xa0, 0x12, 0x52, 0x53, 0x45, 0x56, 0x17, 0x2d, 0x52, 0x85, + 0xc6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0x62, 0x33, 0x5b, 0x6e, 0x86, 0x49, 0xa2, 0xf5, 0xf2, 0xec, 0x42, 0x53, 0xce, + 0x2f, 0x34, 0xe5, 0xe7, 0x85, 0xa6, 0x9c, 0x5c, 0x6a, 0xa5, 0xf3, 0x4b, 0xad, 0xf4, 0xfd, 0x52, + 0x2b, 0x1d, 0xb4, 0x73, 0x4e, 0x7b, 0x95, 0x90, 0xed, 0x1c, 0x23, 0x42, 0x27, 0xc4, 0x83, 0x36, + 0x1c, 0xe6, 0xd8, 0x13, 0xe7, 0x39, 0x95, 0xe4, 0x06, 0xdc, 0xfa, 0x13, 0x00, 0x00, 0xff, 0xff, + 0xbc, 0xc6, 0x23, 0xe2, 0xaf, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/oracle/abci.go b/x/oracle/abci.go index be80ea9ac..fb7b62481 100644 --- a/x/oracle/abci.go +++ b/x/oracle/abci.go @@ -3,8 +3,8 @@ package oracle import ( "time" - "github.com/NibiruChain/nibiru/x/oracle/keeper" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/oracle/keeper" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/oracle/abci_test.go b/x/oracle/abci_test.go index bb6077c21..2db3a55df 100644 --- a/x/oracle/abci_test.go +++ b/x/oracle/abci_test.go @@ -6,10 +6,10 @@ import ( "cosmossdk.io/math" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/oracle/keeper" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/oracle/keeper" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) func TestOracleTallyTiming(t *testing.T) { diff --git a/x/oracle/client/cli/gen_pricefeeder_delegation.go b/x/oracle/client/cli/gen_pricefeeder_delegation.go index 1dd5d599d..fe95ffcd1 100644 --- a/x/oracle/client/cli/gen_pricefeeder_delegation.go +++ b/x/oracle/client/cli/gen_pricefeeder_delegation.go @@ -14,7 +14,7 @@ import ( genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/spf13/cobra" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) const ( diff --git a/x/oracle/client/cli/gen_pricefeeder_delegation_test.go b/x/oracle/client/cli/gen_pricefeeder_delegation_test.go index 04dbb081b..a2bde2e6b 100644 --- a/x/oracle/client/cli/gen_pricefeeder_delegation_test.go +++ b/x/oracle/client/cli/gen_pricefeeder_delegation_test.go @@ -4,10 +4,10 @@ import ( "fmt" "testing" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/app/appconst" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/oracle/client/cli" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/app/appconst" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/oracle/client/cli" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/stretchr/testify/require" diff --git a/x/oracle/client/cli/query.go b/x/oracle/client/cli/query.go index e41200c39..1cf6a8157 100644 --- a/x/oracle/client/cli/query.go +++ b/x/oracle/client/cli/query.go @@ -6,8 +6,8 @@ import ( "github.com/spf13/cobra" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" diff --git a/x/oracle/client/cli/tx.go b/x/oracle/client/cli/tx.go index f52e195dd..567c15980 100644 --- a/x/oracle/client/cli/tx.go +++ b/x/oracle/client/cli/tx.go @@ -6,7 +6,7 @@ import ( "github.com/pkg/errors" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" diff --git a/x/oracle/genesis.go b/x/oracle/genesis.go index a6635d1eb..3d6937e5e 100644 --- a/x/oracle/genesis.go +++ b/x/oracle/genesis.go @@ -7,9 +7,9 @@ import ( "github.com/NibiruChain/collections" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/oracle/keeper" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/oracle/keeper" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) // InitGenesis initialize default parameters diff --git a/x/oracle/genesis_test.go b/x/oracle/genesis_test.go index 9891b5272..f0e1c9dfb 100644 --- a/x/oracle/genesis_test.go +++ b/x/oracle/genesis_test.go @@ -7,9 +7,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/oracle" - "github.com/NibiruChain/nibiru/x/oracle/keeper" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/oracle" + "github.com/NibiruChain/nibiru/v2/x/oracle/keeper" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) func TestExportInitGenesis(t *testing.T) { diff --git a/x/oracle/integration/action/price.go b/x/oracle/integration/action/price.go index 0d80f5e10..2cd9114bc 100644 --- a/x/oracle/integration/action/price.go +++ b/x/oracle/integration/action/price.go @@ -7,10 +7,10 @@ import ( "github.com/NibiruChain/collections" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/testutil/action" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/action" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) func SetOraclePrice(pair asset.Pair, price sdk.Dec) action.Action { diff --git a/x/oracle/keeper/app_test.go b/x/oracle/keeper/app_test.go index 125ff8e99..aac101285 100644 --- a/x/oracle/keeper/app_test.go +++ b/x/oracle/keeper/app_test.go @@ -11,13 +11,13 @@ import ( "cosmossdk.io/math" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/genesis" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/common/testutil/testnetwork" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/genesis" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testnetwork" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) var _ suite.TearDownAllSuite = (*TestSuite)(nil) diff --git a/x/oracle/keeper/ballot.go b/x/oracle/keeper/ballot.go index 0e0adc8de..134523136 100644 --- a/x/oracle/keeper/ballot.go +++ b/x/oracle/keeper/ballot.go @@ -9,10 +9,10 @@ import ( "cosmossdk.io/math" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/omap" - "github.com/NibiruChain/nibiru/x/common/set" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/omap" + "github.com/NibiruChain/nibiru/v2/x/common/set" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) // groupVotesByPair takes a collection of votes and groups them by their diff --git a/x/oracle/keeper/ballot_test.go b/x/oracle/keeper/ballot_test.go index 9245d5dd5..bae2ed21a 100644 --- a/x/oracle/keeper/ballot_test.go +++ b/x/oracle/keeper/ballot_test.go @@ -15,11 +15,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/common/set" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/set" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) func TestGroupVotesByPair(t *testing.T) { diff --git a/x/oracle/keeper/hooks.go b/x/oracle/keeper/hooks.go index 077361353..ec4c50fe0 100644 --- a/x/oracle/keeper/hooks.go +++ b/x/oracle/keeper/hooks.go @@ -5,8 +5,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/keeper" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - "github.com/NibiruChain/nibiru/x/epochs/types" - oracletypes "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/epochs/types" + oracletypes "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) var _ types.EpochHooks = Hooks{} diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index 9ebd24b43..32d2b8b63 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -15,8 +15,8 @@ import ( "github.com/NibiruChain/collections" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) // Keeper of the oracle store diff --git a/x/oracle/keeper/msg_server.go b/x/oracle/keeper/msg_server.go index c21a8dcd5..056340772 100644 --- a/x/oracle/keeper/msg_server.go +++ b/x/oracle/keeper/msg_server.go @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) type msgServer struct { diff --git a/x/oracle/keeper/msg_server_test.go b/x/oracle/keeper/msg_server_test.go index 0c833dc98..4b8aa0714 100644 --- a/x/oracle/keeper/msg_server_test.go +++ b/x/oracle/keeper/msg_server_test.go @@ -8,9 +8,9 @@ import ( "cosmossdk.io/math" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) func TestFeederDelegation(t *testing.T) { diff --git a/x/oracle/keeper/params.go b/x/oracle/keeper/params.go index f45f7b3fb..17a0d2003 100644 --- a/x/oracle/keeper/params.go +++ b/x/oracle/keeper/params.go @@ -1,8 +1,8 @@ package keeper import ( - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/oracle/keeper/params_test.go b/x/oracle/keeper/params_test.go index d574440ca..869afe972 100644 --- a/x/oracle/keeper/params_test.go +++ b/x/oracle/keeper/params_test.go @@ -6,9 +6,9 @@ import ( "cosmossdk.io/math" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) func TestParams(t *testing.T) { diff --git a/x/oracle/keeper/querier.go b/x/oracle/keeper/querier.go index 7e298c6d4..576c5c72b 100644 --- a/x/oracle/keeper/querier.go +++ b/x/oracle/keeper/querier.go @@ -9,8 +9,8 @@ import ( "github.com/NibiruChain/collections" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) // querier is used as Keeper will have duplicate methods if used directly, and gRPC names take precedence over q diff --git a/x/oracle/keeper/querier_test.go b/x/oracle/keeper/querier_test.go index be92c347d..8db8f2749 100644 --- a/x/oracle/keeper/querier_test.go +++ b/x/oracle/keeper/querier_test.go @@ -10,11 +10,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - testutilevents "github.com/NibiruChain/nibiru/x/common/testutil" + testutilevents "github.com/NibiruChain/nibiru/v2/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) func TestQueryParams(t *testing.T) { diff --git a/x/oracle/keeper/reward.go b/x/oracle/keeper/reward.go index 35688c2da..c1f7f6480 100644 --- a/x/oracle/keeper/reward.go +++ b/x/oracle/keeper/reward.go @@ -6,7 +6,7 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) func (k Keeper) AllocateRewards(ctx sdk.Context, funderModule string, totalCoins sdk.Coins, votePeriods uint64) error { diff --git a/x/oracle/keeper/reward_test.go b/x/oracle/keeper/reward_test.go index 47f3b8f73..4bbcfb84c 100644 --- a/x/oracle/keeper/reward_test.go +++ b/x/oracle/keeper/reward_test.go @@ -9,10 +9,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/common" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/common" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) func TestKeeperRewardsDistributionMultiVotePeriods(t *testing.T) { diff --git a/x/oracle/keeper/slash_test.go b/x/oracle/keeper/slash_test.go index 51f8d0436..8b851f458 100644 --- a/x/oracle/keeper/slash_test.go +++ b/x/oracle/keeper/slash_test.go @@ -13,9 +13,9 @@ import ( "github.com/NibiruChain/collections" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) func TestSlashAndResetMissCounters(t *testing.T) { diff --git a/x/oracle/keeper/sudo.go b/x/oracle/keeper/sudo.go index 0843ae882..8af7dbf09 100644 --- a/x/oracle/keeper/sudo.go +++ b/x/oracle/keeper/sudo.go @@ -6,8 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/common/asset" - oracletypes "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + oracletypes "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) // Sudo extends the Keeper with sudo functions. See sudo.go. Sudo is syntactic diff --git a/x/oracle/keeper/sudo_test.go b/x/oracle/keeper/sudo_test.go index 36cc88a92..f52d7f427 100644 --- a/x/oracle/keeper/sudo_test.go +++ b/x/oracle/keeper/sudo_test.go @@ -8,10 +8,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - oraclekeeper "github.com/NibiruChain/nibiru/x/oracle/keeper" - oracletypes "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + oraclekeeper "github.com/NibiruChain/nibiru/v2/x/oracle/keeper" + oracletypes "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) // TestSuiteOracleSudo tests sudo-only functions in the oracle module. diff --git a/x/oracle/keeper/test_utils.go b/x/oracle/keeper/test_utils.go index 72f91aada..692b52623 100644 --- a/x/oracle/keeper/test_utils.go +++ b/x/oracle/keeper/test_utils.go @@ -6,11 +6,11 @@ import ( "time" "cosmossdk.io/math" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/oracle/types" - "github.com/NibiruChain/nibiru/x/sudo" - sudokeeper "github.com/NibiruChain/nibiru/x/sudo/keeper" - sudotypes "github.com/NibiruChain/nibiru/x/sudo/types" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/sudo" + sudokeeper "github.com/NibiruChain/nibiru/v2/x/sudo/keeper" + sudotypes "github.com/NibiruChain/nibiru/v2/x/sudo/types" dbm "github.com/cometbft/cometbft-db" "github.com/cometbft/cometbft/crypto" "github.com/cometbft/cometbft/crypto/secp256k1" diff --git a/x/oracle/keeper/update_exchange_rates.go b/x/oracle/keeper/update_exchange_rates.go index 5d0eb2924..177b4eaba 100644 --- a/x/oracle/keeper/update_exchange_rates.go +++ b/x/oracle/keeper/update_exchange_rates.go @@ -5,10 +5,10 @@ import ( "github.com/NibiruChain/collections" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/omap" - "github.com/NibiruChain/nibiru/x/common/set" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/omap" + "github.com/NibiruChain/nibiru/v2/x/common/set" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) // UpdateExchangeRates updates the ExchangeRates, this is supposed to be executed on EndBlock. diff --git a/x/oracle/keeper/update_exchange_rates_test.go b/x/oracle/keeper/update_exchange_rates_test.go index 80e5b877f..9c3ed2c95 100644 --- a/x/oracle/keeper/update_exchange_rates_test.go +++ b/x/oracle/keeper/update_exchange_rates_test.go @@ -15,10 +15,10 @@ import ( sdkmath "cosmossdk.io/math" "github.com/NibiruChain/collections" - "github.com/NibiruChain/nibiru/x/common" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/common" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) func TestOracleThreshold(t *testing.T) { diff --git a/x/oracle/keeper/whitelist.go b/x/oracle/keeper/whitelist.go index f1662c19e..224b7d5ca 100644 --- a/x/oracle/keeper/whitelist.go +++ b/x/oracle/keeper/whitelist.go @@ -5,8 +5,8 @@ import ( "github.com/NibiruChain/collections" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/set" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/set" ) // IsWhitelistedPair returns existence of a pair in the voting target list diff --git a/x/oracle/keeper/whitelist_test.go b/x/oracle/keeper/whitelist_test.go index 6061d73e3..5f24606df 100644 --- a/x/oracle/keeper/whitelist_test.go +++ b/x/oracle/keeper/whitelist_test.go @@ -9,9 +9,9 @@ import ( "github.com/NibiruChain/collections" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/common/set" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/set" ) func TestKeeper_GetVoteTargets(t *testing.T) { diff --git a/x/oracle/module.go b/x/oracle/module.go index d69df8fdc..d3d5fd4ec 100644 --- a/x/oracle/module.go +++ b/x/oracle/module.go @@ -18,10 +18,10 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/NibiruChain/nibiru/x/oracle/client/cli" - "github.com/NibiruChain/nibiru/x/oracle/keeper" - "github.com/NibiruChain/nibiru/x/oracle/simulation" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/oracle/client/cli" + "github.com/NibiruChain/nibiru/v2/x/oracle/keeper" + "github.com/NibiruChain/nibiru/v2/x/oracle/simulation" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) var ( diff --git a/x/oracle/simulation/decoder.go b/x/oracle/simulation/decoder.go index 25935f631..0400b1552 100644 --- a/x/oracle/simulation/decoder.go +++ b/x/oracle/simulation/decoder.go @@ -10,7 +10,7 @@ import ( "github.com/NibiruChain/collections" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) // NewDecodeStore returns a decoder function closure that unmarshals the KVPair's diff --git a/x/oracle/simulation/decoder_test.go b/x/oracle/simulation/decoder_test.go index f1d5c7702..593d05294 100644 --- a/x/oracle/simulation/decoder_test.go +++ b/x/oracle/simulation/decoder_test.go @@ -11,11 +11,11 @@ import ( gogotypes "github.com/cosmos/gogoproto/types" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/oracle/keeper" - sim "github.com/NibiruChain/nibiru/x/oracle/simulation" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/oracle/keeper" + sim "github.com/NibiruChain/nibiru/v2/x/oracle/simulation" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) var ( diff --git a/x/oracle/simulation/genesis.go b/x/oracle/simulation/genesis.go index 3bae9471b..ad0a3a017 100644 --- a/x/oracle/simulation/genesis.go +++ b/x/oracle/simulation/genesis.go @@ -7,14 +7,14 @@ import ( "fmt" "math/rand" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) // Simulation parameter constants diff --git a/x/oracle/simulation/operations.go b/x/oracle/simulation/operations.go index 16a105010..935520c1b 100644 --- a/x/oracle/simulation/operations.go +++ b/x/oracle/simulation/operations.go @@ -10,8 +10,8 @@ import ( "github.com/CosmWasm/wasmd/app/params" "github.com/cosmos/cosmos-sdk/types/module/testutil" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" helpers "github.com/cosmos/cosmos-sdk/testutil/sims" @@ -21,8 +21,8 @@ import ( simtypes "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/cosmos/cosmos-sdk/x/simulation" - "github.com/NibiruChain/nibiru/x/oracle/keeper" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/oracle/keeper" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) // Simulation operation weights constants diff --git a/x/oracle/types/ballot.go b/x/oracle/types/ballot.go index 4311db6fc..90276f402 100644 --- a/x/oracle/types/ballot.go +++ b/x/oracle/types/ballot.go @@ -7,8 +7,8 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/common" - "github.com/NibiruChain/nibiru/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common" + "github.com/NibiruChain/nibiru/v2/x/common/asset" ) // NOTE: we don't need to implement proto interface on this file diff --git a/x/oracle/types/ballot_test.go b/x/oracle/types/ballot_test.go index 317a6ff2c..af19bd2c7 100644 --- a/x/oracle/types/ballot_test.go +++ b/x/oracle/types/ballot_test.go @@ -7,8 +7,8 @@ import ( "strconv" "testing" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" "github.com/stretchr/testify/require" @@ -19,7 +19,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) func TestExchangeRateVotesToMap(t *testing.T) { diff --git a/x/oracle/types/event.pb.go b/x/oracle/types/event.pb.go index fb48c177f..990920c18 100644 --- a/x/oracle/types/event.pb.go +++ b/x/oracle/types/event.pb.go @@ -358,39 +358,40 @@ func init() { func init() { proto.RegisterFile("nibiru/oracle/v1/event.proto", fileDescriptor_94ec441b793fc0ea) } var fileDescriptor_94ec441b793fc0ea = []byte{ - // 510 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0xdd, 0x6e, 0xd3, 0x30, - 0x14, 0x6e, 0xe8, 0x56, 0x51, 0xb7, 0x48, 0x93, 0x05, 0xa8, 0x94, 0x2e, 0xdd, 0x3a, 0x09, 0xf5, - 0x02, 0x12, 0x0d, 0x9e, 0x80, 0xb6, 0xdb, 0xdd, 0x50, 0x15, 0xc1, 0x26, 0x71, 0x53, 0xb9, 0xc9, - 0x99, 0x6b, 0x91, 0xd8, 0x91, 0xed, 0x26, 0xe3, 0x29, 0xe0, 0x1d, 0xb8, 0xe3, 0x49, 0x76, 0xb9, - 0x4b, 0xc4, 0xc5, 0x40, 0xed, 0x8b, 0x20, 0x3b, 0xee, 0xf8, 0xd9, 0x05, 0xd2, 0xae, 0x72, 0xfc, - 0x7d, 0x9f, 0xbf, 0x7c, 0xc9, 0x39, 0x07, 0xf5, 0x38, 0x9b, 0x33, 0xb9, 0x0c, 0x85, 0x24, 0x71, - 0x0a, 0x61, 0x71, 0x18, 0x42, 0x01, 0x5c, 0x07, 0xb9, 0x14, 0x5a, 0xe0, 0x9d, 0x8a, 0x0d, 0x2a, - 0x36, 0x28, 0x0e, 0xbb, 0xbb, 0xb7, 0xf4, 0x8e, 0xb3, 0x17, 0xba, 0x0f, 0xa9, 0xa0, 0xc2, 0x96, - 0xa1, 0xa9, 0x1c, 0xda, 0xa3, 0x42, 0xd0, 0x14, 0x42, 0x92, 0xb3, 0x90, 0x70, 0x2e, 0x34, 0xd1, - 0x4c, 0x70, 0x55, 0xb1, 0x83, 0x4f, 0x1e, 0xda, 0x39, 0x32, 0x2f, 0x9d, 0x4a, 0x16, 0xc3, 0xbb, - 0x3c, 0x21, 0x1a, 0x30, 0x46, 0x5b, 0x39, 0x61, 0xb2, 0xe3, 0xed, 0x79, 0xc3, 0x66, 0x64, 0x6b,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 0x9d, 0x82, 0x3c, 0x17, 0x32, 0x23, 0x3c, 0xfe, 0x9f, - 0xe7, 0x3e, 0x6a, 0x17, 0x42, 0x33, 0x4e, 0x67, 0xb9, 0x28, 0x9d, 0x73, 0x3d, 0x6a, 0x55, 0xd8, - 0xd4, 0x40, 0xf8, 0x00, 0x3d, 0x90, 0x50, 0x12, 0x99, 0xcc, 0x4a, 0x60, 0x74, 0xa1, 0x5d, 0x2f, - 0xdb, 0x15, 0x78, 0x66, 0x31, 0xfc, 0x14, 0x35, 0x4b, 0xc6, 0x67, 0xb1, 0x58, 0x72, 0xdd, 0xd9, - 0xb2, 0x82, 0xfb, 0x25, 0xe3, 0x63, 0x73, 0x36, 0x0e, 0x64, 0xae, 0x34, 0xb9, 0x11, 0x6c, 0x57, - 0x0e, 0x0e, 0xac, 0x44, 0xbb, 0x08, 0x65, 0x4c, 0x29, 0xa7, 0x68, 0x58, 0x45, 0xd3, 0x20, 0x96, - 0x1e, 0x1d, 0x5f, 0xae, 0x7c, 0xef, 0x6a, 0xe5, 0x7b, 0x3f, 0x57, 0xbe, 0xf7, 0x79, 0xed, 0xd7, - 0xae, 0xd6, 0x7e, 0xed, 0xdb, 0xda, 0xaf, 0xbd, 0x7f, 0xfe, 0xc7, 0x64, 0xbe, 0xb1, 0x0d, 0x1a, - 0x2f, 0x08, 0xe3, 0xa1, 0xdb, 0xa1, 0x8b, 0xcd, 0x16, 0xd9, 0x19, 0x9d, 0x37, 0xec, 0x3a, 0xbc, - 0xfa, 0x15, 0x00, 0x00, 0xff, 0xff, 0x5f, 0xd7, 0x9a, 0x89, 0x93, 0x03, 0x00, 0x00, + // 513 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0xcb, 0x6e, 0x13, 0x31, + 0x14, 0xcd, 0x90, 0x36, 0x22, 0x4e, 0x90, 0x2a, 0x0b, 0x50, 0x08, 0xe9, 0xa4,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 0x05, 0x70, 0x36, 0x37, 0xbe, + 0x97, 0xcd, 0x12, 0x3c, 0x73, 0x18, 0x7e, 0x8a, 0xea, 0x05, 0x17, 0x93, 0x44, 0x2e, 0x85, 0x69, + 0x6d, 0x39, 0xc1, 0xfd, 0x82, 0x8b, 0xa1, 0x3d, 0x5b, 0x07, 0x3a, 0xd5, 0x86, 0xde, 0x08, 0xb6, + 0x4b, 0x07, 0x0f, 0x96, 0xa2, 0x5d, 0x84, 0x52, 0xae, 0xb5, 0x57, 0xd4, 0x9c, 0xa2, 0x6e, 0x11, + 0x47, 0x0f, 0x5e, 0x5f, 0xae, 0xc2, 0xe0, 0x6a, 0x15, 0x06, 0x3f, 0x57, 0x61, 0xf0, 0x79, 0x1d, + 0x56, 0xae, 0xd6, 0x61, 0xe5, 0xdb, 0x3a, 0xac, 0xbc, 0x27, 0x7f, 0x4c, 0xe6, 0x1b, 0xd7, 0xa0, + 0xe1, 0x9c, 0x72, 0x41, 0xfc, 0x0e, 0xe5, 0x47, 0xe4, 0x62, 0xb3, 0x48, 0x6e, 0x4c, 0xa7, 0x35, + 0xb7, 0x11, 0x2f, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0x14, 0xe0, 0x93, 0xd3, 0x96, 0x03, 0x00, + 0x00, } func (m *EventPriceUpdate) Marshal() (dAtA []byte, err error) { diff --git a/x/oracle/types/genesis.go b/x/oracle/types/genesis.go index 18aa327ed..dd5f3f842 100644 --- a/x/oracle/types/genesis.go +++ b/x/oracle/types/genesis.go @@ -5,7 +5,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" - "github.com/NibiruChain/nibiru/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/asset" ) // NewGenesisState creates a new GenesisState object diff --git a/x/oracle/types/genesis.pb.go b/x/oracle/types/genesis.pb.go index 6f7706c1e..d6f7a6014 100644 --- a/x/oracle/types/genesis.pb.go +++ b/x/oracle/types/genesis.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - github_com_NibiruChain_nibiru_x_common_asset "github.com/NibiruChain/nibiru/x/common/asset" + github_com_NibiruChain_nibiru_v2_x_common_asset "github.com/NibiruChain/nibiru/v2/x/common/asset" _ "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" @@ -27,14 +27,14 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the oracle module's genesis state. type GenesisState struct { - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` - FeederDelegations []FeederDelegation `protobuf:"bytes,2,rep,name=feeder_delegations,json=feederDelegations,proto3" json:"feeder_delegations"` - ExchangeRates ExchangeRateTuples `protobuf:"bytes,3,rep,name=exchange_rates,json=exchangeRates,proto3,castrepeated=ExchangeRateTuples" json:"exchange_rates"` - MissCounters []MissCounter `protobuf:"bytes,4,rep,name=miss_counters,json=missCounters,proto3" json:"miss_counters"` - AggregateExchangeRatePrevotes []AggregateExchangeRatePrevote `protobuf:"bytes,5,rep,name=aggregate_exchange_rate_prevotes,json=aggregateExchangeRatePrevotes,proto3" json:"aggregate_exchange_rate_prevotes"` - AggregateExchangeRateVotes []AggregateExchangeRateVote `protobuf:"bytes,6,rep,name=aggregate_exchange_rate_votes,json=aggregateExchangeRateVotes,proto3" json:"aggregate_exchange_rate_votes"` - Pairs []github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,7,rep,name=pairs,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pairs"` - Rewards []Rewards `protobuf:"bytes,8,rep,name=rewards,proto3" json:"rewards"` + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + FeederDelegations []FeederDelegation `protobuf:"bytes,2,rep,name=feeder_delegations,json=feederDelegations,proto3" json:"feeder_delegations"` + ExchangeRates ExchangeRateTuples `protobuf:"bytes,3,rep,name=exchange_rates,json=exchangeRates,proto3,castrepeated=ExchangeRateTuples" json:"exchange_rates"` + MissCounters []MissCounter `protobuf:"bytes,4,rep,name=miss_counters,json=missCounters,proto3" json:"miss_counters"` + AggregateExchangeRatePrevotes []AggregateExchangeRatePrevote `protobuf:"bytes,5,rep,name=aggregate_exchange_rate_prevotes,json=aggregateExchangeRatePrevotes,proto3" json:"aggregate_exchange_rate_prevotes"` + AggregateExchangeRateVotes []AggregateExchangeRateVote `protobuf:"bytes,6,rep,name=aggregate_exchange_rate_votes,json=aggregateExchangeRateVotes,proto3" json:"aggregate_exchange_rate_votes"` + Pairs []github_com_NibiruChain_nibiru_v2_x_common_asset.Pair `protobuf:"bytes,7,rep,name=pairs,proto3,customtype=github.com/NibiruChain/nibiru/v2/x/common/asset.Pair" json:"pairs"` + Rewards []Rewards `protobuf:"bytes,8,rep,name=rewards,proto3" json:"rewards"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -237,42 +237,42 @@ func init() { func init() { proto.RegisterFile("nibiru/oracle/v1/genesis.proto", fileDescriptor_d88ebb2fa2659942) } var fileDescriptor_d88ebb2fa2659942 = []byte{ - // 546 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x5f, 0x6b, 0x13, 0x4d, - 0x14, 0xc6, 0xb3, 0xfd, 0xfb, 0x76, 0xd2, 0x94, 0x74, 0x78, 0x2f, 0xd6, 0x40, 0x36, 0x31, 0x22, - 0x04, 0x2a, 0xbb, 0xa4, 0x82, 0xd0, 0xcb, 0xa6, 0x5a, 0xbd, 0x51, 0xc3, 0x2a, 0x0a, 0x82, 0x84, - 0xc9, 0xee, 0xc9, 0x66, 0x20, 0xbb, 0xb3, 0xcc, 0x99, 0xc4, 0x7a, 0xe1, 0x77, 0xf0, 0x73, 0xf8, - 0x49, 0x7a, 0x59, 0xbc, 0x12, 0x2f, 0xaa, 0x24, 0x5f, 0x44, 0x76, 0x66, 0xdb, 0xc4, 0x6c, 0xab, - 0xde, 0x85, 0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 0x66, 0x7a, 0x6c, 0x86, 0xf4, 0x80, 0xec, 0x4f, 0xd9, 0x98, 0x87, 0x4c, 0x89, 0x05, 0xb9, 0xa6, - 0xc9, 0xea, 0xb5, 0x90, 0xc3, 0xad, 0xf7, 0xa4, 0xbc, 0xd4, 0x85, 0x9b, 0x77, 0xad, 0x9b, 0x77, - 0xe9, 0x5d, 0xb2, 0xbb, 0x5c, 0x37, 0x9d, 0xb1, 0xe1, 0x97, 0x97, 0x8a, 0xd4, 0x3d, 0x3d, 0x9f, - 0x39, 0xd6, 0xc5, 0xcc, 0xb1, 0x7e, 0xce, 0x1c, 0xeb, 0xf3, 0xdc, 0x29, 0x5d, 0xcc, 0x9d, 0xd2, - 0xb7, 0xb9, 0x53, 0x7a, 0xf7, 0xe0, 0x6f, 0xdf, 0x6a, 0xfe, 0x6f, 0xa0, 0x3e, 0xa6, 0x80, 0x83, - 0x2d, 0xfd, 0x53, 0x7f, 0xf8, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x56, 0x94, 0xe7, 0x7b, 0x73, 0x04, - 0x00, 0x00, + // 549 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4f, 0x6b, 0x13, 0x41, + 0x18, 0xc6, 0xb3, 0x6d, 0x93, 0xda, 0x49, 0x52, 0xd2, 0xc1, 0xc3, 0x1a, 0xc8, 0x26, 0x46, 0x84, + 0x40, 0x61, 0x87, 0x44, 0x11, 0x04, 0x2f, 0x4d, 0xfd, 0x7b, 0x50, 0xc2, 0x2a, 0x0a, 0x82, 0x84, + 0xc9, 0xee, 0x64, 0x33, 0x90, 0xdd, 0x59, 0xe6, 0x9d, 0xc4, 0x7a, 0xf0, 0x3b, 0xf8, 0x39, 0xfc, + 0x24, 0x3d, 0xf6, 0x22, 0x88, 0x87, 0x2a, 0xc9, 0x17, 0x91, 0x9d, 0xd9, 0x36, 0x31, 0xdb, 0x4a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c, 0x4c, 0xc5, + 0xf7, 0xbc, 0xaa, 0x99, 0x1e, 0x99, 0x21, 0x3e, 0x44, 0x07, 0x73, 0x3a, 0xe5, 0x01, 0x55, 0x62, + 0x45, 0x6e, 0x69, 0xb2, 0x76, 0x29, 0x64, 0x70, 0xfb, 0x13, 0x2a, 0xaf, 0xd5, 0xe1, 0xea, 0x5d, + 0xeb, 0xea, 0x5d, 0x7c, 0x17, 0x55, 0xd6, 0x1b, 0xa7, 0x33, 0x76, 0xbc, 0xf2, 0x5a, 0x97, 0xfa, + 0xaf, 0x4e, 0x17, 0x8e, 0x75, 0xb6, 0x70, 0xac, 0x3f, 0x0b, 0xc7, 0xfa, 0xb6, 0x74, 0x0a, 0x67, + 0x4b, 0xa7, 0xf0, 0x73, 0xe9, 0x14, 0x3e, 0x92, 0x1b, 0x7c, 0xb1, 0xd9, 0x7f, 0x82, 0xfa, 0x92, + 0x30, 0x18, 0x95, 0xf4, 0x0f, 0xfe, 0xc1, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x90, 0xe5, 0x08, + 0xe6, 0x79, 0x04, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -843,7 +843,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_NibiruChain_nibiru_x_common_asset.Pair + var v github_com_NibiruChain_nibiru_v2_x_common_asset.Pair m.Pairs = append(m.Pairs, v) if err := m.Pairs[len(m.Pairs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/oracle/types/genesis_test.go b/x/oracle/types/genesis_test.go index a20b2620c..147e8a0af 100644 --- a/x/oracle/types/genesis_test.go +++ b/x/oracle/types/genesis_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) func TestGenesisValidation(t *testing.T) { diff --git a/x/oracle/types/hash_test.go b/x/oracle/types/hash_test.go index 86b47fb50..752d45de1 100644 --- a/x/oracle/types/hash_test.go +++ b/x/oracle/types/hash_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/oracle/types/msgs_test.go b/x/oracle/types/msgs_test.go index 9f1d9c8f8..265eae0bb 100644 --- a/x/oracle/types/msgs_test.go +++ b/x/oracle/types/msgs_test.go @@ -5,8 +5,8 @@ import ( "cosmossdk.io/math" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" "github.com/stretchr/testify/require" diff --git a/x/oracle/types/oracle.pb.go b/x/oracle/types/oracle.pb.go index 65b124512..3ada32d99 100644 --- a/x/oracle/types/oracle.pb.go +++ b/x/oracle/types/oracle.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - github_com_NibiruChain_nibiru_x_common_asset "github.com/NibiruChain/nibiru/x/common/asset" + github_com_NibiruChain_nibiru_v2_x_common_asset "github.com/NibiruChain/nibiru/v2/x/common/asset" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -48,7 +48,7 @@ type Params struct { RewardBand github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=reward_band,json=rewardBand,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"reward_band" yaml:"reward_band"` // The set of whitelisted markets, or asset pairs, for the module. // Ex. '["unibi:uusd","ubtc:uusd"]' - Whitelist []github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,4,rep,name=whitelist,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"whitelist,omitempty" yaml:"whitelist"` + Whitelist []github_com_NibiruChain_nibiru_v2_x_common_asset.Pair `protobuf:"bytes,4,rep,name=whitelist,proto3,customtype=github.com/NibiruChain/nibiru/v2/x/common/asset.Pair" json:"whitelist,omitempty" yaml:"whitelist"` // SlashFraction returns the proportion of an oracle's stake that gets // slashed in the event of slashing. `SlashFraction` specifies the exact // penalty for failing a voting period. @@ -223,8 +223,8 @@ var xxx_messageInfo_AggregateExchangeRateVote proto.InternalMessageInfo // ExchangeRateTuple - struct to store interpreted exchange rates data to store type ExchangeRateTuple struct { - Pair github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,1,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pair" yaml:"pair"` - ExchangeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=exchange_rate,json=exchangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"exchange_rate" yaml:"exchange_rate"` + Pair github_com_NibiruChain_nibiru_v2_x_common_asset.Pair `protobuf:"bytes,1,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/v2/x/common/asset.Pair" json:"pair" yaml:"pair"` + ExchangeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=exchange_rate,json=exchangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"exchange_rate" yaml:"exchange_rate"` } func (m *ExchangeRateTuple) Reset() { *m = ExchangeRateTuple{} } @@ -383,68 +383,69 @@ func init() { func init() { proto.RegisterFile("nibiru/oracle/v1/oracle.proto", fileDescriptor_43d45df86ea09ed4) } var fileDescriptor_43d45df86ea09ed4 = []byte{ - // 976 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02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e5, 0x6a, 0xff, 0xe0, 0xf9, 0x79, 0xcb, 0x7a, - 0x71, 0xde, 0xb2, 0x5e, 0x9f, 0xb7, 0xac, 0x67, 0x17, 0xad, 0xda, 0x8b, 0x8b, 0x56, 0xed, 0xb7, - 0x8b, 0x56, 0xed, 0xeb, 0x87, 0x7f, 0x35, 0x08, 0xe6, 0x9f, 0x8b, 0xae, 0x52, 0xb0, 0xac, 0x2f, - 0xdc, 0x77, 0xff, 0x08, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x42, 0xc8, 0x75, 0xd7, 0x08, 0x00, 0x00, + // 977 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xf6, 0x26, 0x4e, 0x1a, 0x8f, 0x93, 0x92, 0x4c, 0x53, 0xd8, 0x84, 0xe2, 0x0d, 0x53, 0xa9, + 0xca, 0x01, 0x76, 0x95, 0x50, 0x84, 0x88, 0xc4, 0x81, 0x6d, 0x08, 0x8a, 0x08, 0xc8, 0x1a, 0x55, + 0x20, 0x71, 0x59, 0xcd, 0xee, 0x4e, 0xec, 0x21, 0xbb, 0x3b, 0xd6, 0xcc, 0xda, 0x4e, 0x24, 0xc4, + 0x99, 0x63, 0x4f, 0x88, 0x63, 0xce, 0xdc, 0xb8, 0xf1, 0x27, 0xf4, 0x84, 0x7a, 0x44, 0x3d, 0x6c, + 0xab, 0xe4, 0x52, 0xc1, 0xcd, 0x7f, 0x01, 0x9a, 0xd9, 0x71, 0xbc, 0xc1, 0x3e, 0x34, 0x20, 0x4e, + 0xde, 0xf7, 0xbe, 0x99, 0xef, 0x7d, 0xef, 0xc7, 0xcc, 0x18, 0xbc, 0x93, 0xb1, 0x90, 0x89, 0xbe, + 0xc7, 0x05, 0x89, 0x12, 0xea, 0x0d, 0x76, 0xcc, 0x97, 0xdb, 0x13, 0x3c, 0xe7, 0x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0x7b, 0xb2, 0xfd, 0x1a, 0x8c, 0xf0, 0xb2, 0xb1, 0xf5, 0x54, 0x22, + 0x09, 0x6e, 0x61, 0xfd, 0x06, 0x49, 0x78, 0x1b, 0xcc, 0x31, 0xf3, 0x0e, 0xe3, 0x39, 0x16, 0xc3, + 0x77, 0xc1, 0x72, 0xe5, 0x0d, 0x96, 0x25, 0x31, 0x6e, 0x4e, 0x5e, 0x62, 0x09, 0x3f, 0x04, 0x0b, + 0xea, 0x71, 0x97, 0xf6, 0xbc, 0x9e, 0xcd, 0x0d, 0xb7, 0x4c, 0xc4, 0x55, 0xcf, 0xbf, 0x6b, 0x9e, + 0x7f, 0xf7, 0x11, 0x67, 0x99, 0x5f, 0x57, 0xc9, 0xe3, 0x72, 0xb5, 0x7f, 0xf8, 0xf4, 0xa2, 0x65, + 0x3d, 0xbb, 0x68, 0x59, 0x2f, 0x2f, 0x5a, 0xd6, 0x93, 0xcb, 0x56, 0xed, 0xd9, 0x65, 0xab, 0xf6, + 0xc7, 0x65, 0xab, 0xf6, 0xad, 0xf7, 0x1a, 0xb3, 0x60, 0xfe, 0xc2, 0xe8, 0x42, 0x85, 0x8b, 0xfa, + 0xda, 0xfd, 0xe0, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x89, 0xe7, 0x1a, 0xe9, 0xe0, 0x08, 0x00, + 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -1124,7 +1125,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_NibiruChain_nibiru_x_common_asset.Pair + var v github_com_NibiruChain_nibiru_v2_x_common_asset.Pair m.Whitelist = append(m.Whitelist, v) if err := m.Whitelist[len(m.Whitelist)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/oracle/types/params.go b/x/oracle/types/params.go index b31e8ac7a..a7221ff03 100644 --- a/x/oracle/types/params.go +++ b/x/oracle/types/params.go @@ -6,8 +6,8 @@ import ( "cosmossdk.io/math" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" ) // Parameter keys diff --git a/x/oracle/types/params_test.go b/x/oracle/types/params_test.go index 6fff8f748..0aba109ba 100644 --- a/x/oracle/types/params_test.go +++ b/x/oracle/types/params_test.go @@ -6,7 +6,7 @@ import ( "cosmossdk.io/math" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) func TestParamsEqual(t *testing.T) { diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go index 3d82a1d37..d1462c82e 100644 --- a/x/oracle/types/query.pb.go +++ b/x/oracle/types/query.pb.go @@ -6,7 +6,7 @@ package types import ( context "context" fmt "fmt" - github_com_NibiruChain_nibiru_x_common_asset "github.com/NibiruChain/nibiru/x/common/asset" + github_com_NibiruChain_nibiru_v2_x_common_asset "github.com/NibiruChain/nibiru/v2/x/common/asset" _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -36,7 +36,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // method. type QueryExchangeRateRequest struct { // pair defines the pair to query for. - Pair github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,1,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pair"` + Pair github_com_NibiruChain_nibiru_v2_x_common_asset.Pair `protobuf:"bytes,1,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/v2/x/common/asset.Pair" json:"pair"` } func (m *QueryExchangeRateRequest) Reset() { *m = QueryExchangeRateRequest{} } @@ -239,7 +239,7 @@ var xxx_messageInfo_QueryActivesRequest proto.InternalMessageInfo // Query/Actives RPC method. type QueryActivesResponse struct { // actives defines a list of the pair which oracle prices agreed upon. - Actives []github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,1,rep,name=actives,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"actives"` + Actives []github_com_NibiruChain_nibiru_v2_x_common_asset.Pair `protobuf:"bytes,1,rep,name=actives,proto3,customtype=github.com/NibiruChain/nibiru/v2/x/common/asset.Pair" json:"actives"` } func (m *QueryActivesResponse) Reset() { *m = QueryActivesResponse{} } @@ -318,7 +318,7 @@ var xxx_messageInfo_QueryVoteTargetsRequest proto.InternalMessageInfo type QueryVoteTargetsResponse struct { // vote_targets defines a list of the pairs in which everyone // should vote in the current vote period. - VoteTargets []github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,1,rep,name=vote_targets,json=voteTargets,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"vote_targets"` + VoteTargets []github_com_NibiruChain_nibiru_v2_x_common_asset.Pair `protobuf:"bytes,1,rep,name=vote_targets,json=voteTargets,proto3,customtype=github.com/NibiruChain/nibiru/v2/x/common/asset.Pair" json:"vote_targets"` } func (m *QueryVoteTargetsResponse) Reset() { *m = QueryVoteTargetsResponse{} } @@ -987,77 +987,77 @@ func init() { func init() { proto.RegisterFile("nibiru/oracle/v1/query.proto", fileDescriptor_16aef2382d1249a8) } var fileDescriptor_16aef2382d1249a8 = []byte{ - // 1105 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x97, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xc7, 0x3d, 0x50, 0x52, 0x18, 0xc7, 0xae, 0x33, 0x04, 0x91, 0x6e, 0x13, 0xbb, 0x2c, 0x4d, - 0xd4, 0x36, 0xc9, 0x2e, 0x4e, 0x50, 0x51, 0xf8, 0x21, 0x70, 0x12, 0x22, 0x81, 0x1a, 0x08, 0xa6, - 0x8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 0xe3, 0x1a, 0x7a, 0x7e, 0x7c, 0x1b, 0x69, 0xdb, 0x47, 0x3f, 0x01, 0x58, 0x48, 0xf8, 0x97, - 0xf2, 0x82, 0x1a, 0xe5, 0xe4, 0xca, 0x0b, 0x6a, 0xa4, 0x51, 0xeb, 0x6f, 0x70, 0xd4, 0x2d, 0x54, - 0x53, 0xa3, 0xb6, 0x9c, 0xb1, 0x13, 0xe7, 0xe3, 0xfe, 0x1e, 0xc0, 0x62, 0xd2, 0x77, 0x51, 0x26, - 0x96, 0x68, 0xd0, 0xab, 0x19, 0xb3, 0x25, 0xfa, 0x06, 0x47, 0x5f, 0x47, 0xd5, 0xff, 0x32, 0x65, - 0x31, 0xe2, 0x8f, 0xe0, 0x94, 0xb0, 0x57, 0x74, 0x49, 0xa1, 0x99, 0x70, 0x71, 0x6d, 0x71, 0x4c, - 0x96, 0x24, 0x5a, 0xe4, 0x44, 0x15, 0xb4, 0xa0, 0xbc, 0xc8, 0xb8, 0xa5, 0xef, 0xdc, 0x3f, 0x2e, - 0x83, 0x07, 0xc7, 0x65, 0xf0, 0xd7, 0x71, 0x19, 0x7c, 0x71, 0x52, 0xce, 0x3d, 0x38, 0x29, 0xe7, - 0x7e, 0x3f, 0x29, 0xe7, 0x6e, 0xae, 0x8c, 0xfb, 0xfe, 0x90, 0x05, 0xf9, 0xc7, 0x63, 0x73, 0x8a, - 0x7f, 0x18, 0xaf, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x10, 0x7a, 0x57, 0xeb, 0xbd, 0x0f, 0x00, - 0x00, + // 1108 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x97, 0xc1, 0x6f, 0x1b, 0x45, + 0x14, 0xc6, 0x3d, 0x10, 0x52, 0x78, 0x8e, 0xd3, 0x64, 0x08, 0x22, 0xdd, 0x26, 0x76, 0x59, 0x9a, + 0xa8, 0x6d, 0x9a, 0x5d, 0x9c, 0x54, 0x45, 0x81, 0x22, 0x70, 0x12, 0x2a, 0x15, 0xb5, 0x10, 0x4c, + 0x15, 0xa1, 0x5e, 0xac, 0xf1, 0x7a, 0xba, 0x59, 0x61, 0xef, 0x6c, 0x77, 0xd6, 0xa6, 0x51, 0xe1, + 0x52, 0x01, 0xe2, 0x88, 0x84, 0x10, 0x37, 0xe8, 0x05, 0x09, 0x71, 0x06, 0xee, 0x70, 0xea, 0xb1, + 0x12, 0x17, 0xc4, 0xa1, 0xa0, 0x84, 0x03, 0x7f, 0x06, 0xda, 0xd9, 0xf1, 0x7a, 0xd7, 0xeb, 0x51, + 0x16, 0x97, 0x9e, 0x12, 0xcd, 0x7b, 0xfb, 0xde, 0xef, 0x7d, 0x33, 0x3b, 0x9f, 0x17, 0x16, 0x5c, + 0xa7, 0xe9, 0xf8, 0x5d, 0x93, 0xf9, 0xc4, 0x6a, 0x53, 0xb3, 0x57, 0x35, 0x6f, 0x75, 0xa9, 0xbf, + 0x6f, 0x78, 0x3e, 0x0b, 0x18, 0x9e, 0x89, 0xa2, 0x46, 0x14, 0x35, 0x7a, 0x55, 0x6d, 0xce, 0x66, + 0x36, 0x13, 0x41, 0x33, 0xfc, 0x2f, 0xca, 0xd3, 0x16, 0x6c, 0xc6, 0xec, 0x36, 0x35, 0x89, 0xe7, + 0x98, 0xc4, 0x75, 0x59, 0x40, 0x02, 0x87, 0xb9, 0x5c, 0x46, 0x17, 0x33, 0x3d, 0x64, 0xbd, 0x28, + 0x5c, 0xb6, 0x18, 0xef, 0x30, 0x6e, 0x36, 0x09, 0x0f, 0x83, 0x4d, 0x1a, 0x90, 0xaa, 0x69, 0x31, + 0xc7, 0x8d, 0xe2, 0x7a, 0x0f, 0xe6, 0xdf, 0x0d, 0x99, 0xde, 0xbc, 0x6d, 0xed, 0x11, 0xd7, 0xa6, + 0x75, 0x12, 0xd0, 0x3a, 0xbd, 0xd5, 0xa5, 0x3c, 0xc0, 0x3b, 0x30, 0xe1,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 0xc5, 0x79, 0xa1, 0xe2, 0xa3, 0xfc, 0x52, 0xfe, 0x07, + 0xe4, 0x18, 0x97, 0xc4, 0x18, 0x17, 0xf1, 0x85, 0xa3, 0xc7, 0xc8, 0xda, 0x3e, 0xfe, 0x09, 0x41, + 0x29, 0xe5, 0x5f, 0xca, 0x0b, 0x6a, 0x94, 0x93, 0x2b, 0x2f, 0xa8, 0x91, 0x46, 0xad, 0x5f, 0x11, + 0xa8, 0x5b, 0xb8, 0xa6, 0x46, 0x6d, 0x39, 0x47, 0x2a, 0x2e, 0xe4, 0xfe, 0x1e, 0xc1, 0x74, 0xda, + 0x77, 0x71, 0x2e, 0x96, 0x58, 0xe8, 0xd5, 0x9c, 0xd9, 0x12, 0x7d, 0x43, 0xa0, 0xaf, 0xe3, 0xea, + 0x7f, 0x51, 0x39, 0x92, 0xf8, 0x23, 0x98, 0x8c, 0xec, 0x15, 0x9f, 0x56, 0xf4, 0x4c, 0xb9, 0xb8, + 0xb6, 0x74, 0x44, 0x96, 0x24, 0x5a, 0x12, 0x44, 0x15, 0xbc, 0xa8, 0xbc, 0xc8, 0x84, 0xa5, 0x5f, + 0xb9, 0x7f, 0x50, 0x46, 0x0f, 0x0e, 0xca, 0xe8, 0xaf, 0x83, 0x32, 0xfa, 0xe2, 0xb0, 0x5c, 0x78, + 0x70, 0x58, 0x2e, 0xfc, 0x7e, 0x58, 0x2e, 0xdc, 0x30, 0x73, 0x7c, 0x82, 0xc8, 0x9a, 0xe2, 0x2b, + 0xb2, 0x39, 0x29, 0x3e, 0x92, 0xd7, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xa4, 0xa3, 0x89, 0xf1, + 0xc9, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2915,7 +2915,7 @@ func (m *QueryActivesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_NibiruChain_nibiru_x_common_asset.Pair + var v github_com_NibiruChain_nibiru_v2_x_common_asset.Pair m.Actives = append(m.Actives, v) if err := m.Actives[len(m.Actives)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -3051,7 +3051,7 @@ func (m *QueryVoteTargetsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_NibiruChain_nibiru_x_common_asset.Pair + var v github_com_NibiruChain_nibiru_v2_x_common_asset.Pair m.VoteTargets = append(m.VoteTargets, v) if err := m.VoteTargets[len(m.VoteTargets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/oracle/types/state.pb.go b/x/oracle/types/state.pb.go index 1569bbca1..e0c999aad 100644 --- a/x/oracle/types/state.pb.go +++ b/x/oracle/types/state.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - github_com_NibiruChain_nibiru_x_common_asset "github.com/NibiruChain/nibiru/x/common/asset" + github_com_NibiruChain_nibiru_v2_x_common_asset "github.com/NibiruChain/nibiru/v2/x/common/asset" _ "github.com/cosmos/cosmos-sdk/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -29,8 +29,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // a snapshot of the prices at a given point in time type PriceSnapshot struct { - Pair github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,1,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pair" yaml:"pair"` - Price github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price"` + Pair github_com_NibiruChain_nibiru_v2_x_common_asset.Pair `protobuf:"bytes,1,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/v2/x/common/asset.Pair" json:"pair" yaml:"pair"` + Price github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price"` // milliseconds since unix epoch TimestampMs int64 `protobuf:"varint,3,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"` } @@ -82,28 +82,28 @@ func init() { func init() { proto.RegisterFile("nibiru/oracle/v1/state.proto", fileDescriptor_125e6c5a6e45c0d0) } var fileDescriptor_125e6c5a6e45c0d0 = []byte{ - // 329 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x90, 0x41, 0x4b, 0xf3, 0x30, - 0x18, 0x80, 0xdb, 0x6f, 0x9f, 0x82, 0x9d, 0x82, 0x14, 0x0f, 0x63, 0xcc, 0x6c, 0xee, 0x20, 0x3b, - 0x68, 0x42, 0xf1, 0xe6, 0x71, 0x0e, 0xf1, 0xa2, 0x8c, 0x79, 0x13, 0x41, 0xde, 0xc6, 0xd0, 0x05, - 0x97, 0xbc, 0xa1, 0xc9, 0x86, 0xfb, 0x17, 0xfe, 0xac, 0x1d, 0x77, 0x12, 0xf1, 0x30, 0x64, 0xfb, - 0x07, 0xfe, 0x02, 0x69, 0x53, 0x44, 0xf0, 0xe0, 0xa9, 0x25, 0x4f, 0xf2, 0x3c, 0xc9, 0x1b, 0xb5, - 0xb4, 0x4c, 0x65, 0x3e, 0x65, 0x98, 0x03, 0x9f, 0x08, 0x36, 0x4b, 0x98, 0x75, 0xe0, 0x04, 0x35, - 0x39, 0x3a, 0x8c, 0xf7, 0x3d, 0xa5, 0x9e, 0xd2, 0x59, 0xd2, 0x3c, 0xc8, 0x30, 0xc3, 0x12, 0xb2, - 0xe2, 0xcf, 0xef, 0x6b, 0xb6, 0x32, 0xc4, 0x6c, 0x22, 0x18, 0x18, 0xc9, 0x40, 0x6b, 0x74, 0xe0, - 0x24, 0x6a, 0x5b, 0xd1, 0xc3, 0x5f, 0x8d, 0xca, 0xe7, 0x31, 0xe1, 0x68, 0x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b, 0xd1, 0x23, 0xcc, 0x01, 0x00, 0x00, + // 330 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xb1, 0x4a, 0x03, 0x31, + 0x18, 0xc7, 0xef, 0xac, 0x0a, 0x5e, 0x15, 0xe4, 0x70, 0x28, 0xa5, 0x5e, 0x6b, 0x07, 0xe9, 0xe2, + 0x7d, 0x54, 0x9d, 0x1c, 0x6b, 0x17, 0x11, 0xa5, 0xd4, 0xcd, 0xa5, 0x7c, 0x17, 0xc3, 0x35, 0xd8, + 0xe4, 0x0b, 0x97, 0xb4, 0xd8, 0xb7, 0xf0, 0xb1, 0x3a, 0x76, 0x54, 0x87, 0x22, 0xed, 0x1b, 0xf8, + 0x04, 0x72, 0x97, 0x43, 0x04, 0x17, 0xa7, 0x84, 0xfc, 0x92, 0xff, 0x2f, 0xdf, 0x3f, 0x68, 0x28, + 0x91, 0x88, 0x6c, 0x0a, 0x94, 0x21, 0x9b, 0x70, 0x98, 0x75, 0xc1, 0x58, 0xb4, 0x3c, 0xd6, 0x19, + 0x59, 0x0a, 0x0f, 0x1d, 0x8d, 0x1d, 0x8d, 0x67, 0xdd, 0xfa, 0x51, 0x4a, 0x29, 0x15, 0x10, 0xf2, + 0x9d, 0xbb, 0x57, 0x6f, 0xa4, 0x44, 0xe9, 0x84, 0x03, 0x6a, 0x01, 0xa8, 0x14, 0x59, 0xb4, 0x82, + 0x94, 0x29, 0xe9, 0xf1, 0x1f, 0x47, 0x99, 0xe7, 0x70, 0xc4, 0xc8, 0x48, 0x32, 0x90, 0xa0, 0xc9, + 0x61, 0xc2, 0x2d, 0x76, 0x81, 0x91, 0x50, 0x8e, 0xb7, 0xdf, 0xfd, 0xe0, 0x60, 0x90, 0x09, 0xc6, + 0x1f, 0x14, 0x6a, 0x33, 0x26, 0x1b, 0x8e, 0x82, 0x6d, 0x8d, 0x22, 0xab, 0xf9, 0x2d, 0xbf, 0xb3, + 0xd7, 0xbb, 0x5d, 0xac, 0x9a, 0xde, 0xc7, 0xaa, 0x79, 0x99, 0x0a, 0x3b, 0x9e, 0x26, 0x31, 0x23, + 0x09, 0xf7, 0x85, 0xf1, 0x7a, 0x8c, 0x42, 0x41, 0x69, 0x9f, 0x9d, 0xc3, 0x0b, 0x30, 0x92, 0x92, + 0x14, 0xa0, 0x31, 0xdc, 0xc6, 0x03, 0x14, 0xd9, 0xd7, 0xaa, 0x59, 0x9d, 0xa3, 0x9c, 0x5c, 0xb5, + 0xf3, 0xc4, 0xf6, 0xb0, 0x08, 0x0e, 0xfb, 0xc1, 0x8e, 0xce, 0x8d, 0xb5, 0xad, 0xc2, 0x10, 0x97, + 0x86, 0xd3, 0x5f, 0x86, 0xf2, 0xd3, 0x6e, 0x39, 0x33, 0x4f, 0xcf, 0x60, 0xe7, 0x9a, 0x9b, 0xb8, + 0xcf, 0xd9, 0xd0, 0x3d, 0x0e, 0x4f, 0x82, 0x7d, 0x2b, 0x24, 0x37, 0x16, 0xa5, 0x1e, 0x49, 0x53, + 0xab, 0xb4, 0xfc, 0x4e, 0x65, 0x58, 0xfd, 0x39, 0xbb, 0x33, 0xbd, 0x9b, 0xc5, 0x3a, 0xf2, 0x97, + 0xeb, 0xc8, 0xff, 0x5c, 0x47, 0xfe, 0xeb, 0x26, 0xf2, 0x96, 0x9b, 0xc8, 0x7b, 0xdb, 0x44, 0xde, + 0x23, 0xfc, 0x63, 0x9a, 0xb2, 0xd0, 0x42, 0x9c, 0xec, 0x16, 0x6d, 0x5d, 0x7c, 0x07, 0x00, 0x00, + 0xff, 0xff, 0x75, 0xe2, 0x1a, 0x07, 0xd2, 0x01, 0x00, 0x00, } func (m *PriceSnapshot) Marshal() (dAtA []byte, err error) { diff --git a/x/oracle/types/tx.pb.go b/x/oracle/types/tx.pb.go index 559b17c45..9c33a0e7f 100644 --- a/x/oracle/types/tx.pb.go +++ b/x/oracle/types/tx.pb.go @@ -405,65 +405,65 @@ func init() { func init() { proto.RegisterFile("nibiru/oracle/v1/tx.proto", fileDescriptor_11e362c65eb610f4) } var fileDescriptor_11e362c65eb610f4 = []byte{ - // 915 bytes of a gzipped FileDescriptorProto + // 917 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x96, 0x41, 0x6f, 0xdc, 0x44, - 0x14, 0xc7, 0xd7, 0x4d, 0xba, 0x64, 0x67, 0x49, 0x9b, 0x7a, 0xd3, 0xc8, 0xd9, 0x06, 0x3b, 0xb8, - 0x10, 0x12, 0x89, 0xb5, 0x49, 0x90, 0x40, 0xf4, 0x04, 0x69, 0x1b, 0x09, 0x89, 0xa5, 0xc1, 0x82, - 0x20, 0x71, 0xc0, 0xcc, 0xae, 0x5f, 0x6c, 0x2b, 0x5e, 0x8f, 0x35, 0x33, 0xcd, 0xa6, 0x57, 0xc4, + 0x14, 0xc7, 0xe3, 0x26, 0x5d, 0xb2, 0xb3, 0xa4, 0x4d, 0xbd, 0x69, 0xe4, 0x6c, 0x83, 0x1d, 0x5c, + 0x08, 0xc9, 0x61, 0x6d, 0x12, 0x24, 0x10, 0x3d, 0x41, 0xda, 0x46, 0xaa, 0xc4, 0xd2, 0x60, 0x41, + 0x90, 0x38, 0x60, 0x66, 0xd7, 0x2f, 0xb6, 0x15, 0xaf, 0xc7, 0x9a, 0x99, 0xee, 0xa6, 0x57, 0xc4, 0x01, 0x6e, 0x48, 0x3d, 0x71, 0xcb, 0x07, 0x40, 0xe2, 0x6b, 0xf4, 0x58, 0x89, 0x0b, 0xe2, 0xb0, 0x42, 0x09, 0x42, 0x9c, 0x38, 0xec, 0x27, 0x40, 0x33, 0x1e, 0xbb, 0xdb, 0xcd, 0xb6, 0xcd, 0xee, - 0x29, 0xce, 0xbc, 0xff, 0xfc, 0xde, 0xff, 0x3d, 0x7b, 0xde, 0x2c, 0x5a, 0x4d, 0xe3, 0x4e, 0x4c,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 0xaa, 0xfb, 0xe2, 0xf5, 0x98, 0x29, 0x37, 0xa7, 0x1a, 0x5a, 0x7b, 0xf9, 0xb5, 0xe1, 0x5c, 0x3e, + 0xb1, 0xd0, 0x37, 0x3e, 0x9c, 0x4e, 0x5f, 0xba, 0xbc, 0x25, 0x5d, 0xde, 0xb4, 0xeb, 0x63, 0x2e, + 0xa5, 0xc5, 0x5f, 0x34, 0x54, 0x9f, 0x34, 0xc0, 0xb7, 0x26, 0x26, 0x9b, 0xa0, 0x6c, 0xbc, 0x7f, + 0x59, 0x65, 0x69, 0x68, 0x53, 0x1a, 0xda, 0xb0, 0xcd, 0x31, 0x43, 0xf9, 0xe5, 0xd5, 0x2c, 0x46, + 0xbc, 0xfe, 0x44, 0x43, 0xcb, 0x17, 0x66, 0xf6, 0xbb, 0x13, 0xd3, 0x8d, 0xcb, 0x1a, 0xcd, 0x4b, + 0xc9, 0x4a, 0x4b, 0xdb, 0xd2, 0xd2, 0x6d, 0xfb, 0xed, 0x31, 0x4b, 0x10, 0xc4, 0xbc, 0x99, 0x3f, + 0x37, 0xf3, 0xcf, 0x76, 0xef, 0xc1, 0xd3, 0x33, 0x53, 0x7b, 0x76, 0x66, 0x6a, 0x7f, 0x9d, 0x99, + 0xda, 0xcf, 0xe7, 0xe6, 0xdc, 0xb3, 0x73, 0x73, 0xee, 0x8f, 0x73, 0x73, 0xee, 0x1b, 0x77, 0xe4, + 0xe0, 0x7c, 0x2e, 0x31, 0x77, 0x23, 0x1c, 0xa7, 0x05, 0xb2, 0xb7, 0xeb, 0x9e, 0x14, 0x5c, 0x79, + 0x8a, 0xda, 0x15, 0xf9, 0xeb, 0xe9, 0x83, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x15, 0xe1, + 0xb0, 0xbf, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/oracle/types/vote.go b/x/oracle/types/vote.go index 5a74eecc8..f95b0a53c 100644 --- a/x/oracle/types/vote.go +++ b/x/oracle/types/vote.go @@ -6,8 +6,8 @@ import ( "cosmossdk.io/math" - "github.com/NibiruChain/nibiru/x/common/asset" - "github.com/NibiruChain/nibiru/x/common/set" + "github.com/NibiruChain/nibiru/v2/x/common/asset" + "github.com/NibiruChain/nibiru/v2/x/common/set" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/oracle/types/vote_test.go b/x/oracle/types/vote_test.go index d95f26fa6..dce6f8cf4 100644 --- a/x/oracle/types/vote_test.go +++ b/x/oracle/types/vote_test.go @@ -6,7 +6,7 @@ import ( "cosmossdk.io/math" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/oracle/types" ) func TestExchangeRateTuples_ToString(t *testing.T) { diff --git a/x/sudo/cli/cli.go b/x/sudo/cli/cli.go index 3e53138c7..a60fdac24 100644 --- a/x/sudo/cli/cli.go +++ b/x/sudo/cli/cli.go @@ -5,7 +5,7 @@ import ( "os" "strings" - "github.com/NibiruChain/nibiru/x/sudo/types" + "github.com/NibiruChain/nibiru/v2/x/sudo/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" diff --git a/x/sudo/cli/cli_test.go b/x/sudo/cli/cli_test.go index 00d5a9a95..2150f1c19 100644 --- a/x/sudo/cli/cli_test.go +++ b/x/sudo/cli/cli_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/NibiruChain/nibiru/x/sudo/types" + "github.com/NibiruChain/nibiru/v2/x/sudo/types" "github.com/cosmos/gogoproto/jsonpb" "github.com/stretchr/testify/assert" @@ -18,15 +18,15 @@ import ( sdktestutil "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/common/set" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/genesis" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/common/testutil/testnetwork" - "github.com/NibiruChain/nibiru/x/sudo/cli" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/set" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/genesis" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testnetwork" + "github.com/NibiruChain/nibiru/v2/x/sudo/cli" ) // ——————————————————————————————————————————————————————————————————— diff --git a/x/sudo/cli/gen_root.go b/x/sudo/cli/gen_root.go index 4369ab3b8..c55d047f3 100644 --- a/x/sudo/cli/gen_root.go +++ b/x/sudo/cli/gen_root.go @@ -12,7 +12,7 @@ import ( genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/spf13/cobra" - "github.com/NibiruChain/nibiru/x/sudo/types" + "github.com/NibiruChain/nibiru/v2/x/sudo/types" ) func AddSudoRootAccountCmd(defaultNodeHome string) *cobra.Command { diff --git a/x/sudo/cli/gen_root_test.go b/x/sudo/cli/gen_root_test.go index 68458a548..ccb958fbb 100644 --- a/x/sudo/cli/gen_root_test.go +++ b/x/sudo/cli/gen_root_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/sudo/cli" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/sudo/cli" ) func TestAddSudoRootAccountCmd(t *testing.T) { diff --git a/x/sudo/genesis.go b/x/sudo/genesis.go index 9feb94e8d..b3e73e378 100644 --- a/x/sudo/genesis.go +++ b/x/sudo/genesis.go @@ -3,8 +3,8 @@ package sudo import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/sudo/keeper" - "github.com/NibiruChain/nibiru/x/sudo/types" + "github.com/NibiruChain/nibiru/v2/x/sudo/keeper" + "github.com/NibiruChain/nibiru/v2/x/sudo/types" ) // InitGenesis initializes the module's state from a provided genesis state JSON. diff --git a/x/sudo/keeper/keeper.go b/x/sudo/keeper/keeper.go index e7474b0ee..d1999ee05 100644 --- a/x/sudo/keeper/keeper.go +++ b/x/sudo/keeper/keeper.go @@ -9,8 +9,8 @@ import ( "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/common/set" - sudotypes "github.com/NibiruChain/nibiru/x/sudo/types" + "github.com/NibiruChain/nibiru/v2/x/common/set" + sudotypes "github.com/NibiruChain/nibiru/v2/x/sudo/types" ) type Keeper struct { diff --git a/x/sudo/keeper/keeper_test.go b/x/sudo/keeper/keeper_test.go index e0346ece9..35927dae3 100644 --- a/x/sudo/keeper/keeper_test.go +++ b/x/sudo/keeper/keeper_test.go @@ -6,8 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - sudotypes "github.com/NibiruChain/nibiru/x/sudo/types" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + sudotypes "github.com/NibiruChain/nibiru/v2/x/sudo/types" ) func TestCheckPermissions(t *testing.T) { diff --git a/x/sudo/keeper/msg_server.go b/x/sudo/keeper/msg_server.go index bfba6d5c1..e44067bfd 100644 --- a/x/sudo/keeper/msg_server.go +++ b/x/sudo/keeper/msg_server.go @@ -9,8 +9,8 @@ import ( "github.com/NibiruChain/collections" - "github.com/NibiruChain/nibiru/x/common/set" - sudotypes "github.com/NibiruChain/nibiru/x/sudo/types" + "github.com/NibiruChain/nibiru/v2/x/common/set" + sudotypes "github.com/NibiruChain/nibiru/v2/x/sudo/types" ) type MsgServer struct { diff --git a/x/sudo/keeper/msg_server_test.go b/x/sudo/keeper/msg_server_test.go index 5c2d24d31..9244bd16b 100644 --- a/x/sudo/keeper/msg_server_test.go +++ b/x/sudo/keeper/msg_server_test.go @@ -4,19 +4,19 @@ import ( "testing" "time" - "github.com/NibiruChain/nibiru/x/sudo/keeper" + "github.com/NibiruChain/nibiru/v2/x/sudo/keeper" - "github.com/NibiruChain/nibiru/x/sudo/types" + "github.com/NibiruChain/nibiru/v2/x/sudo/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/set" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/sudo" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/set" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/sudo" ) func init() { diff --git a/x/sudo/keeper/querier.go b/x/sudo/keeper/querier.go index a4d224783..99f060939 100644 --- a/x/sudo/keeper/querier.go +++ b/x/sudo/keeper/querier.go @@ -3,7 +3,7 @@ package keeper import ( "context" - "github.com/NibiruChain/nibiru/x/sudo/types" + "github.com/NibiruChain/nibiru/v2/x/sudo/types" sdk "github.com/cosmos/cosmos-sdk/types" "google.golang.org/grpc/codes" diff --git a/x/sudo/keeper/querier_test.go b/x/sudo/keeper/querier_test.go index 4bfff282b..c90720704 100644 --- a/x/sudo/keeper/querier_test.go +++ b/x/sudo/keeper/querier_test.go @@ -6,8 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/sudo/keeper" - "github.com/NibiruChain/nibiru/x/sudo/types" + "github.com/NibiruChain/nibiru/v2/x/sudo/keeper" + "github.com/NibiruChain/nibiru/v2/x/sudo/types" ) func TestQuerySudoers(t *testing.T) { diff --git a/x/sudo/module.go b/x/sudo/module.go index 18a42eb46..18d93dc8a 100644 --- a/x/sudo/module.go +++ b/x/sudo/module.go @@ -15,10 +15,10 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "github.com/NibiruChain/nibiru/x/sudo/cli" - sudokeeper "github.com/NibiruChain/nibiru/x/sudo/keeper" - simulation "github.com/NibiruChain/nibiru/x/sudo/simulation" - "github.com/NibiruChain/nibiru/x/sudo/types" + "github.com/NibiruChain/nibiru/v2/x/sudo/cli" + sudokeeper "github.com/NibiruChain/nibiru/v2/x/sudo/keeper" + simulation "github.com/NibiruChain/nibiru/v2/x/sudo/simulation" + "github.com/NibiruChain/nibiru/v2/x/sudo/types" ) // Ensure the interface is properly implemented at compile time diff --git a/x/sudo/simulation/genesis.go b/x/sudo/simulation/genesis.go index 6558770e4..004f696c2 100644 --- a/x/sudo/simulation/genesis.go +++ b/x/sudo/simulation/genesis.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" - "github.com/NibiruChain/nibiru/x/sudo/types" + "github.com/NibiruChain/nibiru/v2/x/sudo/types" ) func RandomizedGenState(simState *module.SimulationState) { diff --git a/x/sudo/types/actions.go b/x/sudo/types/actions.go index 9d838bb8f..2b172727a 100644 --- a/x/sudo/types/actions.go +++ b/x/sudo/types/actions.go @@ -1,6 +1,6 @@ package types -import "github.com/NibiruChain/nibiru/x/common/set" +import "github.com/NibiruChain/nibiru/v2/x/common/set" type RootAction string diff --git a/x/sudo/types/event.pb.go b/x/sudo/types/event.pb.go index f49fa8417..b49d54d1e 100644 --- a/x/sudo/types/event.pb.go +++ b/x/sudo/types/event.pb.go @@ -85,7 +85,7 @@ func init() { func init() { proto.RegisterFile("nibiru/sudo/v1/event.proto", fileDescriptor_7e6085948b018986) } var fileDescriptor_7e6085948b018986 = []byte{ - // 242 bytes of a gzipped FileDescriptorProto + // 245 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xca, 0xcb, 0x4c, 0xca, 0x2c, 0x2a, 0xd5, 0x2f, 0x2e, 0x4d, 0xc9, 0xd7, 0x2f, 0x33, 0xd4, 0x4f, 0x2d, 0x4b, 0xcd, 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x83, 0xc8, 0xe9, 0x81, 0xe4, 0xf4, 0xca, 0x0c, @@ -96,12 +96,12 @@ var fileDescriptor_7e6085948b018986 = []byte{ 0xfc, 0xd4, 0xa2, 0x62, 0x21, 0x73, 0x2e, 0xf6, 0x62, 0x08, 0x53, 0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x5c, 0x0f, 0xd5, 0x1d, 0x7a, 0x50, 0x95, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0xc1, 0x54, 0x0b, 0x89, 0x71, 0xb1, 0x25, 0x26, 0x83, 0xec, 0x96, 0x60, 0x52, 0x60, 0xd4, 0xe0, - 0x0c, 0x82, 0xf2, 0x9c, 0x5c, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, + 0x0c, 0x82, 0xf2, 0x9c, 0xdc, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, - 0x2b, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0xdf, 0x0f, 0x6c, 0x87, 0x73, - 0x46, 0x62, 0x66, 0x9e, 0x3e, 0xd4, 0xcd, 0x15, 0x10, 0x57, 0x97, 0x54, 0x16, 0xa4, 0x16, 0x27, - 0xb1, 0x81, 0xdd, 0x6c, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xcb, 0xb3, 0x68, 0xee, 0x31, 0x01, - 0x00, 0x00, + 0x37, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0xdf, 0x0f, 0x6c, 0x87, 0x73, + 0x46, 0x62, 0x66, 0x9e, 0x3e, 0xd4, 0xcd, 0x65, 0x46, 0xfa, 0x15, 0x10, 0x87, 0x97, 0x54, 0x16, + 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x9d, 0x6d, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x0d, 0xe3, 0x06, + 0x82, 0x34, 0x01, 0x00, 0x00, } func (m *EventUpdateSudoers) Marshal() (dAtA []byte, err error) { diff --git a/x/sudo/types/query.pb.go b/x/sudo/types/query.pb.go index af9c1399e..c226a26ee 100644 --- a/x/sudo/types/query.pb.go +++ b/x/sudo/types/query.pb.go @@ -118,7 +118,7 @@ func init() { func init() { proto.RegisterFile("nibiru/sudo/v1/query.proto", fileDescriptor_3c5c8e03d8d77d77) } var fileDescriptor_3c5c8e03d8d77d77 = []byte{ - // 280 bytes of a gzipped FileDescriptorProto + // 283 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xca, 0xcb, 0x4c, 0xca, 0x2c, 0x2a, 0xd5, 0x2f, 0x2e, 0x4d, 0xc9, 0xd7, 0x2f, 0x33, 0xd4, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x83, 0xc8, 0xe9, 0x81, 0xe4, 0xf4, 0xca, 0x0c, @@ -131,12 +131,12 @@ var fileDescriptor_3c5c8e03d8d77d77 = []byte{ 0x1e, 0xaa, 0x03, 0xf5, 0xa0, 0x3a, 0x9c, 0x58, 0x4e, 0xdc, 0x93, 0x67, 0x08, 0x82, 0xa9, 0x36, 0x6a, 0x60, 0xe4, 0x62, 0x05, 0x9b, 0x28, 0x54, 0xce, 0xc5, 0x83, 0x6c, 0xb4, 0x90, 0x32, 0xba, 0x09, 0x58, 0xdc, 0x23, 0xa5, 0x82, 0x5f, 0x11, 0xc4, 0x75, 0x4a, 0x32, 0x4d, 0x97, 0x9f, 0x4c, - 0x66, 0x12, 0x13, 0x12, 0xd1, 0x47, 0xf6, 0x31, 0xd4, 0x09, 0x4e, 0x2e, 0x27, 0x1e, 0xc9, 0x31, + 0x66, 0x12, 0x13, 0x12, 0xd1, 0x47, 0xf6, 0x31, 0xd4, 0x09, 0x4e, 0xee, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, - 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x95, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, - 0x9f, 0xab, 0xef, 0x07, 0xd6, 0xe9, 0x9c, 0x91, 0x98, 0x99, 0x07, 0x33, 0xa5, 0x02, 0x62, 0x4e, - 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x38, 0xdc, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x97, 0xc1, 0x8d, 0xe0, 0xb5, 0x01, 0x00, 0x00, + 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x9b, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, + 0x9f, 0xab, 0xef, 0x07, 0xd6, 0xe9, 0x9c, 0x91, 0x98, 0x99, 0x07, 0x33, 0xa5, 0xcc, 0x48, 0xbf, + 0x02, 0x62, 0x54, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x38, 0xe8, 0x8c, 0x01, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x54, 0x39, 0xc9, 0x2a, 0xb8, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/sudo/types/state.pb.go b/x/sudo/types/state.pb.go index 9ca78c3ea..41192164b 100644 --- a/x/sudo/types/state.pb.go +++ b/x/sudo/types/state.pb.go @@ -131,24 +131,24 @@ func init() { func init() { proto.RegisterFile("nibiru/sudo/v1/state.proto", fileDescriptor_4b462ff6aaf658cf) } var fileDescriptor_4b462ff6aaf658cf = []byte{ - // 258 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0x31, 0x4b, 0x03, 0x31, - 0x1c, 0xc5, 0xef, 0xb4, 0x58, 0x2e, 0x8a, 0x43, 0x10, 0x2c, 0x47, 0x89, 0xa5, 0x53, 0x71, 0x48, - 0xa8, 0x0e, 0x0e, 0x6e, 0x55, 0xe8, 0xe6, 0x70, 0xdd, 0xdc, 0x72, 0xd7, 0x90, 0x06, 0x34, 0xff, - 0x23, 0xf9, 0x5f, 0xd1, 0x6f, 0xe1, 0xc7, 0xea, 0xd8, 0xd1, 0x49, 0xe4, 0xee, 0x8b, 0xc8, 0x25, - 0x15, 0x71, 0x7b, 0xe4, 0xf7, 0x78, 0x79, 0xff, 0x47, 0x72, 0x6b, 0x4a, 0xe3, 0x1a, 0xe1, 0x9b, - 0x35, 0x88, 0xed, 0x5c, 0x78, 0x94, 0xa8, 0x78, 0xed, 0x00, 0x81, 0x9e, 0x47, 0xc6, 0x7b, 0xc6, - 0xb7, 0xf3, 0xfc, 0x42, 0x83, 0x86, 0x80, 0x44, 0xaf, 0xa2, 0x2b, 0x1f, 0x6b, 0x00, 0xfd, 0xa2, - 0x84, 0xac, 0x8d, 0x90, 0xd6, 0x02, 0x4a, 0x34, 0x60, 0x7d, 0xa4, 0xd3, 0x7b, 0x32, 0x5c, 0x35, - 0x6b, 0x50, 0xce, 0x53, 0x4a, 0x06, 0x0e, 0x00, 0x47, 0xe9, 0x24, 0x9d, 0x65, 0x45, 0xd0, 0x74, - 0x4c, 0xb2, 0x0a, 0x2c, 0x3a, 0x59, 0xa1, 0x1f, 0x1d, 0x4d, 0x8e, 0x67, 0x59, 0xf1, 0xf7, 0x30, - 0x5d, 0x92, 0xb3, 0xa5, 0xb2, 0xca, 0x1b, 0xbf, 0xea, 0x6b, 0xd1, 0x3b, 0x32, 0xf4, 0x31, 0x2c, - 0x84, 0x9c, 0xde, 0x5c, 0xf2, 0xff, 0x15, 0xf9, 0xe1, 0xaf, 0xc5, 0x60, 0xf7, 0x75, 0x95, 0x14, - 0xbf, 0xee, 0xc5, 0xe3, 0xae, 0x65, 0xe9, 0xbe, 0x65, 0xe9, 0x77, 0xcb, 0xd2, 0x8f, 0x8e, 0x25, - 0xfb, 0x8e, 0x25, 0x9f, 0x1d, 0x4b, 0x9e, 0xaf, 0xb5, 0xc1, 0x4d, 0x53, 0xf2, 0x0a, 0x5e, 0xc5, - 0x53, 0xc8, 0x7a, 0xd8, 0x48, 0x63, 0xc5, 0x61, 0x96, 0xb7, 0x38, 0x0c, 0xbe, 0xd7, 0xca, 0x97, - 0x27, 0xe1, 0xa4, 0xdb, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb4, 0x57, 0x7e, 0xb3, 0x34, 0x01, - 0x00, 0x00, + // 259 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xb1, 0x4e, 0xc3, 0x30, + 0x18, 0x84, 0x13, 0xa8, 0xa8, 0x62, 0x10, 0x43, 0x84, 0x44, 0x15, 0x55, 0xa6, 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xd3, 0xe8, 0xf9, 0x56, 0x69, 0xdc, 0x35, 0x25, 0xab, 0xe0, 0x95, 0x3f, + 0xf9, 0xac, 0xc7, 0x9d, 0xd0, 0x86, 0x1f, 0x67, 0x69, 0x57, 0xfc, 0x2d, 0x6c, 0x83, 0xef, 0xb5, + 0x74, 0xe5, 0x99, 0xbf, 0xea, 0xee, 0x27, 0x00, 0x00, 0xff, 0xff, 0x84, 0x4f, 0x6d, 0x13, 0x37, + 0x01, 0x00, 0x00, } func (m *Sudoers) Marshal() (dAtA []byte, err error) { diff --git a/x/sudo/types/tx.pb.go b/x/sudo/types/tx.pb.go index 6d59db760..69509147c 100644 --- a/x/sudo/types/tx.pb.go +++ b/x/sudo/types/tx.pb.go @@ -234,30 +234,31 @@ func init() { func init() { proto.RegisterFile("nibiru/sudo/v1/tx.proto", fileDescriptor_a610e3c1609cdcbc) } var fileDescriptor_a610e3c1609cdcbc = []byte{ - // 368 bytes of a gzipped FileDescriptorProto + // 372 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xcd, 0x4e, 0xea, 0x40, - 0x18, 0x86, 0x29, 0x24, 0x9c, 0xc3, 0x9c, 0x1c, 0x16, 0x8d, 0x42, 0xa9, 0xd8, 0x60, 0x13, 0x0d, - 0x71, 0xd1, 0x09, 0x7a, 0x07, 0xa0, 0x4b, 0x5c, 0xd4, 0x9d, 0x0b, 0xc9, 0xd0, 0x4e, 0x86, 0x49, - 0x74, 0xbe, 0xa6, 0x33, 0x05, 0xdc, 0x7a, 0x05, 0x26, 0xde, 0x94, 0x4b, 0x12, 0x37, 0x2e, 0x0d, - 0x78, 0x0b, 0xee, 0x4d, 0xa7, 0xfc, 0xb4, 0x89, 0x61, 0xd7, 0xe9, 0xf3, 0xbd, 0xcf, 0x3b, 0x33, - 0x2d, 0x6a, 0x0a, 0x3e, 0xe6, 0x71, 0x82, 0x65, 0x12, 0x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x78, 0x29, 0xf0, 0x66, 0x3d, 0xfb, 0x1f, 0x03, 0x06, 0x1a, + 0xe1, 0xf4, 0x29, 0x9b, 0xb2, 0xdb, 0x0c, 0x80, 0xdd, 0x53, 0x4c, 0x22, 0x8e, 0x89, 0x10, 0xa0, + 0x88, 0xe2, 0x20, 0x64, 0x46, 0xdd, 0x3b, 0x54, 0x1f, 0x49, 0x76, 0x19, 0x72, 0x75, 0x93, 0x84, + 0x40, 0x63, 0x69, 0x36, 0x50, 0x95, 0x04, 0xe9, 0x88, 0x65, 0x74, 0x8c, 0x6e, 0xcd, 0xdf, 0xac, + 0xcc, 0x36, 0xaa, 0x05, 0x20, 0x54, 0x4c, 0x02, 0x25, 0xad, 0x72, 0xa7, 0xd2, 0xad, 0xf9, 0xfb, + 0x17, 0x69, 0x4a, 0x52, 0x11, 0xd2, 0xd8, 0xaa, 0x64, 0xa9, 0x6c, 0xe5, 0x5a, 0xa8, 0x51, 0xf4, + 0xfb, 0x54, 0x46, 0x20, 0x24, 0x75, 0x07, 0xe8, 0xef, 0x48, 0xb2, 0xe1, 0x94, 0x08, 0x46, 0x7d, + 0x00, 0x95, 0x53, 0x18, 0x79, 0x85, 0xd9, 0x42, 0xbf, 0x05, 0x9d, 0x8f, 0x63, 0x00, 0x65, 0x95, + 0x35, 0xf9, 0x25, 0xe8, 0x3c, 0x8d, 0xb8, 0x4d, 0xf4, 0xbf, 0xe0, 0xd8, 0xca, 0xfb, 0x5f, 0x06, + 0xaa, 0x8c, 0x24, 0x33, 0x17, 0xe8, 0x4f, 0xfe, 0x6c, 0x8e, 0x57, 0xbc, 0x32, 0xaf, 0xb8, 0x37, + 0xfb, 0xec, 0x30, 0xdf, 0xed, 0xfd, 0xe4, 0xe9, 0xed, 0xf3, 0xa5, 0x7c, 0xe4, 0xb6, 0x70, 0xfe, + 0xdb, 0xd0, 0x90, 0xab, 0xb1, 0xdc, 0x54, 0x29, 0x84, 0x72, 0x67, 0x3b, 0xfe, 0x41, 0xbc, 0xc7, + 0xf6, 0xe9, 0x41, 0xbc, 0xab, 0xed, 0xe8, 0x5a, 0xdb, 0xb5, 0x0a, 0xb5, 0x81, 0x1e, 0xd4, 0xf7, + 0x33, 0xb8, 0x7a, 0x5d, 0x39, 0xc6, 0x72, 0xe5, 0x18, 0x1f, 0x2b, 0xc7, 0x78, 0x5e, 0x3b, 0xa5, + 0xe5, 0xda, 0x29, 0xbd, 0xaf, 0x9d, 0xd2, 0xed, 0x39, 0xe3, 0x6a, 0x9a, 0x4c, 0xbc, 0x00, 0x1e, + 0xf0, 0xb5, 0x4e, 0x0f, 0xa7, 0x84, 0x8b, 0xad, 0x69, 0xd6, 0xc7, 0x8b, 0x4c, 0xa7, 0x1e, 0x23, + 0x2a, 0x27, 0x55, 0xfd, 0x7b, 0x5c, 0x7c, 0x07, 0x00, 0x00, 0xff, 0xff, 0xb6, 0xdb, 0xcd, 0x34, + 0x7d, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/tokenfactory/cli/cli_test.go b/x/tokenfactory/cli/cli_test.go index 87a1c3433..e80062e32 100644 --- a/x/tokenfactory/cli/cli_test.go +++ b/x/tokenfactory/cli/cli_test.go @@ -6,13 +6,13 @@ import ( "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/genesis" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/common/testutil/testnetwork" - "github.com/NibiruChain/nibiru/x/tokenfactory/cli" - "github.com/NibiruChain/nibiru/x/tokenfactory/types" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/genesis" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testnetwork" + "github.com/NibiruChain/nibiru/v2/x/tokenfactory/cli" + "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/tokenfactory/cli/query.go b/x/tokenfactory/cli/query.go index d67e46154..d8370ed89 100644 --- a/x/tokenfactory/cli/query.go +++ b/x/tokenfactory/cli/query.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/cobra" - "github.com/NibiruChain/nibiru/x/tokenfactory/types" + "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" diff --git a/x/tokenfactory/cli/tx.go b/x/tokenfactory/cli/tx.go index 7c472b2cc..21d129109 100644 --- a/x/tokenfactory/cli/tx.go +++ b/x/tokenfactory/cli/tx.go @@ -11,7 +11,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/spf13/cobra" - "github.com/NibiruChain/nibiru/x/tokenfactory/types" + "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) // NewTxCmd returns the transaction commands for this module diff --git a/x/tokenfactory/keeper/genesis.go b/x/tokenfactory/keeper/genesis.go index 01f08fb16..389c6b7cd 100644 --- a/x/tokenfactory/keeper/genesis.go +++ b/x/tokenfactory/keeper/genesis.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/NibiruChain/nibiru/x/tokenfactory/types" + "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) // InitGenesis initializes the tokenfactory module's state from a provided genesis diff --git a/x/tokenfactory/keeper/genesis_test.go b/x/tokenfactory/keeper/genesis_test.go index 8c2748b57..2ef27e537 100644 --- a/x/tokenfactory/keeper/genesis_test.go +++ b/x/tokenfactory/keeper/genesis_test.go @@ -1,8 +1,8 @@ package keeper_test import ( - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/tokenfactory/types" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) func (s *TestSuite) TestGenesis() { diff --git a/x/tokenfactory/keeper/grpc_query.go b/x/tokenfactory/keeper/grpc_query.go index 98070f8a2..63bd3bbea 100644 --- a/x/tokenfactory/keeper/grpc_query.go +++ b/x/tokenfactory/keeper/grpc_query.go @@ -3,7 +3,7 @@ package keeper import ( "context" - types "github.com/NibiruChain/nibiru/x/tokenfactory/types" + types "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/tokenfactory/keeper/grpc_query_test.go b/x/tokenfactory/keeper/grpc_query_test.go index 6897a5ec3..0688f59d0 100644 --- a/x/tokenfactory/keeper/grpc_query_test.go +++ b/x/tokenfactory/keeper/grpc_query_test.go @@ -3,8 +3,8 @@ package keeper_test import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/tokenfactory/types" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) func (s *TestSuite) TestQueryModuleParams() { diff --git a/x/tokenfactory/keeper/keeper.go b/x/tokenfactory/keeper/keeper.go index bc2908d16..ab3ec7c56 100644 --- a/x/tokenfactory/keeper/keeper.go +++ b/x/tokenfactory/keeper/keeper.go @@ -11,7 +11,7 @@ import ( "github.com/NibiruChain/collections" - tftypes "github.com/NibiruChain/nibiru/x/tokenfactory/types" + tftypes "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) // Keeper of this module maintains collections of feeshares for contracts diff --git a/x/tokenfactory/keeper/keeper_test.go b/x/tokenfactory/keeper/keeper_test.go index fc7a44431..99997c6b5 100644 --- a/x/tokenfactory/keeper/keeper_test.go +++ b/x/tokenfactory/keeper/keeper_test.go @@ -7,11 +7,11 @@ import ( "github.com/stretchr/testify/suite" - tfkeeper "github.com/NibiruChain/nibiru/x/tokenfactory/keeper" - tftypes "github.com/NibiruChain/nibiru/x/tokenfactory/types" + tfkeeper "github.com/NibiruChain/nibiru/v2/x/tokenfactory/keeper" + tftypes "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/tokenfactory/keeper/msg_server.go b/x/tokenfactory/keeper/msg_server.go index 68c762381..32083b2c0 100644 --- a/x/tokenfactory/keeper/msg_server.go +++ b/x/tokenfactory/keeper/msg_server.go @@ -6,9 +6,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/NibiruChain/nibiru/x/common" + "github.com/NibiruChain/nibiru/v2/x/common" - "github.com/NibiruChain/nibiru/x/tokenfactory/types" + "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) var _ types.MsgServer = (*Keeper)(nil) diff --git a/x/tokenfactory/keeper/msg_server_test.go b/x/tokenfactory/keeper/msg_server_test.go index 0167bd507..0d7ce4f04 100644 --- a/x/tokenfactory/keeper/msg_server_test.go +++ b/x/tokenfactory/keeper/msg_server_test.go @@ -8,10 +8,10 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/testutil" - oracletypes "github.com/NibiruChain/nibiru/x/oracle/types" - "github.com/NibiruChain/nibiru/x/tokenfactory/types" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + oracletypes "github.com/NibiruChain/nibiru/v2/x/oracle/types" + "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) func (s *TestSuite) TestCreateDenom() { diff --git a/x/tokenfactory/keeper/store.go b/x/tokenfactory/keeper/store.go index a548ba392..60e5a6eb1 100644 --- a/x/tokenfactory/keeper/store.go +++ b/x/tokenfactory/keeper/store.go @@ -6,7 +6,7 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - tftypes "github.com/NibiruChain/nibiru/x/tokenfactory/types" + tftypes "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) // StoreAPI isolates the collections for the x/tokenfactory module. diff --git a/x/tokenfactory/keeper/store_test.go b/x/tokenfactory/keeper/store_test.go index c4892cdcc..e9ec63cc8 100644 --- a/x/tokenfactory/keeper/store_test.go +++ b/x/tokenfactory/keeper/store_test.go @@ -3,9 +3,9 @@ package keeper_test import ( "github.com/NibiruChain/collections" - "github.com/NibiruChain/nibiru/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" - tftypes "github.com/NibiruChain/nibiru/x/tokenfactory/types" + tftypes "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) func (s *TestSuite) TestStoreWrite() { diff --git a/x/tokenfactory/keeper/wasm_test.go b/x/tokenfactory/keeper/wasm_test.go index 8eb8666a4..f25cfd2d2 100644 --- a/x/tokenfactory/keeper/wasm_test.go +++ b/x/tokenfactory/keeper/wasm_test.go @@ -19,12 +19,12 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/tokenfactory/fixture" - tftypes "github.com/NibiruChain/nibiru/x/tokenfactory/types" + "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/x/common/denoms" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/tokenfactory/fixture" + tftypes "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) // Instantiate is a empty struct type with conventience functions for diff --git a/x/tokenfactory/module.go b/x/tokenfactory/module.go index 9cc05ec99..ba8799f58 100644 --- a/x/tokenfactory/module.go +++ b/x/tokenfactory/module.go @@ -25,10 +25,10 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" - "github.com/NibiruChain/nibiru/x/tokenfactory/cli" - "github.com/NibiruChain/nibiru/x/tokenfactory/keeper" - "github.com/NibiruChain/nibiru/x/tokenfactory/simulation" - "github.com/NibiruChain/nibiru/x/tokenfactory/types" + "github.com/NibiruChain/nibiru/v2/x/tokenfactory/cli" + "github.com/NibiruChain/nibiru/v2/x/tokenfactory/keeper" + "github.com/NibiruChain/nibiru/v2/x/tokenfactory/simulation" + "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) // type check to ensure the interface is properly implemented diff --git a/x/tokenfactory/module_test.go b/x/tokenfactory/module_test.go index f143c4296..1b50c4c7e 100644 --- a/x/tokenfactory/module_test.go +++ b/x/tokenfactory/module_test.go @@ -6,10 +6,10 @@ import ( abci "github.com/cometbft/cometbft/abci/types" "github.com/stretchr/testify/suite" - "github.com/NibiruChain/nibiru/app/codec" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - module "github.com/NibiruChain/nibiru/x/tokenfactory" - "github.com/NibiruChain/nibiru/x/tokenfactory/types" + "github.com/NibiruChain/nibiru/v2/app/codec" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + module "github.com/NibiruChain/nibiru/v2/x/tokenfactory" + "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) type ModuleTestSuite struct{ suite.Suite } diff --git a/x/tokenfactory/simulation/genesis.go b/x/tokenfactory/simulation/genesis.go index 40856bd06..389e25b5b 100644 --- a/x/tokenfactory/simulation/genesis.go +++ b/x/tokenfactory/simulation/genesis.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" - "github.com/NibiruChain/nibiru/x/tokenfactory/types" + "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) const ( diff --git a/x/tokenfactory/types/codec_test.go b/x/tokenfactory/types/codec_test.go index 2e0300055..c84a4266d 100644 --- a/x/tokenfactory/types/codec_test.go +++ b/x/tokenfactory/types/codec_test.go @@ -8,7 +8,7 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/tokenfactory/types" + "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) type CodecSuite struct { diff --git a/x/tokenfactory/types/event.pb.go b/x/tokenfactory/types/event.pb.go index 808fb098d..1433be44c 100644 --- a/x/tokenfactory/types/event.pb.go +++ b/x/tokenfactory/types/event.pb.go @@ -332,34 +332,35 @@ func init() { } var fileDescriptor_a46c3c7b7d022093 = []byte{ - // 432 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0xbf, 0x92, 0xd3, 0x30, - 0x10, 0xc6, 0x6d, 0x38, 0x72, 0xb1, 0xd2, 0x30, 0xe6, 0x38, 0x02, 0x19, 0x7c, 0x8c, 0x2b, 0x2a, - 0x69, 0x1c, 0x3a, 0x1a, 0xe6, 0x1c, 0xe8, 0x38, 0x8a, 0xd0, 0xd1, 0xdc, 0xc8, 0x96, 0xce, 0xd1, - 0xc4, 0xd6, 0xde, 0xc8, 0x8a, 0x8f, 0x74, 0x14, 0x0c, 0x35, 0x8f, 0x95, 0x32, 0x25, 0x55, 0x86, - 0x49, 0xde, 0x80, 0x27, 0x60, 0x24, 0xcb, 0x21, 0x14, 0xa1, 0xa2, 0xd3, 0xee, 0xb7, 0x7f, 0x7e, - 0x9f, 0xbd, 0x28, 0x96, 0x22, 0x13, 0x6a, 0x41, 0x34, 0xcc, 0xb9, 0xbc, 0xa1, 0x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, 0x09, 0x3a, 0xd5, 0x70, 0x4d, 0x19, 0xeb, 0xfc, 0xf4, 0x34, 0x5c, 0x32, - 0xa6, 0xc2, 0x73, 0xd4, 0xcb, 0x69, 0x59, 0x72, 0xe5, 0x20, 0x5c, 0x14, 0x7f, 0xed, 0x10, 0xd2, - 0x85, 0x92, 0xff, 0x05, 0x61, 0x84, 0x82, 0x1b, 0x05, 0xd5, 0x21, 0x44, 0xdf, 0x24, 0xfe, 0x89, - 0xf1, 0xcd, 0x47, 0x8f, 0x2d, 0xc6, 0x47, 0xae, 0xed, 0xff, 0xba, 0xe2, 0x9a, 0x32, 0xaa, 0xe9, - 0x91, 0x6f, 0xfe, 0x06, 0xf5, 0x2b, 0x57, 0x61, 0x77, 0x0c, 0xc6, 0xcf, 0xff, 0xc0, 0xca, 0xf9, - 0x1e, 0xb6, 0x1b, 0x93, 0x9e, 0x18, 0xe0, 0xe9, 0xbe, 0xe9, 0x18, 0x48, 0xfa, 0x7e, 0xb5, 0x8d, - 0xfc, 0xf5, 0x36, 0xf2, 0x7f, 0x6e, 0x23, 0xff, 0xfb, 0x2e, 0xf2, 0xd6, 0xbb, 0xc8, 0xfb, 0xb1, - 0x8b, 0xbc, 0x4f, 0xe3, 0x42, 0xe8, 0xd9, 0x22, 0xc3, 0x39, 0x54, 0xe4, 0x83, 0xbd, 0xe6, 0xc9, - 0x8c, 0x0a, 0x49, 0xdc, 0xf5, 0x7f, 0xfe, 0xfb, 0xfe, 0xf5, 0xf2, 0x96, 0xd7, 0x59, 0xcf, 0xde, - 0xe3, 0xab, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x91, 0x31, 0x11, 0x4b, 0x23, 0x03, 0x00, 0x00, + // 436 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x93, 0xbf, 0x8f, 0xd3, 0x30, + 0x14, 0xc7, 0x13, 0x38, 0x7a, 0x8d, 0x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 0x46, 0xde, 0xe7, 0xd7, 0x85, 0xd0, 0xb3, 0x45, 0x86, 0x73, 0xa8, 0xc8, 0x07, 0x7b, + 0xcd, 0x93, 0x19, 0x15, 0x92, 0xb8, 0xeb, 0x6f, 0xc6, 0xe4, 0xcb, 0xbf, 0x4f, 0x40, 0x2f, 0xaf, + 0x79, 0x9d, 0xf5, 0xec, 0x49, 0xbe, 0xfa, 0x13, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x7c, 0xf8, 0x56, + 0x26, 0x03, 0x00, 0x00, } func (m *EventCreateDenom) Marshal() (dAtA []byte, err error) { diff --git a/x/tokenfactory/types/genesis.go b/x/tokenfactory/types/genesis.go index d97990c3a..7546ceb7b 100644 --- a/x/tokenfactory/types/genesis.go +++ b/x/tokenfactory/types/genesis.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/common/set" + "github.com/NibiruChain/nibiru/v2/x/common/set" ) // DefaultGenesis returns the default genesis state. This state is used for diff --git a/x/tokenfactory/types/query.pb.go b/x/tokenfactory/types/query.pb.go index 63b808876..43c75eab8 100644 --- a/x/tokenfactory/types/query.pb.go +++ b/x/tokenfactory/types/query.pb.go @@ -318,38 +318,39 @@ func init() { } var fileDescriptor_b7d8bbc34d6c2a91 = []byte{ - // 495 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x31, 0x6f, 0x13, 0x31, - 0x14, 0xc7, 0xe3, 0x96, 0x1c, 0xc4, 0x6c, 0x26, 0x44, 0x51, 0x04, 0x47, 0x64, 0x21, 0x14, 0x05, - 0x62, 0x93, 0xf0, 0x01, 0x90, 0x02, 0x0b, 0x12, 0x45, 0x90, 0x0d, 0x36, 0x5f, 0xe2, 0x5c, 0x4f, - 0xed, 0xf9, 0x5d, 0xcf, 0xbe, 0x88, 0xa8, 0xea, 0xc2, 0xc6, 0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 0xa6, 0xc0, 0x8f, 0xed, 0xfa, 0x64, 0xf8, 0xf2, 0x6c, 0x11, - 0xa2, 0xf3, 0x45, 0x88, 0x7e, 0x2c, 0x42, 0xf4, 0x69, 0x19, 0x56, 0xce, 0x97, 0x61, 0xe5, 0xdb, - 0x32, 0xac, 0xbc, 0x1b, 0xc4, 0x89, 0xd9, 0x2f, 0x22, 0x36, 0x86, 0x94, 0xbf, 0xb2, 0xfd, 0x9e, - 0xed, 0x8b, 0x44, 0x95, 0xbd, 0xdf, 0xaf, 0x77, 0x37, 0xf3, 0x4c, 0xea, 0x28, 0xb0, 0x7f, 0xe4, - 0x93, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xed, 0x27, 0xd8, 0x56, 0x47, 0x04, 0x00, 0x00, + // 499 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xbf, 0x6f, 0x13, 0x3f, + 0x18, 0xc6, 0xe3, 0xf6, 0x9b, 0xfb, 0x12, 0xb3, 0x99, 0x10, 0x45, 0x11, 0x1c, 0x91, 0x85, 0x50, + 0x14, 0x88, 0x4d, 0x82, 0x98, 0x91, 0x02, 0x0b, 0x43, 0xf9, 0x91, 0x0d, 0x36, 0x5f, 0xe2, 0x5c, + 0x4f, 0xed, 0xf9, 0xbd, 0x9e, 0x7d, 0x11, 0x51, 0xd5, 0x85, 0x8d, 0x0d, 0xa9, 0x3b, 0x7f, 0x4f, + 0xc5, 0x54, 0x89, 0x85, 0x09, 0xa1, 0x84, 0x3f, 0x04, 0xd5, 0xf6, 0x85, 0x06, 0x08, 0xe9, 0xe6, + 0xd7, 0xfe, 0xf8, 0x7d, 0x1e, 0xbf, 0xcf, 0x1d, 0xa6, 0x2a, 0x89, 0x92, 0xbc, 0xe0, 0x06, 0x0e, + 0xa4, 0x9a, 0x8a, 0xb1, 0x81, 0x7c, 0xce, 0x67, 0x7d, 0x7e, 0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xb3, 0x01, 0x7f, 0xb7, 0x2e, 0x60, 0xe6, 0x99, 0xd4, + 0x51, 0x60, 0x7f, 0xca, 0x47, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x55, 0x22, 0x33, 0xf5, 0x4a, + 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/tokenfactory/types/state.pb.go b/x/tokenfactory/types/state.pb.go index 097e89c20..c1916c787 100644 --- a/x/tokenfactory/types/state.pb.go +++ b/x/tokenfactory/types/state.pb.go @@ -323,38 +323,38 @@ func init() { } var fileDescriptor_452ec984f7eef90f = []byte{ - // 490 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0x3f, 0x6f, 0xd3, 0x40, - 0x14, 0xb7, 0x4b, 0xda, 0xc2, 0x35, 0x20, 0x38, 0x41, 0x49, 0x23, 0x61, 0xa7, 0x27, 0xa8, 0x98, - 0x7c, 0x4a, 0xd8, 0xb2, 0xe1, 0x94, 0x76, 0xa1, 0x08, 0x19, 0x26, 0x16, 0xeb, 0xd9, 0x39, 0x92, - 0x83, 0xfa, 0x2e, 0xf2, 0x9d, 0x23, 0xb2, 0xf5, 0x23, 0xf0, 0x11, 0xf8, 0x24, 0xb0, 0x76, 0xec, - 0xc8, 0x80, 0x22, 0x94, 0x2c, 0xcc, 0xf9, 0x04, 0x28, 0x77, 0x57, 0x68, 0x69, 0xc3, 0xe6, 0xf7, - 0x7e, 0xbf, 0xf7, 0xf3, 0xef, 0xfd, 0x39, 0x44, 0x04, 0xcf, 0x78, 0x59, 0x51, 0x2d, 0x3f, 0x32, - 0xf1, 0x1e, 0x72, 0x2d, 0xcb, 0x09, 0x1d, 0xb7, 0xa9, 0xd2, 0xa0, 0x59, 0x34, 0x2a, 0xa5, 0x96, - 0x78, 0xdb, 0x72, 0xa2, 0x8b, 0x9c, 0x68, 0xdc, 0x6e, 0xde, 0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0x69, 0x03, 0x00, 0x00, + // 492 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0xcb, 0x6e, 0xd3, 0x40, + 0x14, 0xb5, 0x4b, 0xda, 0xc2, 0x34, 0x20, 0x18, 0x41, 0x49, 0x23, 0x61, 0xa7, 0x23, 0xa8, 0x58, + 0x79, 0x94, 0x20, 0x36, 0xd9, 0xe1, 0x94, 0x76, 0x55, 0x40, 0x86, 0x15, 0x1b, 0xeb, 0xda, 0x19, + 0x92, 0x81, 0x7a, 0x26, 0xf2, 0x8c, 0x23, 0xb2, 0xeb, 0x27, 0xf0, 0x09, 0x7c, 0x09, 0x6c, 0xbb, + 0xec, 0x92, 0x05, 0x8a, 0x50, 0xb2, 0x61, 0x9d, 0x2f, 0x40, 0x99, 0x99, 0x42, 0x4b, 0x1f, 0x3b, + 0xdf, 0x7b, 0xce, 0x3d, 0x3e, 0xf7, 0x31, 0x88, 0x08, 0x9e, 0xf1, 0xb2, 0xa2, 0x5a, 0x7e, 0x62, + 0xe2, 0x03, 0xe4, 0x5a, 0x96, 0x13, 0x3a, 0x6e, 0x53, 0xa5, 0x41, 0xb3, 0x68, 0x54, 0x4a, 0x2d, + 0xf1, 0xa6, 0xe5, 0x44, 0x67, 0x39, 0xd1, 0xb8, 0xdd, 0xbc, 0x3f, 0x90, 0x03, 0x69, 0x28, 0x74, + 0xf9, 0x65, 0xd9, 0xcd, 0xad, 0x5c, 0xaa, 0x42, 0xaa, 0xd4, 0x02, 0x36, 0x70, 0x50, 0x60, 0x23, + 0x9a, 0x81, 0x62, 0x74, 0xdc, 0xce, 0x98, 0x86, 0x36, 0xcd, 0x25, 0x17, 0x16, 0x27, 0x7b, 0x68, + 0x73, 0x97, 0x09, 0x59, 0xbc, 0xa8, 0xf4, 0x50, 0x96, 0x5c, 0x4f, 0x0e, 0x98, 0x86, 0x3e, 0x68, + 0xc0, 0x3b, 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a7, 0x73, 0x5e, 0x89, 0x24, 0xb7, 0x5d, 0x62, 0xd7, + 0xc6, 0xdf, 0xff, 0x35, 0x60, 0xa7, 0xb1, 0x83, 0x56, 0x6d, 0xc3, 0x17, 0x56, 0x67, 0xd2, 0x24, + 0xb1, 0x30, 0x3e, 0xf2, 0x11, 0x86, 0xd3, 0xc5, 0xa7, 0x85, 0xdb, 0xbc, 0x19, 0xd3, 0x46, 0x27, + 0xba, 0xca, 0xe9, 0xe5, 0xf7, 0x12, 0x6f, 0x3b, 0xcf, 0x5b, 0xee, 0x48, 0x2e, 0xe8, 0x92, 0xe4, + 0x1e, 0xfc, 0x5f, 0x65, 0xaf, 0x27, 0x7e, 0x7d, 0x3c, 0x0b, 0xfc, 0x93, 0x59, 0xe0, 0xff, 0x9a, + 0x05, 0xfe, 0x97, 0x79, 0xe0, 0x9d, 0xcc, 0x03, 0xef, 0xc7, 0x3c, 0xf0, 0xde, 0x3f, 0x1f, 0x70, + 0x3d, 0xac, 0xb2, 0x28, 0x97, 0x05, 0x7d, 0x65, 0xfc, 0xf4, 0x86, 0xc0, 0x05, 0x75, 0x6f, 0x68, + 0xdc, 0xa1, 0x9f, 0xcf, 0x3f, 0x24, 0x3d, 0x19, 0x31, 0x95, 0xad, 0x99, 0xeb, 0x7e, 0xf6, 0x27, + 0x00, 0x00, 0xff, 0xff, 0xb2, 0x87, 0x6f, 0x1a, 0x6c, 0x03, 0x00, 0x00, } func (this *DenomAuthorityMetadata) Equal(that interface{}) bool { diff --git a/x/tokenfactory/types/state_test.go b/x/tokenfactory/types/state_test.go index 614bc3794..51ad0f64a 100644 --- a/x/tokenfactory/types/state_test.go +++ b/x/tokenfactory/types/state_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/tokenfactory/types" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) func TestDenomStr_Validate(t *testing.T) { diff --git a/x/tokenfactory/types/tx.pb.go b/x/tokenfactory/types/tx.pb.go index 25a92dacf..3bc112f12 100644 --- a/x/tokenfactory/types/tx.pb.go +++ b/x/tokenfactory/types/tx.pb.go @@ -740,59 +740,59 @@ func init() { func init() { proto.RegisterFile("nibiru/tokenfactory/v1/tx.proto", fileDescriptor_4c78bacd179e004d) } var fileDescriptor_4c78bacd179e004d = []byte{ - // 826 bytes of a gzipped FileDescriptorProto + // 829 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4f, 0x6f, 0xe3, 0x44, 0x14, 0x8f, 0xd9, 0x6e, 0x36, 0x99, 0xd2, 0x3f, 0xeb, 0x96, 0x34, 0x6b, 0xd4, 0x18, 0x8d, 0x60, - 0x81, 0x45, 0xb5, 0x95, 0xae, 0xe0, 0xb0, 0x17, 0xb4, 0x2e, 0xe2, 0x84, 0x57, 0x2b, 0x6f, 0xb9, - 0x20, 0xa4, 0x68, 0x12, 0x4f, 0x1d, 0xab, 0xf5, 0x4c, 0xe4, 0x99, 0xa4, 0x0d, 0x07, 0x24, 0xf8, - 0x04, 0x9c, 0xf8, 0x02, 0x9c, 0x10, 0x17, 0x0e, 0x7c, 0x88, 0xde, 0xa8, 0x38, 0x71, 0xb2, 0x50, - 0x7b, 0xe0, 0x9e, 0x4f, 0xb0, 0x9a, 0x3f, 0xb5, 0xdd, 0x26, 0x4d, 0x9b, 0x4b, 0x6f, 0x63, 0xbf, - 0xdf, 0xfb, 0xbd, 0xdf, 0xcf, 0x7e, 0xef, 0x69, 0x80, 0x4d, 0xe2, 0x6e, 0x9c, 0x0e, 0x5d, 0x4e, - 0x0f, 0x31, 0x39, 0x40, 0x3d, 0x4e, 0xd3, 0xb1, 0x3b, 0x6a, 0xbb, 0xfc, 0xc4, 0x19, 0xa4, 0x94, - 0x53, 0x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93, 0x98, 0x2c, 0x62, 0xe6, 0x29, 0x78, - 0x58, 0x76, 0xb2, 0x3e, 0xc9, 0xec, 0x77, 0x15, 0x52, 0x57, 0x53, 0x61, 0xb3, 0x0d, 0xea, 0x42, - 0x08, 0x12, 0xfc, 0xcd, 0x07, 0x12, 0xbb, 0x39, 0xc9, 0xec, 0xf5, 0x42, 0xa3, 0x0c, 0xc1, 0xa0, - 0x46, 0xf0, 0xb1, 0x54, 0x01, 0x9b, 0xca, 0x76, 0xa1, 0xeb, 0xd2, 0x36, 0xfc, 0xcd, 0x00, 0xef, - 0xf9, 0x2c, 0xfa, 0x76, 0x10, 0x22, 0x8e, 0x7d, 0x1a, 0x0e, 0x8f, 0xf0, 0x6b, 0x94, 0xa2, 0x84, - 0x99, 0x5f, 0x80, 0x3a, 0x1a, 0xf2, 0x3e, 0x4d, 0x63, 0x3e, 0xd6, 0xe2, 0x9b, 0xff, 0xfc, 0xb5, - 0xb3, 0xa9, 0x3b, 0xe0, 0x65, 0x18, 0xa6, 0x98, 0xb1, 0x37, 0x3c, 0x8d, 0x49, 0x14, 0x14, 0x50, - 0xd3, 0x03, 0xd5, 0x81, 0x64, 0x90, 0x3e, 0x96, 0x77, 0x3f, 0x74, 0x66, 0xf7, 0xa9, 0x53, 0xae, - 0xe6, 0x2d, 0x9d, 0x66, 0x76, 0x25, 0xd0, 0x99, 0x2f, 0x56, 0x7f, 0xfe, 0xff, 0xcf, 0x67, 0x05, - 0x27, 0xb4, 0xc1, 0xf6, 0x4c, 0x91, 0xb9, 0x8d, 0xdf, 0x0d, 0xf0, 0xc8, 0x67, 0x91, 0x1f, 0x13, - 0xbe, 0xc8, 0x27, 0xf7, 0xc0, 0x92, 0x18, 0x01, 0xad, 0xf4, 0x89, 0xa3, 0xbd, 0x89, 0x19, 0x71, - 0x74, 0x3f, 0x3b, 0x7b, 0x34, 0x26, 0xde, 0x86, 0x90, 0x37, 0xc9, 0xec, 0x65, 0xc5, 0x23, 0x92, - 0x60, 0x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, 0x30, 0x67, 0x6c, 0x9b, 0x9d, 0x39, 0x2c, 0xd3, - 0x70, 0xeb, 0xf3, 0x85, 0xe0, 0x79, 0xed, 0xd7, 0x60, 0x49, 0xae, 0x08, 0x7b, 0x4e, 0xba, 0x00, - 0x58, 0x1f, 0xdf, 0x02, 0x28, 0x33, 0xca, 0xe1, 0x9c, 0xc7, 0x28, 0x00, 0x73, 0x19, 0xcb, 0x13, - 0x63, 0x72, 0xb0, 0x3e, 0x35, 0x2d, 0x9f, 0xcd, 0x49, 0xbe, 0x0e, 0xb6, 0x9e, 0x2f, 0x00, 0xce, - 0xab, 0x86, 0x00, 0x94, 0x26, 0xe0, 0xa3, 0x5b, 0xc4, 0x2a, 0x98, 0xb5, 0x73, 0x27, 0x58, 0x3e, - 0x68, 0x15, 0xef, 0x9b, 0xd3, 0xf3, 0x96, 0x71, 0x76, 0xde, 0x32, 0xfe, 0x3b, 0x6f, 0x19, 0xbf, - 0x5c, 0xb4, 0x2a, 0x67, 0x17, 0xad, 0xca, 0xbf, 0x17, 0xad, 0xca, 0x77, 0xbb, 0x51, 0xcc, 0xfb, - 0xc3, 0xae, 0xd3, 0xa3, 0x89, 0xfb, 0x4a, 0x92, 0xee, 0xf5, 0x51, 0x4c, 0x5c, 0x7d, 0x83, 0x38, - 0xb9, 0x7a, 0x87, 0xe0, 0xe3, 0x01, 0x66, 0xdd, 0xaa, 0xbc, 0x41, 0x3c, 0x7f, 0x1b, 0x00, 0x00, - 0xff, 0xff, 0xb6, 0x28, 0x76, 0x66, 0x2a, 0x09, 0x00, 0x00, + 0x81, 0x45, 0xb5, 0x95, 0xae, 0x96, 0xc3, 0x5e, 0xd0, 0xba, 0x88, 0x9b, 0x97, 0x95, 0xb7, 0x5c, + 0x10, 0x52, 0x34, 0x89, 0xa7, 0x8e, 0xd5, 0x7a, 0x26, 0xf2, 0x4c, 0xd2, 0x86, 0x03, 0x12, 0x7c, + 0x02, 0x4e, 0x7c, 0x01, 0x4e, 0x88, 0x0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f0, 0xc6, 0x24, 0xb3, + 0xd7, 0x34, 0x58, 0x47, 0x60, 0x90, 0x83, 0xe0, 0x77, 0xa0, 0x71, 0xb5, 0x5a, 0x80, 0xd9, 0x80, + 0x12, 0x86, 0x4d, 0x0f, 0xac, 0x11, 0x7c, 0xdc, 0x91, 0x52, 0x3b, 0x8a, 0x51, 0x95, 0xb7, 0x26, + 0x99, 0xdd, 0x50, 0x8c, 0xd7, 0x00, 0x30, 0x58, 0x21, 0xf8, 0x78, 0x5f, 0xbc, 0x90, 0x5c, 0xf0, + 0x17, 0x43, 0x99, 0xe9, 0x23, 0x12, 0xe1, 0x57, 0x61, 0x12, 0x93, 0x45, 0xcc, 0x3c, 0x05, 0x0f, + 0xcb, 0x4e, 0xd6, 0x27, 0x99, 0xfd, 0xae, 0x42, 0xea, 0x6a, 0x2a, 0x6c, 0xb6, 0x41, 0x5d, 0x08, + 0x41, 0x82, 0xbf, 0xf9, 0x40, 0x62, 0x37, 0x27, 0x99, 0xbd, 0x5e, 0x68, 0x94, 0x21, 0x18, 0xd4, + 0x08, 0x3e, 0x96, 0x2a, 0x60, 0x53, 0xd9, 0x2e, 0x74, 0x5d, 0xda, 0x86, 0xbf, 0x1a, 0xe0, 0x3d, + 0x9f, 0x45, 0xdf, 0x0c, 0x42, 0xc4, 0xb1, 0x4f, 0xc3, 0xe1, 0x11, 0x7e, 0x83, 0x52, 0x94, 0x30, + 0xf3, 0x73, 0x50, 0x47, 0x43, 0xde, 0xa7, 0x69, 0xcc, 0xc7, 0x5a, 0x7c, 0xf3, 0xef, 0x3f, 0x77, + 0x36, 0x75, 0x07, 0xbc, 0x0a, 0xc3, 0x14, 0x33, 0xf6, 0x96, 0xa7, 0x31, 0x89, 0x82, 0x02, 0x6a, + 0x7a, 0xa0, 0x3a, 0x90, 0x0c, 0xd2, 0xc7, 0xf2, 0xee, 0x87, 0xce, 0xec, 0x3e, 0x75, 0xca, 0xd5, + 0xbc, 0xa5, 0xd3, 0xcc, 0xae, 0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0xe4, 0xea, 0x35, 0x82, 0x8f, 0x07, 0x98, 0x75, 0xab, 0xf2, 0x12, 0xf1, 0xfc, 0xff, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x14, 0x71, 0x2c, 0x23, 0x2d, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/tokenfactory/types/tx_msgs_test.go b/x/tokenfactory/types/tx_msgs_test.go index 31d39fb07..c71033c7f 100644 --- a/x/tokenfactory/types/tx_msgs_test.go +++ b/x/tokenfactory/types/tx_msgs_test.go @@ -13,8 +13,8 @@ import ( "cosmossdk.io/math" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/NibiruChain/nibiru/x/common/testutil" - "github.com/NibiruChain/nibiru/x/tokenfactory/types" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/tokenfactory/types" ) type ValidateBasicTest struct { From fdcda38e9c06f9c45c5f5d39bd8f8d75c7b97c72 Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Wed, 14 Aug 2024 00:01:20 -0700 Subject: [PATCH 4/8] refactor(evm): clean up erc20 and funtoken methods (#2000) * refactor: simplify DeployERC20ForBankCoin * refactor: erc20 keeper methods * remove err array * clean up CallContractWithInput * refactor bankSend precompile * refactor PrecompileAddr_FuntokenGateway * clean up precompile * refactor: remove NibiruPrecompile * Update CHANGELOG.md * fix: DeployERC20ForBankCoin uses wrong nonce * fix: precompile tests * test(evm): fix TestDeployERC20ForBankCoin assertions * test(evm): refactor TestCreateFunTokenFromERC20 * refactor TestCreateFunTokenFromCoin * remove DoEthTx * simplify AssertERC20BalanceEqual * simplify CreateFunTokenForBankCoin * remove PrivKeyE from EthPrivKeyAcc * remove NewEthTxMsg * remove GoCtx * remove GethSigner * rename NewEthAccInfo to EthPrivAcc * remove CreateContractGethCoreMsg * rename to ExecuteContractMsgEthereumTx --- CHANGELOG.md | 1 + app/evmante/evmante_can_transfer_test.go | 11 +- app/evmante/evmante_handler_test.go | 6 +- app/evmante/evmante_mempool_fees_test.go | 2 +- app/evmante/evmante_sigverify_test.go | 11 +- app/evmante/evmante_validate_basic_test.go | 13 +- eth/assert_test.go | 4 +- eth/encoding/config_test.go | 2 +- eth/eth_account_test.go | 6 +- eth/rpc/backend/account_info_test.go | 28 ++-- eth/rpc/backend/backend_suite_test.go | 6 +- eth/rpc/backend/blocks_test.go | 30 ++-- eth/rpc/backend/call_tx_test.go | 4 +- eth/rpc/backend/chain_info_test.go | 2 +- eth/rpc/backend/evm_query_client_test.go | 2 +- eth/rpc/backend/sign_tx_test.go | 6 +- x/evm/evm_test.go | 3 +- x/evm/evmtest/erc20.go | 46 +++-- x/evm/evmtest/eth.go | 19 +-- x/evm/evmtest/eth_test.go | 2 +- x/evm/evmtest/evmante.go | 4 +- x/evm/evmtest/smart_contract.go | 69 +++----- x/evm/evmtest/smart_contract_test.go | 32 +--- x/evm/evmtest/test_deps.go | 11 +- x/evm/evmtest/tx.go | 35 ++-- x/evm/keeper/erc20.go | 15 +- x/evm/keeper/erc20_test.go | 185 +++++++++++---------- x/evm/keeper/funtoken_from_coin.go | 28 ++-- x/evm/keeper/funtoken_from_erc20.go | 34 ++-- x/evm/keeper/grpc_query_test.go | 22 +-- x/evm/keeper/msg_ethereum_tx_test.go | 14 +- x/evm/logs_test.go | 6 +- x/evm/msg_test.go | 6 +- x/evm/precompile/funtoken.go | 71 +++----- x/evm/precompile/funtoken_test.go | 28 ++-- x/evm/precompile/precompile.go | 32 ++-- x/evm/tx_test.go | 2 +- 37 files changed, 345 insertions(+), 453 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e03ad41a..5139ee102 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -103,6 +103,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#1989](https://github.com/NibiruChain/nibiru/pull/1989) - refactor(evm): simplify evm module address - [#1996](https://github.com/NibiruChain/nibiru/pull/1996) - perf(evm-keeper-precompile): implement sorted map for `k.precompiles` to remove dead code - [#1997](https://github.com/NibiruChain/nibiru/pull/1997) - refactor(evm): Remove unnecessary params: "enable_call", "enable_create". +- [#2000](https://github.com/NibiruChain/nibiru/pull/2000) - refactor(evm): simplify ERC-20 keeper methods #### Dapp modules: perp, spot, oracle, etc diff --git a/app/evmante/evmante_can_transfer_test.go b/app/evmante/evmante_can_transfer_test.go index 6602b1dfd..74e697f8b 100644 --- a/app/evmante/evmante_can_transfer_test.go +++ b/app/evmante/evmante_can_transfer_test.go @@ -2,6 +2,7 @@ package evmante_test import ( sdk "github.com/cosmos/cosmos-sdk/types" + gethcore "github.com/ethereum/go-ethereum/core/types" "github.com/NibiruChain/nibiru/v2/app/evmante" "github.com/NibiruChain/nibiru/v2/eth" @@ -34,9 +35,8 @@ func (s *TestSuite) TestCanTransferDecorator() { txMsg := evmtest.HappyTransferTx(deps, 0) txBuilder := deps.EncCfg.TxConfig.NewTxBuilder() - gethSigner := deps.Sender.GethSigner(deps.App.EvmKeeper.EthChainID(deps.Ctx)) - keyringSigner := deps.Sender.KeyringSigner - err := txMsg.Sign(gethSigner, keyringSigner) + gethSigner := gethcore.LatestSignerForChainID(deps.App.EvmKeeper.EthChainID(deps.Ctx)) + err := txMsg.Sign(gethSigner, deps.Sender.KeyringSigner) s.Require().NoError(err) tx, err := txMsg.BuildTx(txBuilder, eth.EthBaseDenom) @@ -52,9 +52,8 @@ func (s *TestSuite) TestCanTransferDecorator() { txMsg := evmtest.HappyTransferTx(deps, 0) txBuilder := deps.EncCfg.TxConfig.NewTxBuilder() - gethSigner := deps.Sender.GethSigner(deps.App.EvmKeeper.EthChainID(deps.Ctx)) - keyringSigner := deps.Sender.KeyringSigner - err := txMsg.Sign(gethSigner, keyringSigner) + gethSigner := gethcore.LatestSignerForChainID(deps.App.EvmKeeper.EthChainID(deps.Ctx)) + err := txMsg.Sign(gethSigner, deps.Sender.KeyringSigner) s.Require().NoError(err) tx, err := txMsg.BuildTx(txBuilder, eth.EthBaseDenom) diff --git a/app/evmante/evmante_handler_test.go b/app/evmante/evmante_handler_test.go index cb09c60cd..62e7afb0d 100644 --- a/app/evmante/evmante_handler_test.go +++ b/app/evmante/evmante_handler_test.go @@ -7,6 +7,7 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" authante "github.com/cosmos/cosmos-sdk/x/auth/ante" + gethcore "github.com/ethereum/go-ethereum/core/types" "github.com/NibiruChain/nibiru/v2/app/ante" "github.com/NibiruChain/nibiru/v2/app/evmante" @@ -52,9 +53,8 @@ func (s *TestSuite) TestAnteHandlerEVM() { txMsg := evmtest.HappyTransferTx(deps, 0) txBuilder := deps.EncCfg.TxConfig.NewTxBuilder() - gethSigner := deps.Sender.GethSigner(deps.App.EvmKeeper.EthChainID(deps.Ctx)) - keyringSigner := deps.Sender.KeyringSigner - err := txMsg.Sign(gethSigner, keyringSigner) + gethSigner := gethcore.LatestSignerForChainID(deps.App.EvmKeeper.EthChainID(deps.Ctx)) + err := txMsg.Sign(gethSigner, deps.Sender.KeyringSigner) s.Require().NoError(err) tx, err := txMsg.BuildTx(txBuilder, eth.EthBaseDenom) diff --git a/app/evmante/evmante_mempool_fees_test.go b/app/evmante/evmante_mempool_fees_test.go index d2d52646e..ef7b34e64 100644 --- a/app/evmante/evmante_mempool_fees_test.go +++ b/app/evmante/evmante_mempool_fees_test.go @@ -70,7 +70,7 @@ func (s *TestSuite) TestMempoolGasFeeDecorator() { fees := sdk.NewCoins(sdk.NewInt64Coin("unibi", int64(gasLimit))) msg := &banktypes.MsgSend{ FromAddress: deps.Sender.NibiruAddr.String(), - ToAddress: evmtest.NewEthAccInfo().NibiruAddr.String(), + ToAddress: evmtest.NewEthPrivAcc().NibiruAddr.String(), Amount: sdk.NewCoins(sdk.NewInt64Coin("unibi", 1)), } return buildTx(deps, true, msg, gasLimit, fees) diff --git a/app/evmante/evmante_sigverify_test.go b/app/evmante/evmante_sigverify_test.go index 0a898bea9..63b290140 100644 --- a/app/evmante/evmante_sigverify_test.go +++ b/app/evmante/evmante_sigverify_test.go @@ -5,6 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" + gethcore "github.com/ethereum/go-ethereum/core/types" "github.com/NibiruChain/nibiru/v2/app/evmante" "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" @@ -42,9 +43,8 @@ func (s *TestSuite) TestEthSigVerificationDecorator() { name: "sad: ethereum tx invalid chain id", txSetup: func(deps *evmtest.TestDeps) sdk.Tx { tx := evmtest.HappyCreateContractTx(deps) - gethSigner := deps.Sender.GethSigner(InvalidChainID) - keyringSigner := deps.Sender.KeyringSigner - err := tx.Sign(gethSigner, keyringSigner) + gethSigner := gethcore.LatestSignerForChainID(InvalidChainID) + err := tx.Sign(gethSigner, deps.Sender.KeyringSigner) s.Require().NoError(err) return tx }, @@ -54,9 +54,8 @@ func (s *TestSuite) TestEthSigVerificationDecorator() { name: "happy: signed ethereum tx", txSetup: func(deps *evmtest.TestDeps) sdk.Tx { tx := evmtest.HappyCreateContractTx(deps) - gethSigner := deps.Sender.GethSigner(deps.App.EvmKeeper.EthChainID(deps.Ctx)) - keyringSigner := deps.Sender.KeyringSigner - err := tx.Sign(gethSigner, keyringSigner) + gethSigner := gethcore.LatestSignerForChainID(deps.App.EvmKeeper.EthChainID(deps.Ctx)) + err := tx.Sign(gethSigner, deps.Sender.KeyringSigner) s.Require().NoError(err) return tx }, diff --git a/app/evmante/evmante_validate_basic_test.go b/app/evmante/evmante_validate_basic_test.go index 94d7aa1a0..4f0e136ff 100644 --- a/app/evmante/evmante_validate_basic_test.go +++ b/app/evmante/evmante_validate_basic_test.go @@ -9,6 +9,7 @@ import ( authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/ethereum/go-ethereum/common" + gethcore "github.com/ethereum/go-ethereum/core/types" "github.com/NibiruChain/nibiru/v2/app/evmante" "github.com/NibiruChain/nibiru/v2/eth" @@ -56,9 +57,8 @@ func (s *TestSuite) TestEthValidateBasicDecorator() { name: "sad: tx not implementing protoTxProvider", txSetup: func(deps *evmtest.TestDeps) sdk.Tx { tx := evmtest.HappyCreateContractTx(deps) - gethSigner := deps.Sender.GethSigner(InvalidChainID) - keyringSigner := deps.Sender.KeyringSigner - err := tx.Sign(gethSigner, keyringSigner) + gethSigner := gethcore.LatestSignerForChainID(InvalidChainID) + err := tx.Sign(gethSigner, deps.Sender.KeyringSigner) s.Require().NoError(err) return tx }, @@ -113,9 +113,8 @@ func (s *TestSuite) TestEthValidateBasicDecorator() { s.Require().NoError(err) txMsg := evmtest.HappyCreateContractTx(deps) - gethSigner := deps.Sender.GethSigner(deps.App.EvmKeeper.EthChainID(deps.Ctx)) - keyringSigner := deps.Sender.KeyringSigner - err = txMsg.Sign(gethSigner, keyringSigner) + gethSigner := gethcore.LatestSignerForChainID(deps.App.EvmKeeper.EthChainID(deps.Ctx)) + err = txMsg.Sign(gethSigner, deps.Sender.KeyringSigner) s.Require().NoError(err) tx, err := txMsg.BuildTx(txBuilder, eth.EthBaseDenom) @@ -142,7 +141,7 @@ func (s *TestSuite) TestEthValidateBasicDecorator() { fees := sdk.NewCoins(sdk.NewInt64Coin("unibi", int64(gasLimit))) msg := &banktypes.MsgSend{ FromAddress: deps.Sender.NibiruAddr.String(), - ToAddress: evmtest.NewEthAccInfo().NibiruAddr.String(), + ToAddress: evmtest.NewEthPrivAcc().NibiruAddr.String(), Amount: sdk.NewCoins(sdk.NewInt64Coin("unibi", 1)), } return buildTx(deps, true, msg, gasLimit, fees) diff --git a/eth/assert_test.go b/eth/assert_test.go index 39045d8a0..f6d38beb7 100644 --- a/eth/assert_test.go +++ b/eth/assert_test.go @@ -72,7 +72,7 @@ func TestValidateAddress(t *testing.T) { "zero address", common.Address{}.String(), false, }, { - "valid address", evmtest.NewEthAccInfo().EthAddr.Hex(), false, + "valid address", evmtest.NewEthPrivAcc().EthAddr.Hex(), false, }, } @@ -103,7 +103,7 @@ func TestValidateNonZeroAddress(t *testing.T) { "zero address", common.Address{}.String(), true, }, { - "valid address", evmtest.NewEthAccInfo().EthAddr.Hex(), false, + "valid address", evmtest.NewEthPrivAcc().EthAddr.Hex(), false, }, } diff --git a/eth/encoding/config_test.go b/eth/encoding/config_test.go index 37ec3b29f..5de6c822e 100644 --- a/eth/encoding/config_test.go +++ b/eth/encoding/config_test.go @@ -15,7 +15,7 @@ import ( ) func TestTxEncoding(t *testing.T) { - ethAcc := evmtest.NewEthAccInfo() + ethAcc := evmtest.NewEthPrivAcc() addr, key := ethAcc.EthAddr, ethAcc.PrivKey signer := evmtest.NewSigner(key) diff --git a/eth/eth_account_test.go b/eth/eth_account_test.go index f42608b65..d33cf8fc4 100644 --- a/eth/eth_account_test.go +++ b/eth/eth_account_test.go @@ -6,7 +6,7 @@ import ( ) func (s *Suite) TestEthAddrToNibiruAddr() { - accInfo := evmtest.NewEthAccInfo() + accInfo := evmtest.NewEthPrivAcc() s.Equal( accInfo.EthAddr, eth.NibiruAddrToEthAddr(accInfo.NibiruAddr), @@ -18,7 +18,7 @@ func (s *Suite) TestEthAddrToNibiruAddr() { s.T().Log("unit operation - hex -> nibi -> hex") { - addr := evmtest.NewEthAccInfo().NibiruAddr + addr := evmtest.NewEthPrivAcc().NibiruAddr s.Equal( addr, eth.EthAddrToNibiruAddr( @@ -29,7 +29,7 @@ func (s *Suite) TestEthAddrToNibiruAddr() { s.T().Log("unit operation - nibi -> hex -> nibi") { - addr := evmtest.NewEthAccInfo().EthAddr + addr := evmtest.NewEthPrivAcc().EthAddr s.Equal( addr, eth.NibiruAddrToEthAddr( diff --git a/eth/rpc/backend/account_info_test.go b/eth/rpc/backend/account_info_test.go index 623fa4d54..15650c0f4 100644 --- a/eth/rpc/backend/account_info_test.go +++ b/eth/rpc/backend/account_info_test.go @@ -33,7 +33,7 @@ func (s *BackendSuite) TestGetCode() { }{ { "fail - BlockHash and BlockNumber are both nil ", - evmtest.NewEthAccInfo().EthAddr, + evmtest.NewEthPrivAcc().EthAddr, rpc.BlockNumberOrHash{}, func(addr common.Address) {}, false, @@ -41,7 +41,7 @@ func (s *BackendSuite) TestGetCode() { }, { "fail - query client errors on getting Code", - evmtest.NewEthAccInfo().EthAddr, + evmtest.NewEthPrivAcc().EthAddr, rpc.BlockNumberOrHash{BlockNumber: &blockNr}, func(addr common.Address) { queryClient := s.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) @@ -52,7 +52,7 @@ func (s *BackendSuite) TestGetCode() { }, { "pass", - evmtest.NewEthAccInfo().EthAddr, + evmtest.NewEthPrivAcc().EthAddr, rpc.BlockNumberOrHash{BlockNumber: &blockNr}, func(addr common.Address) { queryClient := s.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) @@ -81,7 +81,7 @@ func (s *BackendSuite) TestGetCode() { func (s *BackendSuite) TestGetProof() { blockNrInvalid := rpc.NewBlockNumber(big.NewInt(1)) blockNr := rpc.NewBlockNumber(big.NewInt(4)) - address1 := evmtest.NewEthAccInfo().EthAddr + address1 := evmtest.NewEthPrivAcc().EthAddr testCases := []struct { name string @@ -199,7 +199,7 @@ func (s *BackendSuite) TestGetStorageAt() { }{ { "fail - BlockHash and BlockNumber are both nil", - evmtest.NewEthAccInfo().EthAddr, + evmtest.NewEthPrivAcc().EthAddr, "0x0", rpc.BlockNumberOrHash{}, func(addr common.Address, key string, storage string) {}, @@ -208,7 +208,7 @@ func (s *BackendSuite) TestGetStorageAt() { }, { "fail - query client errors on getting Storage", - evmtest.NewEthAccInfo().EthAddr, + evmtest.NewEthPrivAcc().EthAddr, "0x0", rpc.BlockNumberOrHash{BlockNumber: &blockNr}, func(addr common.Address, key string, storage string) { @@ -220,7 +220,7 @@ func (s *BackendSuite) TestGetStorageAt() { }, { "pass", - evmtest.NewEthAccInfo().EthAddr, + evmtest.NewEthPrivAcc().EthAddr, "0x0", rpc.BlockNumberOrHash{BlockNumber: &blockNr}, func(addr common.Address, key string, storage string) { @@ -260,7 +260,7 @@ func (s *BackendSuite) TestGetEvmGasBalance() { }{ { "fail - BlockHash and BlockNumber are both nil", - evmtest.NewEthAccInfo().EthAddr, + evmtest.NewEthPrivAcc().EthAddr, rpc.BlockNumberOrHash{}, func(bn rpc.BlockNumber, addr common.Address) { }, @@ -269,7 +269,7 @@ func (s *BackendSuite) TestGetEvmGasBalance() { }, { "fail - tendermint client failed to get block", - evmtest.NewEthAccInfo().EthAddr, + evmtest.NewEthPrivAcc().EthAddr, rpc.BlockNumberOrHash{BlockNumber: &blockNr}, func(bn rpc.BlockNumber, addr common.Address) { client := s.backend.clientCtx.Client.(*mocks.Client) @@ -280,7 +280,7 @@ func (s *BackendSuite) TestGetEvmGasBalance() { }, { "fail - query client failed to get balance", - evmtest.NewEthAccInfo().EthAddr, + evmtest.NewEthPrivAcc().EthAddr, rpc.BlockNumberOrHash{BlockNumber: &blockNr}, func(bn rpc.BlockNumber, addr common.Address) { client := s.backend.clientCtx.Client.(*mocks.Client) @@ -294,7 +294,7 @@ func (s *BackendSuite) TestGetEvmGasBalance() { }, { "fail - invalid balance", - evmtest.NewEthAccInfo().EthAddr, + evmtest.NewEthPrivAcc().EthAddr, rpc.BlockNumberOrHash{BlockNumber: &blockNr}, func(bn rpc.BlockNumber, addr common.Address) { client := s.backend.clientCtx.Client.(*mocks.Client) @@ -308,7 +308,7 @@ func (s *BackendSuite) TestGetEvmGasBalance() { }, { "fail - pruned node state", - evmtest.NewEthAccInfo().EthAddr, + evmtest.NewEthPrivAcc().EthAddr, rpc.BlockNumberOrHash{BlockNumber: &blockNr}, func(bn rpc.BlockNumber, addr common.Address) { client := s.backend.clientCtx.Client.(*mocks.Client) @@ -322,7 +322,7 @@ func (s *BackendSuite) TestGetEvmGasBalance() { }, { "pass", - evmtest.NewEthAccInfo().EthAddr, + evmtest.NewEthPrivAcc().EthAddr, rpc.BlockNumberOrHash{BlockNumber: &blockNr}, func(bn rpc.BlockNumber, addr common.Address) { client := s.backend.clientCtx.Client.(*mocks.Client) @@ -393,7 +393,7 @@ func (s *BackendSuite) TestGetTransactionCount() { s.Run(fmt.Sprintf("Case %s", tc.name), func() { s.SetupTest() - addr := evmtest.NewEthAccInfo().EthAddr + addr := evmtest.NewEthPrivAcc().EthAddr if tc.accExists { addr = common.BytesToAddress(s.acc.Bytes()) } diff --git a/eth/rpc/backend/backend_suite_test.go b/eth/rpc/backend/backend_suite_test.go index 1bf7e2efb..e019c2fcc 100644 --- a/eth/rpc/backend/backend_suite_test.go +++ b/eth/rpc/backend/backend_suite_test.go @@ -58,7 +58,7 @@ func (s *BackendSuite) SetupTest() { } // Create Account with set sequence - s.acc = sdk.AccAddress(evmtest.NewEthAccInfo().EthAddr.Bytes()) + s.acc = sdk.AccAddress(evmtest.NewEthPrivAcc().EthAddr.Bytes()) accounts := map[string]client.TestAccount{} accounts[s.acc.String()] = client.TestAccount{ Address: s.acc, @@ -66,7 +66,7 @@ func (s *BackendSuite) SetupTest() { Seq: uint64(1), } - ethAcc := evmtest.NewEthAccInfo() + ethAcc := evmtest.NewEthPrivAcc() from, priv := ethAcc.EthAddr, ethAcc.PrivKey s.from = from s.signer = evmtest.NewSigner(priv) @@ -180,7 +180,7 @@ func (s *BackendSuite) generateTestKeyring(clientDir string) (keyring.Keyring, e } func (s *BackendSuite) signAndEncodeEthTx(msgEthereumTx *evm.MsgEthereumTx) []byte { - ethAcc := evmtest.NewEthAccInfo() + ethAcc := evmtest.NewEthPrivAcc() from, priv := ethAcc.EthAddr, ethAcc.PrivKey signer := evmtest.NewSigner(priv) diff --git a/eth/rpc/backend/blocks_test.go b/eth/rpc/backend/blocks_test.go index 3d19f072f..d65dbf421 100644 --- a/eth/rpc/backend/blocks_test.go +++ b/eth/rpc/backend/blocks_test.go @@ -104,7 +104,7 @@ func (s *BackendSuite) TestGetBlockByNumber() { blockNumber: rpc.BlockNumber(1), fullTx: true, baseFee: math.NewInt(1).BigInt(), - validator: sdk.AccAddress(evmtest.NewEthAccInfo().EthAddr.Bytes()), + validator: sdk.AccAddress(evmtest.NewEthPrivAcc().EthAddr.Bytes()), ethTx: nil, ethTxBz: nil, registerMock: func(blockNum rpc.BlockNumber, _ math.Int, _ sdk.AccAddress, _ []byte) { @@ -120,7 +120,7 @@ func (s *BackendSuite) TestGetBlockByNumber() { blockNumber: rpc.BlockNumber(1), fullTx: true, baseFee: math.NewInt(1).BigInt(), - validator: sdk.AccAddress(evmtest.NewEthAccInfo().EthAddr.Bytes()), + validator: sdk.AccAddress(evmtest.NewEthPrivAcc().EthAddr.Bytes()), ethTx: nil, ethTxBz: nil, registerMock: func(blockNum rpc.BlockNumber, baseFee math.Int, validator sdk.AccAddress, txBz []byte) { @@ -136,7 +136,7 @@ func (s *BackendSuite) TestGetBlockByNumber() { blockNumber: rpc.BlockNumber(1), fullTx: true, baseFee: math.NewInt(1).BigInt(), - validator: sdk.AccAddress(evmtest.NewEthAccInfo().EthAddr.Bytes()), + validator: sdk.AccAddress(evmtest.NewEthPrivAcc().EthAddr.Bytes()), ethTx: nil, ethTxBz: nil, registerMock: func(blockNum rpc.BlockNumber, baseFee math.Int, validator sdk.AccAddress, txBz []byte) { @@ -153,7 +153,7 @@ func (s *BackendSuite) TestGetBlockByNumber() { blockNumber: rpc.BlockNumber(1), fullTx: true, baseFee: math.NewInt(1).BigInt(), - validator: sdk.AccAddress(evmtest.NewEthAccInfo().EthAddr.Bytes()), + validator: sdk.AccAddress(evmtest.NewEthPrivAcc().EthAddr.Bytes()), ethTx: nil, ethTxBz: nil, registerMock: func(blockNum rpc.BlockNumber, baseFee math.Int, validator sdk.AccAddress, txBz []byte) { @@ -175,7 +175,7 @@ func (s *BackendSuite) TestGetBlockByNumber() { blockNumber: rpc.BlockNumber(1), fullTx: true, baseFee: math.NewInt(1).BigInt(), - validator: sdk.AccAddress(evmtest.NewEthAccInfo().EthAddr.Bytes()), + validator: sdk.AccAddress(evmtest.NewEthPrivAcc().EthAddr.Bytes()), ethTx: msgEthereumTx, ethTxBz: bz, registerMock: func(blockNum rpc.BlockNumber, baseFee math.Int, validator sdk.AccAddress, txBz []byte) { @@ -249,7 +249,7 @@ func (s *BackendSuite) TestGetBlockByHash() { hash: common.BytesToHash(block.Hash()), fullTx: true, baseFee: math.NewInt(1).BigInt(), - validator: sdk.AccAddress(evmtest.NewEthAccInfo().EthAddr.Bytes()), + validator: sdk.AccAddress(evmtest.NewEthPrivAcc().EthAddr.Bytes()), tx: nil, txBz: nil, registerMock: func(hash common.Hash, baseFee math.Int, validator sdk.AccAddress, txBz []byte) { @@ -264,7 +264,7 @@ func (s *BackendSuite) TestGetBlockByHash() { hash: common.BytesToHash(block.Hash()), fullTx: true, baseFee: math.NewInt(1).BigInt(), - validator: sdk.AccAddress(evmtest.NewEthAccInfo().EthAddr.Bytes()), + validator: sdk.AccAddress(evmtest.NewEthPrivAcc().EthAddr.Bytes()), tx: nil, txBz: nil, registerMock: func(hash common.Hash, baseFee math.Int, validator sdk.AccAddress, txBz []byte) { @@ -279,7 +279,7 @@ func (s *BackendSuite) TestGetBlockByHash() { hash: common.BytesToHash(block.Hash()), fullTx: true, baseFee: math.NewInt(1).BigInt(), - validator: sdk.AccAddress(evmtest.NewEthAccInfo().EthAddr.Bytes()), + validator: sdk.AccAddress(evmtest.NewEthPrivAcc().EthAddr.Bytes()), tx: nil, txBz: nil, registerMock: func(hash common.Hash, baseFee math.Int, validator sdk.AccAddress, txBz []byte) { @@ -297,7 +297,7 @@ func (s *BackendSuite) TestGetBlockByHash() { hash: common.BytesToHash(block.Hash()), fullTx: true, baseFee: math.NewInt(1).BigInt(), - validator: sdk.AccAddress(evmtest.NewEthAccInfo().EthAddr.Bytes()), + validator: sdk.AccAddress(evmtest.NewEthPrivAcc().EthAddr.Bytes()), tx: nil, txBz: nil, registerMock: func(hash common.Hash, baseFee math.Int, validator sdk.AccAddress, txBz []byte) { @@ -320,7 +320,7 @@ func (s *BackendSuite) TestGetBlockByHash() { hash: common.BytesToHash(block.Hash()), fullTx: true, baseFee: math.NewInt(1).BigInt(), - validator: sdk.AccAddress(evmtest.NewEthAccInfo().EthAddr.Bytes()), + validator: sdk.AccAddress(evmtest.NewEthPrivAcc().EthAddr.Bytes()), tx: msgEthereumTx, txBz: bz, registerMock: func(hash common.Hash, baseFee math.Int, validator sdk.AccAddress, txBz []byte) { @@ -926,7 +926,7 @@ func (s *BackendSuite) TestGetEthBlockFromTendermint() { { name: "pass - block with tx - with BaseFee error", baseFee: nil, - validator: sdk.AccAddress(evmtest.NewEthAccInfo().EthAddr.Bytes()), + validator: sdk.AccAddress(evmtest.NewEthPrivAcc().EthAddr.Bytes()), height: int64(1), resBlock: &cmtrpc.ResultBlock{ Block: cmt.MakeBlock(1, []cmt.Tx{bz}, nil, nil), @@ -974,7 +974,7 @@ func (s *BackendSuite) TestGetEthBlockFromTendermint() { { name: "pass - block with tx - with ConsensusParams error - BlockMaxGas defaults to max uint32", baseFee: math.NewInt(1).BigInt(), - validator: sdk.AccAddress(evmtest.NewEthAccInfo().EthAddr.Bytes()), + validator: sdk.AccAddress(evmtest.NewEthPrivAcc().EthAddr.Bytes()), height: int64(1), resBlock: &cmtrpc.ResultBlock{ Block: cmt.MakeBlock(1, []cmt.Tx{bz}, nil, nil), @@ -998,7 +998,7 @@ func (s *BackendSuite) TestGetEthBlockFromTendermint() { { name: "pass - block with tx - with ShouldIgnoreGasUsed - empty txs", baseFee: math.NewInt(1).BigInt(), - validator: sdk.AccAddress(evmtest.NewEthAccInfo().EthAddr.Bytes()), + validator: sdk.AccAddress(evmtest.NewEthPrivAcc().EthAddr.Bytes()), height: int64(1), resBlock: &cmtrpc.ResultBlock{ Block: cmt.MakeBlock(1, []cmt.Tx{bz}, nil, nil), @@ -1028,7 +1028,7 @@ func (s *BackendSuite) TestGetEthBlockFromTendermint() { { name: "pass - block with tx - non fullTx", baseFee: math.NewInt(1).BigInt(), - validator: sdk.AccAddress(evmtest.NewEthAccInfo().EthAddr.Bytes()), + validator: sdk.AccAddress(evmtest.NewEthPrivAcc().EthAddr.Bytes()), height: int64(1), resBlock: &cmtrpc.ResultBlock{ Block: cmt.MakeBlock(1, []cmt.Tx{bz}, nil, nil), @@ -1052,7 +1052,7 @@ func (s *BackendSuite) TestGetEthBlockFromTendermint() { { name: "pass - block with tx", baseFee: math.NewInt(1).BigInt(), - validator: sdk.AccAddress(evmtest.NewEthAccInfo().EthAddr.Bytes()), + validator: sdk.AccAddress(evmtest.NewEthPrivAcc().EthAddr.Bytes()), height: int64(1), resBlock: &cmtrpc.ResultBlock{ Block: cmt.MakeBlock(1, []cmt.Tx{bz}, nil, nil), diff --git a/eth/rpc/backend/call_tx_test.go b/eth/rpc/backend/call_tx_test.go index e8aa98a86..c10039f8a 100644 --- a/eth/rpc/backend/call_tx_test.go +++ b/eth/rpc/backend/call_tx_test.go @@ -22,7 +22,7 @@ func (s *BackendSuite) TestResend() { txNonce := (hexutil.Uint64)(1) baseFee := math.NewInt(1) gasPrice := new(hexutil.Big) - toAddr := evmtest.NewEthAccInfo().EthAddr + toAddr := evmtest.NewEthPrivAcc().EthAddr chainID := (*hexutil.Big)(s.backend.chainID) callArgs := evm.JsonTxArgs{ From: nil, @@ -387,7 +387,7 @@ func (s *BackendSuite) TestSendRawTransaction() { func (s *BackendSuite) TestDoCall() { _, bz := s.buildEthereumTx() gasPrice := (*hexutil.Big)(big.NewInt(1)) - toAddr := evmtest.NewEthAccInfo().EthAddr + toAddr := evmtest.NewEthPrivAcc().EthAddr chainID := (*hexutil.Big)(s.backend.chainID) callArgs := evm.JsonTxArgs{ From: nil, diff --git a/eth/rpc/backend/chain_info_test.go b/eth/rpc/backend/chain_info_test.go index 74a91655f..b97783103 100644 --- a/eth/rpc/backend/chain_info_test.go +++ b/eth/rpc/backend/chain_info_test.go @@ -272,7 +272,7 @@ func (s *BackendSuite) TestFeeHistory() { GasUsedRatio: []float64{0}, Reward: [][]*hexutil.Big{{(*hexutil.Big)(big.NewInt(0)), (*hexutil.Big)(big.NewInt(0)), (*hexutil.Big)(big.NewInt(0)), (*hexutil.Big)(big.NewInt(0))}}, }, - validator: sdk.AccAddress(evmtest.NewEthAccInfo().EthAddr.Bytes()), + validator: sdk.AccAddress(evmtest.NewEthPrivAcc().EthAddr.Bytes()), expPass: true, }, } diff --git a/eth/rpc/backend/evm_query_client_test.go b/eth/rpc/backend/evm_query_client_test.go index 9b5ab9c85..cb0d9eb9f 100644 --- a/eth/rpc/backend/evm_query_client_test.go +++ b/eth/rpc/backend/evm_query_client_test.go @@ -248,7 +248,7 @@ func RegisterValidatorAccountError(queryClient *mocks.EVMQueryClient) { func TestRegisterValidatorAccount(t *testing.T) { queryClient := mocks.NewEVMQueryClient(t) - validator := sdk.AccAddress(evmtest.NewEthAccInfo().EthAddr.Bytes()) + validator := sdk.AccAddress(evmtest.NewEthPrivAcc().EthAddr.Bytes()) RegisterValidatorAccount(queryClient, validator) res, err := queryClient.ValidatorAccount(rpc.NewContextWithHeight(1), &evm.QueryValidatorAccountRequest{}) require.Equal(t, &evm.QueryValidatorAccountResponse{AccountAddress: validator.String()}, res) diff --git a/eth/rpc/backend/sign_tx_test.go b/eth/rpc/backend/sign_tx_test.go index dceb47bce..93c13cfe2 100644 --- a/eth/rpc/backend/sign_tx_test.go +++ b/eth/rpc/backend/sign_tx_test.go @@ -24,7 +24,7 @@ func (s *BackendSuite) TestSendTransaction() { gasPrice := new(hexutil.Big) gas := hexutil.Uint64(1) zeroGas := hexutil.Uint64(0) - toAddr := evmtest.NewEthAccInfo().EthAddr + toAddr := evmtest.NewEthPrivAcc().EthAddr priv, _ := ethsecp256k1.GenerateKey() from := common.BytesToAddress(priv.PubKey().Address().Bytes()) nonce := hexutil.Uint64(1) @@ -145,7 +145,7 @@ func (s *BackendSuite) TestSendTransaction() { } func (s *BackendSuite) TestSign() { - ethAcc := evmtest.NewEthAccInfo() + ethAcc := evmtest.NewEthPrivAcc() from, priv := ethAcc.EthAddr, ethAcc.PrivKey testCases := []struct { @@ -194,7 +194,7 @@ func (s *BackendSuite) TestSign() { } func (s *BackendSuite) TestSignTypedData() { - ethAcc := evmtest.NewEthAccInfo() + ethAcc := evmtest.NewEthPrivAcc() from, priv := ethAcc.EthAddr, ethAcc.PrivKey testCases := []struct { name string diff --git a/x/evm/evm_test.go b/x/evm/evm_test.go index d341016ce..4d653cdd2 100644 --- a/x/evm/evm_test.go +++ b/x/evm/evm_test.go @@ -7,6 +7,7 @@ import ( "strings" "testing" + sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/suite" @@ -129,7 +130,7 @@ func (s *TestSuite) TestModuleAddressEVM() { // EVM module should have mint perms deps := evmtest.NewTestDeps() { - resp, err := deps.EvmKeeper.EthAccount(deps.GoCtx(), &evm.QueryEthAccountRequest{ + resp, err := deps.EvmKeeper.EthAccount(sdk.WrapSDKContext(deps.Ctx), &evm.QueryEthAccountRequest{ Address: evmModuleAddr.Hex(), }) s.NoError(err) diff --git a/x/evm/evmtest/erc20.go b/x/evm/evmtest/erc20.go index 056fa207a..7822cf0ec 100644 --- a/x/evm/evmtest/erc20.go +++ b/x/evm/evmtest/erc20.go @@ -4,6 +4,7 @@ import ( "math/big" "testing" + sdk "github.com/cosmos/cosmos-sdk/types" bank "github.com/cosmos/cosmos-sdk/x/bank/types" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" @@ -13,24 +14,15 @@ import ( "github.com/NibiruChain/nibiru/v2/x/evm" ) -func DoEthTx( - deps *TestDeps, contract, from gethcommon.Address, input []byte, -) (evmResp *evm.MsgEthereumTxResponse, err error) { - commit := true - return deps.EvmKeeper.CallContractWithInput( - deps.Ctx, from, &contract, commit, input, - ) -} - func AssertERC20BalanceEqual( t *testing.T, deps TestDeps, - contract, account gethcommon.Address, - balance *big.Int, + erc20, account gethcommon.Address, + expectedBalance *big.Int, ) { - gotBalance, err := deps.EvmKeeper.ERC20().BalanceOf(contract, account, deps.Ctx) + actualBalance, err := deps.EvmKeeper.ERC20().BalanceOf(erc20, account, deps.Ctx) assert.NoError(t, err) - assert.Equal(t, balance.String(), gotBalance.String()) + assert.Zero(t, expectedBalance.Cmp(actualBalance)) } // CreateFunTokenForBankCoin: Uses the "TestDeps.Sender" account to create a @@ -38,6 +30,10 @@ func AssertERC20BalanceEqual( func CreateFunTokenForBankCoin( deps *TestDeps, bankDenom string, s *suite.Suite, ) (funtoken evm.FunToken) { + if deps.App.BankKeeper.HasDenomMetaData(deps.Ctx, bankDenom) { + s.Failf("setting bank.DenomMetadata would overwrite existing denom \"%s\"", bankDenom) + } + s.T().Log("Setup: Create a coin in the bank state") bankMetadata := bank.Metadata{ DenomUnits: []*bank.DenomUnit{ @@ -51,43 +47,41 @@ func CreateFunTokenForBankCoin( Name: bankDenom, Symbol: bankDenom, } - if deps.App.BankKeeper.HasDenomMetaData(deps.Ctx, bankDenom) { - s.Failf("setting bank.DenomMetadata would overwrite existing denom \"%s\"", bankDenom) - } + deps.App.BankKeeper.SetDenomMetaData(deps.Ctx, bankMetadata) // Give the sender funds for the fee - err := testapp.FundAccount( + s.Require().NoError(testapp.FundAccount( deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), - ) - s.Require().NoError(err) + )) s.T().Log("happy: CreateFunToken for the bank coin") createFuntokenResp, err := deps.EvmKeeper.CreateFunToken( - deps.GoCtx(), + sdk.WrapSDKContext(deps.Ctx), &evm.MsgCreateFunToken{ FromBankDenom: bankDenom, Sender: deps.Sender.NibiruAddr.String(), }, ) s.NoError(err, "bankDenom %s", bankDenom) + erc20 := createFuntokenResp.FuntokenMapping.Erc20Addr funtoken = evm.FunToken{ Erc20Addr: erc20, BankDenom: bankDenom, IsMadeFromCoin: true, } - s.Equal(createFuntokenResp.FuntokenMapping, funtoken) + s.Equal(funtoken, createFuntokenResp.FuntokenMapping) s.T().Log("Expect ERC20 to be deployed") - erc20Addr := erc20.ToAddr() - queryCodeReq := &evm.QueryCodeRequest{ - Address: erc20Addr.String(), - } - _, err = deps.EvmKeeper.Code(deps.Ctx, queryCodeReq) + _, err = deps.EvmKeeper.Code(deps.Ctx, + &evm.QueryCodeRequest{ + Address: erc20.String(), + }, + ) s.NoError(err) return funtoken diff --git a/x/evm/evmtest/eth.go b/x/evm/evmtest/eth.go index 08146dc36..05792bb7e 100644 --- a/x/evm/evmtest/eth.go +++ b/x/evm/evmtest/eth.go @@ -2,7 +2,6 @@ package evmtest import ( - "crypto/ecdsa" "math/big" "testing" @@ -24,9 +23,8 @@ import ( "github.com/NibiruChain/nibiru/v2/x/evm" ) -// NewEthAccInfo returns an Ethereum private key, its corresponding Eth address, -// public key, and Nibiru address. -func NewEthAccInfo() EthPrivKeyAcc { +// NewEthPrivAcc returns an Ethereum private key, its corresponding Eth address, Nibiru address, and keyring signer. +func NewEthPrivAcc() EthPrivKeyAcc { privkey, _ := ethsecp256k1.GenerateKey() privKeyE, _ := privkey.ToECDSA() ethAddr := crypto.PubkeyToAddress(privKeyE.PublicKey) @@ -34,7 +32,6 @@ func NewEthAccInfo() EthPrivKeyAcc { EthAddr: ethAddr, NibiruAddr: eth.EthAddrToNibiruAddr(ethAddr), PrivKey: privkey, - PrivKeyE: privKeyE, KeyringSigner: NewSigner(privkey), } } @@ -43,21 +40,11 @@ type EthPrivKeyAcc struct { EthAddr gethcommon.Address NibiruAddr sdk.AccAddress PrivKey *ethsecp256k1.PrivKey - PrivKeyE *ecdsa.PrivateKey KeyringSigner keyring.Signer } -func (acc EthPrivKeyAcc) GethSigner(ethChainID *big.Int) gethcore.Signer { - return gethcore.LatestSignerForChainID(ethChainID) -} - -// NewEthTxMsg: Helper that returns a valid instance of [*evm.MsgEthereumTx]. -func NewEthTxMsg() *evm.MsgEthereumTx { - return NewEthTxMsgs(1)[0] -} - func NewEthTxMsgs(count uint64) (ethTxMsgs []*evm.MsgEthereumTx) { - ethAddr := NewEthAccInfo().EthAddr + ethAddr := NewEthPrivAcc().EthAddr startIdx := uint64(1) for nonce := startIdx; nonce-startIdx < count; nonce++ { ethTxMsgs = append(ethTxMsgs, evm.NewTx(&evm.EvmTxArgs{ diff --git a/x/evm/evmtest/eth_test.go b/x/evm/evmtest/eth_test.go index 33b32ff4c..60e2087ee 100644 --- a/x/evm/evmtest/eth_test.go +++ b/x/evm/evmtest/eth_test.go @@ -20,7 +20,7 @@ func TestSuiteEVM(t *testing.T) { func (s *Suite) TestSampleFns() { s.T().Log("Test NewEthTxMsg") - ethTxMsg := evmtest.NewEthTxMsg() + ethTxMsg := evmtest.NewEthTxMsgs(1)[0] err := ethTxMsg.ValidateBasic() s.NoError(err) diff --git a/x/evm/evmtest/evmante.go b/x/evm/evmtest/evmante.go index dd83cec83..b25a72f37 100644 --- a/x/evm/evmtest/evmante.go +++ b/x/evm/evmtest/evmante.go @@ -19,7 +19,7 @@ var NextNoOpAnteHandler sdk.AnteHandler = func( } func HappyTransferTx(deps *TestDeps, nonce uint64) *evm.MsgEthereumTx { - to := NewEthAccInfo().EthAddr + to := NewEthPrivAcc().EthAddr ethContractCreationTxParams := &evm.EvmTxArgs{ ChainID: deps.App.EvmKeeper.EthChainID(deps.Ctx), Nonce: nonce, @@ -38,7 +38,7 @@ func NonEvmMsgTx(deps *TestDeps) sdk.Tx { fees := sdk.NewCoins(sdk.NewInt64Coin("unibi", int64(gasLimit))) msg := &banktypes.MsgSend{ FromAddress: deps.Sender.NibiruAddr.String(), - ToAddress: NewEthAccInfo().NibiruAddr.String(), + ToAddress: NewEthPrivAcc().NibiruAddr.String(), Amount: sdk.NewCoins(sdk.NewInt64Coin("unibi", 1)), } return buildTx(deps, true, msg, gasLimit, fees) diff --git a/x/evm/evmtest/smart_contract.go b/x/evm/evmtest/smart_contract.go index 77476618a..9c9d32cd2 100644 --- a/x/evm/evmtest/smart_contract.go +++ b/x/evm/evmtest/smart_contract.go @@ -4,19 +4,15 @@ import ( "math/big" gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/params" + gethcore "github.com/ethereum/go-ethereum/core/types" gethparams "github.com/ethereum/go-ethereum/params" "github.com/NibiruChain/nibiru/v2/x/evm/embeds" - gethcore "github.com/ethereum/go-ethereum/core/types" - "github.com/NibiruChain/nibiru/v2/x/evm" ) -// ArgsCreateContract: Arguments to call with `CreateContractTxMsg` and -// `CreateContractGethCoreMsg` to make Ethereum transactions that create +// ArgsCreateContract: Arguments to call with `CreateContractTxMsg` to make Ethereum transactions that create // contracts. // // It is recommended to use a gas price of `big.NewInt(1)` for simpler op code @@ -41,71 +37,52 @@ type ArgsExecuteContract struct { GasLimit *big.Int } -func CreateContractTxMsg( +func CreateContractMsgEthereumTx( args ArgsCreateContract, -) (ethTxMsg *evm.MsgEthereumTx, err error) { +) (msgEthereumTx *evm.MsgEthereumTx, err error) { gasLimit := args.GasLimit if gasLimit == nil { gasLimit = new(big.Int).SetUint64(gethparams.TxGasContractCreation) } - testContract := embeds.SmartContract_TestERC20 - gethTxCreateCntract := &gethcore.AccessListTx{ + ethTx := gethcore.NewTx(&gethcore.AccessListTx{ GasPrice: args.GasPrice, Gas: gasLimit.Uint64(), To: nil, - Data: testContract.Bytecode, + Data: embeds.SmartContract_TestERC20.Bytecode, Nonce: args.Nonce, - } - ethTx := gethcore.NewTx(gethTxCreateCntract) - ethTxMsg = new(evm.MsgEthereumTx) - err = ethTxMsg.FromEthereumTx(ethTx) - if err != nil { - return ethTxMsg, err - } - fromAcc := args.EthAcc - ethTxMsg.From = fromAcc.EthAddr.Hex() + }) - gethSigner := fromAcc.GethSigner(args.EthChainIDInt) - keyringSigner := fromAcc.KeyringSigner - return ethTxMsg, ethTxMsg.Sign(gethSigner, keyringSigner) -} - -func CreateContractGethCoreMsg( - args ArgsCreateContract, - cfg *params.ChainConfig, - blockHeight *big.Int, -) (gethCoreMsg core.Message, err error) { - ethTxMsg, err := CreateContractTxMsg(args) + msgEthereumTx = new(evm.MsgEthereumTx) + err = msgEthereumTx.FromEthereumTx(ethTx) if err != nil { - return gethCoreMsg, err + return msgEthereumTx, err } + msgEthereumTx.From = args.EthAcc.EthAddr.Hex() - signer := gethcore.MakeSigner(cfg, blockHeight) - return ethTxMsg.AsMessage(signer, nil) + gethSigner := gethcore.LatestSignerForChainID(args.EthChainIDInt) + return msgEthereumTx, msgEthereumTx.Sign(gethSigner, args.EthAcc.KeyringSigner) } -func ExecuteContractTxMsg(args ArgsExecuteContract) (ethTxMsg *evm.MsgEthereumTx, err error) { +func ExecuteContractMsgEthereumTx(args ArgsExecuteContract) (msgEthereumTx *evm.MsgEthereumTx, err error) { gasLimit := args.GasLimit if gasLimit == nil { gasLimit = new(big.Int).SetUint64(gethparams.TxGas) } - gethTxExecuteContract := &gethcore.AccessListTx{ + + coreTx := gethcore.NewTx(&gethcore.AccessListTx{ GasPrice: args.GasPrice, Gas: gasLimit.Uint64(), To: args.ContractAddress, Data: args.Data, Nonce: args.Nonce, - } - ethTx := gethcore.NewTx(gethTxExecuteContract) - ethTxMsg = new(evm.MsgEthereumTx) - err = ethTxMsg.FromEthereumTx(ethTx) + }) + msgEthereumTx = new(evm.MsgEthereumTx) + err = msgEthereumTx.FromEthereumTx(coreTx) if err != nil { - return ethTxMsg, err + return msgEthereumTx, err } - fromAcc := args.EthAcc - ethTxMsg.From = fromAcc.EthAddr.Hex() + msgEthereumTx.From = args.EthAcc.EthAddr.Hex() - gethSigner := fromAcc.GethSigner(args.EthChainIDInt) - keyringSigner := fromAcc.KeyringSigner - return ethTxMsg, ethTxMsg.Sign(gethSigner, keyringSigner) + gethSigner := gethcore.LatestSignerForChainID(args.EthChainIDInt) + return msgEthereumTx, msgEthereumTx.Sign(gethSigner, args.EthAcc.KeyringSigner) } diff --git a/x/evm/evmtest/smart_contract_test.go b/x/evm/evmtest/smart_contract_test.go index cefefebe1..d5ca3434a 100644 --- a/x/evm/evmtest/smart_contract_test.go +++ b/x/evm/evmtest/smart_contract_test.go @@ -6,13 +6,12 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/NibiruChain/nibiru/v2/x/evm" "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) func (s *Suite) TestCreateContractTxMsg() { deps := evmtest.NewTestDeps() - ethAcc := evmtest.NewEthAccInfo() + ethAcc := evmtest.NewEthPrivAcc() args := evmtest.ArgsCreateContract{ EthAcc: ethAcc, @@ -21,37 +20,14 @@ func (s *Suite) TestCreateContractTxMsg() { Nonce: deps.StateDB().GetNonce(ethAcc.EthAddr), } - ethTxMsg, err := evmtest.CreateContractTxMsg(args) + ethTxMsg, err := evmtest.CreateContractMsgEthereumTx(args) s.NoError(err) s.Require().NoError(ethTxMsg.ValidateBasic()) } -func (s *Suite) TestCreateContractGethCoreMsg() { - deps := evmtest.NewTestDeps() - ethAcc := evmtest.NewEthAccInfo() - - args := evmtest.ArgsCreateContract{ - EthAcc: ethAcc, - EthChainIDInt: deps.EvmKeeper.EthChainID(deps.Ctx), - GasPrice: big.NewInt(1), - Nonce: deps.StateDB().GetNonce(ethAcc.EthAddr), - } - - // chain config - cfg := evm.EthereumConfig(args.EthChainIDInt) - - // block height - blockHeight := big.NewInt(deps.Ctx.BlockHeight()) - - _, err := evmtest.CreateContractGethCoreMsg( - args, cfg, blockHeight, - ) - s.NoError(err) -} - func (s *Suite) TestExecuteContractTxMsg() { deps := evmtest.NewTestDeps() - ethAcc := evmtest.NewEthAccInfo() + ethAcc := evmtest.NewEthPrivAcc() contractAddress := gethcommon.HexToAddress("0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed") args := evmtest.ArgsExecuteContract{ EthAcc: ethAcc, @@ -62,7 +38,7 @@ func (s *Suite) TestExecuteContractTxMsg() { Data: nil, } - ethTxMsg, err := evmtest.ExecuteContractTxMsg(args) + ethTxMsg, err := evmtest.ExecuteContractMsgEthereumTx(args) s.NoError(err) s.Require().NoError(ethTxMsg.ValidateBasic()) } diff --git a/x/evm/evmtest/test_deps.go b/x/evm/evmtest/test_deps.go index c00405cf9..9c6015933 100644 --- a/x/evm/evmtest/test_deps.go +++ b/x/evm/evmtest/test_deps.go @@ -1,8 +1,6 @@ package evmtest import ( - "context" - sdk "github.com/cosmos/cosmos-sdk/types" gethcommon "github.com/ethereum/go-ethereum/common" @@ -27,10 +25,6 @@ type TestDeps struct { Sender EthPrivKeyAcc } -func (deps TestDeps) GoCtx() context.Context { - return sdk.WrapSDKContext(deps.Ctx) -} - func NewTestDeps() TestDeps { testapp.EnsureNibiruPrefix() encCfg := app.MakeEncodingConfig() @@ -38,7 +32,7 @@ func NewTestDeps() TestDeps { eth.RegisterInterfaces(encCfg.InterfaceRegistry) app, ctx := testapp.NewNibiruTestAppAndContext() ctx = ctx.WithChainID(eth.EIP155ChainID_Testnet) - ethAcc := NewEthAccInfo() + ethAcc := NewEthPrivAcc() return TestDeps{ App: app, Ctx: ctx, @@ -58,6 +52,5 @@ func (deps TestDeps) StateDB() *statedb.StateDB { } func (deps *TestDeps) GethSigner() gethcore.Signer { - ctx := deps.Ctx - return deps.Sender.GethSigner(deps.App.EvmKeeper.EthChainID(ctx)) + return gethcore.LatestSignerForChainID(deps.App.EvmKeeper.EthChainID(deps.Ctx)) } diff --git a/x/evm/evmtest/tx.go b/x/evm/evmtest/tx.go index e5d1c628c..03f8e4226 100644 --- a/x/evm/evmtest/tx.go +++ b/x/evm/evmtest/tx.go @@ -8,6 +8,7 @@ import ( "testing" "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" gethcore "github.com/ethereum/go-ethereum/core/types" @@ -113,7 +114,7 @@ func NewEthTxMsgFromTxData( // ExecuteNibiTransfer executes nibi transfer func ExecuteNibiTransfer(deps *TestDeps, t *testing.T) *evm.MsgEthereumTx { nonce := deps.StateDB().GetNonce(deps.Sender.EthAddr) - recipient := NewEthAccInfo().EthAddr + recipient := NewEthPrivAcc().EthAddr txArgs := evm.JsonTxArgs{ From: &deps.Sender.EthAddr, @@ -123,7 +124,7 @@ func ExecuteNibiTransfer(deps *TestDeps, t *testing.T) *evm.MsgEthereumTx { ethTxMsg, err := GenerateAndSignEthTxMsg(txArgs, deps) require.NoError(t, err) - resp, err := deps.App.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) + resp, err := deps.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(deps.Ctx), ethTxMsg) require.NoError(t, err) require.Empty(t, resp.VmError) return ethTxMsg @@ -160,7 +161,7 @@ func DeployContract( ethTxMsg, err := GenerateAndSignEthTxMsg(jsonTxArgs, deps) require.NoError(t, err) - resp, err := deps.App.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) + resp, err := deps.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(deps.Ctx), ethTxMsg) require.NoError(t, err) require.Empty(t, resp.VmError) @@ -194,7 +195,7 @@ func DeployAndExecuteERC20Transfer( // TX 2: execute ERC-20 contract transfer input, err := contractData.ABI.Pack( - "transfer", NewEthAccInfo().EthAddr, new(big.Int).SetUint64(1000), + "transfer", NewEthPrivAcc().EthAddr, new(big.Int).SetUint64(1000), ) require.NoError(t, err) nonce = deps.StateDB().GetNonce(deps.Sender.EthAddr) @@ -207,7 +208,7 @@ func DeployAndExecuteERC20Transfer( ethTxMsg, err := GenerateAndSignEthTxMsg(txArgs, deps) require.NoError(t, err) - resp, err := deps.App.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) + resp, err := deps.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(deps.Ctx), ethTxMsg) require.NoError(t, err) require.Empty(t, resp.VmError) @@ -222,21 +223,23 @@ func GenerateAndSignEthTxMsg( if err != nil { return nil, err } - res, err := deps.App.EvmKeeper.EstimateGas(deps.GoCtx(), &evm.EthCallRequest{ - Args: estimateArgs, - GasCap: srvconfig.DefaultEthCallGasLimit, - ProposerAddress: []byte{}, - ChainId: deps.App.EvmKeeper.EthChainID(deps.Ctx).Int64(), - }) + res, err := deps.App.EvmKeeper.EstimateGas( + sdk.WrapSDKContext(deps.Ctx), + &evm.EthCallRequest{ + Args: estimateArgs, + GasCap: srvconfig.DefaultEthCallGasLimit, + ProposerAddress: []byte{}, + ChainId: deps.App.EvmKeeper.EthChainID(deps.Ctx).Int64(), + }, + ) if err != nil { return nil, err } txArgs.Gas = (*hexutil.Uint64)(&res.Gas) - txMsg := txArgs.ToTransaction() - gethSigner := deps.Sender.GethSigner(deps.App.EvmKeeper.EthChainID(deps.Ctx)) - keyringSigner := deps.Sender.KeyringSigner - return txMsg, txMsg.Sign(gethSigner, keyringSigner) + msgEthereumTx := txArgs.ToTransaction() + gethSigner := gethcore.LatestSignerForChainID(deps.App.EvmKeeper.EthChainID(deps.Ctx)) + return msgEthereumTx, msgEthereumTx.Sign(gethSigner, deps.Sender.KeyringSigner) } func TransferWei( @@ -261,7 +264,7 @@ func TransferWei( return fmt.Errorf("error while transferring wei: %w", err) } - _, err = deps.App.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) + _, err = deps.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(deps.Ctx), ethTxMsg) if err != nil { return fmt.Errorf("error while transferring wei: %w", err) } diff --git a/x/evm/keeper/erc20.go b/x/evm/keeper/erc20.go index dce823e4a..fc7d52128 100644 --- a/x/evm/keeper/erc20.go +++ b/x/evm/keeper/erc20.go @@ -176,7 +176,7 @@ func (k Keeper) CallContractWithInput( commit, gasLimit, &fromAcc, contract, contractInput, k, ctx, ) if err != nil { - return + return evmResp, err } unusedBigInt := big.NewInt(0) @@ -195,26 +195,25 @@ func (k Keeper) CallContractWithInput( ) // Apply EVM message - cfg, err := k.GetEVMConfig( + evmCfg, err := k.GetEVMConfig( ctx, sdk.ConsAddress(ctx.BlockHeader().ProposerAddress), k.EthChainID(ctx), ) if err != nil { - err = fmt.Errorf("failed to load evm config: %s", err) - return + return evmResp, fmt.Errorf("failed to load evm config: %s", err) } + txConfig := statedb.NewEmptyTxConfig(gethcommon.BytesToHash(ctx.HeaderHash())) evmResp, err = k.ApplyEvmMsg( - ctx, evmMsg, evm.NewNoOpTracer(), commit, cfg, txConfig, + ctx, evmMsg, evm.NewNoOpTracer(), commit, evmCfg, txConfig, ) if err != nil { - return + return evmResp, err } if evmResp.Failed() { - err = fmt.Errorf("%w: EVM error: %s", err, evmResp.VmError) - return + return evmResp, fmt.Errorf("%w: EVM error: %s", err, evmResp.VmError) } return evmResp, err diff --git a/x/evm/keeper/erc20_test.go b/x/evm/keeper/erc20_test.go index d6a60696b..20946553f 100644 --- a/x/evm/keeper/erc20_test.go +++ b/x/evm/keeper/erc20_test.go @@ -25,12 +25,11 @@ func (s *Suite) TestCreateFunTokenFromERC20() { deps := evmtest.NewTestDeps() // Compute contract address. FindERC20 should fail - nonce := deps.StateDB().GetNonce(deps.Sender.EthAddr) - contractAddress := crypto.CreateAddress(deps.Sender.EthAddr, nonce) - _, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, contractAddress) + expectedERC20Addr := crypto.CreateAddress(deps.Sender.EthAddr, deps.StateDB().GetNonce(deps.Sender.EthAddr)) + _, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, expectedERC20Addr) s.Error(err) - s.T().Log("Case 1: Deploy and invoke ERC20 for info") + s.T().Log("Case 1: Deploy and invoke ERC20 with 18 decimals") { metadata := keeper.ERC20Metadata{ Name: "erc20name", @@ -42,115 +41,120 @@ func (s *Suite) TestCreateFunTokenFromERC20() { metadata.Name, metadata.Symbol, metadata.Decimals, ) s.Require().NoError(err) - s.Equal(contractAddress, deployResp.ContractAddr) + s.Equal(expectedERC20Addr, deployResp.ContractAddr) info, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, deployResp.ContractAddr) s.NoError(err, info) s.Equal(metadata, info) } - s.T().Log("Case 2: Deploy and invoke ERC20 for info") + s.T().Log("Case 2: Deploy and invoke ERC20 with 9 decimals") { metadata := keeper.ERC20Metadata{ Name: "gwei", Symbol: "GWEI", Decimals: 9, } + expectedERC20Addr = crypto.CreateAddress(deps.Sender.EthAddr, deps.StateDB().GetNonce(deps.Sender.EthAddr)) deployResp, err := evmtest.DeployContract( &deps, embeds.SmartContract_ERC20Minter, s.T(), metadata.Name, metadata.Symbol, metadata.Decimals, ) s.Require().NoError(err) - s.NotEqual(contractAddress, deployResp.ContractAddr) + s.Require().Equal(expectedERC20Addr, deployResp.ContractAddr) info, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, deployResp.ContractAddr) s.NoError(err, info) s.Equal(metadata, info) + + queryCodeReq := &evm.QueryCodeRequest{ + Address: expectedERC20Addr.String(), + } + _, err = deps.EvmKeeper.Code(deps.Ctx, queryCodeReq) + s.Require().NoError(err) } + erc20Addr := eth.NewHexAddr(expectedERC20Addr) s.T().Log("happy: CreateFunToken for the ERC20") + { + // Give the sender funds for the fee + s.Require().NoError(testapp.FundAccount( + deps.App.BankKeeper, + deps.Ctx, + deps.Sender.NibiruAddr, + deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), + )) + + resp, err := deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromErc20: &erc20Addr, + Sender: deps.Sender.NibiruAddr.String(), + }, + ) + s.Require().NoError(err, "erc20 %s", erc20Addr) + + expectedBankDenom := fmt.Sprintf("erc20/%s", erc20Addr.String()) + s.Equal( + resp.FuntokenMapping, + evm.FunToken{ + Erc20Addr: erc20Addr, + BankDenom: expectedBankDenom, + IsMadeFromCoin: false, + }) - erc20Addr := eth.NewHexAddr(contractAddress) - queryCodeReq := &evm.QueryCodeRequest{ - Address: erc20Addr.String(), + // Event "EventFunTokenCreated" must present + testutil.RequireContainsTypedEvent( + s.T(), + deps.Ctx, + &evm.EventFunTokenCreated{ + BankDenom: expectedBankDenom, + Erc20ContractAddress: erc20Addr.String(), + Creator: deps.Sender.NibiruAddr.String(), + IsMadeFromCoin: false, + }, + ) } - _, err = deps.EvmKeeper.Code(deps.Ctx, queryCodeReq) - s.Require().NoError(err) - - // Give the sender funds for the fee - err = testapp.FundAccount( - deps.App.BankKeeper, - deps.Ctx, - deps.Sender.NibiruAddr, - deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), - ) - s.Require().NoError(err) - - createFuntokenResp, err := deps.EvmKeeper.CreateFunToken( - deps.GoCtx(), - &evm.MsgCreateFunToken{ - FromErc20: &erc20Addr, - Sender: deps.Sender.NibiruAddr.String(), - }, - ) - s.NoError(err, "erc20 %s", erc20Addr) - expectedBankDenom := fmt.Sprintf("erc20/%s", erc20Addr.String()) - s.Equal( - createFuntokenResp.FuntokenMapping, - evm.FunToken{ - Erc20Addr: erc20Addr, - BankDenom: expectedBankDenom, - IsMadeFromCoin: false, - }) - - // Event "EventFunTokenCreated" must present - testutil.RequireContainsTypedEvent( - s.T(), - deps.Ctx, - &evm.EventFunTokenCreated{ - BankDenom: expectedBankDenom, - Erc20ContractAddress: erc20Addr.String(), - Creator: deps.Sender.NibiruAddr.String(), - IsMadeFromCoin: false, - }, - ) s.T().Log("sad: CreateFunToken for the ERC20: already registered") - // Give the sender funds for the fee - err = testapp.FundAccount( - deps.App.BankKeeper, - deps.Ctx, - deps.Sender.NibiruAddr, - deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), - ) - s.Require().NoError(err) - - _, err = deps.EvmKeeper.CreateFunToken( - deps.GoCtx(), - &evm.MsgCreateFunToken{ - FromErc20: &erc20Addr, - Sender: deps.Sender.NibiruAddr.String(), - }, - ) - s.ErrorContains(err, "funtoken mapping already created") + { + // Give the sender funds for the fee + s.Require().NoError(testapp.FundAccount( + deps.App.BankKeeper, + deps.Ctx, + deps.Sender.NibiruAddr, + deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), + )) + + _, err = deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromErc20: &erc20Addr, + Sender: deps.Sender.NibiruAddr.String(), + }, + ) + s.ErrorContains(err, "funtoken mapping already created") + } s.T().Log("sad: CreateFunToken for the ERC20: invalid sender") - _, err = deps.EvmKeeper.CreateFunToken( - deps.GoCtx(), - &evm.MsgCreateFunToken{ - FromErc20: &erc20Addr, - }, - ) - s.ErrorContains(err, "invalid sender") + { + _, err = deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromErc20: &erc20Addr, + }, + ) + s.ErrorContains(err, "invalid sender") + } } func (s *Suite) TestDeployERC20ForBankCoin() { deps := evmtest.NewTestDeps() // Compute contract address. FindERC20 should fail - nonce := deps.StateDB().GetNonce(deps.Sender.EthAddr) - contractAddress := crypto.CreateAddress(deps.Sender.EthAddr, nonce) - _, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, contractAddress) + nonce := deps.StateDB().GetNonce(evm.EVM_MODULE_ADDRESS) + expectedERC20Addr := crypto.CreateAddress(evm.EVM_MODULE_ADDRESS, nonce) + _, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, expectedERC20Addr) s.Error(err) s.T().Log("Case 1: Deploy and invoke ERC20 for info") @@ -171,18 +175,16 @@ func (s *Suite) TestDeployERC20ForBankCoin() { deps.Ctx, bankMetadata, ) s.Require().NoError(err) - s.NotEqual(contractAddress, erc20Addr, - "address derived from before call should differ since the contract deployment succeeds") + s.Equal(expectedERC20Addr, erc20Addr) s.T().Log("Expect ERC20 metadata on contract") - metadata := keeper.ERC20Metadata{ + info, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, erc20Addr) + s.NoError(err) + s.Equal(keeper.ERC20Metadata{ Name: bankDenom, Symbol: "TOKEN", Decimals: 0, - } - info, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, erc20Addr) - s.NoError(err, info) - s.Equal(metadata, info) + }, info) } func (s *Suite) TestCreateFunTokenFromCoin() { @@ -201,16 +203,15 @@ func (s *Suite) TestCreateFunTokenFromCoin() { s.T().Log("happy: CreateFunToken for the bank coin") // Give the sender funds for the fee - err = testapp.FundAccount( + s.Require().NoError(testapp.FundAccount( deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), - ) - s.Require().NoError(err) + )) createFuntokenResp, err := deps.EvmKeeper.CreateFunToken( - deps.GoCtx(), + sdk.WrapSDKContext(deps.Ctx), &evm.MsgCreateFunToken{ FromBankDenom: bankDenom, Sender: deps.Sender.NibiruAddr.String(), @@ -229,7 +230,7 @@ func (s *Suite) TestCreateFunTokenFromCoin() { s.T().Log("Expect ERC20 to be deployed") queryCodeReq := &evm.QueryCodeRequest{ - Address: erc20Addr.String(), + Address: erc20.String(), } _, err = deps.EvmKeeper.Code(deps.Ctx, queryCodeReq) s.Require().NoError(err) @@ -251,7 +252,7 @@ func (s *Suite) TestCreateFunTokenFromCoin() { deps.Ctx, &evm.EventFunTokenCreated{ BankDenom: bankDenom, - Erc20ContractAddress: erc20Addr.String(), + Erc20ContractAddress: erc20.String(), Creator: deps.Sender.NibiruAddr.String(), IsMadeFromCoin: true, }, @@ -267,7 +268,7 @@ func (s *Suite) TestCreateFunTokenFromCoin() { ) s.Require().NoError(err) _, err = deps.EvmKeeper.CreateFunToken( - deps.GoCtx(), + sdk.WrapSDKContext(deps.Ctx), &evm.MsgCreateFunToken{ FromBankDenom: bankDenom, Sender: deps.Sender.NibiruAddr.String(), @@ -318,7 +319,7 @@ func (s *Suite) TestSendFunTokenToEvm() { spendableAmount := tc.senderBalanceBefore.Int64() spendableCoins := sdk.NewCoins(sdk.NewInt64Coin(bankDenom, spendableAmount)) - ctx := deps.GoCtx() + ctx := sdk.WrapSDKContext(deps.Ctx) setBankDenomMetadata(deps.Ctx, deps.App.BankKeeper, bankDenom) // Fund sender's wallet diff --git a/x/evm/keeper/funtoken_from_coin.go b/x/evm/keeper/funtoken_from_coin.go index 87191e52d..c58d43db9 100644 --- a/x/evm/keeper/funtoken_from_coin.go +++ b/x/evm/keeper/funtoken_from_coin.go @@ -18,9 +18,7 @@ func (k *Keeper) CreateFunTokenFromCoin( ctx sdk.Context, bankDenom string, ) (funtoken evm.FunToken, err error) { // 1 | Coin already registered with FunToken? - if funtokens := k.FunTokens.Collect( - ctx, k.FunTokens.Indexes.BankDenom.ExactMatch(ctx, bankDenom), - ); len(funtokens) > 0 { + if funtokens := k.FunTokens.Collect(ctx, k.FunTokens.Indexes.BankDenom.ExactMatch(ctx, bankDenom)); len(funtokens) > 0 { return funtoken, fmt.Errorf("funtoken mapping already created for bank denom \"%s\"", bankDenom) } @@ -33,13 +31,11 @@ func (k *Keeper) CreateFunTokenFromCoin( // 3 | deploy ERC20 for metadata erc20Addr, err := k.DeployERC20ForBankCoin(ctx, bankCoin) if err != nil { - return + return funtoken, errors.Wrap(err, "failed to deploy ERC20 for bank coin") } // 4 | ERC20 already registered with FunToken? - if funtokens := k.FunTokens.Collect( - ctx, k.FunTokens.Indexes.ERC20Addr.ExactMatch(ctx, erc20Addr), - ); len(funtokens) > 0 { + if funtokens := k.FunTokens.Collect(ctx, k.FunTokens.Indexes.ERC20Addr.ExactMatch(ctx, erc20Addr)); len(funtokens) > 0 { return funtoken, fmt.Errorf("funtoken mapping already created for ERC20 \"%s\"", erc20Addr.Hex()) } @@ -71,23 +67,19 @@ func (k *Keeper) DeployERC20ForBankCoin( } erc20Embed := embeds.SmartContract_ERC20Minter - callArgs := []any{bankCoin.Name, bankCoin.Symbol, decimals} - methodName := "" // pass empty method name to deploy the contract - packedArgs, err := erc20Embed.ABI.Pack(methodName, callArgs...) + + // pass empty method name to deploy the contract + packedArgs, err := erc20Embed.ABI.Pack("", bankCoin.Name, bankCoin.Symbol, decimals) if err != nil { err = errors.Wrap(err, "failed to pack ABI args") - return + return gethcommon.Address{}, err } - bytecodeForCall := append(erc20Embed.Bytecode, packedArgs...) - fromEvmAddr := evm.EVM_MODULE_ADDRESS - nonce := k.GetAccNonce(ctx, fromEvmAddr) - erc20Addr = crypto.CreateAddress(fromEvmAddr, nonce) - erc20Contract := (*gethcommon.Address)(nil) // nil >> doesn't exist yet - commit := true + erc20Addr = crypto.CreateAddress(evm.EVM_MODULE_ADDRESS, k.GetAccNonce(ctx, evm.EVM_MODULE_ADDRESS)) + bytecodeForCall := append(erc20Embed.Bytecode, packedArgs...) _, err = k.CallContractWithInput( - ctx, fromEvmAddr, erc20Contract, commit, bytecodeForCall, + ctx, evm.EVM_MODULE_ADDRESS, nil, true, bytecodeForCall, ) if err != nil { err = errors.Wrap(err, "deploy ERC20 failed") diff --git a/x/evm/keeper/funtoken_from_erc20.go b/x/evm/keeper/funtoken_from_erc20.go index 9fb333f3b..9e2dcda5a 100644 --- a/x/evm/keeper/funtoken_from_erc20.go +++ b/x/evm/keeper/funtoken_from_erc20.go @@ -11,7 +11,6 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" "github.com/NibiruChain/nibiru/v2/eth" - "github.com/NibiruChain/nibiru/v2/x/common" "github.com/NibiruChain/nibiru/v2/x/evm" "github.com/NibiruChain/nibiru/v2/x/evm/embeds" ) @@ -31,19 +30,19 @@ func (k Keeper) FindERC20Metadata( ) (info ERC20Metadata, err error) { var abi *gethabi.ABI = embeds.SmartContract_ERC20Minter.ABI - errs := []error{} - // Load name, symbol, decimals name, err := k.LoadERC20Name(ctx, abi, contract) - errs = append(errs, err) + if err != nil { + return info, err + } + symbol, err := k.LoadERC20Symbol(ctx, abi, contract) - errs = append(errs, err) - decimals, err := k.LoadERC20Decimals(ctx, abi, contract) - errs = append(errs, err) + if err != nil { + return info, err + } - err = common.CombineErrors(errs...) + decimals, err := k.LoadERC20Decimals(ctx, abi, contract) if err != nil { - err = fmt.Errorf("failed to \"FindERC20Metadata\": %w", err) return info, err } @@ -99,27 +98,24 @@ func (k *Keeper) CreateFunTokenFromERC20( erc20Addr := erc20.ToAddr() // 1 | ERC20 already registered with FunToken? - if funtokens := k.FunTokens.Collect( - ctx, k.FunTokens.Indexes.ERC20Addr.ExactMatch(ctx, erc20Addr), - ); len(funtokens) > 0 { + if funtokens := k.FunTokens.Collect(ctx, k.FunTokens.Indexes.ERC20Addr.ExactMatch(ctx, erc20Addr)); len(funtokens) > 0 { return funtoken, fmt.Errorf("funtoken mapping already created for ERC20 \"%s\"", erc20Addr.Hex()) } // 2 | Get existing ERC20 metadata info, err := k.FindERC20Metadata(ctx, erc20Addr) if err != nil { - return + return funtoken, err } bankDenom := fmt.Sprintf("erc20/%s", erc20.String()) // 3 | Coin already registered with FunToken? - _, isAlreadyCoin := k.bankKeeper.GetDenomMetaData(ctx, bankDenom) - if isAlreadyCoin { + _, isFound := k.bankKeeper.GetDenomMetaData(ctx, bankDenom) + if isFound { return funtoken, fmt.Errorf("bank coin denom already registered with denom \"%s\"", bankDenom) } - if funtokens := k.FunTokens.Collect( - ctx, k.FunTokens.Indexes.BankDenom.ExactMatch(ctx, bankDenom), - ); len(funtokens) > 0 { + + if funtokens := k.FunTokens.Collect(ctx, k.FunTokens.Indexes.BankDenom.ExactMatch(ctx, bankDenom)); len(funtokens) > 0 { return funtoken, fmt.Errorf("funtoken mapping already created for bank denom \"%s\"", bankDenom) } @@ -142,7 +138,7 @@ func (k *Keeper) CreateFunTokenFromERC20( err = bankMetadata.Validate() if err != nil { - return + return funtoken, fmt.Errorf("failed to validate bank metadata: %w", err) } k.bankKeeper.SetDenomMetaData(ctx, bankMetadata) diff --git a/x/evm/keeper/grpc_query_test.go b/x/evm/keeper/grpc_query_test.go index f9f53784c..be0bdc8bd 100644 --- a/x/evm/keeper/grpc_query_test.go +++ b/x/evm/keeper/grpc_query_test.go @@ -140,7 +140,7 @@ func (s *Suite) TestQueryEvmAccount() { { name: "happy: not existing account", scenario: func(deps *evmtest.TestDeps) (req In, wantResp Out) { - ethAcc := evmtest.NewEthAccInfo() + ethAcc := evmtest.NewEthPrivAcc() req = &evm.QueryEthAccountRequest{ Address: ethAcc.EthAddr.String(), } @@ -304,7 +304,7 @@ func (s *Suite) TestQueryStorage() { { name: "happy", scenario: func(deps *evmtest.TestDeps) (req In, wantResp Out) { - addr := evmtest.NewEthAccInfo().EthAddr + addr := evmtest.NewEthPrivAcc().EthAddr storageKey := gethcommon.BytesToHash([]byte("storagekey")) req = &evm.QueryStorageRequest{ Address: addr.Hex(), @@ -327,7 +327,7 @@ func (s *Suite) TestQueryStorage() { { name: "happy: no committed state", scenario: func(deps *evmtest.TestDeps) (req In, wantResp Out) { - addr := evmtest.NewEthAccInfo().EthAddr + addr := evmtest.NewEthPrivAcc().EthAddr storageKey := gethcommon.BytesToHash([]byte("storagekey")) req = &evm.QueryStorageRequest{ Address: addr.Hex(), @@ -380,7 +380,7 @@ func (s *Suite) TestQueryCode() { { name: "happy", scenario: func(deps *evmtest.TestDeps) (req In, wantResp Out) { - addr := evmtest.NewEthAccInfo().EthAddr + addr := evmtest.NewEthPrivAcc().EthAddr req = &evm.QueryCodeRequest{ Address: addr.Hex(), } @@ -429,7 +429,7 @@ func (s *Suite) TestQueryParams() { deps := evmtest.NewTestDeps() want := evm.DefaultParams() deps.EvmKeeper.SetParams(deps.Ctx, want) - gotResp, err := deps.EvmKeeper.Params(deps.GoCtx(), nil) + gotResp, err := deps.EvmKeeper.Params(sdk.WrapSDKContext(deps.Ctx), nil) s.NoError(err) got := gotResp.Params s.Require().NoError(err) @@ -440,7 +440,7 @@ func (s *Suite) TestQueryParams() { // Empty params to test the setter want.EvmDenom = "wei" deps.EvmKeeper.SetParams(deps.Ctx, want) - gotResp, err = deps.EvmKeeper.Params(deps.GoCtx(), nil) + gotResp, err = deps.EvmKeeper.Params(sdk.WrapSDKContext(deps.Ctx), nil) s.Require().NoError(err) got = gotResp.Params @@ -491,7 +491,7 @@ func (s *Suite) TestQueryEthCall() { tc.setup(&deps) } req, wantResp := tc.scenario(&deps) - gotResp, err := deps.App.EvmKeeper.EthCall(deps.GoCtx(), req) + gotResp, err := deps.App.EvmKeeper.EthCall(sdk.WrapSDKContext(deps.Ctx), req) if tc.wantErr != "" { s.Require().ErrorContains(err, tc.wantErr) return @@ -524,7 +524,7 @@ func (s *Suite) TestQueryBalance() { name: "happy: zero balance", scenario: func(deps *evmtest.TestDeps) (req In, wantResp Out) { req = &evm.QueryBalanceRequest{ - Address: evmtest.NewEthAccInfo().EthAddr.String(), + Address: evmtest.NewEthPrivAcc().EthAddr.String(), } wantResp = &evm.QueryBalanceResponse{ Balance: "0", @@ -666,14 +666,14 @@ func (s *Suite) TestEstimateGasForEvmCallType() { s.Require().NoError(err) // assert balance of 1000 * 10^12 wei - resp, _ := deps.App.EvmKeeper.Balance(deps.GoCtx(), &evm.QueryBalanceRequest{ + resp, _ := deps.App.EvmKeeper.Balance(sdk.WrapSDKContext(deps.Ctx), &evm.QueryBalanceRequest{ Address: deps.Sender.EthAddr.Hex(), }) s.Equal("1000", resp.Balance) s.Require().Equal("1000"+strings.Repeat("0", 12), resp.BalanceWei) // Send Eth call to transfer from the account - 5 * 10^12 wei - recipient := evmtest.NewEthAccInfo().EthAddr + recipient := evmtest.NewEthPrivAcc().EthAddr amountToSend := hexutil.Big(*evm.NativeToWei(big.NewInt(5))) gasLimitArg := hexutil.Uint64(100000) @@ -700,7 +700,7 @@ func (s *Suite) TestEstimateGasForEvmCallType() { { name: "sad: insufficient balance for transfer", scenario: func(deps *evmtest.TestDeps) (req In, wantResp Out) { - recipient := evmtest.NewEthAccInfo().EthAddr + recipient := evmtest.NewEthPrivAcc().EthAddr amountToSend := hexutil.Big(*evm.NativeToWei(big.NewInt(10))) jsonTxArgs, err := json.Marshal(&evm.JsonTxArgs{ diff --git a/x/evm/keeper/msg_ethereum_tx_test.go b/x/evm/keeper/msg_ethereum_tx_test.go index 883cd94b3..f1075a854 100644 --- a/x/evm/keeper/msg_ethereum_tx_test.go +++ b/x/evm/keeper/msg_ethereum_tx_test.go @@ -50,12 +50,12 @@ func (s *Suite) TestMsgEthereumTx_CreateContract() { Nonce: deps.StateDB().GetNonce(ethAcc.EthAddr), GasLimit: gasLimit, } - ethTxMsg, err := evmtest.CreateContractTxMsg(args) + ethTxMsg, err := evmtest.CreateContractMsgEthereumTx(args) s.Require().NoError(err) s.Require().NoError(ethTxMsg.ValidateBasic()) s.Equal(ethTxMsg.GetGas(), gasLimit.Uint64()) - resp, err := deps.App.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) + resp, err := deps.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(deps.Ctx), ethTxMsg) s.Require().NoError( err, "resp: %s\nblock header: %s", @@ -89,12 +89,12 @@ func (s *Suite) TestMsgEthereumTx_CreateContract() { GasPrice: big.NewInt(1), Nonce: deps.StateDB().GetNonce(ethAcc.EthAddr), } - ethTxMsg, err := evmtest.CreateContractTxMsg(args) + ethTxMsg, err := evmtest.CreateContractMsgEthereumTx(args) s.NoError(err) s.Require().NoError(ethTxMsg.ValidateBasic()) s.Equal(ethTxMsg.GetGas(), gasLimit) - resp, err := deps.App.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) + resp, err := deps.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(deps.Ctx), ethTxMsg) s.Require().ErrorContains( err, core.ErrIntrinsicGas.Error(), @@ -144,11 +144,11 @@ func (s *Suite) TestMsgEthereumTx_ExecuteContract() { ContractAddress: &contractAddr, Data: input, } - ethTxMsg, err := evmtest.ExecuteContractTxMsg(args) + ethTxMsg, err := evmtest.ExecuteContractMsgEthereumTx(args) s.NoError(err) s.Require().NoError(ethTxMsg.ValidateBasic()) s.Equal(ethTxMsg.GetGas(), gasLimit.Uint64()) - resp, err := deps.App.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) + resp, err := deps.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(deps.Ctx), ethTxMsg) s.Require().NoError( err, "resp: %s\nblock header: %s", @@ -213,7 +213,7 @@ func (s *Suite) TestMsgEthereumTx_SimpleTransfer() { ) s.NoError(err) - resp, err := deps.App.EvmKeeper.EthereumTx(deps.GoCtx(), ethTxMsg) + resp, err := deps.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(deps.Ctx), ethTxMsg) s.Require().NoError(err) s.Require().Empty(resp.VmError) diff --git a/x/evm/logs_test.go b/x/evm/logs_test.go index 467535de5..34cb80a12 100644 --- a/x/evm/logs_test.go +++ b/x/evm/logs_test.go @@ -12,7 +12,7 @@ import ( ) func TestTransactionLogsValidate(t *testing.T) { - addr := evmtest.NewEthAccInfo().EthAddr.String() + addr := evmtest.NewEthPrivAcc().EthAddr.String() testCases := []struct { name string @@ -96,7 +96,7 @@ func TestTransactionLogsValidate(t *testing.T) { } func TestValidateLog(t *testing.T) { - addr := evmtest.NewEthAccInfo().EthAddr.String() + addr := evmtest.NewEthPrivAcc().EthAddr.String() testCases := []struct { name string @@ -169,7 +169,7 @@ func TestValidateLog(t *testing.T) { } func TestConversionFunctions(t *testing.T) { - addr := evmtest.NewEthAccInfo().EthAddr.String() + addr := evmtest.NewEthPrivAcc().EthAddr.String() txLogs := evm.TransactionLogs{ Hash: common.BytesToHash([]byte("tx_hash")).String(), diff --git a/x/evm/msg_test.go b/x/evm/msg_test.go index c761dd59c..f6835e0d7 100644 --- a/x/evm/msg_test.go +++ b/x/evm/msg_test.go @@ -45,12 +45,12 @@ func TestMsgsSuite(t *testing.T) { } func (s *MsgsSuite) SetupTest() { - ethAcc := evmtest.NewEthAccInfo() + ethAcc := evmtest.NewEthPrivAcc() from, privFrom := ethAcc.EthAddr, ethAcc.PrivKey s.signer = evmtest.NewSigner(privFrom) s.from = from - s.to = evmtest.NewEthAccInfo().EthAddr + s.to = evmtest.NewEthPrivAcc().EthAddr s.chainID = big.NewInt(1) s.hundredBigInt = big.NewInt(100) @@ -958,7 +958,7 @@ func (s *MsgsSuite) TestUnwrapEthererumMsg() { } func (s *MsgsSuite) TestTransactionLogsEncodeDecode() { - addr := evmtest.NewEthAccInfo().EthAddr.String() + addr := evmtest.NewEthPrivAcc().EthAddr.String() txLogs := evm.TransactionLogs{ Hash: common.BytesToHash([]byte("tx_hash")).String(), diff --git a/x/evm/precompile/funtoken.go b/x/evm/precompile/funtoken.go index b8f593525..59eb53e73 100644 --- a/x/evm/precompile/funtoken.go +++ b/x/evm/precompile/funtoken.go @@ -13,25 +13,19 @@ import ( "github.com/ethereum/go-ethereum/core/vm" "github.com/NibiruChain/nibiru/v2/app/keepers" - "github.com/NibiruChain/nibiru/v2/eth" "github.com/NibiruChain/nibiru/v2/x/evm" "github.com/NibiruChain/nibiru/v2/x/evm/embeds" ) -var ( - _ vm.PrecompiledContract = (*precompileFunToken)(nil) - _ NibiruPrecompile = (*precompileFunToken)(nil) -) +var _ vm.PrecompiledContract = (*precompileFunToken)(nil) // Precompile address for "FunToken.sol", the contract that // enables transfers of ERC20 tokens to "nibi" addresses as bank coins // using the ERC20's `FunToken` mapping. -var PrecompileAddr_FuntokenGateway = eth.MustNewHexAddrFromStr( - "0x0000000000000000000000000000000000000800", -) +var PrecompileAddr_FuntokenGateway = gethcommon.HexToAddress("0x0000000000000000000000000000000000000800") func (p precompileFunToken) Address() gethcommon.Address { - return PrecompileAddr_FuntokenGateway.ToAddr() + return PrecompileAddr_FuntokenGateway } func (p precompileFunToken) RequiredGas(input []byte) (gasPrice uint64) { @@ -62,18 +56,16 @@ func (p precompileFunToken) Run( } }() - contractInput := contract.Input - ctx, method, args, err := OnRunStart(p, evm, contractInput) + ctx, method, args, err := OnRunStart(embeds.SmartContract_FunToken.ABI, evm, contract.Input) if err != nil { return nil, err } - caller := contract.CallerAddress switch FunTokenMethod(method.Name) { case FunTokenMethod_BankSend: // TODO: UD-DEBUG: Test that calling non-method on the right address does // nothing. - bz, err = p.bankSend(ctx, caller, method, args, readonly) + bz, err = p.bankSend(ctx, contract.CallerAddress, method, args, readonly) default: // TODO: UD-DEBUG: test invalid method called err = fmt.Errorf("invalid method called with name \"%s\"", method.Name) @@ -88,13 +80,8 @@ func PrecompileFunToken(keepers keepers.PublicKeepers) vm.PrecompiledContract { } } -func (p precompileFunToken) ABI() *gethabi.ABI { - return embeds.SmartContract_FunToken.ABI -} - type precompileFunToken struct { keepers.PublicKeepers - NibiruPrecompile } var executionGuard sync.Mutex @@ -120,8 +107,7 @@ func (p precompileFunToken) bankSend( ) (bz []byte, err error) { if readOnly { // Check required for transactions but not needed for queries - err = fmt.Errorf("cannot write state from staticcall (a read-only call)") - return + return nil, fmt.Errorf("cannot write state from staticcall (a read-only call)") } if !executionGuard.TryLock() { return nil, fmt.Errorf("bankSend is already in progress") @@ -188,8 +174,7 @@ func (p precompileFunToken) bankSend( // Since we're sending them away and want accurate total supply tracking, the // tokens need to be burned. if funtoken.IsMadeFromCoin { - caller := evm.EVM_MODULE_ADDRESS - _, err = p.EvmKeeper.ERC20().Burn(erc20, caller, amount, ctx) + _, err = p.EvmKeeper.ERC20().Burn(erc20, evm.EVM_MODULE_ADDRESS, amount, ctx) if err != nil { err = fmt.Errorf("ERC20.Burn: %w", err) return @@ -202,40 +187,34 @@ func (p precompileFunToken) bankSend( return method.Outputs.Pack() // TODO: change interface } -// ArgsFunTokenBankSend: Constructor for an "args" array of arguments for the -// "IFunToken.bankSend" function. -func ArgsFunTokenBankSend( - erc20 gethcommon.Address, - amount *big.Int, - to sdk.AccAddress, -) []any { - return []any{erc20, amount, to.String()} -} - func (p precompileFunToken) AssertArgTypesBankSend(args []any) ( erc20 gethcommon.Address, amount *big.Int, to string, err error, ) { - err = AssertArgCount(args, 3) - if err != nil { + if len(args) != 3 { + err = fmt.Errorf("expected 3 arguments but got %d", len(args)) return } - erc20, ok1 := args[0].(gethcommon.Address) - amount, ok2 := args[1].(*big.Int) - to, ok3 := args[2].(string) - if !(ok1 && ok2 && ok3) { - err = fmt.Errorf("type validation for failed for \"%s\"", - "function bankSend(address erc20, uint256 amount, string memory to) external") + erc20, ok := args[0].(gethcommon.Address) + if !ok { + err = fmt.Errorf("type validation for failed for (address erc20) argument") + return } - return -} -func AssertArgCount(args []interface{}, wantNumArgs int) error { - if len(args) != wantNumArgs { - return fmt.Errorf("expected %d arguments but got %d", wantNumArgs, len(args)) + amount, ok = args[1].(*big.Int) + if !ok { + err = fmt.Errorf("type validation for failed for (uint256 amount) argument") + return } - return nil + + to, ok = args[2].(string) + if !ok { + err = fmt.Errorf("type validation for failed for (string to) argument") + return + } + + return } diff --git a/x/evm/precompile/funtoken_test.go b/x/evm/precompile/funtoken_test.go index 8353dac9c..239940e17 100644 --- a/x/evm/precompile/funtoken_test.go +++ b/x/evm/precompile/funtoken_test.go @@ -5,13 +5,14 @@ import ( "math/big" "testing" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/suite" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" "github.com/NibiruChain/nibiru/v2/x/evm" "github.com/NibiruChain/nibiru/v2/x/evm/embeds" "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" "github.com/NibiruChain/nibiru/v2/x/evm/precompile" - - "github.com/stretchr/testify/suite" ) type Suite struct { @@ -37,7 +38,7 @@ func (s *Suite) FunToken_PrecompileExists() { deps := evmtest.NewTestDeps() codeResp, err := deps.EvmKeeper.Code( - deps.GoCtx(), + sdk.WrapSDKContext(deps.Ctx), &evm.QueryCodeRequest{ Address: precompileAddr.String(), }, @@ -45,7 +46,7 @@ func (s *Suite) FunToken_PrecompileExists() { s.NoError(err) s.Equal(string(codeResp.Code), "") - s.True(deps.EvmKeeper.IsAvailablePrecompile(precompileAddr.ToAddr()), + s.True(deps.EvmKeeper.IsAvailablePrecompile(precompileAddr), "did not see precompile address during \"InitPrecompiles\"") callArgs := []any{"nonsense", "args here", "to see if", "precompile is", "called"} @@ -59,11 +60,10 @@ func (s *Suite) FunToken_PrecompileExists() { "callArgs: ", callArgs) fromEvmAddr := evm.EVM_MODULE_ADDRESS - contractAddr := precompileAddr.ToAddr() commit := true bytecodeForCall := packedArgs _, err = deps.EvmKeeper.CallContractWithInput( - deps.Ctx, fromEvmAddr, &contractAddr, commit, + deps.Ctx, fromEvmAddr, &precompileAddr, commit, bytecodeForCall, ) s.ErrorContains(err, "precompile error") @@ -77,7 +77,7 @@ func (s *Suite) FunToken_HappyPath() { theUser := deps.Sender.EthAddr theEvm := evm.EVM_MODULE_ADDRESS - s.True(deps.EvmKeeper.IsAvailablePrecompile(precompileAddr.ToAddr()), + s.True(deps.EvmKeeper.IsAvailablePrecompile(precompileAddr), "did not see precompile address during \"InitPrecompiles\"") s.T().Log("Create FunToken mapping and ERC20") @@ -95,7 +95,9 @@ func (s *Suite) FunToken_HappyPath() { to := theUser input, err := embeds.SmartContract_ERC20Minter.ABI.Pack("mint", to, big.NewInt(69_420)) s.NoError(err) - _, err = evmtest.DoEthTx(&deps, contract, from, input) + _, err = deps.EvmKeeper.CallContractWithInput( + deps.Ctx, from, &contract, true, input, + ) s.ErrorContains(err, "Ownable: caller is not the owner") } @@ -106,7 +108,9 @@ func (s *Suite) FunToken_HappyPath() { input, err := embeds.SmartContract_ERC20Minter.ABI.Pack("mint", to, big.NewInt(69_420)) s.NoError(err) - _, err = evmtest.DoEthTx(&deps, contract, from, input) + _, err = deps.EvmKeeper.CallContractWithInput( + deps.Ctx, from, &contract, true, input, + ) s.NoError(err) evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theUser, big.NewInt(69_420)) evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theEvm, big.NewInt(0)) @@ -128,13 +132,15 @@ func (s *Suite) FunToken_HappyPath() { s.T().Log("Send using precompile") amtToSend := int64(419) - callArgs := precompile.ArgsFunTokenBankSend(contract, big.NewInt(amtToSend), randomAcc) + callArgs := []any{contract, big.NewInt(amtToSend), randomAcc.String()} methodName := string(precompile.FunTokenMethod_BankSend) input, err := abi.Pack(methodName, callArgs...) s.NoError(err) from := theUser - _, err = evmtest.DoEthTx(&deps, precompileAddr.ToAddr(), from, input) + _, err = deps.EvmKeeper.CallContractWithInput( + deps.Ctx, from, &precompileAddr, true, input, + ) s.Require().NoError(err) evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theUser, big.NewInt(69_419-amtToSend)) diff --git a/x/evm/precompile/precompile.go b/x/evm/precompile/precompile.go index bba3c6e8d..c42b40c26 100644 --- a/x/evm/precompile/precompile.go +++ b/x/evm/precompile/precompile.go @@ -7,7 +7,6 @@ // // Key components: // - InitPrecompiles: Initializes and returns a map of precompiled contracts. -// - NibiruPrecompile: Interface for Nibiru-specific precompiles. // - PrecompileFunToken: Implements the FunToken precompile for ERC20-to-bank transfers. // // The package also provides utility functions for working with precompiles, such @@ -92,29 +91,24 @@ func addPrecompileToVM(p vm.PrecompiledContract) { // vm.PrecompiledAddressesCancun, } -// NibiruPrecompile is the interface that all Nibiru-specific precompiles -// must implement. -type NibiruPrecompile interface { - vm.PrecompiledContract - ABI() *gethabi.ABI -} - -// ABIMethodByID: Looks up an ABI method by the 4-byte id. +// methodById: Looks up an ABI method by the 4-byte id. // Copy of "ABI.MethodById" from go-ethereum version > 1.10 -func ABIMethodByID(abi *gethabi.ABI, sigdata []byte) (*gethabi.Method, error) { - if len(sigdata) < 4 { - return nil, fmt.Errorf("data too short (%d bytes) for abi method lookup", len(sigdata)) +func methodById(abi *gethabi.ABI, sigdata []byte) (*gethabi.Method, error) { + if len(sigdata) != 4 { + return nil, fmt.Errorf("data (%d bytes) insufficient for abi method lookup", len(sigdata)) } + for _, method := range abi.Methods { if bytes.Equal(method.ID, sigdata[:4]) { return &method, nil } } + return nil, fmt.Errorf("no method with id: %#x", sigdata[:4]) } func OnRunStart( - p NibiruPrecompile, evm *vm.EVM, input []byte, + abi *gethabi.ABI, evm *vm.EVM, input []byte, ) (ctx sdk.Context, method *gethabi.Method, args []interface{}, err error) { // 1 | Get context from StateDB stateDB, ok := evm.StateDB.(*statedb.StateDB) @@ -125,23 +119,19 @@ func OnRunStart( ctx = stateDB.GetContext() // 2 | Parse the ABI method - // ABI method IDs are at least 4 bytes according to "gethabi.ABI.MethodByID". - methodIdBytes := 4 - if len(input) < methodIdBytes { + // ABI method IDs are exactly 4 bytes according to "gethabi.ABI.MethodByID". + if len(input) < 4 { readableBz := collections.HumanizeBytes(input) err = fmt.Errorf("input \"%s\" too short to extract method ID (less than 4 bytes)", readableBz) return } - methodID := input[:methodIdBytes] - abi := p.ABI() - method, err = ABIMethodByID(abi, methodID) + method, err = methodById(abi, input[:4]) if err != nil { err = fmt.Errorf("unable to parse ABI method by its 4-byte ID: %w", err) return } - argsBz := input[methodIdBytes:] - args, err = method.Inputs.Unpack(argsBz) + args, err = method.Inputs.Unpack(input[4:]) if err != nil { err = fmt.Errorf("unable to unpack input args: %w", err) return diff --git a/x/evm/tx_test.go b/x/evm/tx_test.go index 638fb585a..2a8a2acd2 100644 --- a/x/evm/tx_test.go +++ b/x/evm/tx_test.go @@ -45,7 +45,7 @@ func (suite *TxDataTestSuite) SetupTest() { suite.sdkMinusOneInt = sdkmath.NewInt(-1) suite.invalidAddr = "123456" - suite.addr = evmtest.NewEthAccInfo().EthAddr + suite.addr = evmtest.NewEthPrivAcc().EthAddr suite.hexAddr = suite.addr.Hex() suite.hexDataBytes = hexutil.Bytes([]byte("data")) From dbf26bbdba92701cb18a61582f6f60dfc7e3e63a Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Wed, 14 Aug 2024 11:32:47 -0700 Subject: [PATCH 5/8] refactor(evm): funtoken tests (#2001) * create funtoken_from_coin_test.go * refactor FunTokenFromCoinSuite * create funtoken_from_erc20_test.go * refactor DeployContract * refactor MsgCreateFunToken ValidateBasic() * add test case for TestCreateFunTokenFromERC20 * refactor TestERC20Calls * move TestSendFunTokenToEvm * refactor CreateFunTokenFromERC20 * add TestSendFromEvmToCosmos * remove ApplyEvmMsgWithEmptyTxConfig * Update CHANGELOG.md --- CHANGELOG.md | 1 + eth/rpc/backend/call_tx.go | 2 +- eth/rpc/backend/sign_tx.go | 2 +- eth/rpc/backend/sign_tx_test.go | 4 +- eth/rpc/rpcapi/eth_api.go | 2 +- x/evm/evmmodule/genesis_test.go | 2 +- x/evm/evmtest/tx.go | 51 +-- x/evm/json_tx_args.go | 4 +- x/evm/json_tx_args_test.go | 2 +- x/evm/keeper/erc20.go | 21 +- x/evm/keeper/erc20_test.go | 445 +---------------------- x/evm/keeper/funtoken_from_coin.go | 18 +- x/evm/keeper/funtoken_from_coin_test.go | 262 +++++++++++++ x/evm/keeper/funtoken_from_erc20.go | 18 +- x/evm/keeper/funtoken_from_erc20_test.go | 222 +++++++++++ x/evm/keeper/keeper_test.go | 3 +- x/evm/keeper/msg_ethereum_tx_test.go | 2 +- x/evm/keeper/msg_server.go | 21 +- x/evm/msg.go | 32 +- x/evm/msg_test.go | 9 +- x/evm/precompile/funtoken.go | 19 +- x/evm/precompile/funtoken_test.go | 84 ++--- 22 files changed, 615 insertions(+), 611 deletions(-) create mode 100644 x/evm/keeper/funtoken_from_coin_test.go create mode 100644 x/evm/keeper/funtoken_from_erc20_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 5139ee102..ce42aaaf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -104,6 +104,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#1996](https://github.com/NibiruChain/nibiru/pull/1996) - perf(evm-keeper-precompile): implement sorted map for `k.precompiles` to remove dead code - [#1997](https://github.com/NibiruChain/nibiru/pull/1997) - refactor(evm): Remove unnecessary params: "enable_call", "enable_create". - [#2000](https://github.com/NibiruChain/nibiru/pull/2000) - refactor(evm): simplify ERC-20 keeper methods +- [#2001](https://github.com/NibiruChain/nibiru/pull/2001) - refactor(evm): simplify FunToken methods and tests #### Dapp modules: perp, spot, oracle, etc diff --git a/eth/rpc/backend/call_tx.go b/eth/rpc/backend/call_tx.go index 98c2342c9..7f61bf880 100644 --- a/eth/rpc/backend/call_tx.go +++ b/eth/rpc/backend/call_tx.go @@ -50,7 +50,7 @@ func (b *Backend) Resend(args evm.JsonTxArgs, gasPrice *hexutil.Big, gasLimit *h signer := gethcore.LatestSigner(cfg) - matchTx := args.ToTransaction().AsTransaction() + matchTx := args.ToMsgEthTx().AsTransaction() // Before replacing the old transaction, ensure the _new_ transaction fee is reasonable. price := matchTx.GasPrice() diff --git a/eth/rpc/backend/sign_tx.go b/eth/rpc/backend/sign_tx.go index 3d6379d97..7d3032ea3 100644 --- a/eth/rpc/backend/sign_tx.go +++ b/eth/rpc/backend/sign_tx.go @@ -49,7 +49,7 @@ func (b *Backend) SendTransaction(args evm.JsonTxArgs) (common.Hash, error) { // the corresponding chainID validation, we need to sign the transaction before calling it // Sign transaction - msg := args.ToTransaction() + msg := args.ToMsgEthTx() if err := msg.Sign(signer, b.clientCtx.Keyring); err != nil { b.logger.Debug("failed to sign tx", "error", err.Error()) return common.Hash{}, err diff --git a/eth/rpc/backend/sign_tx_test.go b/eth/rpc/backend/sign_tx_test.go index 93c13cfe2..559289d3f 100644 --- a/eth/rpc/backend/sign_tx_test.go +++ b/eth/rpc/backend/sign_tx_test.go @@ -128,7 +128,7 @@ func (s *BackendSuite) TestSendTransaction() { queryClient := s.backend.queryClient.QueryClient.(*mocks.EVMQueryClient) RegisterParamsWithoutHeader(queryClient, 1) ethSigner := gethcore.LatestSigner(s.backend.ChainConfig()) - msg := callArgsDefault.ToTransaction() + msg := callArgsDefault.ToMsgEthTx() err := msg.Sign(ethSigner, s.backend.clientCtx.Keyring) s.Require().NoError(err) tc.expHash = msg.AsTransaction().Hash() @@ -263,7 +263,7 @@ func broadcastTx( RegisterBaseFee(queryClient, baseFee) RegisterParamsWithoutHeader(queryClient, 1) ethSigner := gethcore.LatestSigner(s.backend.ChainConfig()) - msg := callArgsDefault.ToTransaction() + msg := callArgsDefault.ToMsgEthTx() err = msg.Sign(ethSigner, s.backend.clientCtx.Keyring) s.Require().NoError(err) tx, _ := msg.BuildTx(s.backend.clientCtx.TxConfig.NewTxBuilder(), evm.DefaultEVMDenom) diff --git a/eth/rpc/rpcapi/eth_api.go b/eth/rpc/rpcapi/eth_api.go index 9b59be6bc..75f7ffc85 100644 --- a/eth/rpc/rpcapi/eth_api.go +++ b/eth/rpc/rpcapi/eth_api.go @@ -471,7 +471,7 @@ func (e *EthAPI) FillTransaction( } // Assemble the transaction and obtain rlp - tx := args.ToTransaction().AsTransaction() + tx := args.ToMsgEthTx().AsTransaction() data, err := tx.MarshalBinary() if err != nil { diff --git a/x/evm/evmmodule/genesis_test.go b/x/evm/evmmodule/genesis_test.go index 15c8dcd66..10e61efbd 100644 --- a/x/evm/evmmodule/genesis_test.go +++ b/x/evm/evmmodule/genesis_test.go @@ -45,7 +45,7 @@ func (s *Suite) TestExportInitGenesis() { amountToSendC := big.NewInt(228) // Create ERC-20 contract - deployResp, err := evmtest.DeployContract(&deps, erc20Contract, s.T()) + deployResp, err := evmtest.DeployContract(&deps, erc20Contract) s.Require().NoError(err) erc20Addr := deployResp.ContractAddr totalSupply, err := deps.EvmKeeper.ERC20().LoadERC20BigInt( diff --git a/x/evm/evmtest/tx.go b/x/evm/evmtest/tx.go index 03f8e4226..ea6055454 100644 --- a/x/evm/evmtest/tx.go +++ b/x/evm/evmtest/tx.go @@ -141,38 +141,41 @@ type DeployContractResult struct { func DeployContract( deps *TestDeps, contract embeds.CompiledEvmContract, - t *testing.T, args ...any, -) (result DeployContractResult, err error) { +) (result *DeployContractResult, err error) { // Use contract args packedArgs, err := contract.ABI.Pack("", args...) if err != nil { - err = errors.Wrap(err, "failed to pack ABI args") - return + return nil, errors.Wrap(err, "failed to pack contract args") } bytecodeForCall := append(contract.Bytecode, packedArgs...) nonce := deps.StateDB().GetNonce(deps.Sender.EthAddr) - jsonTxArgs := evm.JsonTxArgs{ - Nonce: (*hexutil.Uint64)(&nonce), - Input: (*hexutil.Bytes)(&bytecodeForCall), - From: &deps.Sender.EthAddr, + msgEthTx, err := GenerateAndSignEthTxMsg( + evm.JsonTxArgs{ + Nonce: (*hexutil.Uint64)(&nonce), + Input: (*hexutil.Bytes)(&bytecodeForCall), + From: &deps.Sender.EthAddr, + }, deps, + ) + if err != nil { + return nil, errors.Wrap(err, "failed to generate and sign eth tx msg") } - ethTxMsg, err := GenerateAndSignEthTxMsg(jsonTxArgs, deps) - require.NoError(t, err) - resp, err := deps.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(deps.Ctx), ethTxMsg) - require.NoError(t, err) - require.Empty(t, resp.VmError) - - contractAddress := crypto.CreateAddress(deps.Sender.EthAddr, nonce) + resp, err := deps.App.EvmKeeper.EthereumTx(sdk.WrapSDKContext(deps.Ctx), msgEthTx) + if err != nil { + return nil, errors.Wrap(err, "failed to execute ethereum tx") + } + if resp.VmError != "" { + return nil, fmt.Errorf("vm error: %s", resp.VmError) + } - return DeployContractResult{ + return &DeployContractResult{ TxResp: resp, - EthTxMsg: ethTxMsg, + EthTxMsg: msgEthTx, ContractData: contract, Nonce: nonce, - ContractAddr: contractAddress, + ContractAddr: crypto.CreateAddress(deps.Sender.EthAddr, nonce), }, nil } @@ -181,7 +184,7 @@ func DeployAndExecuteERC20Transfer( deps *TestDeps, t *testing.T, ) (*evm.MsgEthereumTx, []*evm.MsgEthereumTx) { // TX 1: Deploy ERC-20 contract - deployResp, err := DeployContract(deps, embeds.SmartContract_TestERC20, t) + deployResp, err := DeployContract(deps, embeds.SmartContract_TestERC20) require.NoError(t, err) contractData := deployResp.ContractData nonce := deployResp.Nonce @@ -217,9 +220,9 @@ func DeployAndExecuteERC20Transfer( // GenerateAndSignEthTxMsg estimates gas, sets gas limit and sings the tx func GenerateAndSignEthTxMsg( - txArgs evm.JsonTxArgs, deps *TestDeps, + jsonTxArgs evm.JsonTxArgs, deps *TestDeps, ) (*evm.MsgEthereumTx, error) { - estimateArgs, err := json.Marshal(&txArgs) + estimateArgs, err := json.Marshal(&jsonTxArgs) if err != nil { return nil, err } @@ -235,11 +238,11 @@ func GenerateAndSignEthTxMsg( if err != nil { return nil, err } - txArgs.Gas = (*hexutil.Uint64)(&res.Gas) + jsonTxArgs.Gas = (*hexutil.Uint64)(&res.Gas) - msgEthereumTx := txArgs.ToTransaction() + msgEthTx := jsonTxArgs.ToMsgEthTx() gethSigner := gethcore.LatestSignerForChainID(deps.App.EvmKeeper.EthChainID(deps.Ctx)) - return msgEthereumTx, msgEthereumTx.Sign(gethSigner, deps.Sender.KeyringSigner) + return msgEthTx, msgEthTx.Sign(gethSigner, deps.Sender.KeyringSigner) } func TransferWei( diff --git a/x/evm/json_tx_args.go b/x/evm/json_tx_args.go index 38e3a1a4b..603546632 100644 --- a/x/evm/json_tx_args.go +++ b/x/evm/json_tx_args.go @@ -56,9 +56,9 @@ func (args *JsonTxArgs) String() string { args.AccessList) } -// ToTransaction converts the arguments to an ethereum transaction. +// ToMsgEthTx converts the arguments to an ethereum transaction. // This assumes that setTxDefaults has been called. -func (args *JsonTxArgs) ToTransaction() *MsgEthereumTx { +func (args *JsonTxArgs) ToMsgEthTx() *MsgEthereumTx { var ( chainID, value, gasPrice, maxFeePerGas, maxPriorityFeePerGas sdkmath.Int gas, nonce uint64 diff --git a/x/evm/json_tx_args_test.go b/x/evm/json_tx_args_test.go index 49ade7a6a..fb38cc6ca 100644 --- a/x/evm/json_tx_args_test.go +++ b/x/evm/json_tx_args_test.go @@ -94,7 +94,7 @@ func (suite *TxDataTestSuite) TestConvertTxArgsEthTx() { }, } for _, tc := range testCases { - res := tc.txArgs.ToTransaction() + res := tc.txArgs.ToMsgEthTx() suite.Require().NotNil(res) } } diff --git a/x/evm/keeper/erc20.go b/x/evm/keeper/erc20.go index fc7d52128..3874c7729 100644 --- a/x/evm/keeper/erc20.go +++ b/x/evm/keeper/erc20.go @@ -6,6 +6,7 @@ import ( "fmt" "math/big" + "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" gethabi "github.com/ethereum/go-ethereum/accounts/abi" gethcommon "github.com/ethereum/go-ethereum/common" @@ -137,8 +138,7 @@ func (k Keeper) CallContract( ) (evmResp *evm.MsgEthereumTxResponse, err error) { contractInput, err := abi.Pack(methodName, args...) if err != nil { - err = fmt.Errorf("failed to pack ABI args: %w", err) - return + return nil, fmt.Errorf("failed to pack ABI args: %w", err) } return k.CallContractWithInput(ctx, fromAcc, contract, commit, contractInput) } @@ -176,7 +176,7 @@ func (k Keeper) CallContractWithInput( commit, gasLimit, &fromAcc, contract, contractInput, k, ctx, ) if err != nil { - return evmResp, err + return nil, err } unusedBigInt := big.NewInt(0) @@ -201,7 +201,7 @@ func (k Keeper) CallContractWithInput( k.EthChainID(ctx), ) if err != nil { - return evmResp, fmt.Errorf("failed to load evm config: %s", err) + return nil, errors.Wrapf(err, "failed to load evm config") } txConfig := statedb.NewEmptyTxConfig(gethcommon.BytesToHash(ctx.HeaderHash())) @@ -209,11 +209,11 @@ func (k Keeper) CallContractWithInput( ctx, evmMsg, evm.NewNoOpTracer(), commit, evmCfg, txConfig, ) if err != nil { - return evmResp, err + return nil, errors.Wrapf(err, "failed to apply EVM message") } if evmResp.Failed() { - return evmResp, fmt.Errorf("%w: EVM error: %s", err, evmResp.VmError) + return nil, errors.Wrapf(err, "EVM execution failed: %s", evmResp.VmError) } return evmResp, err @@ -249,8 +249,7 @@ func computeCommitGasLimit( Data: (*hexutil.Bytes)(&contractInput), }) if err != nil { - err = fmt.Errorf("failed compute gas limit to marshal tx args: %w", err) - return + return gasLimit, fmt.Errorf("failed compute gas limit to marshal tx args: %w", err) } gasRes, err := k.EstimateGasForEvmCallType( @@ -262,12 +261,10 @@ func computeCommitGasLimit( evm.CallTypeSmart, ) if err != nil { - err = fmt.Errorf("failed to compute gas limit: %w", err) - return + return gasLimit, fmt.Errorf("failed to compute gas limit: %w", err) } - newGasLimit = gasRes.Gas - return newGasLimit, nil + return gasRes.Gas, nil } func (k Keeper) LoadERC20Name( diff --git a/x/evm/keeper/erc20_test.go b/x/evm/keeper/erc20_test.go index 20946553f..a35bb6891 100644 --- a/x/evm/keeper/erc20_test.go +++ b/x/evm/keeper/erc20_test.go @@ -2,419 +2,16 @@ package keeper_test import ( - "fmt" "math/big" - "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" bank "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/NibiruChain/nibiru/v2/x/common/testutil" - - "github.com/NibiruChain/nibiru/v2/eth" - "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" "github.com/NibiruChain/nibiru/v2/x/evm" - "github.com/NibiruChain/nibiru/v2/x/evm/embeds" "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" - "github.com/NibiruChain/nibiru/v2/x/evm/keeper" ) -func (s *Suite) TestCreateFunTokenFromERC20() { - deps := evmtest.NewTestDeps() - - // Compute contract address. FindERC20 should fail - expectedERC20Addr := crypto.CreateAddress(deps.Sender.EthAddr, deps.StateDB().GetNonce(deps.Sender.EthAddr)) - _, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, expectedERC20Addr) - s.Error(err) - - s.T().Log("Case 1: Deploy and invoke ERC20 with 18 decimals") - { - metadata := keeper.ERC20Metadata{ - Name: "erc20name", - Symbol: "TOKEN", - Decimals: 18, - } - deployResp, err := evmtest.DeployContract( - &deps, embeds.SmartContract_ERC20Minter, s.T(), - metadata.Name, metadata.Symbol, metadata.Decimals, - ) - s.Require().NoError(err) - s.Equal(expectedERC20Addr, deployResp.ContractAddr) - - info, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, deployResp.ContractAddr) - s.NoError(err, info) - s.Equal(metadata, info) - } - - s.T().Log("Case 2: Deploy and invoke ERC20 with 9 decimals") - { - metadata := keeper.ERC20Metadata{ - Name: "gwei", - Symbol: "GWEI", - Decimals: 9, - } - expectedERC20Addr = crypto.CreateAddress(deps.Sender.EthAddr, deps.StateDB().GetNonce(deps.Sender.EthAddr)) - deployResp, err := evmtest.DeployContract( - &deps, embeds.SmartContract_ERC20Minter, s.T(), - metadata.Name, metadata.Symbol, metadata.Decimals, - ) - s.Require().NoError(err) - s.Require().Equal(expectedERC20Addr, deployResp.ContractAddr) - - info, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, deployResp.ContractAddr) - s.NoError(err, info) - s.Equal(metadata, info) - - queryCodeReq := &evm.QueryCodeRequest{ - Address: expectedERC20Addr.String(), - } - _, err = deps.EvmKeeper.Code(deps.Ctx, queryCodeReq) - s.Require().NoError(err) - } - - erc20Addr := eth.NewHexAddr(expectedERC20Addr) - s.T().Log("happy: CreateFunToken for the ERC20") - { - // Give the sender funds for the fee - s.Require().NoError(testapp.FundAccount( - deps.App.BankKeeper, - deps.Ctx, - deps.Sender.NibiruAddr, - deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), - )) - - resp, err := deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), - &evm.MsgCreateFunToken{ - FromErc20: &erc20Addr, - Sender: deps.Sender.NibiruAddr.String(), - }, - ) - s.Require().NoError(err, "erc20 %s", erc20Addr) - - expectedBankDenom := fmt.Sprintf("erc20/%s", erc20Addr.String()) - s.Equal( - resp.FuntokenMapping, - evm.FunToken{ - Erc20Addr: erc20Addr, - BankDenom: expectedBankDenom, - IsMadeFromCoin: false, - }) - - // Event "EventFunTokenCreated" must present - testutil.RequireContainsTypedEvent( - s.T(), - deps.Ctx, - &evm.EventFunTokenCreated{ - BankDenom: expectedBankDenom, - Erc20ContractAddress: erc20Addr.String(), - Creator: deps.Sender.NibiruAddr.String(), - IsMadeFromCoin: false, - }, - ) - } - - s.T().Log("sad: CreateFunToken for the ERC20: already registered") - { - // Give the sender funds for the fee - s.Require().NoError(testapp.FundAccount( - deps.App.BankKeeper, - deps.Ctx, - deps.Sender.NibiruAddr, - deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), - )) - - _, err = deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), - &evm.MsgCreateFunToken{ - FromErc20: &erc20Addr, - Sender: deps.Sender.NibiruAddr.String(), - }, - ) - s.ErrorContains(err, "funtoken mapping already created") - } - - s.T().Log("sad: CreateFunToken for the ERC20: invalid sender") - { - _, err = deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), - &evm.MsgCreateFunToken{ - FromErc20: &erc20Addr, - }, - ) - s.ErrorContains(err, "invalid sender") - } -} - -func (s *Suite) TestDeployERC20ForBankCoin() { - deps := evmtest.NewTestDeps() - - // Compute contract address. FindERC20 should fail - nonce := deps.StateDB().GetNonce(evm.EVM_MODULE_ADDRESS) - expectedERC20Addr := crypto.CreateAddress(evm.EVM_MODULE_ADDRESS, nonce) - _, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, expectedERC20Addr) - s.Error(err) - - s.T().Log("Case 1: Deploy and invoke ERC20 for info") - bankDenom := "sometoken" - bankMetadata := bank.Metadata{ - DenomUnits: []*bank.DenomUnit{ - { - Denom: bankDenom, - Exponent: 0, - }, - }, - Base: bankDenom, - Display: bankDenom, - Name: bankDenom, - Symbol: "TOKEN", - } - erc20Addr, err := deps.EvmKeeper.DeployERC20ForBankCoin( - deps.Ctx, bankMetadata, - ) - s.Require().NoError(err) - s.Equal(expectedERC20Addr, erc20Addr) - - s.T().Log("Expect ERC20 metadata on contract") - info, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, erc20Addr) - s.NoError(err) - s.Equal(keeper.ERC20Metadata{ - Name: bankDenom, - Symbol: "TOKEN", - Decimals: 0, - }, info) -} - -func (s *Suite) TestCreateFunTokenFromCoin() { - deps := evmtest.NewTestDeps() - - // Compute contract address. FindERC20 should fail - nonce := deps.StateDB().GetNonce(deps.Sender.EthAddr) - contractAddress := crypto.CreateAddress(deps.Sender.EthAddr, nonce) - _, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, contractAddress) - s.Error(err) - - s.T().Log("Setup: Create a coin in the bank state") - bankDenom := "sometoken" - - setBankDenomMetadata(deps.Ctx, deps.App.BankKeeper, bankDenom) - - s.T().Log("happy: CreateFunToken for the bank coin") - // Give the sender funds for the fee - s.Require().NoError(testapp.FundAccount( - deps.App.BankKeeper, - deps.Ctx, - deps.Sender.NibiruAddr, - deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), - )) - - createFuntokenResp, err := deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), - &evm.MsgCreateFunToken{ - FromBankDenom: bankDenom, - Sender: deps.Sender.NibiruAddr.String(), - }, - ) - s.Require().NoError(err, "bankDenom %s", bankDenom) - erc20 := createFuntokenResp.FuntokenMapping.Erc20Addr - erc20Addr := erc20.ToAddr() - s.Equal( - createFuntokenResp.FuntokenMapping, - evm.FunToken{ - Erc20Addr: erc20, - BankDenom: bankDenom, - IsMadeFromCoin: true, - }) - - s.T().Log("Expect ERC20 to be deployed") - queryCodeReq := &evm.QueryCodeRequest{ - Address: erc20.String(), - } - _, err = deps.EvmKeeper.Code(deps.Ctx, queryCodeReq) - s.Require().NoError(err) - - s.T().Log("Expect ERC20 metadata on contract") - metadata := keeper.ERC20Metadata{ - Name: bankDenom, - Symbol: "TOKEN", - Decimals: 0, - } - info, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, erc20Addr) - s.NoError(err, info) - s.Equal(metadata, info) - - // Event "EventFunTokenCreated" must present - // Event "EventFunTokenCreated" must present - testutil.RequireContainsTypedEvent( - s.T(), - deps.Ctx, - &evm.EventFunTokenCreated{ - BankDenom: bankDenom, - Erc20ContractAddress: erc20.String(), - Creator: deps.Sender.NibiruAddr.String(), - IsMadeFromCoin: true, - }, - ) - - s.T().Log("sad: CreateFunToken for the bank coin: already registered") - // Give the sender funds for the fee - err = testapp.FundAccount( - deps.App.BankKeeper, - deps.Ctx, - deps.Sender.NibiruAddr, - deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), - ) - s.Require().NoError(err) - _, err = deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), - &evm.MsgCreateFunToken{ - FromBankDenom: bankDenom, - Sender: deps.Sender.NibiruAddr.String(), - }, - ) - s.Require().ErrorContains(err, "funtoken mapping already created") -} - -// TestSendFunTokenToEvm executes sending fun tokens from bank coin to erc20 and checks the results: -// - sender balance should be reduced by sendAmount -// - erc-20 balance should be increased by sendAmount -// - evm module account should hold sender's coins -func (s *Suite) TestSendFunTokenToEvm() { - for _, tc := range []struct { - name string - bankDenom string - senderBalanceBefore math.Int - amountToSend math.Int - wantErr string - }{ - { - name: "happy: proper sending", - bankDenom: "unibi", - senderBalanceBefore: math.NewInt(100), - amountToSend: math.NewInt(10), - wantErr: "", - }, - { - name: "sad: not registered bank denom", - bankDenom: "not-registered-denom", - senderBalanceBefore: math.NewInt(100), - amountToSend: math.NewInt(10), - wantErr: "does not exist", - }, - { - name: "sad: insufficient balance", - bankDenom: "unibi", - senderBalanceBefore: math.NewInt(10), - amountToSend: math.NewInt(100), - wantErr: "insufficient funds", - }, - } { - s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() - bankDenom := "unibi" - recipientEVMAddr := eth.MustNewHexAddrFromStr("0x1234500000000000000000000000000000000000") - evmModuleAddr := deps.App.AccountKeeper.GetModuleAddress(evm.ModuleName) - spendableAmount := tc.senderBalanceBefore.Int64() - spendableCoins := sdk.NewCoins(sdk.NewInt64Coin(bankDenom, spendableAmount)) - - ctx := sdk.WrapSDKContext(deps.Ctx) - setBankDenomMetadata(deps.Ctx, deps.App.BankKeeper, bankDenom) - - // Fund sender's wallet - err := deps.App.BankKeeper.MintCoins(deps.Ctx, evm.ModuleName, spendableCoins) - s.Require().NoError(err) - err = deps.App.BankKeeper.SendCoinsFromModuleToAccount( - deps.Ctx, evm.ModuleName, deps.Sender.NibiruAddr, spendableCoins, - ) - s.Require().NoError(err) - - // Give the sender funds for the fee - err = testapp.FundAccount( - deps.App.BankKeeper, - deps.Ctx, - deps.Sender.NibiruAddr, - deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), - ) - s.Require().NoError(err) - - // Create fun token from coin - createFunTokenResp, err := deps.EvmKeeper.CreateFunToken( - ctx, - &evm.MsgCreateFunToken{ - FromBankDenom: bankDenom, - Sender: deps.Sender.NibiruAddr.String(), - }, - ) - s.Require().NoError(err) - funTokenErc20Addr := createFunTokenResp.FuntokenMapping.Erc20Addr.ToAddr() - - // Send fun token to ERC-20 contract - bankCoin := sdk.Coin{Denom: tc.bankDenom, Amount: tc.amountToSend} - _, err = deps.EvmKeeper.SendFunTokenToEvm( - ctx, - &evm.MsgSendFunTokenToEvm{ - Sender: deps.Sender.NibiruAddr.String(), - BankCoin: bankCoin, - ToEthAddr: recipientEVMAddr, - }, - ) - if tc.wantErr != "" { - s.Require().ErrorContains(err, tc.wantErr) - return - } - s.Require().NoError(err) - - // Event "EventSendFunTokenToEvm" must present - testutil.RequireContainsTypedEvent( - s.T(), - deps.Ctx, - &evm.EventSendFunTokenToEvm{ - Sender: deps.Sender.NibiruAddr.String(), - Erc20ContractAddress: funTokenErc20Addr.String(), - ToEthAddr: recipientEVMAddr.String(), - BankCoin: bankCoin, - }, - ) - - // Check 1: coins are stored on a module balance - moduleBalance, err := deps.App.BankKeeper.Balance(ctx, &bank.QueryBalanceRequest{ - Address: evmModuleAddr.String(), - Denom: bankDenom, - }) - s.Require().NoError(err) - s.Equal(tc.amountToSend, moduleBalance.Balance.Amount) - - // Check 2: Sender balance reduced by send amount - senderBalance, err := deps.App.BankKeeper.Balance(ctx, &bank.QueryBalanceRequest{ - Address: deps.Sender.NibiruAddr.String(), - Denom: bankDenom, - }) - s.Require().NoError(err) - s.Equal(tc.senderBalanceBefore.Sub(tc.amountToSend), senderBalance.Balance.Amount) - - // Check 3: erc-20 balance equals to send amount - recipientERC20Balance, err := deps.EvmKeeper.CallContract( - deps.Ctx, - embeds.SmartContract_ERC20Minter.ABI, - evm.EVM_MODULE_ADDRESS, - &funTokenErc20Addr, - false, - "balanceOf", - recipientEVMAddr.ToAddr(), - ) - s.Require().NoError(err) - res, err := embeds.SmartContract_ERC20Minter.ABI.Unpack( - "balanceOf", recipientERC20Balance.Ret, - ) - s.Require().NoError(err) - s.Equal(1, len(res)) - s.Equal(tc.amountToSend.BigInt(), res[0]) - }) - } -} - // setBankDenomMetadata utility method to set bank denom metadata required for working with coin func setBankDenomMetadata(ctx sdk.Context, bankKeeper bankkeeper.Keeper, bankDenom string) { bankMetadata := bank.Metadata{ @@ -438,61 +35,47 @@ func (s *Suite) TestERC20Calls() { funtoken := evmtest.CreateFunTokenForBankCoin(&deps, bankDenom, &s.Suite) contract := funtoken.Erc20Addr.ToAddr() - theUser := deps.Sender.EthAddr - theEvm := evm.EVM_MODULE_ADDRESS - s.T().Log("Mint tokens - Fail from non-owner") { - from := theUser - to := theUser - _, err := deps.EvmKeeper.ERC20().Mint(contract, from, to, big.NewInt(69_420), deps.Ctx) + _, err := deps.EvmKeeper.ERC20().Mint(contract, deps.Sender.EthAddr, evm.EVM_MODULE_ADDRESS, big.NewInt(69_420), deps.Ctx) s.ErrorContains(err, evm.ErrOwnable) } s.T().Log("Mint tokens - Success") { - from := theEvm - to := theEvm - - _, err := deps.EvmKeeper.ERC20().Mint(contract, from, to, big.NewInt(69_420), deps.Ctx) + _, err := deps.EvmKeeper.ERC20().Mint(contract, evm.EVM_MODULE_ADDRESS, evm.EVM_MODULE_ADDRESS, big.NewInt(69_420), deps.Ctx) s.Require().NoError(err) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theUser, big.NewInt(0)) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theEvm, big.NewInt(69_420)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, deps.Sender.EthAddr, big.NewInt(0)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, evm.EVM_MODULE_ADDRESS, big.NewInt(69_420)) } s.T().Log("Transfer - Not enough funds") { - from := theUser - to := theEvm - _, err := deps.EvmKeeper.ERC20().Transfer(contract, from, to, big.NewInt(9_420), deps.Ctx) + _, err := deps.EvmKeeper.ERC20().Transfer(contract, deps.Sender.EthAddr, evm.EVM_MODULE_ADDRESS, big.NewInt(9_420), deps.Ctx) s.ErrorContains(err, "ERC20: transfer amount exceeds balance") // balances unchanged - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theUser, big.NewInt(0)) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theEvm, big.NewInt(69_420)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, deps.Sender.EthAddr, big.NewInt(0)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, evm.EVM_MODULE_ADDRESS, big.NewInt(69_420)) } s.T().Log("Transfer - Success (sanity check)") { - from := theEvm - to := theUser - _, err := deps.EvmKeeper.ERC20().Transfer(contract, from, to, big.NewInt(9_420), deps.Ctx) + _, err := deps.EvmKeeper.ERC20().Transfer(contract, evm.EVM_MODULE_ADDRESS, deps.Sender.EthAddr, big.NewInt(9_420), deps.Ctx) s.Require().NoError(err) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theUser, big.NewInt(9_420)) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theEvm, big.NewInt(60_000)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, deps.Sender.EthAddr, big.NewInt(9_420)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, evm.EVM_MODULE_ADDRESS, big.NewInt(60_000)) } s.T().Log("Burn tokens - Allowed as non-owner") { - from := theUser - _, err := deps.EvmKeeper.ERC20().Burn(contract, from, big.NewInt(420), deps.Ctx) + _, err := deps.EvmKeeper.ERC20().Burn(contract, deps.Sender.EthAddr, big.NewInt(420), deps.Ctx) s.Require().NoError(err) - from = theEvm - _, err = deps.EvmKeeper.ERC20().Burn(contract, from, big.NewInt(6_000), deps.Ctx) + _, err = deps.EvmKeeper.ERC20().Burn(contract, evm.EVM_MODULE_ADDRESS, big.NewInt(6_000), deps.Ctx) s.Require().NoError(err) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theUser, big.NewInt(9_000)) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theEvm, big.NewInt(54_000)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, deps.Sender.EthAddr, big.NewInt(9_000)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, evm.EVM_MODULE_ADDRESS, big.NewInt(54_000)) } } diff --git a/x/evm/keeper/funtoken_from_coin.go b/x/evm/keeper/funtoken_from_coin.go index c58d43db9..469657da6 100644 --- a/x/evm/keeper/funtoken_from_coin.go +++ b/x/evm/keeper/funtoken_from_coin.go @@ -23,8 +23,8 @@ func (k *Keeper) CreateFunTokenFromCoin( } // 2 | Check for denom metadata in bank state - bankCoin, isAlreadyCoin := k.bankKeeper.GetDenomMetaData(ctx, bankDenom) - if !isAlreadyCoin { + bankCoin, isFound := k.bankKeeper.GetDenomMetaData(ctx, bankDenom) + if !isFound { return funtoken, fmt.Errorf("bank coin denom should have bank metadata for denom \"%s\"", bankDenom) } @@ -66,24 +66,22 @@ func (k *Keeper) DeployERC20ForBankCoin( decimals = uint8(bankCoin.DenomUnits[decimalsIdx].Exponent) } - erc20Embed := embeds.SmartContract_ERC20Minter - // pass empty method name to deploy the contract - packedArgs, err := erc20Embed.ABI.Pack("", bankCoin.Name, bankCoin.Symbol, decimals) + packedArgs, err := embeds.SmartContract_ERC20Minter.ABI.Pack("", bankCoin.Name, bankCoin.Symbol, decimals) if err != nil { - err = errors.Wrap(err, "failed to pack ABI args") - return gethcommon.Address{}, err + return gethcommon.Address{}, errors.Wrap(err, "failed to pack ABI args") } erc20Addr = crypto.CreateAddress(evm.EVM_MODULE_ADDRESS, k.GetAccNonce(ctx, evm.EVM_MODULE_ADDRESS)) - bytecodeForCall := append(erc20Embed.Bytecode, packedArgs...) + bytecodeForCall := append(embeds.SmartContract_ERC20Minter.Bytecode, packedArgs...) + + // nil address for contract creation _, err = k.CallContractWithInput( ctx, evm.EVM_MODULE_ADDRESS, nil, true, bytecodeForCall, ) if err != nil { - err = errors.Wrap(err, "deploy ERC20 failed") - return + return gethcommon.Address{}, errors.Wrap(err, "failed to deploy ERC20 contract") } return erc20Addr, nil diff --git a/x/evm/keeper/funtoken_from_coin_test.go b/x/evm/keeper/funtoken_from_coin_test.go new file mode 100644 index 000000000..b377dd336 --- /dev/null +++ b/x/evm/keeper/funtoken_from_coin_test.go @@ -0,0 +1,262 @@ +// Copyright (c) 2023-2024 Nibi, Inc. +package keeper_test + +import ( + "testing" + + "cosmossdk.io/math" + sdk "github.com/cosmos/cosmos-sdk/types" + bank "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/ethereum/go-ethereum/crypto" + "github.com/stretchr/testify/suite" + + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/x/evm/keeper" +) + +func (s *FunTokenFromCoinSuite) TestDeployERC20ForBankCoin() { + deps := evmtest.NewTestDeps() + + // Compute contract address. FindERC20 should fail + nonce := deps.StateDB().GetNonce(evm.EVM_MODULE_ADDRESS) + expectedERC20Addr := crypto.CreateAddress(evm.EVM_MODULE_ADDRESS, nonce) + _, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, expectedERC20Addr) + s.Error(err) + + s.T().Log("Case 1: Deploy and invoke ERC20 for info") + const bankDenom = "sometoken" + bankMetadata := bank.Metadata{ + DenomUnits: []*bank.DenomUnit{ + { + Denom: bankDenom, + Exponent: 0, + }, + }, + Base: bankDenom, + Display: bankDenom, + Name: bankDenom, + Symbol: "TOKEN", + } + erc20Addr, err := deps.EvmKeeper.DeployERC20ForBankCoin( + deps.Ctx, bankMetadata, + ) + s.Require().NoError(err) + s.Equal(expectedERC20Addr, erc20Addr) + + s.T().Log("Expect ERC20 metadata on contract") + info, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, erc20Addr) + s.NoError(err) + s.Equal(keeper.ERC20Metadata{ + Name: bankDenom, + Symbol: "TOKEN", + Decimals: 0, + }, info) +} + +func (s *FunTokenFromCoinSuite) TestCreateFunTokenFromCoin() { + deps := evmtest.NewTestDeps() + + // Compute contract address. FindERC20 should fail + nonce := deps.StateDB().GetNonce(deps.Sender.EthAddr) + contractAddress := crypto.CreateAddress(deps.Sender.EthAddr, nonce) + _, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, contractAddress) + s.Error(err) + + s.T().Log("Setup: Create a coin in the bank state") + bankDenom := "sometoken" + + setBankDenomMetadata(deps.Ctx, deps.App.BankKeeper, bankDenom) + + s.T().Log("happy: CreateFunToken for the bank coin") + // Give the sender funds for the fee + s.Require().NoError(testapp.FundAccount( + deps.App.BankKeeper, + deps.Ctx, + deps.Sender.NibiruAddr, + deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), + )) + + createFuntokenResp, err := deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromBankDenom: bankDenom, + Sender: deps.Sender.NibiruAddr.String(), + }, + ) + s.Require().NoError(err, "bankDenom %s", bankDenom) + erc20 := createFuntokenResp.FuntokenMapping.Erc20Addr + erc20Addr := erc20.ToAddr() + s.Equal( + createFuntokenResp.FuntokenMapping, + evm.FunToken{ + Erc20Addr: erc20, + BankDenom: bankDenom, + IsMadeFromCoin: true, + }) + + s.T().Log("Expect ERC20 to be deployed") + queryCodeReq := &evm.QueryCodeRequest{ + Address: erc20.String(), + } + _, err = deps.EvmKeeper.Code(deps.Ctx, queryCodeReq) + s.Require().NoError(err) + + s.T().Log("Expect ERC20 metadata on contract") + metadata := keeper.ERC20Metadata{ + Name: bankDenom, + Symbol: "TOKEN", + Decimals: 0, + } + info, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, erc20Addr) + s.NoError(err, info) + s.Equal(metadata, info) + + // Event "EventFunTokenCreated" must present + // Event "EventFunTokenCreated" must present + testutil.RequireContainsTypedEvent( + s.T(), + deps.Ctx, + &evm.EventFunTokenCreated{ + BankDenom: bankDenom, + Erc20ContractAddress: erc20.String(), + Creator: deps.Sender.NibiruAddr.String(), + IsMadeFromCoin: true, + }, + ) + + s.T().Log("sad: CreateFunToken for the bank coin: already registered") + // Give the sender funds for the fee + err = testapp.FundAccount( + deps.App.BankKeeper, + deps.Ctx, + deps.Sender.NibiruAddr, + deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), + ) + s.Require().NoError(err) + _, err = deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromBankDenom: bankDenom, + Sender: deps.Sender.NibiruAddr.String(), + }, + ) + s.Require().ErrorContains(err, "funtoken mapping already created") +} + +// TestSendFunTokenToEvm executes sending fun tokens from bank coin to erc20 and checks the results: +// - sender balance should be reduced by sendAmount +// - erc-20 balance should be increased by sendAmount +// - evm module account should hold sender's coins +func (s *FunTokenFromCoinSuite) TestSendFunTokenToEvm() { + for _, tc := range []struct { + name string + bankDenom string + initialBalance math.Int + amountToSend math.Int + wantErr string + }{ + { + name: "happy: proper sending", + bankDenom: "unibi", + initialBalance: math.NewInt(100), + amountToSend: math.NewInt(10), + wantErr: "", + }, + { + name: "sad: not registered bank denom", + bankDenom: "not-registered-denom", + initialBalance: math.NewInt(100), + amountToSend: math.NewInt(10), + wantErr: "does not exist", + }, + { + name: "sad: insufficient balance", + bankDenom: "unibi", + initialBalance: math.NewInt(10), + amountToSend: math.NewInt(100), + wantErr: "insufficient funds", + }, + } { + s.Run(tc.name, func() { + deps := evmtest.NewTestDeps() + bankDenom := "unibi" + recipientEVMAddr := eth.MustNewHexAddrFromStr("0x1234500000000000000000000000000000000000") + evmModuleAddr := deps.App.AccountKeeper.GetModuleAddress(evm.ModuleName) + + ctx := sdk.WrapSDKContext(deps.Ctx) + setBankDenomMetadata(deps.Ctx, deps.App.BankKeeper, bankDenom) + + // Give the sender funds + s.Require().NoError(testapp.FundAccount( + deps.App.BankKeeper, + deps.Ctx, + deps.Sender.NibiruAddr, + deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx).Add(sdk.NewCoin(bankDenom, tc.initialBalance)), + )) + + // Create fun token from coin + createFunTokenResp, err := deps.EvmKeeper.CreateFunToken( + ctx, + &evm.MsgCreateFunToken{ + FromBankDenom: bankDenom, + Sender: deps.Sender.NibiruAddr.String(), + }, + ) + s.Require().NoError(err) + funTokenErc20Addr := createFunTokenResp.FuntokenMapping.Erc20Addr.ToAddr() + + // Send fun token to ERC-20 contract + bankCoin := sdk.NewCoin(tc.bankDenom, tc.amountToSend) + _, err = deps.EvmKeeper.SendFunTokenToEvm( + ctx, + &evm.MsgSendFunTokenToEvm{ + Sender: deps.Sender.NibiruAddr.String(), + BankCoin: bankCoin, + ToEthAddr: recipientEVMAddr, + }, + ) + if tc.wantErr != "" { + s.Require().ErrorContains(err, tc.wantErr) + return + } + s.Require().NoError(err) + + // Event "EventSendFunTokenToEvm" must present + testutil.RequireContainsTypedEvent( + s.T(), + deps.Ctx, + &evm.EventSendFunTokenToEvm{ + Sender: deps.Sender.NibiruAddr.String(), + Erc20ContractAddress: funTokenErc20Addr.String(), + ToEthAddr: recipientEVMAddr.String(), + BankCoin: bankCoin, + }, + ) + + // Check 1: coins are stored on a module balance + moduleBalance := deps.App.BankKeeper.GetBalance(deps.Ctx, evmModuleAddr, bankDenom) + s.Require().Equal(tc.amountToSend, moduleBalance.Amount) + + // Check 2: Sender balance reduced by send amount + senderBalance := deps.App.BankKeeper.GetBalance(deps.Ctx, deps.Sender.NibiruAddr, bankDenom) + s.Require().Equal(tc.initialBalance.Sub(tc.amountToSend), senderBalance.Amount) + + // Check 3: erc-20 balance equals to send amount + balance, err := deps.EvmKeeper.ERC20().BalanceOf(funTokenErc20Addr, recipientEVMAddr.ToAddr(), deps.Ctx) + s.Require().NoError(err) + s.Require().Zero(balance.Cmp(tc.amountToSend.BigInt())) + }) + } +} + +type FunTokenFromCoinSuite struct { + suite.Suite +} + +func TestFunTokenFromCoinSuite(t *testing.T) { + suite.Run(t, new(FunTokenFromCoinSuite)) +} diff --git a/x/evm/keeper/funtoken_from_erc20.go b/x/evm/keeper/funtoken_from_erc20.go index 9e2dcda5a..c56ecb584 100644 --- a/x/evm/keeper/funtoken_from_erc20.go +++ b/x/evm/keeper/funtoken_from_erc20.go @@ -93,20 +93,19 @@ type ( // - If the bank metadata validation fails. // - If the FunToken insertion fails. func (k *Keeper) CreateFunTokenFromERC20( - ctx sdk.Context, erc20 eth.HexAddr, + ctx sdk.Context, erc20 gethcommon.Address, ) (funtoken evm.FunToken, err error) { - erc20Addr := erc20.ToAddr() - // 1 | ERC20 already registered with FunToken? - if funtokens := k.FunTokens.Collect(ctx, k.FunTokens.Indexes.ERC20Addr.ExactMatch(ctx, erc20Addr)); len(funtokens) > 0 { - return funtoken, fmt.Errorf("funtoken mapping already created for ERC20 \"%s\"", erc20Addr.Hex()) + if funtokens := k.FunTokens.Collect(ctx, k.FunTokens.Indexes.ERC20Addr.ExactMatch(ctx, erc20)); len(funtokens) > 0 { + return funtoken, fmt.Errorf("funtoken mapping already created for ERC20 \"%s\"", erc20) } // 2 | Get existing ERC20 metadata - info, err := k.FindERC20Metadata(ctx, erc20Addr) + info, err := k.FindERC20Metadata(ctx, erc20) if err != nil { return funtoken, err } + bankDenom := fmt.Sprintf("erc20/%s", erc20.String()) // 3 | Coin already registered with FunToken? @@ -114,7 +113,6 @@ func (k *Keeper) CreateFunTokenFromERC20( if isFound { return funtoken, fmt.Errorf("bank coin denom already registered with denom \"%s\"", bankDenom) } - if funtokens := k.FunTokens.Collect(ctx, k.FunTokens.Indexes.BankDenom.ExactMatch(ctx, bankDenom)); len(funtokens) > 0 { return funtoken, fmt.Errorf("funtoken mapping already created for bank denom \"%s\"", bankDenom) } @@ -122,12 +120,12 @@ func (k *Keeper) CreateFunTokenFromERC20( // 4 | Set bank coin denom metadata in state bankMetadata := bank.Metadata{ Description: fmt.Sprintf( - "ERC20 token \"%s\" represented as a bank coin with corresponding FunToken mapping", erc20.String(), + "ERC20 token \"%s\" represented as a bank coin with a corresponding FunToken mapping", erc20.String(), ), DenomUnits: []*bank.DenomUnit{ { Denom: bankDenom, - Exponent: 0, + Exponent: 0, // TODO(k-yang): determine which exponent to use }, }, Base: bankDenom, @@ -144,7 +142,7 @@ func (k *Keeper) CreateFunTokenFromERC20( // 5 | Officially create the funtoken mapping funtoken = evm.FunToken{ - Erc20Addr: erc20, + Erc20Addr: eth.NewHexAddr(erc20), BankDenom: bankDenom, IsMadeFromCoin: false, } diff --git a/x/evm/keeper/funtoken_from_erc20_test.go b/x/evm/keeper/funtoken_from_erc20_test.go new file mode 100644 index 000000000..3a29be7b5 --- /dev/null +++ b/x/evm/keeper/funtoken_from_erc20_test.go @@ -0,0 +1,222 @@ +// Copyright (c) 2023-2024 Nibi, Inc. +package keeper_test + +import ( + "fmt" + "math/big" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/crypto" + "github.com/stretchr/testify/suite" + + "github.com/NibiruChain/nibiru/v2/eth" + "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" + "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" + "github.com/NibiruChain/nibiru/v2/x/evm/keeper" + "github.com/NibiruChain/nibiru/v2/x/evm/precompile" +) + +func (s *FunTokenFromErc20Suite) TestCreateFunTokenFromERC20() { + deps := evmtest.NewTestDeps() + + // assert that the ERC20 contract is not deployed + expectedERC20Addr := crypto.CreateAddress(deps.Sender.EthAddr, deps.StateDB().GetNonce(deps.Sender.EthAddr)) + _, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, expectedERC20Addr) + s.Error(err) + + s.T().Log("Deploy ERC20") + { + metadata := keeper.ERC20Metadata{ + Name: "erc20name", + Symbol: "TOKEN", + Decimals: 18, + } + deployResp, err := evmtest.DeployContract( + &deps, embeds.SmartContract_ERC20Minter, + metadata.Name, metadata.Symbol, metadata.Decimals, + ) + s.Require().NoError(err) + s.Require().Equal(expectedERC20Addr, deployResp.ContractAddr) + + info, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, deployResp.ContractAddr) + s.Require().NoError(err, info) + s.Require().Equal(metadata, info) + + queryCodeReq := &evm.QueryCodeRequest{ + Address: expectedERC20Addr.String(), + } + _, err = deps.EvmKeeper.Code(deps.Ctx, queryCodeReq) + s.Require().NoError(err) + } + + erc20Addr := eth.NewHexAddr(expectedERC20Addr) + + s.T().Log("happy: CreateFunToken for the ERC20") + { + s.Require().NoError(testapp.FundAccount( + deps.App.BankKeeper, + deps.Ctx, + deps.Sender.NibiruAddr, + deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), + )) + + resp, err := deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromErc20: &erc20Addr, + Sender: deps.Sender.NibiruAddr.String(), + }, + ) + s.Require().NoError(err, "erc20 %s", erc20Addr) + + expectedBankDenom := fmt.Sprintf("erc20/%s", expectedERC20Addr.String()) + s.Equal( + resp.FuntokenMapping, + evm.FunToken{ + Erc20Addr: erc20Addr, + BankDenom: expectedBankDenom, + IsMadeFromCoin: false, + }) + + // Event "EventFunTokenCreated" must present + testutil.RequireContainsTypedEvent( + s.T(), + deps.Ctx, + &evm.EventFunTokenCreated{ + BankDenom: expectedBankDenom, + Erc20ContractAddress: erc20Addr.String(), + Creator: deps.Sender.NibiruAddr.String(), + IsMadeFromCoin: false, + }, + ) + } + + s.T().Log("sad: CreateFunToken for the ERC20: already registered") + { + // Give the sender funds for the fee + s.Require().NoError(testapp.FundAccount( + deps.App.BankKeeper, + deps.Ctx, + deps.Sender.NibiruAddr, + deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), + )) + + _, err = deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromErc20: &erc20Addr, + Sender: deps.Sender.NibiruAddr.String(), + }, + ) + s.ErrorContains(err, "funtoken mapping already created") + } + + s.T().Log("sad: CreateFunToken for the ERC20: invalid sender") + { + _, err = deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromErc20: &erc20Addr, + }, + ) + s.ErrorContains(err, "invalid sender") + } + + s.T().Log("sad: CreateFunToken for the ERC20: missing erc20 address") + { + _, err = deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromErc20: nil, + FromBankDenom: "", + Sender: deps.Sender.NibiruAddr.String(), + }, + ) + s.ErrorContains(err, "either the \"from_erc20\" or \"from_bank_denom\" must be set") + } +} + +func (s *FunTokenFromErc20Suite) TestSendFromEvmToCosmos() { + deps := evmtest.NewTestDeps() + + var erc20Addr eth.HexAddr + s.T().Log("Deploy ERC20") + + metadata := keeper.ERC20Metadata{ + Name: "erc20name", + Symbol: "TOKEN", + Decimals: 18, + } + deployResp, err := evmtest.DeployContract( + &deps, embeds.SmartContract_ERC20Minter, + metadata.Name, metadata.Symbol, metadata.Decimals, + ) + s.Require().NoError(err) + erc20Addr = eth.NewHexAddr(deployResp.ContractAddr) + + s.T().Log("happy: CreateFunToken for the ERC20") + + s.Require().NoError(testapp.FundAccount( + deps.App.BankKeeper, + deps.Ctx, + deps.Sender.NibiruAddr, + deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), + )) + + _, err = deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromErc20: &erc20Addr, + Sender: deps.Sender.NibiruAddr.String(), + }, + ) + s.Require().NoError(err, "erc20 %s", erc20Addr) + // bankDemon := resp.FuntokenMapping.BankDenom + + s.T().Logf("mint erc20 tokens to %s", deps.Sender.EthAddr.String()) + input, err := embeds.SmartContract_ERC20Minter.ABI.Pack("mint", deps.Sender.EthAddr, big.NewInt(69_420)) + s.Require().NoError(err) + erc20 := erc20Addr.ToAddr() + _, err = deps.EvmKeeper.CallContractWithInput( + deps.Ctx, deps.Sender.EthAddr, &erc20, true, input, + ) + s.Require().NoError(err) + + s.T().Log("send erc20 tokens to cosmos") + randomAcc := testutil.AccAddress() + callArgs := []any{erc20Addr.ToAddr(), big.NewInt(1), randomAcc.String()} + input, err = embeds.SmartContract_FunToken.ABI.Pack(string(precompile.FunTokenMethod_BankSend), callArgs...) + s.Require().NoError(err) + + _, err = deps.EvmKeeper.CallContractWithInput( + deps.Ctx, deps.Sender.EthAddr, &precompile.PrecompileAddr_FunToken, true, input, + ) + s.Require().NoError(err) + + s.T().Log("check balances") + evmtest.AssertERC20BalanceEqual(s.T(), deps, erc20, deps.Sender.EthAddr, big.NewInt(69_419)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, erc20, evm.EVM_MODULE_ADDRESS, big.NewInt(1)) + s.Equal("1", + deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, "erc20/"+erc20Addr.String()).Amount.String(), + ) + + // s.T().Log("send cosmos tokens back to erc20") + // _, err = deps.EvmKeeper.SendFunTokenToEvm(sdk.WrapSDKContext(deps.Ctx), &evm.MsgSendFunTokenToEvm{ + // ToEthAddr: eth.NewHexAddr(deps.Sender.EthAddr), + // Sender: randomAcc.String(), + // BankCoin: sdk.NewCoin("erc20/"+erc20Addr.String(), sdk.NewInt(1)), + // }) + // s.Require().NoError(err) +} + +type FunTokenFromErc20Suite struct { + suite.Suite +} + +func TestFunTokenFromErc20Suite(t *testing.T) { + suite.Run(t, new(FunTokenFromErc20Suite)) +} diff --git a/x/evm/keeper/keeper_test.go b/x/evm/keeper/keeper_test.go index 0ddc2de45..584ff21bf 100644 --- a/x/evm/keeper/keeper_test.go +++ b/x/evm/keeper/keeper_test.go @@ -12,6 +12,5 @@ type Suite struct { // TestSuite: Runs all the tests in the suite. func TestSuite(t *testing.T) { - s := new(Suite) - suite.Run(t, s) + suite.Run(t, new(Suite)) } diff --git a/x/evm/keeper/msg_ethereum_tx_test.go b/x/evm/keeper/msg_ethereum_tx_test.go index f1075a854..374f06c57 100644 --- a/x/evm/keeper/msg_ethereum_tx_test.go +++ b/x/evm/keeper/msg_ethereum_tx_test.go @@ -125,7 +125,7 @@ func (s *Suite) TestMsgEthereumTx_ExecuteContract() { ) s.Require().NoError(err) deployResp, err := evmtest.DeployContract( - &deps, embeds.SmartContract_TestERC20, s.T(), + &deps, embeds.SmartContract_TestERC20, ) s.Require().NoError(err) contractAddr := deployResp.ContractAddr diff --git a/x/evm/keeper/msg_server.go b/x/evm/keeper/msg_server.go index 3bb2cec17..7e8f7f0ec 100644 --- a/x/evm/keeper/msg_server.go +++ b/x/evm/keeper/msg_server.go @@ -20,10 +20,9 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" - "github.com/NibiruChain/nibiru/v2/x/evm/embeds" - "github.com/NibiruChain/nibiru/v2/eth" "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) @@ -204,22 +203,6 @@ func (k *Keeper) ApplyEvmTx( return res, nil } -// ApplyEvmMsgWithEmptyTxConfig; Computes new state by applyig the EVM -// message to the given state. This function calls [Keeper.ApplyEvmMsg] with -// and empty`statedb.TxConfig`. -// See [Keeper.ApplyEvmMsg]. -func (k *Keeper) ApplyEvmMsgWithEmptyTxConfig( - ctx sdk.Context, msg core.Message, tracer vm.EVMLogger, commit bool, -) (*evm.MsgEthereumTxResponse, error) { - cfg, err := k.GetEVMConfig(ctx, ctx.BlockHeader().ProposerAddress, k.EthChainID(ctx)) - if err != nil { - return nil, errors.Wrap(err, "failed to load evm config") - } - - txConfig := statedb.NewEmptyTxConfig(gethcommon.BytesToHash(ctx.HeaderHash())) - return k.ApplyEvmMsg(ctx, msg, tracer, commit, cfg, txConfig) -} - // NewEVM generates a go-ethereum VM. // // Args: @@ -517,7 +500,7 @@ func (k *Keeper) CreateFunToken( emptyErc20 := msg.FromErc20 == nil || msg.FromErc20.Size() == 0 switch { case !emptyErc20 && msg.FromBankDenom == "": - funtoken, err = k.CreateFunTokenFromERC20(ctx, *msg.FromErc20) + funtoken, err = k.CreateFunTokenFromERC20(ctx, msg.FromErc20.ToAddr()) case emptyErc20 && msg.FromBankDenom != "": funtoken, err = k.CreateFunTokenFromCoin(ctx, msg.FromBankDenom) default: diff --git a/x/evm/msg.go b/x/evm/msg.go index 4e101f52a..02b2732e7 100644 --- a/x/evm/msg.go +++ b/x/evm/msg.go @@ -489,25 +489,21 @@ func (m MsgCreateFunToken) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{addr} } -func errMsgCreateFunTokenValidate(errMsg string) error { - return fmt.Errorf("MsgCreateFunToken ValidateBasic error: %s", errMsg) -} - // ValidateBasic does a sanity check of the provided data func (m *MsgCreateFunToken) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(m.Sender); err != nil { - return errMsgCreateFunTokenValidate("invalid sender addr") + return fmt.Errorf("invalid sender addr") } - erc20 := m.FromErc20 - bankDenom := m.FromBankDenom - emptyBankDenom := bankDenom == "" - emptyErc20 := !(erc20 != nil && erc20.Size() > 0) - if (emptyErc20 && emptyBankDenom) || (!emptyErc20 && !emptyBankDenom) { - return errMsgCreateFunTokenValidate(fmt.Sprintf( - "Either the \"from_erc20\" or \"from_bank_denom\" must be set (but not both)."+ - "got values (from_erc20=\"%s\", from_bank_denom=\"%s\")", erc20, bankDenom, - )) + emptyBankDenom := m.FromBankDenom == "" + emptyErc20 := m.FromErc20 == nil || m.FromErc20.Size() == 0 + + if emptyErc20 && emptyBankDenom { + return fmt.Errorf("either the \"from_erc20\" or \"from_bank_denom\" must be set") + } + + if !emptyErc20 && !emptyBankDenom { + return fmt.Errorf("either the \"from_erc20\" or \"from_bank_denom\" must be set (but not both)") } return nil @@ -524,17 +520,13 @@ func (m MsgSendFunTokenToEvm) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{addr} } -func errMsgSendFunTokenToEvmValidate(errMsg string) error { - return fmt.Errorf("MsgSendFunTokenToEvm ValidateBasic error: %s", errMsg) -} - // ValidateBasic does a sanity check of the provided data func (m *MsgSendFunTokenToEvm) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(m.Sender); err != nil { - return errMsgCreateFunTokenValidate("invalid sender addr") + return fmt.Errorf("invalid sender addr") } if m.ToEthAddr == "" { - return errMsgSendFunTokenToEvmValidate("\"to_eth_addr\" must be set") + return fmt.Errorf("empty to_eth_addr") } return nil } diff --git a/x/evm/msg_test.go b/x/evm/msg_test.go index f6835e0d7..c673f6453 100644 --- a/x/evm/msg_test.go +++ b/x/evm/msg_test.go @@ -9,20 +9,17 @@ import ( "testing" sdkmath "cosmossdk.io/math" - "github.com/stretchr/testify/suite" - "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/crypto/keyring" sdk "github.com/cosmos/cosmos-sdk/types" + authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" "github.com/ethereum/go-ethereum/common" gethcore "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - - "github.com/NibiruChain/nibiru/v2/eth/crypto/ethsecp256k1" - - authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" + "github.com/stretchr/testify/suite" "github.com/NibiruChain/nibiru/v2/app" + "github.com/NibiruChain/nibiru/v2/eth/crypto/ethsecp256k1" "github.com/NibiruChain/nibiru/v2/eth/encoding" "github.com/NibiruChain/nibiru/v2/x/evm" "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" diff --git a/x/evm/precompile/funtoken.go b/x/evm/precompile/funtoken.go index 59eb53e73..88407bd11 100644 --- a/x/evm/precompile/funtoken.go +++ b/x/evm/precompile/funtoken.go @@ -22,10 +22,10 @@ var _ vm.PrecompiledContract = (*precompileFunToken)(nil) // Precompile address for "FunToken.sol", the contract that // enables transfers of ERC20 tokens to "nibi" addresses as bank coins // using the ERC20's `FunToken` mapping. -var PrecompileAddr_FuntokenGateway = gethcommon.HexToAddress("0x0000000000000000000000000000000000000800") +var PrecompileAddr_FunToken = gethcommon.HexToAddress("0x0000000000000000000000000000000000000800") func (p precompileFunToken) Address() gethcommon.Address { - return PrecompileAddr_FuntokenGateway + return PrecompileAddr_FunToken } func (p precompileFunToken) RequiredGas(input []byte) (gasPrice uint64) { @@ -131,23 +131,20 @@ func (p precompileFunToken) bankSend( // Amount should be positive if amount == nil || amount.Cmp(big.NewInt(0)) != 1 { - err = fmt.Errorf("transfer amount must be positive") - return + return nil, fmt.Errorf("transfer amount must be positive") } // The "to" argument must be a valid Nibiru address toAddr, err := sdk.AccAddressFromBech32(to) if err != nil { - err = fmt.Errorf("\"to\" is not a valid address (%s): %w", to, err) - return + return nil, fmt.Errorf("\"to\" is not a valid address (%s): %w", to, err) } // Caller transfers ERC20 to the EVM account transferTo := evm.EVM_MODULE_ADDRESS _, err = p.EvmKeeper.ERC20().Transfer(erc20, caller, transferTo, amount, ctx) if err != nil { - err = fmt.Errorf("failed to send from caller to the EVM account: %w", err) - return + return nil, fmt.Errorf("failed to send from caller to the EVM account: %w", err) } // EVM account mints FunToken.BankDenom to module account @@ -155,18 +152,16 @@ func (p precompileFunToken) bankSend( coins := sdk.NewCoins(sdk.NewCoin(funtoken.BankDenom, amt)) err = p.BankKeeper.MintCoins(ctx, evm.ModuleName, coins) if err != nil { - err = fmt.Errorf("mint failed for module \"%s\" (%s): contract caller %s: %w", + return nil, fmt.Errorf("mint failed for module \"%s\" (%s): contract caller %s: %w", evm.ModuleName, evm.EVM_MODULE_ADDRESS.Hex(), caller.Hex(), err, ) - return } err = p.BankKeeper.SendCoinsFromModuleToAccount(ctx, evm.ModuleName, toAddr, coins) if err != nil { - err = fmt.Errorf("send failed for module \"%s\" (%s): contract caller %s: %w", + return nil, fmt.Errorf("send failed for module \"%s\" (%s): contract caller %s: %w", evm.ModuleName, evm.EVM_MODULE_ADDRESS.Hex(), caller.Hex(), err, ) - return } // If the FunToken mapping was created from a bank coin, then the EVM account diff --git a/x/evm/precompile/funtoken_test.go b/x/evm/precompile/funtoken_test.go index 239940e17..a38cf8954 100644 --- a/x/evm/precompile/funtoken_test.go +++ b/x/evm/precompile/funtoken_test.go @@ -21,63 +21,45 @@ type Suite struct { // TestPrecompileSuite: Runs all the tests in the suite. func TestSuite(t *testing.T) { - s := new(Suite) - suite.Run(t, s) -} - -func (s *Suite) TestPrecompile_FunToken() { - s.Run("PrecompileExists", s.FunToken_PrecompileExists) - s.Run("HappyPath", s.FunToken_HappyPath) + suite.Run(t, new(Suite)) } // PrecompileExists: An integration test showing that a "PrecompileError" occurs // when calling the FunToken -func (s *Suite) FunToken_PrecompileExists() { - precompileAddr := precompile.PrecompileAddr_FuntokenGateway +func (s *Suite) TestPrecompileExists() { abi := embeds.SmartContract_FunToken.ABI deps := evmtest.NewTestDeps() codeResp, err := deps.EvmKeeper.Code( sdk.WrapSDKContext(deps.Ctx), &evm.QueryCodeRequest{ - Address: precompileAddr.String(), + Address: precompile.PrecompileAddr_FunToken.String(), }, ) - s.NoError(err) + s.Require().NoError(err) s.Equal(string(codeResp.Code), "") - s.True(deps.EvmKeeper.IsAvailablePrecompile(precompileAddr), + s.True(deps.EvmKeeper.IsAvailablePrecompile(precompile.PrecompileAddr_FunToken), "did not see precompile address during \"InitPrecompiles\"") callArgs := []any{"nonsense", "args here", "to see if", "precompile is", "called"} - methodName := string(precompile.FunTokenMethod_BankSend) - packedArgs, err := abi.Pack(methodName, callArgs...) - if err != nil { - err = fmt.Errorf("failed to pack ABI args: %w", err) // easier to read - } - s.ErrorContains( + input, err := abi.Pack(string(precompile.FunTokenMethod_BankSend), callArgs...) + s.Require().ErrorContains( err, fmt.Sprintf("argument count mismatch: got %d for 3", len(callArgs)), "callArgs: ", callArgs) + s.Require().Nil(input) - fromEvmAddr := evm.EVM_MODULE_ADDRESS - commit := true - bytecodeForCall := packedArgs _, err = deps.EvmKeeper.CallContractWithInput( - deps.Ctx, fromEvmAddr, &precompileAddr, commit, - bytecodeForCall, + deps.Ctx, evm.EVM_MODULE_ADDRESS, &precompile.PrecompileAddr_FunToken, true, + input, ) s.ErrorContains(err, "precompile error") } -func (s *Suite) FunToken_HappyPath() { - precompileAddr := precompile.PrecompileAddr_FuntokenGateway - abi := embeds.SmartContract_FunToken.ABI +func (s *Suite) TestHappyPath() { deps := evmtest.NewTestDeps() - theUser := deps.Sender.EthAddr - theEvm := evm.EVM_MODULE_ADDRESS - - s.True(deps.EvmKeeper.IsAvailablePrecompile(precompileAddr), + s.True(deps.EvmKeeper.IsAvailablePrecompile(precompile.PrecompileAddr_FunToken), "did not see precompile address during \"InitPrecompiles\"") s.T().Log("Create FunToken mapping and ERC20") @@ -86,45 +68,39 @@ func (s *Suite) FunToken_HappyPath() { contract := funtoken.Erc20Addr.ToAddr() s.T().Log("Balances of the ERC20 should start empty") - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theUser, big.NewInt(0)) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theEvm, big.NewInt(0)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, deps.Sender.EthAddr, big.NewInt(0)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, evm.EVM_MODULE_ADDRESS, big.NewInt(0)) s.T().Log("Mint tokens - Fail from non-owner") { - from := theUser - to := theUser - input, err := embeds.SmartContract_ERC20Minter.ABI.Pack("mint", to, big.NewInt(69_420)) + input, err := embeds.SmartContract_ERC20Minter.ABI.Pack("mint", deps.Sender.EthAddr, big.NewInt(69_420)) s.NoError(err) _, err = deps.EvmKeeper.CallContractWithInput( - deps.Ctx, from, &contract, true, input, + deps.Ctx, deps.Sender.EthAddr, &contract, true, input, ) s.ErrorContains(err, "Ownable: caller is not the owner") } s.T().Log("Mint tokens - Success") { - from := theEvm - to := theUser - input, err := embeds.SmartContract_ERC20Minter.ABI.Pack("mint", to, big.NewInt(69_420)) + input, err := embeds.SmartContract_ERC20Minter.ABI.Pack("mint", deps.Sender.EthAddr, big.NewInt(69_420)) s.NoError(err) _, err = deps.EvmKeeper.CallContractWithInput( - deps.Ctx, from, &contract, true, input, + deps.Ctx, evm.EVM_MODULE_ADDRESS, &contract, true, input, ) s.NoError(err) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theUser, big.NewInt(69_420)) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theEvm, big.NewInt(0)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, deps.Sender.EthAddr, big.NewInt(69_420)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, evm.EVM_MODULE_ADDRESS, big.NewInt(0)) } s.T().Log("Transfer - Success (sanity check)") randomAcc := testutil.AccAddress() { - from := theUser - to := theEvm - _, err := deps.EvmKeeper.ERC20().Transfer(contract, from, to, big.NewInt(1), deps.Ctx) + _, err := deps.EvmKeeper.ERC20().Transfer(contract, deps.Sender.EthAddr, evm.EVM_MODULE_ADDRESS, big.NewInt(1), deps.Ctx) s.NoError(err) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theUser, big.NewInt(69_419)) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theEvm, big.NewInt(1)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, deps.Sender.EthAddr, big.NewInt(69_419)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, evm.EVM_MODULE_ADDRESS, big.NewInt(1)) s.Equal("0", deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, funtoken.BankDenom).Amount.String(), ) @@ -133,24 +109,22 @@ func (s *Suite) FunToken_HappyPath() { s.T().Log("Send using precompile") amtToSend := int64(419) callArgs := []any{contract, big.NewInt(amtToSend), randomAcc.String()} - methodName := string(precompile.FunTokenMethod_BankSend) - input, err := abi.Pack(methodName, callArgs...) + input, err := embeds.SmartContract_FunToken.ABI.Pack(string(precompile.FunTokenMethod_BankSend), callArgs...) s.NoError(err) - from := theUser _, err = deps.EvmKeeper.CallContractWithInput( - deps.Ctx, from, &precompileAddr, true, input, + deps.Ctx, deps.Sender.EthAddr, &precompile.PrecompileAddr_FunToken, true, input, ) s.Require().NoError(err) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theUser, big.NewInt(69_419-amtToSend)) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theEvm, big.NewInt(1)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, deps.Sender.EthAddr, big.NewInt(69_419-amtToSend)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, evm.EVM_MODULE_ADDRESS, big.NewInt(1)) s.Equal(fmt.Sprintf("%d", amtToSend), deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, funtoken.BankDenom).Amount.String(), ) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theUser, big.NewInt(69_000)) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, theEvm, big.NewInt(1)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, deps.Sender.EthAddr, big.NewInt(69_000)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, evm.EVM_MODULE_ADDRESS, big.NewInt(1)) s.Equal("419", deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, funtoken.BankDenom).Amount.String(), ) From ccb476314dbb1165ceec54c96a469be47fe9dea2 Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Thu, 15 Aug 2024 07:14:57 -0700 Subject: [PATCH 6/8] fix(evm)!: Fungible Token conversions (#2003) * create funtoken_from_coin_test.go * refactor FunTokenFromCoinSuite * create funtoken_from_erc20_test.go * refactor DeployContract * refactor MsgCreateFunToken ValidateBasic() * add test case for TestCreateFunTokenFromERC20 * refactor TestERC20Calls * move TestSendFunTokenToEvm * refactor CreateFunTokenFromERC20 * add TestSendFromEvmToCosmos * remove ApplyEvmMsgWithEmptyTxConfig * Update CHANGELOG.md * refactor: rename SendFunTokenToEvm to ConvertCoinToEvm * refactor LoadERC20BigInt * refactor erc20 Transfer call * feat: add convertCoinNativeCoin and convertCoinNativeERC20 * refactor(evm); rename EventSendFunTokenToEvm to EventConvertCoinToEvm * test: TestCreateFunTokenFromCoin * fix: TestConvertCoinToEvmAndBack * Update funtoken_from_coin_test.go * refactor TestCreateFunTokenFromERC20 * fix: send tokens from evm to cosmos and back * add negative test cases * add negative test case * add negative cases for TestConvertCoinToEvmAndBack * Update CHANGELOG.md * fix: precompile test * refactor: rename SendFunTokenToEvm to ConvertCoinToEvm --- CHANGELOG.md | 1 + proto/eth/evm/v1/events.proto | 4 +- proto/eth/evm/v1/tx.proto | 10 +- x/evm/cli/tx.go | 8 +- x/evm/events.pb.go | 134 ++++----- x/evm/evmmodule/genesis_test.go | 4 +- x/evm/evmtest/erc20.go | 2 +- x/evm/keeper/erc20.go | 47 +-- x/evm/keeper/erc20_test.go | 21 -- x/evm/keeper/funtoken_from_coin.go | 27 +- x/evm/keeper/funtoken_from_coin_test.go | 366 +++++++++++++---------- x/evm/keeper/funtoken_from_erc20.go | 27 +- x/evm/keeper/funtoken_from_erc20_test.go | 291 ++++++++++-------- x/evm/keeper/msg_server.go | 166 ++++++++-- x/evm/msg.go | 8 +- x/evm/precompile/funtoken.go | 35 +-- x/evm/precompile/funtoken_test.go | 58 ++-- x/evm/tx.pb.go | 282 ++++++++--------- 18 files changed, 831 insertions(+), 660 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce42aaaf5..704ac598a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -105,6 +105,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#1997](https://github.com/NibiruChain/nibiru/pull/1997) - refactor(evm): Remove unnecessary params: "enable_call", "enable_create". - [#2000](https://github.com/NibiruChain/nibiru/pull/2000) - refactor(evm): simplify ERC-20 keeper methods - [#2001](https://github.com/NibiruChain/nibiru/pull/2001) - refactor(evm): simplify FunToken methods and tests +- [#2003](https://github.com/NibiruChain/nibiru/pull/2003) - fix(evm): fix FunToken conversions between Cosmos and EVM #### Dapp modules: perp, spot, oracle, etc diff --git a/proto/eth/evm/v1/events.proto b/proto/eth/evm/v1/events.proto index f4468f7b5..039566fa0 100644 --- a/proto/eth/evm/v1/events.proto +++ b/proto/eth/evm/v1/events.proto @@ -55,8 +55,8 @@ message EventFunTokenCreated { bool is_made_from_coin = 4; } -// SendFunTokenToEvm defines sending fun token to erc20 event. -message EventSendFunTokenToEvm { +// ConvertCoinToEvm defines sending fun token to erc20 event. +message EventConvertCoinToEvm { string sender = 1; string erc20_contract_address = 2; string to_eth_addr = 3; diff --git a/proto/eth/evm/v1/tx.proto b/proto/eth/evm/v1/tx.proto index ee801ed7e..583a6c598 100644 --- a/proto/eth/evm/v1/tx.proto +++ b/proto/eth/evm/v1/tx.proto @@ -27,10 +27,10 @@ service Msg { // denomination for a bank coin can be given to create the mapping to an ERC20. rpc CreateFunToken(MsgCreateFunToken) returns (MsgCreateFunTokenResponse); - // SendFunTokenToEvm: Sends a coin with a valid "FunToken" mapping to the + // ConvertCoinToEvm: Sends a coin with a valid "FunToken" mapping to the // given recipient address ("to_eth_addr") in the corresponding ERC20 // representation. - rpc SendFunTokenToEvm(MsgSendFunTokenToEvm) returns (MsgSendFunTokenToEvmResponse); + rpc ConvertCoinToEvm(MsgConvertCoinToEvm) returns (MsgConvertCoinToEvmResponse); } // MsgEthereumTx encapsulates an Ethereum transaction as an SDK message. @@ -210,8 +210,8 @@ message MsgCreateFunTokenResponse { eth.evm.v1.FunToken funtoken_mapping = 1 [(gogoproto.nullable) = false]; } -// MsgSendFunTokenToEvm: Arguments to send a bank coin to ERC-20 representation -message MsgSendFunTokenToEvm { +// MsgConvertCoinToEvm: Arguments to send a bank coin to ERC-20 representation +message MsgConvertCoinToEvm { // Hexadecimal address of the ERC20 token to which the `FunToken` maps string to_eth_addr = 1 [ (gogoproto.customtype) = "github.com/NibiruChain/nibiru/v2/eth.HexAddr", @@ -227,4 +227,4 @@ message MsgSendFunTokenToEvm { (gogoproto.nullable) = false ]; } -message MsgSendFunTokenToEvmResponse {} +message MsgConvertCoinToEvmResponse {} diff --git a/x/evm/cli/tx.go b/x/evm/cli/tx.go index 1688a9e88..9ee6ad88a 100644 --- a/x/evm/cli/tx.go +++ b/x/evm/cli/tx.go @@ -27,7 +27,7 @@ func GetTxCmd() *cobra.Command { cmds := []*cobra.Command{ CmdCreateFunTokenFromBankCoin(), CmdCreateFunTokenFromERC20(), - SendFunTokenToEvm(), + ConvertCoinToEvm(), } for _, cmd := range cmds { txCmd.AddCommand(cmd) @@ -99,8 +99,8 @@ func CmdCreateFunTokenFromERC20() *cobra.Command { return cmd } -// SendFunTokenToEvm broadcast MsgSendFunTokenToEvm -func SendFunTokenToEvm() *cobra.Command { +// ConvertCoinToEvm broadcast MsgConvertCoinToEvm +func ConvertCoinToEvm() *cobra.Command { cmd := &cobra.Command{ Use: "send-funtoken-to-erc20 [to_eth_addr] [coin] [flags]", Short: `Send bank [coin] to its erc20 representation for the user [to_eth_addr]"`, @@ -122,7 +122,7 @@ func SendFunTokenToEvm() *cobra.Command { if err != nil { return err } - msg := &evm.MsgSendFunTokenToEvm{ + msg := &evm.MsgConvertCoinToEvm{ Sender: clientCtx.GetFromAddress().String(), BankCoin: coin, ToEthAddr: eth.MustNewHexAddrFromStr(args[0]), diff --git a/x/evm/events.pb.go b/x/evm/events.pb.go index 54c9fe9d3..e9f40dbd1 100644 --- a/x/evm/events.pb.go +++ b/x/evm/events.pb.go @@ -349,26 +349,26 @@ func (m *EventFunTokenCreated) GetIsMadeFromCoin() bool { return false } -// SendFunTokenToEvm defines sending fun token to erc20 event. -type EventSendFunTokenToEvm struct { +// ConvertCoinToEvm defines sending fun token to erc20 event. +type EventConvertCoinToEvm struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` Erc20ContractAddress string `protobuf:"bytes,2,opt,name=erc20_contract_address,json=erc20ContractAddress,proto3" json:"erc20_contract_address,omitempty"` ToEthAddr string `protobuf:"bytes,3,opt,name=to_eth_addr,json=toEthAddr,proto3" json:"to_eth_addr,omitempty"` BankCoin types.Coin `protobuf:"bytes,4,opt,name=bank_coin,json=bankCoin,proto3" json:"bank_coin" yaml:"bank_coin"` } -func (m *EventSendFunTokenToEvm) Reset() { *m = EventSendFunTokenToEvm{} } -func (m *EventSendFunTokenToEvm) String() string { return proto.CompactTextString(m) } -func (*EventSendFunTokenToEvm) ProtoMessage() {} -func (*EventSendFunTokenToEvm) Descriptor() ([]byte, []int) { +func (m *EventConvertCoinToEvm) Reset() { *m = EventConvertCoinToEvm{} } +func (m *EventConvertCoinToEvm) String() string { return proto.CompactTextString(m) } +func (*EventConvertCoinToEvm) ProtoMessage() {} +func (*EventConvertCoinToEvm) Descriptor() ([]byte, []int) { return fileDescriptor_f8bc26b53c788f17, []int{5} } -func (m *EventSendFunTokenToEvm) XXX_Unmarshal(b []byte) error { +func (m *EventConvertCoinToEvm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *EventSendFunTokenToEvm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *EventConvertCoinToEvm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_EventSendFunTokenToEvm.Marshal(b, m, deterministic) + return xxx_messageInfo_EventConvertCoinToEvm.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -378,40 +378,40 @@ func (m *EventSendFunTokenToEvm) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *EventSendFunTokenToEvm) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventSendFunTokenToEvm.Merge(m, src) +func (m *EventConvertCoinToEvm) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventConvertCoinToEvm.Merge(m, src) } -func (m *EventSendFunTokenToEvm) XXX_Size() int { +func (m *EventConvertCoinToEvm) XXX_Size() int { return m.Size() } -func (m *EventSendFunTokenToEvm) XXX_DiscardUnknown() { - xxx_messageInfo_EventSendFunTokenToEvm.DiscardUnknown(m) +func (m *EventConvertCoinToEvm) XXX_DiscardUnknown() { + xxx_messageInfo_EventConvertCoinToEvm.DiscardUnknown(m) } -var xxx_messageInfo_EventSendFunTokenToEvm proto.InternalMessageInfo +var xxx_messageInfo_EventConvertCoinToEvm proto.InternalMessageInfo -func (m *EventSendFunTokenToEvm) GetSender() string { +func (m *EventConvertCoinToEvm) GetSender() string { if m != nil { return m.Sender } return "" } -func (m *EventSendFunTokenToEvm) GetErc20ContractAddress() string { +func (m *EventConvertCoinToEvm) GetErc20ContractAddress() string { if m != nil { return m.Erc20ContractAddress } return "" } -func (m *EventSendFunTokenToEvm) GetToEthAddr() string { +func (m *EventConvertCoinToEvm) GetToEthAddr() string { if m != nil { return m.ToEthAddr } return "" } -func (m *EventSendFunTokenToEvm) GetBankCoin() types.Coin { +func (m *EventConvertCoinToEvm) GetBankCoin() types.Coin { if m != nil { return m.BankCoin } @@ -591,7 +591,7 @@ func init() { proto.RegisterType((*EventMessage)(nil), "eth.evm.v1.EventMessage") proto.RegisterType((*EventBlockBloom)(nil), "eth.evm.v1.EventBlockBloom") proto.RegisterType((*EventFunTokenCreated)(nil), "eth.evm.v1.EventFunTokenCreated") - proto.RegisterType((*EventSendFunTokenToEvm)(nil), "eth.evm.v1.EventSendFunTokenToEvm") + proto.RegisterType((*EventConvertCoinToEvm)(nil), "eth.evm.v1.EventConvertCoinToEvm") proto.RegisterType((*EventTransfer)(nil), "eth.evm.v1.EventTransfer") proto.RegisterType((*EventContractDeployed)(nil), "eth.evm.v1.EventContractDeployed") proto.RegisterType((*EventContractExecuted)(nil), "eth.evm.v1.EventContractExecuted") @@ -602,46 +602,46 @@ func init() { proto.RegisterFile("eth/evm/v1/events.proto", fileDescriptor_f8bc2 var fileDescriptor_f8bc26b53c788f17 = []byte{ // 658 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xcb, 0x6e, 0xd4, 0x3c, - 0x14, 0x9e, 0xf4, 0x32, 0xd3, 0x71, 0xdb, 0xff, 0x62, 0x0d, 0x6d, 0x5a, 0x41, 0x5a, 0x05, 0x71, - 0xdb, 0x24, 0x4c, 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55, 0x3f, 0x04, + 0x49, 0xfa, 0x7e, 0xc4, 0x32, 0xda, 0xe4, 0x6e, 0xf6, 0x12, 0x96, 0x30, 0x6d, 0xfa, 0xca, 0x6a, + 0x50, 0xf7, 0xab, 0x85, 0xfe, 0x1f, 0xa9, 0x96, 0x23, 0x99, 0x02, 0x87, 0xb2, 0x18, 0xd7, 0x78, + 0x0d, 0xb5, 0x49, 0xc1, 0x4a, 0x2a, 0x6d, 0x6b, 0xdb, 0x7a, 0xdc, 0x3d, 0x30, 0x1e, 0xde, 0x40, + 0x4b, 0x20, 0xd3, 0x20, 0x25, 0x22, 0xb5, 0xe7, 0x74, 0xa4, 0x03, 0x32, 0x7d, 0x4d, 0x44, 0x8a, + 0x7b, 0x68, 0x31, 0xa3, 0x31, 0xd4, 0xf6, 0xbc, 0xc6, 0x1b, 0x47, 0x15, 0x24, 0x44, 0x04, 0xa5, + 0x80, 0xd8, 0x5e, 0x68, 0x0a, 0x12, 0x22, 0xde, 0x0b, 0x88, 0x31, 0x46, 0x0b, 0xba, 0xcf, 0xa2, + 0x86, 0xb5, 0x8d, 0xef, 0xa2, 0x2e, 0x87, 0x28, 0x9b, 0x64, 0x40, 0xa5, 0xdd, 0xd6, 0x81, 0x19, + 0x80, 0x5d, 0xb4, 0xaa, 0x4e, 0x97, 0x75, 0x70, 0x48, 0xb2, 0x1c, 0x62, 0xbb, 0xa3, 0x33, 0x96, + 0x41, 0xa6, 0xe3, 0x7a, 0x4f, 0x43, 0xee, 0x03, 0x84, 0x34, 0x99, 0x71, 0xfd, 0x86, 0x25, 0x78, + 0x1d, 0x75, 0x64, 0x1d, 0xe4, 0x2c, 0x11, 0xb6, 0xb5, 0x3d, 0xaf, 0x88, 0x48, 0x85, 0x0b, 0xf7, + 0x03, 0x5a, 0xd1, 0x69, 0xfb, 0x20, 0x04, 0x49, 0x40, 0x11, 0x2e, 0x58, 0x5c, 0xe6, 0x70, 0x41, + 0xb8, 0xf1, 0x14, 0x2e, 0x80, 0xc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, 0xb3, 0xe1, 0x35, + 0xbb, 0xef, 0xa9, 0xdd, 0xf7, 0xcc, 0xee, 0x7b, 0x6a, 0xc0, 0x81, 0x7d, 0x7c, 0xba, 0xd5, 0xfa, + 0x79, 0xba, 0x75, 0x6b, 0x4a, 0x8a, 0xfc, 0x85, 0x7b, 0x59, 0xe9, 0x1e, 0x2c, 0x29, 0x5b, 0x33, + 0xfb, 0x84, 0x56, 0x9b, 0xad, 0xe1, 0x84, 0x8a, 0x43, 0xe0, 0x37, 0x12, 0xba, 0xb6, 0xa0, 0x73, + 0xbf, 0x2f, 0xe8, 0xec, 0xd9, 0xcc, 0x5f, 0x7d, 0x36, 0xee, 0x78, 0xa6, 0x9b, 0x26, 0xba, 0x0b, + 0x93, 0x9c, 0x4d, 0x21, 0xbe, 0xf1, 0x98, 0xfb, 0x68, 0xf5, 0x9a, 0x62, 0xe6, 0xa8, 0x95, 0xe8, + 0x8a, 0x52, 0x7f, 0x74, 0x1d, 0xd5, 0x10, 0x95, 0xf2, 0x1f, 0xbb, 0x0e, 0x5e, 0x1e, 0x9f, 0x39, + 0xd6, 0xc9, 0x99, 0x63, 0xfd, 0x38, 0x73, 0xac, 0xcf, 0xe7, 0x4e, 0xeb, 0xe4, 0xdc, 0x69, 0x7d, + 0x3f, 0x77, 0x5a, 0x1f, 0x1f, 0x26, 0x99, 0x4c, 0xcb, 0xd0, 0x8b, 0x58, 0xe1, 0xbf, 0xcd, 0xc2, + 0x8c, 0x97, 0xc3, 0x94, 0x64, 0xd4, 0xa7, 0xda, 0xf6, 0xab, 0x1d, 0xbf, 0x56, 0x5f, 0x54, 0xd8, + 0xd6, 0xff, 0xca, 0xb3, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x18, 0xd0, 0xf1, 0x1b, 0xb4, 0x04, 0x00, 0x00, } @@ -877,7 +877,7 @@ func (m *EventFunTokenCreated) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *EventSendFunTokenToEvm) Marshal() (dAtA []byte, err error) { +func (m *EventConvertCoinToEvm) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -887,12 +887,12 @@ func (m *EventSendFunTokenToEvm) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *EventSendFunTokenToEvm) MarshalTo(dAtA []byte) (int, error) { +func (m *EventConvertCoinToEvm) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *EventSendFunTokenToEvm) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *EventConvertCoinToEvm) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1170,7 +1170,7 @@ func (m *EventFunTokenCreated) Size() (n int) { return n } -func (m *EventSendFunTokenToEvm) Size() (n int) { +func (m *EventConvertCoinToEvm) Size() (n int) { if m == nil { return 0 } @@ -2004,7 +2004,7 @@ func (m *EventFunTokenCreated) Unmarshal(dAtA []byte) error { } return nil } -func (m *EventSendFunTokenToEvm) Unmarshal(dAtA []byte) error { +func (m *EventConvertCoinToEvm) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2027,10 +2027,10 @@ func (m *EventSendFunTokenToEvm) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: EventSendFunTokenToEvm: wiretype end group for non-group") + return fmt.Errorf("proto: EventConvertCoinToEvm: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: EventSendFunTokenToEvm: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: EventConvertCoinToEvm: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/evm/evmmodule/genesis_test.go b/x/evm/evmmodule/genesis_test.go index 10e61efbd..bc6a3d081 100644 --- a/x/evm/evmmodule/genesis_test.go +++ b/x/evm/evmmodule/genesis_test.go @@ -76,9 +76,9 @@ func (s *Suite) TestExportInitGenesis() { s.Require().NoError(err) // Send fungible token coins from bank to evm - _, err = deps.EvmKeeper.SendFunTokenToEvm( + _, err = deps.EvmKeeper.ConvertCoinToEvm( deps.Ctx, - &evm.MsgSendFunTokenToEvm{ + &evm.MsgConvertCoinToEvm{ Sender: deps.Sender.NibiruAddr.String(), BankCoin: sdk.Coin{Denom: "unibi", Amount: math.NewInt(amountToSendC.Int64())}, ToEthAddr: eth.MustNewHexAddrFromStr(toUserC.String()), diff --git a/x/evm/evmtest/erc20.go b/x/evm/evmtest/erc20.go index 7822cf0ec..c7f20cfce 100644 --- a/x/evm/evmtest/erc20.go +++ b/x/evm/evmtest/erc20.go @@ -22,7 +22,7 @@ func AssertERC20BalanceEqual( ) { actualBalance, err := deps.EvmKeeper.ERC20().BalanceOf(erc20, account, deps.Ctx) assert.NoError(t, err) - assert.Zero(t, expectedBalance.Cmp(actualBalance)) + assert.Zero(t, expectedBalance.Cmp(actualBalance), "expected %s, got %s", expectedBalance, actualBalance) } // CreateFunTokenForBankCoin: Uses the "TestDeps.Sender" account to create a diff --git a/x/evm/keeper/erc20.go b/x/evm/keeper/erc20.go index 3874c7729..abecd80ca 100644 --- a/x/evm/keeper/erc20.go +++ b/x/evm/keeper/erc20.go @@ -55,10 +55,9 @@ func (e erc20Calls) Mint( ) (evmResp *evm.MsgEthereumTxResponse, err error) { input, err := e.ABI.Pack("mint", to, amount) if err != nil { - return + return nil, fmt.Errorf("failed to pack ABI args: %w", err) } - commit := true - return e.CallContractWithInput(ctx, from, &contract, commit, input) + return e.CallContractWithInput(ctx, from, &contract, true, input) } /* @@ -74,13 +73,23 @@ Transfer implements "ERC20.transfer" func (e erc20Calls) Transfer( contract, from, to gethcommon.Address, amount *big.Int, ctx sdk.Context, -) (evmResp *evm.MsgEthereumTxResponse, err error) { +) (out bool, err error) { input, err := e.ABI.Pack("transfer", to, amount) if err != nil { - return + return false, fmt.Errorf("failed to pack ABI args: %w", err) } - commit := true - return e.CallContractWithInput(ctx, from, &contract, commit, input) + resp, err := e.CallContractWithInput(ctx, from, &contract, true, input) + if err != nil { + return false, err + } + + var erc20Bool ERC20Bool + err = e.ABI.UnpackIntoInterface(&erc20Bool, "transfer", resp.Ret) + if err != nil { + return false, err + } + + return erc20Bool.Value, nil } // BalanceOf retrieves the balance of an ERC20 token for a specific account. @@ -339,31 +348,31 @@ func (k Keeper) loadERC20Uint8( func (k Keeper) LoadERC20BigInt( ctx sdk.Context, - erc20Abi *gethabi.ABI, - erc20Contract gethcommon.Address, + abi *gethabi.ABI, + contract gethcommon.Address, methodName string, args ...any, ) (out *big.Int, err error) { - commit := false res, err := k.CallContract( ctx, - erc20Abi, + abi, evm.EVM_MODULE_ADDRESS, - &erc20Contract, - commit, + &contract, + false, methodName, args..., ) if err != nil { - return out, err + return nil, err } - erc20Val := new(ERC20BigInt) - err = erc20Abi.UnpackIntoInterface( - erc20Val, methodName, res.Ret, + erc20BigInt := new(ERC20BigInt) + err = abi.UnpackIntoInterface( + erc20BigInt, methodName, res.Ret, ) if err != nil { - return out, err + return nil, err } - return erc20Val.Value, err + + return erc20BigInt.Value, nil } diff --git a/x/evm/keeper/erc20_test.go b/x/evm/keeper/erc20_test.go index a35bb6891..58d001eb5 100644 --- a/x/evm/keeper/erc20_test.go +++ b/x/evm/keeper/erc20_test.go @@ -4,31 +4,10 @@ package keeper_test import ( "math/big" - sdk "github.com/cosmos/cosmos-sdk/types" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - bank "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/NibiruChain/nibiru/v2/x/evm" "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) -// setBankDenomMetadata utility method to set bank denom metadata required for working with coin -func setBankDenomMetadata(ctx sdk.Context, bankKeeper bankkeeper.Keeper, bankDenom string) { - bankMetadata := bank.Metadata{ - DenomUnits: []*bank.DenomUnit{ - { - Denom: bankDenom, - Exponent: 0, - }, - }, - Base: bankDenom, - Display: bankDenom, - Name: bankDenom, - Symbol: "TOKEN", - } - bankKeeper.SetDenomMetaData(ctx, bankMetadata) -} - func (s *Suite) TestERC20Calls() { deps := evmtest.NewTestDeps() bankDenom := "ibc/btc" diff --git a/x/evm/keeper/funtoken_from_coin.go b/x/evm/keeper/funtoken_from_coin.go index 469657da6..30592a747 100644 --- a/x/evm/keeper/funtoken_from_coin.go +++ b/x/evm/keeper/funtoken_from_coin.go @@ -14,48 +14,50 @@ import ( "github.com/NibiruChain/nibiru/v2/x/evm/embeds" ) -func (k *Keeper) CreateFunTokenFromCoin( +func (k *Keeper) createFunTokenFromCoin( ctx sdk.Context, bankDenom string, -) (funtoken evm.FunToken, err error) { +) (funtoken *evm.FunToken, err error) { // 1 | Coin already registered with FunToken? if funtokens := k.FunTokens.Collect(ctx, k.FunTokens.Indexes.BankDenom.ExactMatch(ctx, bankDenom)); len(funtokens) > 0 { - return funtoken, fmt.Errorf("funtoken mapping already created for bank denom \"%s\"", bankDenom) + return nil, fmt.Errorf("funtoken mapping already created for bank denom \"%s\"", bankDenom) } // 2 | Check for denom metadata in bank state - bankCoin, isFound := k.bankKeeper.GetDenomMetaData(ctx, bankDenom) + bankMetadata, isFound := k.bankKeeper.GetDenomMetaData(ctx, bankDenom) if !isFound { - return funtoken, fmt.Errorf("bank coin denom should have bank metadata for denom \"%s\"", bankDenom) + return nil, fmt.Errorf("bank coin denom should have bank metadata for denom \"%s\"", bankDenom) } // 3 | deploy ERC20 for metadata - erc20Addr, err := k.DeployERC20ForBankCoin(ctx, bankCoin) + erc20Addr, err := k.deployERC20ForBankCoin(ctx, bankMetadata) if err != nil { - return funtoken, errors.Wrap(err, "failed to deploy ERC20 for bank coin") + return nil, errors.Wrap(err, "failed to deploy ERC20 for bank coin") } // 4 | ERC20 already registered with FunToken? if funtokens := k.FunTokens.Collect(ctx, k.FunTokens.Indexes.ERC20Addr.ExactMatch(ctx, erc20Addr)); len(funtokens) > 0 { - return funtoken, fmt.Errorf("funtoken mapping already created for ERC20 \"%s\"", erc20Addr.Hex()) + return nil, fmt.Errorf("funtoken mapping already created for ERC20 \"%s\"", erc20Addr.Hex()) } // 5 | Officially create the funtoken mapping - funtoken = evm.FunToken{ + funtoken = &evm.FunToken{ Erc20Addr: eth.NewHexAddr(erc20Addr), BankDenom: bankDenom, IsMadeFromCoin: true, } return funtoken, k.FunTokens.SafeInsert( - ctx, funtoken.Erc20Addr.ToAddr(), + ctx, erc20Addr, funtoken.BankDenom, funtoken.IsMadeFromCoin, ) } -func (k *Keeper) DeployERC20ForBankCoin( +func (k *Keeper) deployERC20ForBankCoin( ctx sdk.Context, bankCoin bank.Metadata, ) (erc20Addr gethcommon.Address, err error) { + erc20Addr = crypto.CreateAddress(evm.EVM_MODULE_ADDRESS, k.GetAccNonce(ctx, evm.EVM_MODULE_ADDRESS)) + // bank.Metadata validation guarantees that both "Base" and "Display" denoms // pass "sdk.ValidateDenom" and that the "DenomUnits" slice has exponents in // ascending order with at least one element, which must be the base @@ -71,9 +73,6 @@ func (k *Keeper) DeployERC20ForBankCoin( if err != nil { return gethcommon.Address{}, errors.Wrap(err, "failed to pack ABI args") } - - erc20Addr = crypto.CreateAddress(evm.EVM_MODULE_ADDRESS, k.GetAccNonce(ctx, evm.EVM_MODULE_ADDRESS)) - bytecodeForCall := append(embeds.SmartContract_ERC20Minter.Bytecode, packedArgs...) // nil address for contract creation diff --git a/x/evm/keeper/funtoken_from_coin_test.go b/x/evm/keeper/funtoken_from_coin_test.go index b377dd336..4ae2355a4 100644 --- a/x/evm/keeper/funtoken_from_coin_test.go +++ b/x/evm/keeper/funtoken_from_coin_test.go @@ -2,10 +2,11 @@ package keeper_test import ( + "math/big" "testing" - "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" bank "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/suite" @@ -14,72 +15,73 @@ import ( "github.com/NibiruChain/nibiru/v2/x/common/testutil" "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" "github.com/NibiruChain/nibiru/v2/x/evm" + "github.com/NibiruChain/nibiru/v2/x/evm/embeds" "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" "github.com/NibiruChain/nibiru/v2/x/evm/keeper" + "github.com/NibiruChain/nibiru/v2/x/evm/precompile" ) -func (s *FunTokenFromCoinSuite) TestDeployERC20ForBankCoin() { +func (s *FunTokenFromCoinSuite) TestCreateFunTokenFromCoin() { deps := evmtest.NewTestDeps() // Compute contract address. FindERC20 should fail - nonce := deps.StateDB().GetNonce(evm.EVM_MODULE_ADDRESS) - expectedERC20Addr := crypto.CreateAddress(evm.EVM_MODULE_ADDRESS, nonce) - _, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, expectedERC20Addr) - s.Error(err) - - s.T().Log("Case 1: Deploy and invoke ERC20 for info") - const bankDenom = "sometoken" - bankMetadata := bank.Metadata{ + nonce := deps.StateDB().GetNonce(deps.Sender.EthAddr) + contractAddress := crypto.CreateAddress(deps.Sender.EthAddr, nonce) + metadata, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, contractAddress) + s.Require().Error(err) + s.Require().Nil(metadata) + + s.T().Log("Setup: Create a coin in the bank state") + bankDenom := "sometoken" + deps.App.BankKeeper.SetDenomMetaData(deps.Ctx, bank.Metadata{ DenomUnits: []*bank.DenomUnit{ { Denom: bankDenom, Exponent: 0, + Aliases: nil, }, }, Base: bankDenom, Display: bankDenom, Name: bankDenom, Symbol: "TOKEN", - } - erc20Addr, err := deps.EvmKeeper.DeployERC20ForBankCoin( - deps.Ctx, bankMetadata, - ) - s.Require().NoError(err) - s.Equal(expectedERC20Addr, erc20Addr) + }) - s.T().Log("Expect ERC20 metadata on contract") - info, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, erc20Addr) - s.NoError(err) - s.Equal(keeper.ERC20Metadata{ - Name: bankDenom, - Symbol: "TOKEN", - Decimals: 0, - }, info) -} - -func (s *FunTokenFromCoinSuite) TestCreateFunTokenFromCoin() { - deps := evmtest.NewTestDeps() - - // Compute contract address. FindERC20 should fail - nonce := deps.StateDB().GetNonce(deps.Sender.EthAddr) - contractAddress := crypto.CreateAddress(deps.Sender.EthAddr, nonce) - _, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, contractAddress) - s.Error(err) + s.T().Log("sad: not enough funds to create fun token") + _, err = deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromBankDenom: bankDenom, + Sender: deps.Sender.NibiruAddr.String(), + }, + ) + s.Require().ErrorContains(err, "insufficient funds") - s.T().Log("Setup: Create a coin in the bank state") - bankDenom := "sometoken" + // Give the sender funds for the fee + s.Require().NoError(testapp.FundAccount( + deps.App.BankKeeper, + deps.Ctx, + deps.Sender.NibiruAddr, + deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), + )) - setBankDenomMetadata(deps.Ctx, deps.App.BankKeeper, bankDenom) + s.T().Log("sad: invalid bank denom") + _, err = deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromBankDenom: "doesn't exist", + Sender: deps.Sender.NibiruAddr.String(), + }, + ) + s.Require().Error(err) s.T().Log("happy: CreateFunToken for the bank coin") - // Give the sender funds for the fee s.Require().NoError(testapp.FundAccount( deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), )) - createFuntokenResp, err := deps.EvmKeeper.CreateFunToken( sdk.WrapSDKContext(deps.Ctx), &evm.MsgCreateFunToken{ @@ -87,42 +89,43 @@ func (s *FunTokenFromCoinSuite) TestCreateFunTokenFromCoin() { Sender: deps.Sender.NibiruAddr.String(), }, ) - s.Require().NoError(err, "bankDenom %s", bankDenom) - erc20 := createFuntokenResp.FuntokenMapping.Erc20Addr - erc20Addr := erc20.ToAddr() + s.Require().NoError(err) + + erc20Addr := createFuntokenResp.FuntokenMapping.Erc20Addr + s.Equal( createFuntokenResp.FuntokenMapping, evm.FunToken{ - Erc20Addr: erc20, + Erc20Addr: erc20Addr, BankDenom: bankDenom, IsMadeFromCoin: true, - }) + }, + ) s.T().Log("Expect ERC20 to be deployed") - queryCodeReq := &evm.QueryCodeRequest{ - Address: erc20.String(), - } - _, err = deps.EvmKeeper.Code(deps.Ctx, queryCodeReq) + _, err = deps.EvmKeeper.Code(deps.Ctx, &evm.QueryCodeRequest{ + Address: erc20Addr.String(), + }) s.Require().NoError(err) s.T().Log("Expect ERC20 metadata on contract") - metadata := keeper.ERC20Metadata{ - Name: bankDenom, - Symbol: "TOKEN", - Decimals: 0, - } - info, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, erc20Addr) - s.NoError(err, info) - s.Equal(metadata, info) + info, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, erc20Addr.ToAddr()) + s.Require().NoError(err, info) + s.Equal( + keeper.ERC20Metadata{ + Name: bankDenom, + Symbol: "TOKEN", + Decimals: 0, + }, *info, + ) - // Event "EventFunTokenCreated" must present // Event "EventFunTokenCreated" must present testutil.RequireContainsTypedEvent( s.T(), deps.Ctx, &evm.EventFunTokenCreated{ BankDenom: bankDenom, - Erc20ContractAddress: erc20.String(), + Erc20ContractAddress: erc20Addr.String(), Creator: deps.Sender.NibiruAddr.String(), IsMadeFromCoin: true, }, @@ -130,13 +133,12 @@ func (s *FunTokenFromCoinSuite) TestCreateFunTokenFromCoin() { s.T().Log("sad: CreateFunToken for the bank coin: already registered") // Give the sender funds for the fee - err = testapp.FundAccount( + s.Require().NoError(testapp.FundAccount( deps.App.BankKeeper, deps.Ctx, deps.Sender.NibiruAddr, deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), - ) - s.Require().NoError(err) + )) _, err = deps.EvmKeeper.CreateFunToken( sdk.WrapSDKContext(deps.Ctx), &evm.MsgCreateFunToken{ @@ -145,112 +147,152 @@ func (s *FunTokenFromCoinSuite) TestCreateFunTokenFromCoin() { }, ) s.Require().ErrorContains(err, "funtoken mapping already created") + + s.T().Log("sad: bank denom metadata not registered") + // Give the sender funds for the fee + s.Require().NoError(testapp.FundAccount( + deps.App.BankKeeper, + deps.Ctx, + deps.Sender.NibiruAddr, + deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), + )) + _, err = deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromBankDenom: "some random denom", + Sender: deps.Sender.NibiruAddr.String(), + }, + ) + s.Require().ErrorContains(err, "bank coin denom should have bank metadata for denom") } -// TestSendFunTokenToEvm executes sending fun tokens from bank coin to erc20 and checks the results: -// - sender balance should be reduced by sendAmount -// - erc-20 balance should be increased by sendAmount -// - evm module account should hold sender's coins -func (s *FunTokenFromCoinSuite) TestSendFunTokenToEvm() { - for _, tc := range []struct { - name string - bankDenom string - initialBalance math.Int - amountToSend math.Int - wantErr string - }{ - { - name: "happy: proper sending", - bankDenom: "unibi", - initialBalance: math.NewInt(100), - amountToSend: math.NewInt(10), - wantErr: "", +func (s *FunTokenFromCoinSuite) TestConvertCoinToEvmAndBack() { + deps := evmtest.NewTestDeps() + alice := evmtest.NewEthPrivAcc() + bankDenom := "unibi" + + s.T().Log("Setup: Create a coin in the bank state") + deps.App.BankKeeper.SetDenomMetaData(deps.Ctx, bank.Metadata{ + DenomUnits: []*bank.DenomUnit{ + { + Denom: bankDenom, + Exponent: 0, + Aliases: nil, + }, }, - { - name: "sad: not registered bank denom", - bankDenom: "not-registered-denom", - initialBalance: math.NewInt(100), - amountToSend: math.NewInt(10), - wantErr: "does not exist", + Base: bankDenom, + Display: bankDenom, + Name: bankDenom, + Symbol: "TOKEN", + }) + + s.T().Log("Give the sender funds") + s.Require().NoError(testapp.FundAccount( + deps.App.BankKeeper, + deps.Ctx, + deps.Sender.NibiruAddr, + deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx).Add(sdk.NewCoin(bankDenom, sdk.NewInt(100))), + )) + + s.T().Log("Create FunToken mapping and ERC20") + createFunTokenResp, err := deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromBankDenom: bankDenom, + Sender: deps.Sender.NibiruAddr.String(), }, - { - name: "sad: insufficient balance", - bankDenom: "unibi", - initialBalance: math.NewInt(10), - amountToSend: math.NewInt(100), - wantErr: "insufficient funds", + ) + s.Require().NoError(err) + + funTokenErc20Addr := createFunTokenResp.FuntokenMapping.Erc20Addr + + s.T().Log("Convert bank coin to erc-20") + _, err = deps.EvmKeeper.ConvertCoinToEvm( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgConvertCoinToEvm{ + Sender: deps.Sender.NibiruAddr.String(), + BankCoin: sdk.NewCoin(bankDenom, sdk.NewInt(10)), + ToEthAddr: eth.NewHexAddr(alice.EthAddr), + }, + ) + s.Require().NoError(err) + + s.T().Log("Check typed event") + testutil.RequireContainsTypedEvent( + s.T(), + deps.Ctx, + &evm.EventConvertCoinToEvm{ + Sender: deps.Sender.NibiruAddr.String(), + Erc20ContractAddress: funTokenErc20Addr.String(), + ToEthAddr: alice.EthAddr.String(), + BankCoin: sdk.NewCoin(bankDenom, sdk.NewInt(10)), + }, + ) + + // Check 1: module balance + moduleBalance := deps.App.BankKeeper.GetBalance(deps.Ctx, authtypes.NewModuleAddress(evm.ModuleName), bankDenom) + s.Require().Equal(sdk.NewInt(10), moduleBalance.Amount) + + // Check 2: Sender balance + senderBalance := deps.App.BankKeeper.GetBalance(deps.Ctx, deps.Sender.NibiruAddr, bankDenom) + s.Require().Equal(sdk.NewInt(90), senderBalance.Amount) + + // Check 3: erc-20 balance + balance, err := deps.EvmKeeper.ERC20().BalanceOf(funTokenErc20Addr.ToAddr(), alice.EthAddr, deps.Ctx) + s.Require().NoError(err) + s.Require().Zero(balance.Cmp(big.NewInt(10))) + + s.T().Log("sad: Convert more bank coin to erc-20, insufficient funds") + _, err = deps.EvmKeeper.ConvertCoinToEvm( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgConvertCoinToEvm{ + Sender: deps.Sender.NibiruAddr.String(), + BankCoin: sdk.NewCoin(bankDenom, sdk.NewInt(100)), + ToEthAddr: eth.NewHexAddr(alice.EthAddr), }, - } { - s.Run(tc.name, func() { - deps := evmtest.NewTestDeps() - bankDenom := "unibi" - recipientEVMAddr := eth.MustNewHexAddrFromStr("0x1234500000000000000000000000000000000000") - evmModuleAddr := deps.App.AccountKeeper.GetModuleAddress(evm.ModuleName) - - ctx := sdk.WrapSDKContext(deps.Ctx) - setBankDenomMetadata(deps.Ctx, deps.App.BankKeeper, bankDenom) - - // Give the sender funds - s.Require().NoError(testapp.FundAccount( - deps.App.BankKeeper, - deps.Ctx, - deps.Sender.NibiruAddr, - deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx).Add(sdk.NewCoin(bankDenom, tc.initialBalance)), - )) - - // Create fun token from coin - createFunTokenResp, err := deps.EvmKeeper.CreateFunToken( - ctx, - &evm.MsgCreateFunToken{ - FromBankDenom: bankDenom, - Sender: deps.Sender.NibiruAddr.String(), - }, - ) - s.Require().NoError(err) - funTokenErc20Addr := createFunTokenResp.FuntokenMapping.Erc20Addr.ToAddr() - - // Send fun token to ERC-20 contract - bankCoin := sdk.NewCoin(tc.bankDenom, tc.amountToSend) - _, err = deps.EvmKeeper.SendFunTokenToEvm( - ctx, - &evm.MsgSendFunTokenToEvm{ - Sender: deps.Sender.NibiruAddr.String(), - BankCoin: bankCoin, - ToEthAddr: recipientEVMAddr, - }, - ) - if tc.wantErr != "" { - s.Require().ErrorContains(err, tc.wantErr) - return - } - s.Require().NoError(err) - - // Event "EventSendFunTokenToEvm" must present - testutil.RequireContainsTypedEvent( - s.T(), - deps.Ctx, - &evm.EventSendFunTokenToEvm{ - Sender: deps.Sender.NibiruAddr.String(), - Erc20ContractAddress: funTokenErc20Addr.String(), - ToEthAddr: recipientEVMAddr.String(), - BankCoin: bankCoin, - }, - ) - - // Check 1: coins are stored on a module balance - moduleBalance := deps.App.BankKeeper.GetBalance(deps.Ctx, evmModuleAddr, bankDenom) - s.Require().Equal(tc.amountToSend, moduleBalance.Amount) - - // Check 2: Sender balance reduced by send amount - senderBalance := deps.App.BankKeeper.GetBalance(deps.Ctx, deps.Sender.NibiruAddr, bankDenom) - s.Require().Equal(tc.initialBalance.Sub(tc.amountToSend), senderBalance.Amount) - - // Check 3: erc-20 balance equals to send amount - balance, err := deps.EvmKeeper.ERC20().BalanceOf(funTokenErc20Addr, recipientEVMAddr.ToAddr(), deps.Ctx) - s.Require().NoError(err) - s.Require().Zero(balance.Cmp(tc.amountToSend.BigInt())) - }) - } + ) + s.Require().ErrorContains(err, "insufficient funds") + + s.T().Log("Convert erc-20 to back to bank coin") + _, err = deps.EvmKeeper.CallContract( + deps.Ctx, + embeds.SmartContract_FunToken.ABI, + alice.EthAddr, + &precompile.PrecompileAddr_FunToken, + true, + "bankSend", + funTokenErc20Addr.ToAddr(), + big.NewInt(10), + deps.Sender.NibiruAddr.String(), + ) + s.Require().NoError(err) + + // Check 1: module balance + moduleBalance = deps.App.BankKeeper.GetBalance(deps.Ctx, authtypes.NewModuleAddress(evm.ModuleName), bankDenom) + s.Require().True(moduleBalance.Amount.Equal(sdk.ZeroInt())) + + // Check 2: Sender balance + senderBalance = deps.App.BankKeeper.GetBalance(deps.Ctx, deps.Sender.NibiruAddr, bankDenom) + s.Require().Equal(sdk.NewInt(100), senderBalance.Amount) + + // Check 3: erc-20 balance + balance, err = deps.EvmKeeper.ERC20().BalanceOf(funTokenErc20Addr.ToAddr(), alice.EthAddr, deps.Ctx) + s.Require().NoError(err) + s.Require().Zero(balance.Cmp(big.NewInt(0))) + + s.T().Log("sad: Convert more erc-20 to back to bank coin, insufficient funds") + _, err = deps.EvmKeeper.CallContract( + deps.Ctx, + embeds.SmartContract_FunToken.ABI, + alice.EthAddr, + &precompile.PrecompileAddr_FunToken, + true, + "bankSend", + funTokenErc20Addr.ToAddr(), + big.NewInt(10), + deps.Sender.NibiruAddr.String(), + ) + s.Require().ErrorContains(err, "transfer amount exceeds balance") } type FunTokenFromCoinSuite struct { diff --git a/x/evm/keeper/funtoken_from_erc20.go b/x/evm/keeper/funtoken_from_erc20.go index c56ecb584..1da6d411a 100644 --- a/x/evm/keeper/funtoken_from_erc20.go +++ b/x/evm/keeper/funtoken_from_erc20.go @@ -7,7 +7,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" bank "github.com/cosmos/cosmos-sdk/x/bank/types" - gethabi "github.com/ethereum/go-ethereum/accounts/abi" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/NibiruChain/nibiru/v2/eth" @@ -27,26 +26,24 @@ import ( func (k Keeper) FindERC20Metadata( ctx sdk.Context, contract gethcommon.Address, -) (info ERC20Metadata, err error) { - var abi *gethabi.ABI = embeds.SmartContract_ERC20Minter.ABI - +) (info *ERC20Metadata, err error) { // Load name, symbol, decimals - name, err := k.LoadERC20Name(ctx, abi, contract) + name, err := k.LoadERC20Name(ctx, embeds.SmartContract_ERC20Minter.ABI, contract) if err != nil { - return info, err + return nil, err } - symbol, err := k.LoadERC20Symbol(ctx, abi, contract) + symbol, err := k.LoadERC20Symbol(ctx, embeds.SmartContract_ERC20Minter.ABI, contract) if err != nil { - return info, err + return nil, err } - decimals, err := k.LoadERC20Decimals(ctx, abi, contract) + decimals, err := k.LoadERC20Decimals(ctx, embeds.SmartContract_ERC20Minter.ABI, contract) if err != nil { - return info, err + return nil, err } - return ERC20Metadata{ + return &ERC20Metadata{ Name: name, Symbol: symbol, Decimals: decimals, @@ -69,7 +66,7 @@ type ( ERC20BigInt struct{ Value *big.Int } ) -// CreateFunTokenFromERC20 creates a new FunToken mapping from an existing ERC20 token. +// createFunTokenFromERC20 creates a new FunToken mapping from an existing ERC20 token. // // This function performs the following steps: // 1. Checks if the ERC20 token is already registered as a FunToken. @@ -92,9 +89,9 @@ type ( // - If the bank coin denom is already registered. // - If the bank metadata validation fails. // - If the FunToken insertion fails. -func (k *Keeper) CreateFunTokenFromERC20( +func (k *Keeper) createFunTokenFromERC20( ctx sdk.Context, erc20 gethcommon.Address, -) (funtoken evm.FunToken, err error) { +) (funtoken *evm.FunToken, err error) { // 1 | ERC20 already registered with FunToken? if funtokens := k.FunTokens.Collect(ctx, k.FunTokens.Indexes.ERC20Addr.ExactMatch(ctx, erc20)); len(funtokens) > 0 { return funtoken, fmt.Errorf("funtoken mapping already created for ERC20 \"%s\"", erc20) @@ -141,7 +138,7 @@ func (k *Keeper) CreateFunTokenFromERC20( k.bankKeeper.SetDenomMetaData(ctx, bankMetadata) // 5 | Officially create the funtoken mapping - funtoken = evm.FunToken{ + funtoken = &evm.FunToken{ Erc20Addr: eth.NewHexAddr(erc20), BankDenom: bankDenom, IsMadeFromCoin: false, diff --git a/x/evm/keeper/funtoken_from_erc20_test.go b/x/evm/keeper/funtoken_from_erc20_test.go index 3a29be7b5..13af650da 100644 --- a/x/evm/keeper/funtoken_from_erc20_test.go +++ b/x/evm/keeper/funtoken_from_erc20_test.go @@ -29,123 +29,122 @@ func (s *FunTokenFromErc20Suite) TestCreateFunTokenFromERC20() { s.Error(err) s.T().Log("Deploy ERC20") - { - metadata := keeper.ERC20Metadata{ - Name: "erc20name", - Symbol: "TOKEN", - Decimals: 18, - } - deployResp, err := evmtest.DeployContract( - &deps, embeds.SmartContract_ERC20Minter, - metadata.Name, metadata.Symbol, metadata.Decimals, - ) - s.Require().NoError(err) - s.Require().Equal(expectedERC20Addr, deployResp.ContractAddr) - - info, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, deployResp.ContractAddr) - s.Require().NoError(err, info) - s.Require().Equal(metadata, info) - - queryCodeReq := &evm.QueryCodeRequest{ - Address: expectedERC20Addr.String(), - } - _, err = deps.EvmKeeper.Code(deps.Ctx, queryCodeReq) - s.Require().NoError(err) + metadata := keeper.ERC20Metadata{ + Name: "erc20name", + Symbol: "TOKEN", + Decimals: 18, } + deployResp, err := evmtest.DeployContract( + &deps, embeds.SmartContract_ERC20Minter, + metadata.Name, metadata.Symbol, metadata.Decimals, + ) + s.Require().NoError(err) + s.Require().Equal(expectedERC20Addr, deployResp.ContractAddr) + + info, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, deployResp.ContractAddr) + s.Require().NoError(err) + s.Require().Equal(metadata, *info) + + _, err = deps.EvmKeeper.Code(deps.Ctx, &evm.QueryCodeRequest{ + Address: expectedERC20Addr.String(), + }) + s.Require().NoError(err) + + erc20Addr := eth.NewHexAddr(deployResp.ContractAddr) - erc20Addr := eth.NewHexAddr(expectedERC20Addr) + s.T().Log("sad: insufficient funds to create FunToken mapping") + _, err = deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromErc20: &erc20Addr, + Sender: deps.Sender.NibiruAddr.String(), + }, + ) + s.Require().ErrorContains(err, "insufficient funds") s.T().Log("happy: CreateFunToken for the ERC20") - { - s.Require().NoError(testapp.FundAccount( - deps.App.BankKeeper, - deps.Ctx, - deps.Sender.NibiruAddr, - deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), - )) - - resp, err := deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), - &evm.MsgCreateFunToken{ - FromErc20: &erc20Addr, - Sender: deps.Sender.NibiruAddr.String(), - }, - ) - s.Require().NoError(err, "erc20 %s", erc20Addr) - - expectedBankDenom := fmt.Sprintf("erc20/%s", expectedERC20Addr.String()) - s.Equal( - resp.FuntokenMapping, - evm.FunToken{ - Erc20Addr: erc20Addr, - BankDenom: expectedBankDenom, - IsMadeFromCoin: false, - }) - - // Event "EventFunTokenCreated" must present - testutil.RequireContainsTypedEvent( - s.T(), - deps.Ctx, - &evm.EventFunTokenCreated{ - BankDenom: expectedBankDenom, - Erc20ContractAddress: erc20Addr.String(), - Creator: deps.Sender.NibiruAddr.String(), - IsMadeFromCoin: false, - }, - ) - } + s.Require().NoError(testapp.FundAccount( + deps.App.BankKeeper, + deps.Ctx, + deps.Sender.NibiruAddr, + deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), + )) + + resp, err := deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromErc20: &erc20Addr, + Sender: deps.Sender.NibiruAddr.String(), + }, + ) + s.Require().NoError(err, "erc20 %s", erc20Addr) + + expectedBankDenom := fmt.Sprintf("erc20/%s", expectedERC20Addr.String()) + s.Equal( + resp.FuntokenMapping, + evm.FunToken{ + Erc20Addr: erc20Addr, + BankDenom: expectedBankDenom, + IsMadeFromCoin: false, + }) + + // Event "EventFunTokenCreated" must present + testutil.RequireContainsTypedEvent( + s.T(), + deps.Ctx, + &evm.EventFunTokenCreated{ + BankDenom: expectedBankDenom, + Erc20ContractAddress: erc20Addr.String(), + Creator: deps.Sender.NibiruAddr.String(), + IsMadeFromCoin: false, + }, + ) s.T().Log("sad: CreateFunToken for the ERC20: already registered") - { - // Give the sender funds for the fee - s.Require().NoError(testapp.FundAccount( - deps.App.BankKeeper, - deps.Ctx, - deps.Sender.NibiruAddr, - deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), - )) - - _, err = deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), - &evm.MsgCreateFunToken{ - FromErc20: &erc20Addr, - Sender: deps.Sender.NibiruAddr.String(), - }, - ) - s.ErrorContains(err, "funtoken mapping already created") - } + // Give the sender funds for the fee + s.Require().NoError(testapp.FundAccount( + deps.App.BankKeeper, + deps.Ctx, + deps.Sender.NibiruAddr, + deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), + )) + + _, err = deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromErc20: &erc20Addr, + Sender: deps.Sender.NibiruAddr.String(), + }, + ) + s.ErrorContains(err, "funtoken mapping already created") s.T().Log("sad: CreateFunToken for the ERC20: invalid sender") - { - _, err = deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), - &evm.MsgCreateFunToken{ - FromErc20: &erc20Addr, - }, - ) - s.ErrorContains(err, "invalid sender") - } + + _, err = deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromErc20: &erc20Addr, + }, + ) + s.ErrorContains(err, "invalid sender") s.T().Log("sad: CreateFunToken for the ERC20: missing erc20 address") - { - _, err = deps.EvmKeeper.CreateFunToken( - sdk.WrapSDKContext(deps.Ctx), - &evm.MsgCreateFunToken{ - FromErc20: nil, - FromBankDenom: "", - Sender: deps.Sender.NibiruAddr.String(), - }, - ) - s.ErrorContains(err, "either the \"from_erc20\" or \"from_bank_denom\" must be set") - } + + _, err = deps.EvmKeeper.CreateFunToken( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgCreateFunToken{ + FromErc20: nil, + FromBankDenom: "", + Sender: deps.Sender.NibiruAddr.String(), + }, + ) + s.ErrorContains(err, "either the \"from_erc20\" or \"from_bank_denom\" must be set") } func (s *FunTokenFromErc20Suite) TestSendFromEvmToCosmos() { deps := evmtest.NewTestDeps() - var erc20Addr eth.HexAddr s.T().Log("Deploy ERC20") - metadata := keeper.ERC20Metadata{ Name: "erc20name", Symbol: "TOKEN", @@ -156,10 +155,9 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToCosmos() { metadata.Name, metadata.Symbol, metadata.Decimals, ) s.Require().NoError(err) - erc20Addr = eth.NewHexAddr(deployResp.ContractAddr) - - s.T().Log("happy: CreateFunToken for the ERC20") + erc20Addr := eth.NewHexAddr(deployResp.ContractAddr) + s.T().Log("CreateFunToken for the ERC20") s.Require().NoError(testapp.FundAccount( deps.App.BankKeeper, deps.Ctx, @@ -167,7 +165,7 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToCosmos() { deps.EvmKeeper.FeeForCreateFunToken(deps.Ctx), )) - _, err = deps.EvmKeeper.CreateFunToken( + resp, err := deps.EvmKeeper.CreateFunToken( sdk.WrapSDKContext(deps.Ctx), &evm.MsgCreateFunToken{ FromErc20: &erc20Addr, @@ -175,42 +173,85 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToCosmos() { }, ) s.Require().NoError(err, "erc20 %s", erc20Addr) - // bankDemon := resp.FuntokenMapping.BankDenom + bankDemon := resp.FuntokenMapping.BankDenom s.T().Logf("mint erc20 tokens to %s", deps.Sender.EthAddr.String()) - input, err := embeds.SmartContract_ERC20Minter.ABI.Pack("mint", deps.Sender.EthAddr, big.NewInt(69_420)) - s.Require().NoError(err) erc20 := erc20Addr.ToAddr() - _, err = deps.EvmKeeper.CallContractWithInput( - deps.Ctx, deps.Sender.EthAddr, &erc20, true, input, + _, err = deps.EvmKeeper.CallContract( + deps.Ctx, + embeds.SmartContract_ERC20Minter.ABI, + deps.Sender.EthAddr, + &erc20, + true, + "mint", + deps.Sender.EthAddr, + big.NewInt(69_420), ) s.Require().NoError(err) - s.T().Log("send erc20 tokens to cosmos") randomAcc := testutil.AccAddress() - callArgs := []any{erc20Addr.ToAddr(), big.NewInt(1), randomAcc.String()} - input, err = embeds.SmartContract_FunToken.ABI.Pack(string(precompile.FunTokenMethod_BankSend), callArgs...) - s.Require().NoError(err) - _, err = deps.EvmKeeper.CallContractWithInput( - deps.Ctx, deps.Sender.EthAddr, &precompile.PrecompileAddr_FunToken, true, input, + s.T().Log("send erc20 tokens to cosmos") + _, err = deps.EvmKeeper.CallContract( + deps.Ctx, + embeds.SmartContract_FunToken.ABI, + deps.Sender.EthAddr, + &precompile.PrecompileAddr_FunToken, + true, + "bankSend", + erc20Addr.ToAddr(), + big.NewInt(1), + randomAcc.String(), ) s.Require().NoError(err) s.T().Log("check balances") evmtest.AssertERC20BalanceEqual(s.T(), deps, erc20, deps.Sender.EthAddr, big.NewInt(69_419)) evmtest.AssertERC20BalanceEqual(s.T(), deps, erc20, evm.EVM_MODULE_ADDRESS, big.NewInt(1)) - s.Equal("1", - deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, "erc20/"+erc20Addr.String()).Amount.String(), + s.Require().Equal(sdk.NewInt(1), + deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, bankDemon).Amount, ) - // s.T().Log("send cosmos tokens back to erc20") - // _, err = deps.EvmKeeper.SendFunTokenToEvm(sdk.WrapSDKContext(deps.Ctx), &evm.MsgSendFunTokenToEvm{ - // ToEthAddr: eth.NewHexAddr(deps.Sender.EthAddr), - // Sender: randomAcc.String(), - // BankCoin: sdk.NewCoin("erc20/"+erc20Addr.String(), sdk.NewInt(1)), - // }) - // s.Require().NoError(err) + s.T().Log("sad: send too many erc20 tokens to cosmos") + _, err = deps.EvmKeeper.CallContract( + deps.Ctx, + embeds.SmartContract_FunToken.ABI, + deps.Sender.EthAddr, + &precompile.PrecompileAddr_FunToken, + true, + "bankSend", + erc20Addr.ToAddr(), + big.NewInt(70_000), + randomAcc.String(), + ) + s.Require().Error(err) + + s.T().Log("send cosmos tokens back to erc20") + _, err = deps.EvmKeeper.ConvertCoinToEvm(sdk.WrapSDKContext(deps.Ctx), + &evm.MsgConvertCoinToEvm{ + ToEthAddr: eth.NewHexAddr(deps.Sender.EthAddr), + Sender: randomAcc.String(), + BankCoin: sdk.NewCoin(bankDemon, sdk.NewInt(1)), + }, + ) + s.Require().NoError(err) + + s.T().Log("check balances") + evmtest.AssertERC20BalanceEqual(s.T(), deps, erc20, deps.Sender.EthAddr, big.NewInt(69_420)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, erc20, evm.EVM_MODULE_ADDRESS, big.NewInt(0)) + s.Require().True( + deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, bankDemon).Amount.Equal(sdk.NewInt(0)), + ) + + s.T().Log("sad: send too many cosmos tokens back to erc20") + _, err = deps.EvmKeeper.ConvertCoinToEvm(sdk.WrapSDKContext(deps.Ctx), + &evm.MsgConvertCoinToEvm{ + ToEthAddr: eth.NewHexAddr(deps.Sender.EthAddr), + Sender: randomAcc.String(), + BankCoin: sdk.NewCoin(bankDemon, sdk.NewInt(1)), + }, + ) + s.Require().Error(err) } type FunTokenFromErc20Suite struct { diff --git a/x/evm/keeper/msg_server.go b/x/evm/keeper/msg_server.go index 7e8f7f0ec..f7b3b3d7f 100644 --- a/x/evm/keeper/msg_server.go +++ b/x/evm/keeper/msg_server.go @@ -484,32 +484,32 @@ func ParseWeiAsMultipleOfMicronibi(weiInt *big.Int) (newWeiInt *big.Int, err err func (k *Keeper) CreateFunToken( goCtx context.Context, msg *evm.MsgCreateFunToken, ) (resp *evm.MsgCreateFunTokenResponse, err error) { - var funtoken evm.FunToken + var funtoken *evm.FunToken err = msg.ValidateBasic() if err != nil { - return + return nil, err } // Deduct fee upon registration. ctx := sdk.UnwrapSDKContext(goCtx) err = k.deductCreateFunTokenFee(ctx, msg) if err != nil { - return + return nil, err } emptyErc20 := msg.FromErc20 == nil || msg.FromErc20.Size() == 0 switch { case !emptyErc20 && msg.FromBankDenom == "": - funtoken, err = k.CreateFunTokenFromERC20(ctx, msg.FromErc20.ToAddr()) + funtoken, err = k.createFunTokenFromERC20(ctx, msg.FromErc20.ToAddr()) case emptyErc20 && msg.FromBankDenom != "": - funtoken, err = k.CreateFunTokenFromCoin(ctx, msg.FromBankDenom) + funtoken, err = k.createFunTokenFromCoin(ctx, msg.FromBankDenom) default: // Impossible to reach this case due to ValidateBasic err = fmt.Errorf( "either the \"from_erc20\" or \"from_bank_denom\" must be set (but not both)") } if err != nil { - return + return nil, err } _ = ctx.EventManager().EmitTypedEvent(&evm.EventFunTokenCreated{ @@ -520,7 +520,7 @@ func (k *Keeper) CreateFunToken( }) return &evm.MsgCreateFunTokenResponse{ - FuntokenMapping: funtoken, + FuntokenMapping: *funtoken, }, err } @@ -543,32 +543,52 @@ func (k Keeper) FeeForCreateFunToken(ctx sdk.Context) sdk.Coins { return sdk.NewCoins(sdk.NewCoin(evmParams.EvmDenom, evmParams.CreateFuntokenFee)) } -// SendFunTokenToEvm Sends a coin with a valid "FunToken" mapping to the +// ConvertCoinToEvm Sends a coin with a valid "FunToken" mapping to the // given recipient address ("to_eth_addr") in the corresponding ERC20 // representation. -func (k *Keeper) SendFunTokenToEvm( - goCtx context.Context, msg *evm.MsgSendFunTokenToEvm, -) (resp *evm.MsgSendFunTokenToEvmResponse, err error) { +func (k *Keeper) ConvertCoinToEvm( + goCtx context.Context, msg *evm.MsgConvertCoinToEvm, +) (resp *evm.MsgConvertCoinToEvmResponse, err error) { ctx := sdk.UnwrapSDKContext(goCtx) sender := sdk.MustAccAddressFromBech32(msg.Sender) - toEthAddr := msg.ToEthAddr.ToAddr() - bankDenom := msg.BankCoin.Denom - amount := msg.BankCoin.Amount + ethRecipient := msg.ToEthAddr.ToAddr() - funTokens := k.FunTokens.Collect(ctx, k.FunTokens.Indexes.BankDenom.ExactMatch(ctx, bankDenom)) + funTokens := k.FunTokens.Collect(ctx, k.FunTokens.Indexes.BankDenom.ExactMatch(ctx, msg.BankCoin.Denom)) if len(funTokens) == 0 { - return nil, fmt.Errorf("funtoken for bank denom \"%s\" does not exist", bankDenom) + return nil, fmt.Errorf("funtoken for bank denom \"%s\" does not exist", msg.BankCoin.Denom) + } + if len(funTokens) > 1 { + return nil, fmt.Errorf("multiple funtokens for bank denom \"%s\" found", msg.BankCoin.Denom) + } + + fungibleTokenMapping := funTokens[0] + + if fungibleTokenMapping.IsMadeFromCoin { + return k.convertCoinNativeCoin(ctx, sender, ethRecipient, msg.BankCoin, fungibleTokenMapping) + } else { + return k.convertCoinNativeERC20(ctx, sender, ethRecipient, msg.BankCoin, fungibleTokenMapping) } - erc20ContractAddr := funTokens[0].Erc20Addr.ToAddr() +} - // Step 1: Send coins to the evm module account - err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, sender, evm.ModuleName, sdk.Coins{msg.BankCoin}) +// Converts a native coin to an ERC20 token. +// EVM module owns the ERC-20 contract and can mint the ERC-20 tokens. +func (k Keeper) convertCoinNativeCoin( + ctx sdk.Context, + sender sdk.AccAddress, + recipient gethcommon.Address, + coin sdk.Coin, + fungibleTokenMapping evm.FunToken, +) (*evm.MsgConvertCoinToEvmResponse, error) { + // Step 1: Escrow bank coins with EVM module account + err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, sender, evm.ModuleName, sdk.NewCoins(coin)) if err != nil { return nil, errors.Wrap(err, "failed to send coins to module account") } - // Step 2: evm call to erc20 minter: mint tokens for a toEthAddr + erc20ContractAddr := fungibleTokenMapping.Erc20Addr.ToAddr() + + // Step 2: mint ERC-20 tokens for recipient evmResp, err := k.CallContract( ctx, embeds.SmartContract_ERC20Minter.ABI, @@ -576,8 +596,8 @@ func (k *Keeper) SendFunTokenToEvm( &erc20ContractAddr, true, "mint", - toEthAddr, - amount.BigInt(), + recipient, + coin.Amount.BigInt(), ) if err != nil { return nil, err @@ -586,12 +606,104 @@ func (k *Keeper) SendFunTokenToEvm( return nil, fmt.Errorf("failed to mint erc-20 tokens of contract %s", erc20ContractAddr.String()) } - _ = ctx.EventManager().EmitTypedEvent(&evm.EventSendFunTokenToEvm{ - Sender: msg.Sender, + _ = ctx.EventManager().EmitTypedEvent(&evm.EventConvertCoinToEvm{ + Sender: sender.String(), Erc20ContractAddress: erc20ContractAddr.String(), - ToEthAddr: toEthAddr.String(), - BankCoin: msg.BankCoin, + ToEthAddr: recipient.String(), + BankCoin: coin, + }) + + return &evm.MsgConvertCoinToEvmResponse{}, nil +} + +// Converts a coin that was originally an ERC20 token, and that was converted to a bank coin, back to an ERC20 token. +// EVM module does not own the ERC-20 contract and cannot mint the ERC-20 tokens. +// EVM module has escrowed tokens in the first conversion from ERC-20 to bank coin. +func (k Keeper) convertCoinNativeERC20( + ctx sdk.Context, + sender sdk.AccAddress, + recipient gethcommon.Address, + coin sdk.Coin, + fungibleTokenMapping evm.FunToken, +) (*evm.MsgConvertCoinToEvmResponse, error) { + erc20Addr := fungibleTokenMapping.Erc20Addr.ToAddr() + + recipientBalanceBefore, err := k.ERC20().BalanceOf(erc20Addr, recipient, ctx) + if err != nil { + return nil, errors.Wrap(err, "failed to retrieve balance") + } + if recipientBalanceBefore == nil { + return nil, fmt.Errorf("failed to retrieve balance, balance is nil") + } + + // Escrow Coins on module account + if err := k.bankKeeper.SendCoinsFromAccountToModule( + ctx, + sender, + evm.ModuleName, + sdk.NewCoins(coin), + ); err != nil { + return nil, errors.Wrap(err, "failed to escrow coins") + } + + // verify that the EVM module account has enough escrowed ERC-20 to transfer + // should never fail, because the coins were minted from the escrowed tokens, but check just in case + evmModuleBalance, err := k.ERC20().BalanceOf( + erc20Addr, + evm.EVM_MODULE_ADDRESS, + ctx, + ) + if err != nil { + return nil, errors.Wrap(err, "failed to retrieve balance") + } + if evmModuleBalance == nil { + return nil, fmt.Errorf("failed to retrieve balance, balance is nil") + } + if evmModuleBalance.Cmp(coin.Amount.BigInt()) < 0 { + return nil, fmt.Errorf("insufficient balance in EVM module account") + } + + // unescrow ERC-20 tokens from EVM module address + res, err := k.ERC20().Transfer( + erc20Addr, + evm.EVM_MODULE_ADDRESS, + recipient, + coin.Amount.BigInt(), + ctx, + ) + if err != nil { + return nil, errors.Wrap(err, "failed to transfer ERC20 tokens") + } + if !res { + return nil, fmt.Errorf("failed to transfer ERC20 tokens") + } + + // Check expected Receiver balance after transfer execution + recipientBalanceAfter, err := k.ERC20().BalanceOf(erc20Addr, recipient, ctx) + if err != nil { + return nil, errors.Wrap(err, "failed to retrieve balance") + } + if recipientBalanceAfter == nil { + return nil, fmt.Errorf("failed to retrieve balance, balance is nil") + } + + expectedFinalBalance := big.NewInt(0).Add(recipientBalanceBefore, coin.Amount.BigInt()) + if r := recipientBalanceAfter.Cmp(expectedFinalBalance); r != 0 { + return nil, fmt.Errorf("expected balance after transfer to be %s, got %s", expectedFinalBalance, recipientBalanceAfter) + } + + // Burn escrowed Coins + err = k.bankKeeper.BurnCoins(ctx, evm.ModuleName, sdk.NewCoins(coin)) + if err != nil { + return nil, errors.Wrap(err, "failed to burn coins") + } + + _ = ctx.EventManager().EmitTypedEvent(&evm.EventConvertCoinToEvm{ + Sender: sender.String(), + Erc20ContractAddress: fungibleTokenMapping.Erc20Addr.String(), + ToEthAddr: recipient.String(), + BankCoin: coin, }) - return &evm.MsgSendFunTokenToEvmResponse{}, nil + return &evm.MsgConvertCoinToEvmResponse{}, nil } diff --git a/x/evm/msg.go b/x/evm/msg.go index 02b2732e7..3d10c5ff6 100644 --- a/x/evm/msg.go +++ b/x/evm/msg.go @@ -514,14 +514,14 @@ func (m MsgCreateFunToken) GetSignBytes() []byte { return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) } -// GetSigners returns the expected signers for a MsgSendFunTokenToEvm message. -func (m MsgSendFunTokenToEvm) GetSigners() []sdk.AccAddress { +// GetSigners returns the expected signers for a MsgConvertCoinToEvm message. +func (m MsgConvertCoinToEvm) GetSigners() []sdk.AccAddress { addr, _ := sdk.AccAddressFromBech32(m.Sender) return []sdk.AccAddress{addr} } // ValidateBasic does a sanity check of the provided data -func (m *MsgSendFunTokenToEvm) ValidateBasic() error { +func (m *MsgConvertCoinToEvm) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(m.Sender); err != nil { return fmt.Errorf("invalid sender addr") } @@ -532,6 +532,6 @@ func (m *MsgSendFunTokenToEvm) ValidateBasic() error { } // GetSignBytes implements the LegacyMsg interface. -func (m MsgSendFunTokenToEvm) GetSignBytes() []byte { +func (m MsgConvertCoinToEvm) GetSignBytes() []byte { return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&m)) } diff --git a/x/evm/precompile/funtoken.go b/x/evm/precompile/funtoken.go index 88407bd11..42f14ff22 100644 --- a/x/evm/precompile/funtoken.go +++ b/x/evm/precompile/funtoken.go @@ -150,13 +150,26 @@ func (p precompileFunToken) bankSend( // EVM account mints FunToken.BankDenom to module account amt := math.NewIntFromBigInt(amount) coins := sdk.NewCoins(sdk.NewCoin(funtoken.BankDenom, amt)) - err = p.BankKeeper.MintCoins(ctx, evm.ModuleName, coins) - if err != nil { - return nil, fmt.Errorf("mint failed for module \"%s\" (%s): contract caller %s: %w", - evm.ModuleName, evm.EVM_MODULE_ADDRESS.Hex(), caller.Hex(), err, - ) + if funtoken.IsMadeFromCoin { + // If the FunToken mapping was created from a bank coin, then the EVM account + // owns the ERC20 contract and was the original minter of the ERC20 tokens. + // Since we're sending them away and want accurate total supply tracking, the + // tokens need to be burned. + _, err = p.EvmKeeper.ERC20().Burn(erc20, evm.EVM_MODULE_ADDRESS, amount, ctx) + if err != nil { + err = fmt.Errorf("ERC20.Burn: %w", err) + return + } + } else { + err = p.BankKeeper.MintCoins(ctx, evm.ModuleName, coins) + if err != nil { + return nil, fmt.Errorf("mint failed for module \"%s\" (%s): contract caller %s: %w", + evm.ModuleName, evm.EVM_MODULE_ADDRESS.Hex(), caller.Hex(), err, + ) + } } + // Transfer the bank coin err = p.BankKeeper.SendCoinsFromModuleToAccount(ctx, evm.ModuleName, toAddr, coins) if err != nil { return nil, fmt.Errorf("send failed for module \"%s\" (%s): contract caller %s: %w", @@ -164,18 +177,6 @@ func (p precompileFunToken) bankSend( ) } - // If the FunToken mapping was created from a bank coin, then the EVM account - // owns the ERC20 contract and was the original minter of the ERC20 tokens. - // Since we're sending them away and want accurate total supply tracking, the - // tokens need to be burned. - if funtoken.IsMadeFromCoin { - _, err = p.EvmKeeper.ERC20().Burn(erc20, evm.EVM_MODULE_ADDRESS, amount, ctx) - if err != nil { - err = fmt.Errorf("ERC20.Burn: %w", err) - return - } - } - // TODO: UD-DEBUG: feat: Emit EVM events // TODO: UD-DEBUG: feat: Emit ABCI events diff --git a/x/evm/precompile/funtoken_test.go b/x/evm/precompile/funtoken_test.go index a38cf8954..629487596 100644 --- a/x/evm/precompile/funtoken_test.go +++ b/x/evm/precompile/funtoken_test.go @@ -8,7 +8,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/suite" + "github.com/NibiruChain/nibiru/v2/eth" "github.com/NibiruChain/nibiru/v2/x/common/testutil" + "github.com/NibiruChain/nibiru/v2/x/common/testutil/testapp" "github.com/NibiruChain/nibiru/v2/x/evm" "github.com/NibiruChain/nibiru/v2/x/evm/embeds" "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" @@ -63,7 +65,7 @@ func (s *Suite) TestHappyPath() { "did not see precompile address during \"InitPrecompiles\"") s.T().Log("Create FunToken mapping and ERC20") - bankDenom := "ibc/usdc" + bankDenom := "unibi" funtoken := evmtest.CreateFunTokenForBankCoin(&deps, bankDenom, &s.Suite) contract := funtoken.Erc20Addr.ToAddr() @@ -71,6 +73,23 @@ func (s *Suite) TestHappyPath() { evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, deps.Sender.EthAddr, big.NewInt(0)) evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, evm.EVM_MODULE_ADDRESS, big.NewInt(0)) + s.Require().NoError(testapp.FundAccount( + deps.App.BankKeeper, + deps.Ctx, + deps.Sender.NibiruAddr, + sdk.NewCoins(sdk.NewCoin(bankDenom, sdk.NewInt(69_420))), + )) + + _, err := deps.EvmKeeper.ConvertCoinToEvm( + sdk.WrapSDKContext(deps.Ctx), + &evm.MsgConvertCoinToEvm{ + Sender: deps.Sender.NibiruAddr.String(), + BankCoin: sdk.NewCoin(bankDenom, sdk.NewInt(69_420)), + ToEthAddr: eth.NewHexAddr(deps.Sender.EthAddr), + }, + ) + s.Require().NoError(err) + s.T().Log("Mint tokens - Fail from non-owner") { input, err := embeds.SmartContract_ERC20Minter.ABI.Pack("mint", deps.Sender.EthAddr, big.NewInt(69_420)) @@ -81,33 +100,10 @@ func (s *Suite) TestHappyPath() { s.ErrorContains(err, "Ownable: caller is not the owner") } - s.T().Log("Mint tokens - Success") - { - input, err := embeds.SmartContract_ERC20Minter.ABI.Pack("mint", deps.Sender.EthAddr, big.NewInt(69_420)) - s.NoError(err) - - _, err = deps.EvmKeeper.CallContractWithInput( - deps.Ctx, evm.EVM_MODULE_ADDRESS, &contract, true, input, - ) - s.NoError(err) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, deps.Sender.EthAddr, big.NewInt(69_420)) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, evm.EVM_MODULE_ADDRESS, big.NewInt(0)) - } - - s.T().Log("Transfer - Success (sanity check)") randomAcc := testutil.AccAddress() - { - _, err := deps.EvmKeeper.ERC20().Transfer(contract, deps.Sender.EthAddr, evm.EVM_MODULE_ADDRESS, big.NewInt(1), deps.Ctx) - s.NoError(err) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, deps.Sender.EthAddr, big.NewInt(69_419)) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, evm.EVM_MODULE_ADDRESS, big.NewInt(1)) - s.Equal("0", - deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, funtoken.BankDenom).Amount.String(), - ) - } s.T().Log("Send using precompile") - amtToSend := int64(419) + amtToSend := int64(420) callArgs := []any{contract, big.NewInt(amtToSend), randomAcc.String()} input, err := embeds.SmartContract_FunToken.ABI.Pack(string(precompile.FunTokenMethod_BankSend), callArgs...) s.NoError(err) @@ -117,15 +113,9 @@ func (s *Suite) TestHappyPath() { ) s.Require().NoError(err) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, deps.Sender.EthAddr, big.NewInt(69_419-amtToSend)) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, evm.EVM_MODULE_ADDRESS, big.NewInt(1)) - s.Equal(fmt.Sprintf("%d", amtToSend), - deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, funtoken.BankDenom).Amount.String(), - ) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, deps.Sender.EthAddr, big.NewInt(69_000)) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, evm.EVM_MODULE_ADDRESS, big.NewInt(1)) - s.Equal("419", - deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, funtoken.BankDenom).Amount.String(), + evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, evm.EVM_MODULE_ADDRESS, big.NewInt(0)) + s.Equal(sdk.NewInt(420), + deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, funtoken.BankDenom).Amount, ) } diff --git a/x/evm/tx.pb.go b/x/evm/tx.pb.go index af5d865fb..19daadd03 100644 --- a/x/evm/tx.pb.go +++ b/x/evm/tx.pb.go @@ -546,8 +546,8 @@ func (m *MsgCreateFunTokenResponse) GetFuntokenMapping() FunToken { return FunToken{} } -// MsgSendFunTokenToEvm: Arguments to send a bank coin to ERC-20 representation -type MsgSendFunTokenToEvm struct { +// MsgConvertCoinToEvm: Arguments to send a bank coin to ERC-20 representation +type MsgConvertCoinToEvm struct { // Hexadecimal address of the ERC20 token to which the `FunToken` maps ToEthAddr github_com_NibiruChain_nibiru_v2_eth.HexAddr `protobuf:"bytes,1,opt,name=to_eth_addr,json=toEthAddr,proto3,customtype=github.com/NibiruChain/nibiru/v2/eth.HexAddr" json:"to_eth_addr"` // Sender: Address for the signer of the transaction. @@ -556,18 +556,18 @@ type MsgSendFunTokenToEvm struct { BankCoin types1.Coin `protobuf:"bytes,3,opt,name=bank_coin,json=bankCoin,proto3" json:"bank_coin" yaml:"bank_coin"` } -func (m *MsgSendFunTokenToEvm) Reset() { *m = MsgSendFunTokenToEvm{} } -func (m *MsgSendFunTokenToEvm) String() string { return proto.CompactTextString(m) } -func (*MsgSendFunTokenToEvm) ProtoMessage() {} -func (*MsgSendFunTokenToEvm) Descriptor() ([]byte, []int) { +func (m *MsgConvertCoinToEvm) Reset() { *m = MsgConvertCoinToEvm{} } +func (m *MsgConvertCoinToEvm) String() string { return proto.CompactTextString(m) } +func (*MsgConvertCoinToEvm) ProtoMessage() {} +func (*MsgConvertCoinToEvm) Descriptor() ([]byte, []int) { return fileDescriptor_82a0bfe4f0bab953, []int{10} } -func (m *MsgSendFunTokenToEvm) XXX_Unmarshal(b []byte) error { +func (m *MsgConvertCoinToEvm) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgSendFunTokenToEvm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgConvertCoinToEvm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgSendFunTokenToEvm.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgConvertCoinToEvm.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -577,47 +577,47 @@ func (m *MsgSendFunTokenToEvm) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (m *MsgSendFunTokenToEvm) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSendFunTokenToEvm.Merge(m, src) +func (m *MsgConvertCoinToEvm) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgConvertCoinToEvm.Merge(m, src) } -func (m *MsgSendFunTokenToEvm) XXX_Size() int { +func (m *MsgConvertCoinToEvm) XXX_Size() int { return m.Size() } -func (m *MsgSendFunTokenToEvm) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSendFunTokenToEvm.DiscardUnknown(m) +func (m *MsgConvertCoinToEvm) XXX_DiscardUnknown() { + xxx_messageInfo_MsgConvertCoinToEvm.DiscardUnknown(m) } -var xxx_messageInfo_MsgSendFunTokenToEvm proto.InternalMessageInfo +var xxx_messageInfo_MsgConvertCoinToEvm proto.InternalMessageInfo -func (m *MsgSendFunTokenToEvm) GetSender() string { +func (m *MsgConvertCoinToEvm) GetSender() string { if m != nil { return m.Sender } return "" } -func (m *MsgSendFunTokenToEvm) GetBankCoin() types1.Coin { +func (m *MsgConvertCoinToEvm) GetBankCoin() types1.Coin { if m != nil { return m.BankCoin } return types1.Coin{} } -type MsgSendFunTokenToEvmResponse struct { +type MsgConvertCoinToEvmResponse struct { } -func (m *MsgSendFunTokenToEvmResponse) Reset() { *m = MsgSendFunTokenToEvmResponse{} } -func (m *MsgSendFunTokenToEvmResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSendFunTokenToEvmResponse) ProtoMessage() {} -func (*MsgSendFunTokenToEvmResponse) Descriptor() ([]byte, []int) { +func (m *MsgConvertCoinToEvmResponse) Reset() { *m = MsgConvertCoinToEvmResponse{} } +func (m *MsgConvertCoinToEvmResponse) String() string { return proto.CompactTextString(m) } +func (*MsgConvertCoinToEvmResponse) ProtoMessage() {} +func (*MsgConvertCoinToEvmResponse) Descriptor() ([]byte, []int) { return fileDescriptor_82a0bfe4f0bab953, []int{11} } -func (m *MsgSendFunTokenToEvmResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgConvertCoinToEvmResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgSendFunTokenToEvmResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgConvertCoinToEvmResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgSendFunTokenToEvmResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgConvertCoinToEvmResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -627,17 +627,17 @@ func (m *MsgSendFunTokenToEvmResponse) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *MsgSendFunTokenToEvmResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSendFunTokenToEvmResponse.Merge(m, src) +func (m *MsgConvertCoinToEvmResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgConvertCoinToEvmResponse.Merge(m, src) } -func (m *MsgSendFunTokenToEvmResponse) XXX_Size() int { +func (m *MsgConvertCoinToEvmResponse) XXX_Size() int { return m.Size() } -func (m *MsgSendFunTokenToEvmResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSendFunTokenToEvmResponse.DiscardUnknown(m) +func (m *MsgConvertCoinToEvmResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgConvertCoinToEvmResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgSendFunTokenToEvmResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgConvertCoinToEvmResponse proto.InternalMessageInfo func init() { proto.RegisterType((*MsgEthereumTx)(nil), "eth.evm.v1.MsgEthereumTx") @@ -650,92 +650,92 @@ func init() { proto.RegisterType((*MsgUpdateParamsResponse)(nil), "eth.evm.v1.MsgUpdateParamsResponse") proto.RegisterType((*MsgCreateFunToken)(nil), "eth.evm.v1.MsgCreateFunToken") proto.RegisterType((*MsgCreateFunTokenResponse)(nil), "eth.evm.v1.MsgCreateFunTokenResponse") - proto.RegisterType((*MsgSendFunTokenToEvm)(nil), "eth.evm.v1.MsgSendFunTokenToEvm") - proto.RegisterType((*MsgSendFunTokenToEvmResponse)(nil), "eth.evm.v1.MsgSendFunTokenToEvmResponse") + proto.RegisterType((*MsgConvertCoinToEvm)(nil), "eth.evm.v1.MsgConvertCoinToEvm") + proto.RegisterType((*MsgConvertCoinToEvmResponse)(nil), "eth.evm.v1.MsgConvertCoinToEvmResponse") } func init() { proto.RegisterFile("eth/evm/v1/tx.proto", fileDescriptor_82a0bfe4f0bab953) } var fileDescriptor_82a0bfe4f0bab953 = []byte{ - // 1240 bytes of a gzipped FileDescriptorProto + // 1243 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xda, 0x8e, 0x3f, 0x9e, 0xdd, 0xa4, 0x5d, 0x52, 0x6a, 0x9b, 0xe2, 0x35, 0x5b, 0x51, - 0x59, 0x88, 0xec, 0x36, 0x06, 0x21, 0x35, 0x27, 0xe2, 0xc4, 0x85, 0xa2, 0x04, 0xa2, 0xad, 0xcb, - 0x81, 0x8b, 0x35, 0xde, 0x9d, 0xac, 0x57, 0xc9, 0xce, 0xac, 0x76, 0xc6, 0x2b, 0x87, 0x13, 0xea, - 0x09, 0x89, 0x03, 0x20, 0xee, 0x88, 0x23, 0xe2, 0xc4, 0x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0x63, 0xc2, 0x7c, 0x4a, 0xde, 0x0f, 0xe5, 0x38, 0x3e, 0x9a, + 0xb2, 0xe9, 0xac, 0xfb, 0x4a, 0x81, 0x0b, 0x53, 0xd3, 0xd7, 0xc6, 0x2c, 0xa4, 0x84, 0xc9, 0x12, + 0xe5, 0x00, 0x55, 0x92, 0xf9, 0x28, 0x67, 0xe6, 0x55, 0xc8, 0xed, 0x53, 0x8f, 0x69, 0x19, 0x59, + 0xde, 0xfc, 0x64, 0x79, 0x5b, 0xd4, 0xb3, 0xa5, 0x52, 0x5d, 0x80, 0x6c, 0x84, 0xb9, 0x24, 0xbd, + 0x62, 0x8b, 0xa5, 0x5a, 0x85, 0x62, 0x1c, 0x74, 0x70, 0x14, 0xd1, 0x28, 0x9d, 0x6d, 0x85, 0x38, + 0x68, 0x09, 0x51, 0xa8, 0x04, 0xdd, 0x7d, 0x86, 0xdd, 0x84, 0x38, 0xbb, 0xe0, 0x21, 0x76, 0x87, + 0x61, 0x37, 0x4d, 0xf0, 0x53, 0x05, 0xe6, 0xb7, 0x99, 0x77, 0x27, 0x74, 0x11, 0xc7, 0x3b, 0x28, + 0x42, 0x01, 0x13, 0x93, 0x01, 0xf5, 0x79, 0x8f, 0x46, 0x3e, 0x3f, 0x48, 0x3b, 0x58, 0xfb, 0xf1, + 0xde, 0xca, 0x62, 0xfa, 0x78, 0xad, 0xbb, 0x6e, 0x84, 0x19, 0xbb, 0xcd, 0x23, 0x9f, 0x78, 0xf6, + 0x91, 0xa9, 0x7a, 0x1d, 0xf2, 0xa1, 0x8c, 0x20, 0xbb, 0xb5, 0xdc, 0x50, 0x27, 0x0b, 0x48, 0x62, + 0x37, 0x73, 0x82, 0x1a, 0x3b, 0xb5, 0x5b, 0x9b, 0xbb, 0xfb, 0xc7, 0x77, 0xaf, 0x1e, 0x45, 0x30, + 0xaa, 0x70, 0xf1, 0x58, 0x32, 0x23, 0xbc, 0x8c, 0x6f, 0x14, 0x78, 0x61, 0x9b, 0x79, 0x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9, 0xfa, 0xdf, 0x01, 0x00, + 0x00, 0xff, 0xff, 0xd4, 0xfe, 0x63, 0x93, 0x72, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -759,10 +759,10 @@ type MsgClient interface { // address can be given to create the mapping to a bank coin, or the // denomination for a bank coin can be given to create the mapping to an ERC20. CreateFunToken(ctx context.Context, in *MsgCreateFunToken, opts ...grpc.CallOption) (*MsgCreateFunTokenResponse, error) - // SendFunTokenToEvm: Sends a coin with a valid "FunToken" mapping to the + // ConvertCoinToEvm: Sends a coin with a valid "FunToken" mapping to the // given recipient address ("to_eth_addr") in the corresponding ERC20 // representation. - SendFunTokenToEvm(ctx context.Context, in *MsgSendFunTokenToEvm, opts ...grpc.CallOption) (*MsgSendFunTokenToEvmResponse, error) + ConvertCoinToEvm(ctx context.Context, in *MsgConvertCoinToEvm, opts ...grpc.CallOption) (*MsgConvertCoinToEvmResponse, error) } type msgClient struct { @@ -800,9 +800,9 @@ func (c *msgClient) CreateFunToken(ctx context.Context, in *MsgCreateFunToken, o return out, nil } -func (c *msgClient) SendFunTokenToEvm(ctx context.Context, in *MsgSendFunTokenToEvm, opts ...grpc.CallOption) (*MsgSendFunTokenToEvmResponse, error) { - out := new(MsgSendFunTokenToEvmResponse) - err := c.cc.Invoke(ctx, "/eth.evm.v1.Msg/SendFunTokenToEvm", in, out, opts...) +func (c *msgClient) ConvertCoinToEvm(ctx context.Context, in *MsgConvertCoinToEvm, opts ...grpc.CallOption) (*MsgConvertCoinToEvmResponse, error) { + out := new(MsgConvertCoinToEvmResponse) + err := c.cc.Invoke(ctx, "/eth.evm.v1.Msg/ConvertCoinToEvm", in, out, opts...) if err != nil { return nil, err } @@ -820,10 +820,10 @@ type MsgServer interface { // address can be given to create the mapping to a bank coin, or the // denomination for a bank coin can be given to create the mapping to an ERC20. CreateFunToken(context.Context, *MsgCreateFunToken) (*MsgCreateFunTokenResponse, error) - // SendFunTokenToEvm: Sends a coin with a valid "FunToken" mapping to the + // ConvertCoinToEvm: Sends a coin with a valid "FunToken" mapping to the // given recipient address ("to_eth_addr") in the corresponding ERC20 // representation. - SendFunTokenToEvm(context.Context, *MsgSendFunTokenToEvm) (*MsgSendFunTokenToEvmResponse, error) + ConvertCoinToEvm(context.Context, *MsgConvertCoinToEvm) (*MsgConvertCoinToEvmResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -839,8 +839,8 @@ func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateP func (*UnimplementedMsgServer) CreateFunToken(ctx context.Context, req *MsgCreateFunToken) (*MsgCreateFunTokenResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateFunToken not implemented") } -func (*UnimplementedMsgServer) SendFunTokenToEvm(ctx context.Context, req *MsgSendFunTokenToEvm) (*MsgSendFunTokenToEvmResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SendFunTokenToEvm not implemented") +func (*UnimplementedMsgServer) ConvertCoinToEvm(ctx context.Context, req *MsgConvertCoinToEvm) (*MsgConvertCoinToEvmResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ConvertCoinToEvm not implemented") } func RegisterMsgServer(s grpc1.Server, srv MsgServer) { @@ -901,20 +901,20 @@ func _Msg_CreateFunToken_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -func _Msg_SendFunTokenToEvm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSendFunTokenToEvm) +func _Msg_ConvertCoinToEvm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgConvertCoinToEvm) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).SendFunTokenToEvm(ctx, in) + return srv.(MsgServer).ConvertCoinToEvm(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/eth.evm.v1.Msg/SendFunTokenToEvm", + FullMethod: "/eth.evm.v1.Msg/ConvertCoinToEvm", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SendFunTokenToEvm(ctx, req.(*MsgSendFunTokenToEvm)) + return srv.(MsgServer).ConvertCoinToEvm(ctx, req.(*MsgConvertCoinToEvm)) } return interceptor(ctx, in, info, handler) } @@ -936,8 +936,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_CreateFunToken_Handler, }, { - MethodName: "SendFunTokenToEvm", - Handler: _Msg_SendFunTokenToEvm_Handler, + MethodName: "ConvertCoinToEvm", + Handler: _Msg_ConvertCoinToEvm_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -1570,7 +1570,7 @@ func (m *MsgCreateFunTokenResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *MsgSendFunTokenToEvm) Marshal() (dAtA []byte, err error) { +func (m *MsgConvertCoinToEvm) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1580,12 +1580,12 @@ func (m *MsgSendFunTokenToEvm) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgSendFunTokenToEvm) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgConvertCoinToEvm) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgSendFunTokenToEvm) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgConvertCoinToEvm) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1620,7 +1620,7 @@ func (m *MsgSendFunTokenToEvm) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgSendFunTokenToEvmResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgConvertCoinToEvmResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1630,12 +1630,12 @@ func (m *MsgSendFunTokenToEvmResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgSendFunTokenToEvmResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgConvertCoinToEvmResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgSendFunTokenToEvmResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgConvertCoinToEvmResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1926,7 +1926,7 @@ func (m *MsgCreateFunTokenResponse) Size() (n int) { return n } -func (m *MsgSendFunTokenToEvm) Size() (n int) { +func (m *MsgConvertCoinToEvm) Size() (n int) { if m == nil { return 0 } @@ -1943,7 +1943,7 @@ func (m *MsgSendFunTokenToEvm) Size() (n int) { return n } -func (m *MsgSendFunTokenToEvmResponse) Size() (n int) { +func (m *MsgConvertCoinToEvmResponse) Size() (n int) { if m == nil { return 0 } @@ -3928,7 +3928,7 @@ func (m *MsgCreateFunTokenResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSendFunTokenToEvm) Unmarshal(dAtA []byte) error { +func (m *MsgConvertCoinToEvm) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3951,10 +3951,10 @@ func (m *MsgSendFunTokenToEvm) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSendFunTokenToEvm: wiretype end group for non-group") + return fmt.Errorf("proto: MsgConvertCoinToEvm: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSendFunTokenToEvm: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgConvertCoinToEvm: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4077,7 +4077,7 @@ func (m *MsgSendFunTokenToEvm) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSendFunTokenToEvmResponse) Unmarshal(dAtA []byte) error { +func (m *MsgConvertCoinToEvmResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4100,10 +4100,10 @@ func (m *MsgSendFunTokenToEvmResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSendFunTokenToEvmResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgConvertCoinToEvmResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSendFunTokenToEvmResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgConvertCoinToEvmResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: From ba151df2c5ec95397f1a8da0c31345bacc4781af Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Fri, 16 Aug 2024 07:32:46 -0700 Subject: [PATCH 7/8] refactor(evm)!: replace `HexAddr` with `EIP55Addr` (#2004) * add HexAddrSuite * remove ToBytes() * rename ToAddr() to Addr() * feat: add EIP55Addr * Update CHANGELOG.md --- CHANGELOG.md | 1 + eth/eip55.go | 88 +++++++ eth/eip55_test.go | 175 ++++++++++++++ eth/hex.go | 128 ----------- eth/hex_test.go | 281 ----------------------- proto/eth/evm/v1/evm.proto | 2 +- proto/eth/evm/v1/tx.proto | 4 +- x/evm/cli/tx.go | 9 +- x/evm/evm.go | 12 +- x/evm/evm.pb.go | 143 ++++++------ x/evm/evm_test.go | 56 ++--- x/evm/evmmodule/genesis_test.go | 6 +- x/evm/evmtest/eth_test.go | 6 +- x/evm/keeper/erc20_test.go | 2 +- x/evm/keeper/funtoken_from_coin.go | 4 +- x/evm/keeper/funtoken_from_coin_test.go | 26 ++- x/evm/keeper/funtoken_from_erc20.go | 8 +- x/evm/keeper/funtoken_from_erc20_test.go | 44 ++-- x/evm/keeper/funtoken_state.go | 2 +- x/evm/keeper/funtoken_state_test.go | 13 +- x/evm/keeper/grpc_query_test.go | 8 +- x/evm/keeper/msg_server.go | 23 +- x/evm/msg.go | 2 +- x/evm/precompile/funtoken_test.go | 10 +- x/evm/tx.pb.go | 162 ++++++------- 25 files changed, 545 insertions(+), 670 deletions(-) create mode 100644 eth/eip55.go create mode 100644 eth/eip55_test.go delete mode 100644 eth/hex.go delete mode 100644 eth/hex_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 704ac598a..f6c2f1877 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -106,6 +106,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#2000](https://github.com/NibiruChain/nibiru/pull/2000) - refactor(evm): simplify ERC-20 keeper methods - [#2001](https://github.com/NibiruChain/nibiru/pull/2001) - refactor(evm): simplify FunToken methods and tests - [#2003](https://github.com/NibiruChain/nibiru/pull/2003) - fix(evm): fix FunToken conversions between Cosmos and EVM +- [#2004](https://github.com/NibiruChain/nibiru/pull/2004) - refactor(evm)!: replace `HexAddr` with `EIP55Addr` #### Dapp modules: perp, spot, oracle, etc diff --git a/eth/eip55.go b/eth/eip55.go new file mode 100644 index 000000000..5a47664b9 --- /dev/null +++ b/eth/eip55.go @@ -0,0 +1,88 @@ +package eth + +import ( + "encoding/json" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + gethcommon "github.com/ethereum/go-ethereum/common" +) + +var _ sdk.CustomProtobufType = (*EIP55Addr)(nil) + +// EIP55Addr is a wrapper around gethcommon.Address that provides JSON marshaling +// and unmarshalling as well as Protobuf serialization and deserialization. +// The constructors ensure that the input string is a valid 20 byte hex address. +type EIP55Addr struct { + gethcommon.Address +} + +// Checks input length, but not case-sensitive hex. +func NewEIP55AddrFromStr(input string) (EIP55Addr, error) { + if !gethcommon.IsHexAddress(input) { + return EIP55Addr{}, fmt.Errorf( + "EIP55AddrError: input \"%s\" is not an ERC55-compliant, 20 byte hex address", + input, + ) + } + + addr := EIP55Addr{ + Address: gethcommon.HexToAddress(input), + } + + return addr, nil +} + +// Marshal implements the gogo proto custom type interface. +// Ref: https://github.com/cosmos/gogoproto/blob/v1.5.0/custom_types.md +func (h EIP55Addr) Marshal() ([]byte, error) { + return h.Bytes(), nil +} + +// MarshalJSON returns the [EIP55Addr] as JSON bytes. +// Implements the gogo proto custom type interface. +// Ref: https://github.com/cosmos/gogoproto/blob/v1.5.0/custom_types.md +func (h EIP55Addr) MarshalJSON() ([]byte, error) { + return json.Marshal(h.String()) +} + +// MarshalTo serializes a EIP55Addr directly into a pre-allocated byte slice ("data"). +// MarshalTo implements the gogo proto custom type interface. +// Implements the gogo proto custom type interface. +// Ref: https://github.com/cosmos/gogoproto/blob/v1.5.0/custom_types.md +func (h *EIP55Addr) MarshalTo(data []byte) (n int, err error) { + copy(data, h.Bytes()) + return h.Size(), nil +} + +// Unmarshal implements the gogo proto custom type interface. +// Ref: https://github.com/cosmos/gogoproto/blob/v1.5.0/custom_types.md +func (h *EIP55Addr) Unmarshal(data []byte) error { + addr := gethcommon.BytesToAddress(data) + *h = EIP55Addr{Address: addr} + return nil +} + +// UnmarshalJSON implements the gogo proto custom type interface. +// Ref: https://github.com/cosmos/gogoproto/blob/v1.5.0/custom_types.md +func (h *EIP55Addr) UnmarshalJSON(bz []byte) error { + text := new(string) + if err := json.Unmarshal(bz, text); err != nil { + return err + } + + addr, err := NewEIP55AddrFromStr(*text) + if err != nil { + return err + } + + *h = addr + + return nil +} + +// Size implements the gogo proto custom type interface. +// Ref: https://github.com/cosmos/gogoproto/blob/v1.5.0/custom_types.md +func (h EIP55Addr) Size() int { + return len(h.Bytes()) +} diff --git a/eth/eip55_test.go b/eth/eip55_test.go new file mode 100644 index 000000000..c0f1b9de4 --- /dev/null +++ b/eth/eip55_test.go @@ -0,0 +1,175 @@ +package eth_test + +import ( + "strconv" + "testing" + + gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/suite" + + "github.com/NibiruChain/nibiru/v2/eth" +) + +// MustNewEIP55AddrFromStr is the same as [NewEIP55AddrFromStr], except it panics +// when there's an error. +func MustNewEIP55AddrFromStr(input string) eth.EIP55Addr { + addr, err := eth.NewEIP55AddrFromStr(input) + if err != nil { + panic(err) + } + return addr +} + +var threeValidAddrs []eth.EIP55Addr = []eth.EIP55Addr{ + MustNewEIP55AddrFromStr("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed"), + MustNewEIP55AddrFromStr("0xAe967917c465db8578ca9024c205720b1a3651A9"), + MustNewEIP55AddrFromStr("0x1111111111111111111112222222222223333323"), +} + +func (s *EIP55AddrSuite) TestEquivalence() { + expectedGethAddr := gethcommon.HexToAddress("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed") + expectedEIP55Addr := MustNewEIP55AddrFromStr("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed") + + equivalentAddrs := []string{ + "0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed", + "0x5AAEB6053F3E94C9B9A09F33669435E7EF1BEAED", + "5aaeb6053f3e94c9b9a09f33669435e7ef1beaed", + "0X5AAEB6053F3E94C9B9A09F33669435E7EF1BEAED", + } + + for _, addr := range equivalentAddrs { + eip55Addr, err := eth.NewEIP55AddrFromStr(addr) + s.Require().NoError(err) + + s.Equal(expectedEIP55Addr, eip55Addr) + s.Equal(expectedGethAddr, eip55Addr.Address) + } +} + +// TestEIP55Addr_NewEIP55Addr: Test to showcase the flexibility of inputs that can be +// passed to `eth.NewEIP55AddrFromStr` and result in a "valid" `EIP55Addr` that preserves +// bijectivity with `gethcommon.Address` and has a canonical string +// representation. +// +// We only want to store valid `EIP55Addr` strings in state. Hex addresses that +// include or remove the prefix, or change the letters to and from lower and +// upper case will all produce the same `EIP55Addr` when passed to +// `eth.NewEIP55AddrFromStr`. +func (s *EIP55AddrSuite) TestNewEIP55Addr() { + // TestCase: An instance of a "EIP55Addr" that derives to the + // expected Ethereum address and results in the same string representation. + type TestCase struct { + input string + name string + wantErr bool + } + + want := "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed" + + for _, tc := range []TestCase{ + { + input: "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed", + name: "happy: no-op (sanity check to show constructor doesn't break a valid input)", + }, + { + input: "0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed", + name: "happy: lower case is valid", + }, + { + input: "0x5AAEB6053F3E94C9B9A09F33669435E7EF1BEAED", + name: "happy: upper case is valid", + }, + { + input: "5aaeb6053f3e94c9b9a09f33669435e7ef1beaed", + name: "happy: 0x prefix: missing", + }, + { + input: "0X5aaeb6053f3e94c9b9a09f33669435e7ef1beaed", + name: "happy: 0X prefix: typo", + }, + { + input: "nibi1zaa12312312aacbcbeabea123", + name: "sad: bech32 is not hex", + wantErr: true, + }, + } { + tc := tc + s.Run(tc.name, func() { + got, err := eth.NewEIP55AddrFromStr(tc.input) + if tc.wantErr { + s.Require().Error(err) + return + } + + // string input should give the canonical EIP55Addr + s.Equal(want, got.String()) + s.Equal(gethcommon.HexToAddress(tc.input), got.Address) + }) + } +} + +func (s *EIP55AddrSuite) TestProtobufEncoding() { + for tcIdx, tc := range []struct { + input eth.EIP55Addr + expectedJson string + wantErr string + }{ + { + input: threeValidAddrs[0], + expectedJson: "\"0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed\"", + }, + { + input: threeValidAddrs[1], + expectedJson: "\"0xAe967917c465db8578ca9024c205720b1a3651A9\"", + }, + { + input: threeValidAddrs[2], + expectedJson: "\"0x1111111111111111111112222222222223333323\"", + }, + } { + s.Run(strconv.Itoa(tcIdx), func() { + givenMut := tc.input + jsonBz, err := givenMut.MarshalJSON() + s.NoError(err) + s.Equal(tc.expectedJson, string(jsonBz)) + + eip55Addr := new(eth.EIP55Addr) + s.NoError(eip55Addr.UnmarshalJSON(jsonBz)) + s.Equal(givenMut, tc.input, + "Given -> MarshalJSON -> UnmarshalJSON returns a different value than the given when it should be an identity operation (no-op). test case #%d", tcIdx) + + bz, err := tc.input.Marshal() + s.NoError(err) + s.Equal(tc.input.Bytes(), bz, + "Marshaling to bytes gives different value than the test case specifies. test case #%d", tcIdx) + + err = eip55Addr.Unmarshal(bz) + s.NoError(err) + s.Equal(tc.input.Address, eip55Addr.Address, + "Given -> Marshal -> Unmarshal returns a different value than the given when it should be an identity operation (no-op). test case #%d", tcIdx) + + s.Equal(len(tc.input.Bytes()), tc.input.Size()) + }) + } +} + +// showcases how geth checks for valid hex addresses and treats invalid inputs +func (s *EIP55AddrSuite) TestIsEIP55Address() { + s.True(gethcommon.IsHexAddress("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed")) + s.True(gethcommon.IsHexAddress("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAED")) + s.False(gethcommon.IsHexAddress("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed1234")) + s.False(gethcommon.IsHexAddress("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1B")) + + s.Equal("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed", gethcommon.HexToAddress("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed").Hex()) + s.Equal("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed", gethcommon.HexToAddress("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAED").Hex()) + s.Equal("0xb6053f3e94c9B9a09f33669435e7eF1BEAEd1234", gethcommon.HexToAddress("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed1234").Hex()) + s.Equal("0x00005AaEb6053f3e94c9b9A09f33669435e7Ef1b", gethcommon.HexToAddress("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1B").Hex()) +} + +type EIP55AddrSuite struct { + suite.Suite +} + +func TestEIP55AddrSuite(t *testing.T) { + suite.Run(t, new(EIP55AddrSuite)) +} diff --git a/eth/hex.go b/eth/hex.go deleted file mode 100644 index 4f4017bc5..000000000 --- a/eth/hex.go +++ /dev/null @@ -1,128 +0,0 @@ -package eth - -import ( - "encoding/json" - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - gethcommon "github.com/ethereum/go-ethereum/common" -) - -/////////// HexAddr - -// HexAddr: An ERC55-compliant hexadecimal-encoded string representing the 20 -// byte address of an Ethereum account. -type HexAddr string - -var _ sdk.CustomProtobufType = (*HexAddr)(nil) - -func NewHexAddr(addr gethcommon.Address) HexAddr { - return HexAddr(addr.Hex()) -} - -func NewHexAddrFromStr(addr string) (HexAddr, error) { - hexAddr := HexAddr(gethcommon.HexToAddress(addr).Hex()) - if !gethcommon.IsHexAddress(addr) { - return hexAddr, fmt.Errorf( - "%s: input \"%s\" is not an ERC55-compliant, 20 byte hex address", - HexAddrError, addr, - ) - } - return hexAddr, hexAddr.Valid() -} - -// MustNewHexAddrFromStr is the same as [NewHexAddrFromStr], except it panics -// when there's an error. -func MustNewHexAddrFromStr(addr string) HexAddr { - hexAddr, err := NewHexAddrFromStr(addr) - if err != nil { - panic(err) - } - return hexAddr -} - -const HexAddrError = "HexAddrError" - -func (h HexAddr) Valid() error { - // Check address encoding bijectivity - wantAddr := h.ToAddr().Hex() // gethcommon.Address.Hex() - haveAddr := string(h) // should be equivalent to ↑ - - if !gethcommon.IsHexAddress(haveAddr) || haveAddr != wantAddr { - return fmt.Errorf( - "%s: Ethereum address is not represented as expected. We have encoding \"%s\" and instead need \"%s\" (gethcommon.Address.Hex)", - HexAddrError, haveAddr, wantAddr, - ) - } - - return nil -} - -func (h HexAddr) ToAddr() gethcommon.Address { - return gethcommon.HexToAddress(string(h)) -} - -// ToBytes gets the string representation of the underlying address. -func (h HexAddr) ToBytes() []byte { - return h.ToAddr().Bytes() -} - -func (h HexAddr) String() string { return h.ToAddr().Hex() } - -// Marshal implements the gogo proto custom type interface. -// Ref: https://github.com/cosmos/gogoproto/blob/v1.5.0/custom_types.md -func (h HexAddr) Marshal() ([]byte, error) { - return []byte(h), nil -} - -// MarshalJSON returns the [HexAddr] as JSON bytes. -// Implements the gogo proto custom type interface. -// Ref: https://github.com/cosmos/gogoproto/blob/v1.5.0/custom_types.md -func (h HexAddr) MarshalJSON() ([]byte, error) { - return []byte("\"" + h.String() + "\""), nil // a string is already JSON -} - -// MarshalTo serializes a pre-allocated byte slice ("data") directly into the -// [HexAddr] value, avoiding unnecessary memory allocations. -// MarshalTo implements the gogo proto custom type interface. -// Implements the gogo proto custom type interface. -// Ref: https://github.com/cosmos/gogoproto/blob/v1.5.0/custom_types.md -func (h *HexAddr) MarshalTo(data []byte) (n int, err error) { - bz := []byte(*h) - copy(data, bz) - hexAddr, err := NewHexAddrFromStr(string(bz)) - *h = hexAddr - return h.Size(), err -} - -// Unmarshal implements the gogo proto custom type interface. -// Ref: https://github.com/cosmos/gogoproto/blob/v1.5.0/custom_types.md -func (h *HexAddr) Unmarshal(data []byte) error { - hexAddr, err := NewHexAddrFromStr(string(data)) - *h = hexAddr - return err -} - -// UnmarshalJSON implements the gogo proto custom type interface. -// Ref: https://github.com/cosmos/gogoproto/blob/v1.5.0/custom_types.md -func (h *HexAddr) UnmarshalJSON(bz []byte) error { - text := new(string) - if err := json.Unmarshal(bz, text); err != nil { - return err - } - - hexAddr, err := NewHexAddrFromStr(*text) - if err != nil { - return err - } - - *h = hexAddr - - return nil -} - -// Size implements the gogo proto custom type interface. -// Ref: https://github.com/cosmos/gogoproto/blob/v1.5.0/custom_types.md -func (h HexAddr) Size() int { - return len(h) -} diff --git a/eth/hex_test.go b/eth/hex_test.go deleted file mode 100644 index 28694b6f9..000000000 --- a/eth/hex_test.go +++ /dev/null @@ -1,281 +0,0 @@ -package eth_test - -import ( - "fmt" - "strconv" - "strings" - - gethcommon "github.com/ethereum/go-ethereum/common" - - "github.com/NibiruChain/nibiru/v2/eth" - "github.com/NibiruChain/nibiru/v2/x/common/set" -) - -var threeValidAddrs []eth.HexAddr = []eth.HexAddr{ - eth.MustNewHexAddrFromStr("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed"), - eth.MustNewHexAddrFromStr("0xAe967917c465db8578ca9024c205720b1a3651A9"), - eth.MustNewHexAddrFromStr("0x1111111111111111111112222222222223333323"), -} - -func (s *Suite) TestHexAddr_UniqueMapping() { - type CorrectAnswer struct { - gethAddrOut gethcommon.Address - hexAddrOut eth.HexAddr - } - - for tcIdx, tc := range []struct { - equivSet set.Set[string] - }{ - { - equivSet: set.New( - "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed", - "0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed", - "0x5AAEB6053F3E94C9B9A09F33669435E7EF1BEAED", - "5aaeb6053f3e94c9b9a09f33669435e7ef1beaed", - "0X5AAEB6053F3E94C9B9A09F33669435E7EF1BEAED", - ), - }, - } { - s.Run(strconv.Itoa(tcIdx), func() { - s.T().Log("Show that each member of the set is equivalent") - var answer CorrectAnswer - for idx, equivHexAddrString := range tc.equivSet.ToSlice() { - gethAddrOut := gethcommon.HexToAddress(equivHexAddrString) - hexAddrOut, err := eth.NewHexAddrFromStr(equivHexAddrString) - s.NoError(err) - if idx == 0 { - answer = CorrectAnswer{ - gethAddrOut: gethAddrOut, - hexAddrOut: hexAddrOut, - } - continue - } - - s.Equal(answer.gethAddrOut, gethAddrOut) - s.Equal(answer.gethAddrOut, hexAddrOut.ToAddr()) - s.Equal(answer.hexAddrOut, hexAddrOut) - } - }) - } -} - -// TestHexAddr_NewHexAddr: Test to showcase the flexibility of inputs that can be -// passed to `eth.NewHexAddrFromStr` and result in a "valid" `HexAddr` that preserves -// bijectivity with `gethcommon.Address` and has a canonical string -// representation. -// -// We only want to store valid `HexAddr` strings in state. Hex addresses that -// include or remove the prefix, or change the letters to and from lower and -// upper case will all produce the same `HexAddr` when passed to -// `eth.NewHexAddrFromStr`. -func (s *Suite) TestHexAddr_NewHexAddr() { - // InputAddrVariation: An instance of a "hexAddr" that derives to the - // expected Ethereum address and results in the same string representation. - type InputAddrVariation struct { - hexAddr string - testCaseName string - wantNotEqual bool - } - - for _, tcGroup := range []struct { - want eth.HexAddr - hexAddrs []InputAddrVariation - }{ - { - want: threeValidAddrs[0], - hexAddrs: []InputAddrVariation{ - { - hexAddr: "0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed", - testCaseName: "happy: no-op (sanity check to show constructor doesn't break a valid input)", - }, - { - hexAddr: "0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed", - testCaseName: "happy: lower case is valid", - }, - { - hexAddr: "0x5AAEB6053F3E94C9B9A09F33669435E7EF1BEAED", - testCaseName: "happy: upper case is valid", - }, - { - hexAddr: "5aaeb6053f3e94c9b9a09f33669435e7ef1beaed", - testCaseName: "happy: 0x prefix: missing", - }, - { - hexAddr: "nibi1zaa12312312aacbcbeabea123", - testCaseName: "sad: bech32 is not hex", - wantNotEqual: true, - }, - }, - }, - { - want: threeValidAddrs[1], - hexAddrs: []InputAddrVariation{ - { - hexAddr: "0XAe967917c465db8578ca9024c205720b1a3651A9", - testCaseName: "happy: 0x prefix: typo", - }, - { - hexAddr: "0xae967917c465db8578ca9024c205720b1a3651A9", - testCaseName: "happy: mixed case checksum not valid according to ERC55", - }, - { - hexAddr: "not-a-hex-addr", - testCaseName: "sad: sanity check: clearly not a hex addr", - wantNotEqual: true, - }, - }, - }, - { - want: threeValidAddrs[2], - hexAddrs: []InputAddrVariation{ - { - hexAddr: "0x1111111111111111111112222222222223333323", - testCaseName: "happy", - }, - }, - }, - } { - want := tcGroup.want - for _, tc := range tcGroup.hexAddrs { - tcName := fmt.Sprintf("want %s, %s", want, tc.testCaseName) - s.Run(tcName, func() { - got, err := eth.NewHexAddrFromStr(tc.hexAddr) - - // gethcommon.Address input should give the same thing - got2 := eth.NewHexAddr(gethcommon.HexToAddress(tc.hexAddr)) - if tc.wantNotEqual { - s.NotEqual(want, got) - s.NotEqual(want.ToAddr(), got.ToAddr()) - s.NotEqual(want, got2) - s.NotEqual(want.ToAddr(), got2.ToAddr()) - s.Require().Error(err) - return - } else { - // string input should give the canonical HexAddr - s.Equal(want, got) - s.Equal(want.ToAddr(), got.ToAddr()) - - // gethcommon.Address input should give the same thing - got2 := eth.NewHexAddr(gethcommon.HexToAddress(tc.hexAddr)) - s.Equal(want, got2) - s.Equal(want.ToAddr(), got2.ToAddr()) - } - - s.Require().NoError(err) - }) - } - } -} - -// TestHexAddr_Valid: Test that demonstrates -func (s *Suite) TestHexAddr_Valid() { - for _, tc := range []struct { - name string - hexAddr string - wantErr string - }{ - { - name: "happy 0", - hexAddr: threeValidAddrs[0].String(), - }, - { - name: "happy 1", - hexAddr: threeValidAddrs[1].String(), - }, - { - name: "happy 2", - hexAddr: threeValidAddrs[2].String(), - }, - { - name: "0x prefix: missing", - hexAddr: "5aaeb6053f3e94c9b9a09f33669435e7ef1beaed", - wantErr: eth.HexAddrError, - }, - { - name: "0x prefix: typo", - hexAddr: "0XAe967917c465db8578ca9024c205720b1a3651A9", - wantErr: eth.HexAddrError, - }, - { - name: "mixed case checksum not valid according to ERC55", - hexAddr: "0xae967917c465db8578ca9024c205720b1a3651A9", - wantErr: eth.HexAddrError, - }, - { - name: "sad 1", - hexAddr: "0x5aaeb6053f3e94c9b9a09f33669435e7ef1beaed", - wantErr: eth.HexAddrError, - }, - } { - s.Run(tc.name, func() { - err := eth.HexAddr(tc.hexAddr).Valid() - if tc.wantErr != "" { - s.Require().ErrorContains(err, tc.wantErr) - return - } - s.Require().NoError(err) - }) - } -} - -func withQuotes(s string) string { return fmt.Sprintf("\"%s\"", s) } - -func withoutQuotes(s string) string { - return strings.TrimPrefix(strings.TrimSuffix(s, "\""), "\"") -} - -func (s *Suite) TestProtobufEncoding() { - for tcIdx, tc := range []struct { - given eth.HexAddr - json string - wantErr string - }{ - { - given: threeValidAddrs[0], - json: withQuotes(threeValidAddrs[0].String()), - }, - { - given: threeValidAddrs[1], - json: withQuotes(threeValidAddrs[1].String()), - }, - { - given: threeValidAddrs[2], - json: withQuotes(threeValidAddrs[2].String()), - }, - } { - s.Run(strconv.Itoa(tcIdx), func() { - givenMut := tc.given - jsonBz, err := givenMut.MarshalJSON() - s.NoError(err) - s.Equal(tc.json, string(jsonBz)) - - err = (&givenMut).UnmarshalJSON(jsonBz) - s.NoError(err) - s.Equal(givenMut, tc.given, - "Given -> MarshalJSON -> UnmarshalJSON returns a different value than the given when it should be an identity operation (no-op). test case #%d", tcIdx) - - bz, err := tc.given.Marshal() - s.NoError(err) - jsonBzWithoutQuotes := withoutQuotes(tc.json) - s.Equal(jsonBzWithoutQuotes, string(bz), - "Marshaling to bytes gives different value than the test case specifies. test case #%d", tcIdx) - - err = (&givenMut).Unmarshal(bz) - s.NoError(err) - s.Equal(tc.given, givenMut, - "Given -> Marshal -> Unmarshal returns a different value than the given when it should be an identity operation (no-op). test case #%d", tcIdx) - - s.Equal(len(tc.given), tc.given.Size()) - s.Equal(len(tc.json), tc.given.Size()+2) - }) - } -} - -func (s *Suite) TestHexAddrToString() { - hexAddr := eth.HexAddr("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed") - s.Equal("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed", hexAddr.String()) - s.Equal("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed", string(hexAddr)) - - ethAddr := gethcommon.HexToAddress("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed") - s.Equal("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed", ethAddr.String()) -} diff --git a/proto/eth/evm/v1/evm.proto b/proto/eth/evm/v1/evm.proto index 9bc560a52..ce50798a7 100644 --- a/proto/eth/evm/v1/evm.proto +++ b/proto/eth/evm/v1/evm.proto @@ -13,7 +13,7 @@ option go_package = "github.com/NibiruChain/nibiru/v2/x/evm"; message FunToken { // Hexadecimal address of the ERC20 token to which the `FunToken` maps string erc20_addr = 1 [ - (gogoproto.customtype) = "github.com/NibiruChain/nibiru/v2/eth.HexAddr", + (gogoproto.customtype) = "github.com/NibiruChain/nibiru/v2/eth.EIP55Addr", (gogoproto.nullable) = false ]; diff --git a/proto/eth/evm/v1/tx.proto b/proto/eth/evm/v1/tx.proto index 583a6c598..e97a81e5c 100644 --- a/proto/eth/evm/v1/tx.proto +++ b/proto/eth/evm/v1/tx.proto @@ -194,7 +194,7 @@ message MsgUpdateParamsResponse {} message MsgCreateFunToken { // Hexadecimal address of the ERC20 token to which the `FunToken` maps string from_erc20 = 1 [ - (gogoproto.customtype) = "github.com/NibiruChain/nibiru/v2/eth.HexAddr", + (gogoproto.customtype) = "github.com/NibiruChain/nibiru/v2/eth.EIP55Addr", (gogoproto.nullable) = true ]; @@ -214,7 +214,7 @@ message MsgCreateFunTokenResponse { message MsgConvertCoinToEvm { // Hexadecimal address of the ERC20 token to which the `FunToken` maps string to_eth_addr = 1 [ - (gogoproto.customtype) = "github.com/NibiruChain/nibiru/v2/eth.HexAddr", + (gogoproto.customtype) = "github.com/NibiruChain/nibiru/v2/eth.EIP55Addr", (gogoproto.nullable) = false ]; diff --git a/x/evm/cli/tx.go b/x/evm/cli/tx.go index 9ee6ad88a..c8a625a21 100644 --- a/x/evm/cli/tx.go +++ b/x/evm/cli/tx.go @@ -84,7 +84,7 @@ func CmdCreateFunTokenFromERC20() *cobra.Command { txFactory = txFactory. WithTxConfig(clientCtx.TxConfig). WithAccountRetriever(clientCtx.AccountRetriever) - erc20Addr, err := eth.NewHexAddrFromStr(args[0]) + erc20Addr, err := eth.NewEIP55AddrFromStr(args[0]) if err != nil { return err } @@ -118,6 +118,11 @@ func ConvertCoinToEvm() *cobra.Command { WithTxConfig(clientCtx.TxConfig). WithAccountRetriever(clientCtx.AccountRetriever) + eip55Addr, err := eth.NewEIP55AddrFromStr(args[0]) + if err != nil { + return err + } + coin, err := sdk.ParseCoinNormalized(args[1]) if err != nil { return err @@ -125,7 +130,7 @@ func ConvertCoinToEvm() *cobra.Command { msg := &evm.MsgConvertCoinToEvm{ Sender: clientCtx.GetFromAddress().String(), BankCoin: coin, - ToEthAddr: eth.MustNewHexAddrFromStr(args[0]), + ToEthAddr: eip55Addr, } return tx.GenerateOrBroadcastTxWithFactory(clientCtx, txFactory, msg) }, diff --git a/x/evm/evm.go b/x/evm/evm.go index b991acaa1..d0e368aad 100644 --- a/x/evm/evm.go +++ b/x/evm/evm.go @@ -15,10 +15,10 @@ import ( // tokens that are valid ERC20s with the same address. // https://github.com/NibiruChain/nibiru/issues/1933 func (fun FunToken) ID() []byte { - return NewFunTokenID(fun.Erc20Addr, fun.BankDenom) + return NewFunTokenID(fun.Erc20Addr.Address, fun.BankDenom) } -func NewFunTokenID(erc20 eth.HexAddr, bankDenom string) []byte { +func NewFunTokenID(erc20 gethcommon.Address, bankDenom string) []byte { return tmhash.Sum([]byte(erc20.String() + "|" + bankDenom)) } @@ -31,10 +31,6 @@ func (fun FunToken) Validate() error { return funTokenValidationError(err) } - if err := fun.Erc20Addr.Valid(); err != nil { - return funTokenValidationError(err) - } - return nil } @@ -45,7 +41,9 @@ func NewFunToken( erc20 gethcommon.Address, bankDenom string, isMadeFromCoin bool, ) FunToken { return FunToken{ - Erc20Addr: eth.NewHexAddr(erc20), + Erc20Addr: eth.EIP55Addr{ + Address: erc20, + }, BankDenom: bankDenom, IsMadeFromCoin: isMadeFromCoin, } diff --git a/x/evm/evm.pb.go b/x/evm/evm.pb.go index 2136ccecb..c8e6bebf3 100644 --- a/x/evm/evm.pb.go +++ b/x/evm/evm.pb.go @@ -31,7 +31,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // "Coin" type in Golang. type FunToken struct { // Hexadecimal address of the ERC20 token to which the `FunToken` maps - Erc20Addr github_com_NibiruChain_nibiru_v2_eth.HexAddr `protobuf:"bytes,1,opt,name=erc20_addr,json=erc20Addr,proto3,customtype=github.com/NibiruChain/nibiru/v2/eth.HexAddr" json:"erc20_addr"` + Erc20Addr github_com_NibiruChain_nibiru_v2_eth.EIP55Addr `protobuf:"bytes,1,opt,name=erc20_addr,json=erc20Addr,proto3,customtype=github.com/NibiruChain/nibiru/v2/eth.EIP55Addr" json:"erc20_addr"` // bank_denom: Coin denomination in the Bank Module. BankDenom string `protobuf:"bytes,2,opt,name=bank_denom,json=bankDenom,proto3" json:"bank_denom,omitempty"` // True if the `FunToken` mapping was created from an existing bank coin and @@ -637,77 +637,78 @@ func init() { func init() { proto.RegisterFile("eth/evm/v1/evm.proto", fileDescriptor_98abbdadb327b7d0) } var fileDescriptor_98abbdadb327b7d0 = []byte{ - // 1120 bytes of a gzipped FileDescriptorProto + // 1123 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x55, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0xb6, 0x2c, 0xca, 0xa6, 0x56, 0x4a, 0xc4, 0xac, 0x9d, 0x94, 0x4d, 0x10, 0x53, 0x60, 0x81, - 0x42, 0x05, 0x02, 0xa9, 0x51, 0xdb, 0x4b, 0x0a, 0x14, 0xb5, 0x1c, 0x1b, 0x89, 0x6a, 0x07, 0xc1, - 0x46, 0xe9, 0xa1, 0x17, 0x62, 0x45, 0x8e, 0x29, 0x56, 0x24, 0xd7, 0xe0, 0x2e, 0x55, 0xfa, 0x01, - 0x0a, 0xf4, 0xd8, 0x47, 0xc8, 0xb5, 0x6f, 0x12, 0xf4, 0x14, 0xa0, 0x97, 0xa2, 0x07, 0xa2, 0x70, - 0x2e, 0xad, 0x8e, 0x7e, 0x82, 0x62, 0x77, 0x29, 0xcb, 0x49, 0x81, 0xf6, 0xc4, 0xf9, 0xbe, 0xd9, - 0xf9, 0xe1, 0xcc, 0xb7, 0x24, 0xda, 0x05, 0x31, 0x1b, 0xc0, 0x22, 0x19, 0x2c, 0x1e, 0xca, 0x47, - 0xff, 0x2c, 0x63, 0x82, 0x61, 0x04, 0x62, 0xd6, 0x97, 0x70, 0xf1, 0xf0, 0xee, 0x6e, 0xc8, 0x42, - 0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f, 0x46, 0x6f, 0xdf, 0x52, 0xa2, 0x56, 0xf5, 0xb5, 0x57, 0xaf, 0x84, 0x58, + 0x1a, 0x8d, 0x38, 0x4b, 0x35, 0x33, 0x32, 0x4c, 0xc3, 0xaa, 0xe9, 0xaf, 0xde, 0xc8, 0x30, 0x91, + 0xd5, 0xb8, 0x1a, 0x44, 0xf9, 0x2e, 0x64, 0x67, 0x85, 0xaf, 0x35, 0x39, 0xfc, 0xea, 0xcd, 0x45, + 0xbb, 0xf2, 0xf6, 0xa2, 0x5d, 0xf9, 0xf3, 0xa2, 0x5d, 0xf9, 0xf9, 0x5d, 0x7b, 0xe3, 0xed, 0xbb, + 0xf6, 0xc6, 0xef, 0xef, 0xda, 0x1b, 0xdf, 0x7d, 0xfc, 0xbf, 0x7f, 0xc5, 0x85, 0xfc, 0x1d, 0x4f, + 0xb6, 0xd4, 0xdf, 0xf6, 0xb3, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa2, 0xa8, 0xe3, 0xf2, 0xa7, + 0x07, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { diff --git a/x/evm/evm_test.go b/x/evm/evm_test.go index 4d653cdd2..d6eb1f5f1 100644 --- a/x/evm/evm_test.go +++ b/x/evm/evm_test.go @@ -26,59 +26,53 @@ func TestSuite_RunAll(t *testing.T) { } func (s *TestSuite) TestFunToken() { - for testIdx, tc := range []struct { + for idx, tc := range []struct { bankDenom string - erc20Addr eth.HexAddr - wantErr string + input string + wantErr bool }{ { // sad: Invalid bank denom bankDenom: "", - erc20Addr: eth.HexAddr(""), - wantErr: "FunTokenError", + input: "5aaeb6053f3e94c9b9a09f33669435e7ef1beaed", + wantErr: true, }, { bankDenom: "unibi", - erc20Addr: eth.MustNewHexAddrFromStr("5aaeb6053f3e94c9b9a09f33669435e7ef1beaed"), - wantErr: "", + input: "5aaeb6053f3e94c9b9a09f33669435e7ef1beaed", }, { bankDenom: "unibi", - erc20Addr: eth.MustNewHexAddrFromStr("5AAEB6053F3E94C9B9A09F33669435E7EF1BEAED"), - wantErr: "", + input: "5AAEB6053F3E94C9B9A09F33669435E7EF1BEAED", }, { - // NOTE: notice how this one errors using the same happy path - // input as above because an unsafe constructor was used. - // Naked type overrides should not be used with eth.HexAddr. - // Always use NewHexAddr, NewHexAddrFromStr, or MustNewHexAddr... bankDenom: "unibi", - erc20Addr: eth.HexAddr("5aaeb6053f3e94c9b9a09f33669435e7ef1beaed"), - wantErr: "not encoded as expected", + input: "5aaeb6053f3e94c9b9a09f33669435e7ef1beaed", }, { bankDenom: "ibc/AAA/BBB", - erc20Addr: eth.MustNewHexAddrFromStr("0xE1aA1500b962528cBB42F05bD6d8A6032a85602f"), - wantErr: "", + input: "0xE1aA1500b962528cBB42F05bD6d8A6032a85602f", }, { bankDenom: "tf/contract-addr/subdenom", - erc20Addr: eth.MustNewHexAddrFromStr("0x6B2e60f1030aFa69F584829f1d700b47eE5Fc74a"), - wantErr: "", + input: "0x6B2e60f1030aFa69F584829f1d700b47eE5Fc74a", }, } { - s.Run(strconv.Itoa(testIdx), func() { + s.Run(strconv.Itoa(idx), func() { + eip55Addr, err := eth.NewEIP55AddrFromStr(tc.input) + s.Require().NoError(err) + funtoken := evm.FunToken{ - Erc20Addr: tc.erc20Addr, + Erc20Addr: eip55Addr, BankDenom: tc.bankDenom, } - err := funtoken.Validate() - if tc.wantErr != "" { - s.Require().Error(err, "funtoken %s", funtoken) + if tc.wantErr { + s.Require().Error(funtoken.Validate()) return } - s.Require().NoError(err) + + s.Require().NoError(funtoken.Validate()) }) } @@ -109,10 +103,16 @@ func (s *TestSuite) TestFunToken() { }, } { s.Run(tc.name, func() { - funA := evm.FunToken{Erc20Addr: eth.HexAddr(tc.A)} - funB := evm.FunToken{Erc20Addr: eth.HexAddr(tc.B)} + addrA, err := eth.NewEIP55AddrFromStr(tc.A) + s.Require().NoError(err) + + addrB, err := eth.NewEIP55AddrFromStr(tc.B) + s.Require().NoError(err) + + funA := evm.FunToken{Erc20Addr: addrA} + funB := evm.FunToken{Erc20Addr: addrB} - s.EqualValues(funA.Erc20Addr.ToAddr(), funB.Erc20Addr.ToAddr()) + s.EqualValues(funA.Erc20Addr.Address, funB.Erc20Addr.Address) }) } } diff --git a/x/evm/evmmodule/genesis_test.go b/x/evm/evmmodule/genesis_test.go index bc6a3d081..690745e84 100644 --- a/x/evm/evmmodule/genesis_test.go +++ b/x/evm/evmmodule/genesis_test.go @@ -64,7 +64,7 @@ func (s *Suite) TestExportInitGenesis() { // Create fungible token from bank coin funToken := evmtest.CreateFunTokenForBankCoin(&deps, "unibi", &s.Suite) s.Require().NoError(err) - funTokenAddr := funToken.Erc20Addr.ToAddr() + funTokenAddr := funToken.Erc20Addr.Address // Fund sender's wallet spendableCoins := sdk.NewCoins(sdk.NewInt64Coin("unibi", totalSupply.Int64())) @@ -75,13 +75,15 @@ func (s *Suite) TestExportInitGenesis() { ) s.Require().NoError(err) + eip55Addr, err := eth.NewEIP55AddrFromStr(toUserC.String()) + s.Require().NoError(err) // Send fungible token coins from bank to evm _, err = deps.EvmKeeper.ConvertCoinToEvm( deps.Ctx, &evm.MsgConvertCoinToEvm{ Sender: deps.Sender.NibiruAddr.String(), BankCoin: sdk.Coin{Denom: "unibi", Amount: math.NewInt(amountToSendC.Int64())}, - ToEthAddr: eth.MustNewHexAddrFromStr(toUserC.String()), + ToEthAddr: eip55Addr, }, ) s.Require().NoError(err) diff --git a/x/evm/evmtest/eth_test.go b/x/evm/evmtest/eth_test.go index 60e2087ee..612beb05d 100644 --- a/x/evm/evmtest/eth_test.go +++ b/x/evm/evmtest/eth_test.go @@ -35,13 +35,11 @@ func (s *Suite) TestSampleFns() { func (s *Suite) TestERC20Helpers() { deps := evmtest.NewTestDeps() - bankDenom := "token" - funtoken := evmtest.CreateFunTokenForBankCoin(&deps, bankDenom, &s.Suite) - erc20Contract := funtoken.Erc20Addr.ToAddr() + funtoken := evmtest.CreateFunTokenForBankCoin(&deps, "token", &s.Suite) evmtest.AssertERC20BalanceEqual( s.T(), deps, - erc20Contract, + funtoken.Erc20Addr.Address, deps.Sender.EthAddr, big.NewInt(0), ) diff --git a/x/evm/keeper/erc20_test.go b/x/evm/keeper/erc20_test.go index 58d001eb5..d328ea4e6 100644 --- a/x/evm/keeper/erc20_test.go +++ b/x/evm/keeper/erc20_test.go @@ -12,7 +12,7 @@ func (s *Suite) TestERC20Calls() { deps := evmtest.NewTestDeps() bankDenom := "ibc/btc" funtoken := evmtest.CreateFunTokenForBankCoin(&deps, bankDenom, &s.Suite) - contract := funtoken.Erc20Addr.ToAddr() + contract := funtoken.Erc20Addr.Address s.T().Log("Mint tokens - Fail from non-owner") { diff --git a/x/evm/keeper/funtoken_from_coin.go b/x/evm/keeper/funtoken_from_coin.go index 30592a747..82d7017f6 100644 --- a/x/evm/keeper/funtoken_from_coin.go +++ b/x/evm/keeper/funtoken_from_coin.go @@ -41,7 +41,9 @@ func (k *Keeper) createFunTokenFromCoin( // 5 | Officially create the funtoken mapping funtoken = &evm.FunToken{ - Erc20Addr: eth.NewHexAddr(erc20Addr), + Erc20Addr: eth.EIP55Addr{ + Address: erc20Addr, + }, BankDenom: bankDenom, IsMadeFromCoin: true, } diff --git a/x/evm/keeper/funtoken_from_coin_test.go b/x/evm/keeper/funtoken_from_coin_test.go index 4ae2355a4..cb9b87ffb 100644 --- a/x/evm/keeper/funtoken_from_coin_test.go +++ b/x/evm/keeper/funtoken_from_coin_test.go @@ -109,7 +109,7 @@ func (s *FunTokenFromCoinSuite) TestCreateFunTokenFromCoin() { s.Require().NoError(err) s.T().Log("Expect ERC20 metadata on contract") - info, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, erc20Addr.ToAddr()) + info, err := deps.EvmKeeper.FindERC20Metadata(deps.Ctx, erc20Addr.Address) s.Require().NoError(err, info) s.Equal( keeper.ERC20Metadata{ @@ -210,9 +210,11 @@ func (s *FunTokenFromCoinSuite) TestConvertCoinToEvmAndBack() { _, err = deps.EvmKeeper.ConvertCoinToEvm( sdk.WrapSDKContext(deps.Ctx), &evm.MsgConvertCoinToEvm{ - Sender: deps.Sender.NibiruAddr.String(), - BankCoin: sdk.NewCoin(bankDenom, sdk.NewInt(10)), - ToEthAddr: eth.NewHexAddr(alice.EthAddr), + Sender: deps.Sender.NibiruAddr.String(), + BankCoin: sdk.NewCoin(bankDenom, sdk.NewInt(10)), + ToEthAddr: eth.EIP55Addr{ + Address: alice.EthAddr, + }, }, ) s.Require().NoError(err) @@ -238,7 +240,7 @@ func (s *FunTokenFromCoinSuite) TestConvertCoinToEvmAndBack() { s.Require().Equal(sdk.NewInt(90), senderBalance.Amount) // Check 3: erc-20 balance - balance, err := deps.EvmKeeper.ERC20().BalanceOf(funTokenErc20Addr.ToAddr(), alice.EthAddr, deps.Ctx) + balance, err := deps.EvmKeeper.ERC20().BalanceOf(funTokenErc20Addr.Address, alice.EthAddr, deps.Ctx) s.Require().NoError(err) s.Require().Zero(balance.Cmp(big.NewInt(10))) @@ -246,9 +248,11 @@ func (s *FunTokenFromCoinSuite) TestConvertCoinToEvmAndBack() { _, err = deps.EvmKeeper.ConvertCoinToEvm( sdk.WrapSDKContext(deps.Ctx), &evm.MsgConvertCoinToEvm{ - Sender: deps.Sender.NibiruAddr.String(), - BankCoin: sdk.NewCoin(bankDenom, sdk.NewInt(100)), - ToEthAddr: eth.NewHexAddr(alice.EthAddr), + Sender: deps.Sender.NibiruAddr.String(), + BankCoin: sdk.NewCoin(bankDenom, sdk.NewInt(100)), + ToEthAddr: eth.EIP55Addr{ + Address: alice.EthAddr, + }, }, ) s.Require().ErrorContains(err, "insufficient funds") @@ -261,7 +265,7 @@ func (s *FunTokenFromCoinSuite) TestConvertCoinToEvmAndBack() { &precompile.PrecompileAddr_FunToken, true, "bankSend", - funTokenErc20Addr.ToAddr(), + funTokenErc20Addr.Address, big.NewInt(10), deps.Sender.NibiruAddr.String(), ) @@ -276,7 +280,7 @@ func (s *FunTokenFromCoinSuite) TestConvertCoinToEvmAndBack() { s.Require().Equal(sdk.NewInt(100), senderBalance.Amount) // Check 3: erc-20 balance - balance, err = deps.EvmKeeper.ERC20().BalanceOf(funTokenErc20Addr.ToAddr(), alice.EthAddr, deps.Ctx) + balance, err = deps.EvmKeeper.ERC20().BalanceOf(funTokenErc20Addr.Address, alice.EthAddr, deps.Ctx) s.Require().NoError(err) s.Require().Zero(balance.Cmp(big.NewInt(0))) @@ -288,7 +292,7 @@ func (s *FunTokenFromCoinSuite) TestConvertCoinToEvmAndBack() { &precompile.PrecompileAddr_FunToken, true, "bankSend", - funTokenErc20Addr.ToAddr(), + funTokenErc20Addr.Address, big.NewInt(10), deps.Sender.NibiruAddr.String(), ) diff --git a/x/evm/keeper/funtoken_from_erc20.go b/x/evm/keeper/funtoken_from_erc20.go index 1da6d411a..ab7186aa3 100644 --- a/x/evm/keeper/funtoken_from_erc20.go +++ b/x/evm/keeper/funtoken_from_erc20.go @@ -139,14 +139,14 @@ func (k *Keeper) createFunTokenFromERC20( // 5 | Officially create the funtoken mapping funtoken = &evm.FunToken{ - Erc20Addr: eth.NewHexAddr(erc20), + Erc20Addr: eth.EIP55Addr{ + Address: erc20, + }, BankDenom: bankDenom, IsMadeFromCoin: false, } return funtoken, k.FunTokens.SafeInsert( - ctx, funtoken.Erc20Addr.ToAddr(), - funtoken.BankDenom, - funtoken.IsMadeFromCoin, + ctx, erc20, bankDenom, false, ) } diff --git a/x/evm/keeper/funtoken_from_erc20_test.go b/x/evm/keeper/funtoken_from_erc20_test.go index 13af650da..e09d4e748 100644 --- a/x/evm/keeper/funtoken_from_erc20_test.go +++ b/x/evm/keeper/funtoken_from_erc20_test.go @@ -50,7 +50,9 @@ func (s *FunTokenFromErc20Suite) TestCreateFunTokenFromERC20() { }) s.Require().NoError(err) - erc20Addr := eth.NewHexAddr(deployResp.ContractAddr) + erc20Addr := eth.EIP55Addr{ + Address: deployResp.ContractAddr, + } s.T().Log("sad: insufficient funds to create FunToken mapping") _, err = deps.EvmKeeper.CreateFunToken( @@ -155,7 +157,6 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToCosmos() { metadata.Name, metadata.Symbol, metadata.Decimals, ) s.Require().NoError(err) - erc20Addr := eth.NewHexAddr(deployResp.ContractAddr) s.T().Log("CreateFunToken for the ERC20") s.Require().NoError(testapp.FundAccount( @@ -168,20 +169,21 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToCosmos() { resp, err := deps.EvmKeeper.CreateFunToken( sdk.WrapSDKContext(deps.Ctx), &evm.MsgCreateFunToken{ - FromErc20: &erc20Addr, - Sender: deps.Sender.NibiruAddr.String(), + FromErc20: ð.EIP55Addr{ + Address: deployResp.ContractAddr, + }, + Sender: deps.Sender.NibiruAddr.String(), }, ) - s.Require().NoError(err, "erc20 %s", erc20Addr) + s.Require().NoError(err, "erc20 %s", deployResp.ContractAddr) bankDemon := resp.FuntokenMapping.BankDenom s.T().Logf("mint erc20 tokens to %s", deps.Sender.EthAddr.String()) - erc20 := erc20Addr.ToAddr() _, err = deps.EvmKeeper.CallContract( deps.Ctx, embeds.SmartContract_ERC20Minter.ABI, deps.Sender.EthAddr, - &erc20, + &deployResp.ContractAddr, true, "mint", deps.Sender.EthAddr, @@ -199,15 +201,15 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToCosmos() { &precompile.PrecompileAddr_FunToken, true, "bankSend", - erc20Addr.ToAddr(), + deployResp.ContractAddr, big.NewInt(1), randomAcc.String(), ) s.Require().NoError(err) s.T().Log("check balances") - evmtest.AssertERC20BalanceEqual(s.T(), deps, erc20, deps.Sender.EthAddr, big.NewInt(69_419)) - evmtest.AssertERC20BalanceEqual(s.T(), deps, erc20, evm.EVM_MODULE_ADDRESS, big.NewInt(1)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, deployResp.ContractAddr, deps.Sender.EthAddr, big.NewInt(69_419)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, deployResp.ContractAddr, evm.EVM_MODULE_ADDRESS, big.NewInt(1)) s.Require().Equal(sdk.NewInt(1), deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, bankDemon).Amount, ) @@ -220,7 +222,7 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToCosmos() { &precompile.PrecompileAddr_FunToken, true, "bankSend", - erc20Addr.ToAddr(), + deployResp.ContractAddr, big.NewInt(70_000), randomAcc.String(), ) @@ -229,16 +231,18 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToCosmos() { s.T().Log("send cosmos tokens back to erc20") _, err = deps.EvmKeeper.ConvertCoinToEvm(sdk.WrapSDKContext(deps.Ctx), &evm.MsgConvertCoinToEvm{ - ToEthAddr: eth.NewHexAddr(deps.Sender.EthAddr), - Sender: randomAcc.String(), - BankCoin: sdk.NewCoin(bankDemon, sdk.NewInt(1)), + ToEthAddr: eth.EIP55Addr{ + Address: deps.Sender.EthAddr, + }, + Sender: randomAcc.String(), + BankCoin: sdk.NewCoin(bankDemon, sdk.NewInt(1)), }, ) s.Require().NoError(err) s.T().Log("check balances") - evmtest.AssertERC20BalanceEqual(s.T(), deps, erc20, deps.Sender.EthAddr, big.NewInt(69_420)) - evmtest.AssertERC20BalanceEqual(s.T(), deps, erc20, evm.EVM_MODULE_ADDRESS, big.NewInt(0)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, deployResp.ContractAddr, deps.Sender.EthAddr, big.NewInt(69_420)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, deployResp.ContractAddr, evm.EVM_MODULE_ADDRESS, big.NewInt(0)) s.Require().True( deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, bankDemon).Amount.Equal(sdk.NewInt(0)), ) @@ -246,9 +250,11 @@ func (s *FunTokenFromErc20Suite) TestSendFromEvmToCosmos() { s.T().Log("sad: send too many cosmos tokens back to erc20") _, err = deps.EvmKeeper.ConvertCoinToEvm(sdk.WrapSDKContext(deps.Ctx), &evm.MsgConvertCoinToEvm{ - ToEthAddr: eth.NewHexAddr(deps.Sender.EthAddr), - Sender: randomAcc.String(), - BankCoin: sdk.NewCoin(bankDemon, sdk.NewInt(1)), + ToEthAddr: eth.EIP55Addr{ + Address: deps.Sender.EthAddr, + }, + Sender: randomAcc.String(), + BankCoin: sdk.NewCoin(bankDemon, sdk.NewInt(1)), }, ) s.Require().Error(err) diff --git a/x/evm/keeper/funtoken_state.go b/x/evm/keeper/funtoken_state.go index a1966148c..c8f36fa07 100644 --- a/x/evm/keeper/funtoken_state.go +++ b/x/evm/keeper/funtoken_state.go @@ -33,7 +33,7 @@ func NewFunTokenState( eth.KeyEncoderEthAddr, // indexing key (IK): ERC-20 addr primaryKeyEncoder, func(v evm.FunToken) gethcommon.Address { - return v.Erc20Addr.ToAddr() + return v.Erc20Addr.Address }, ), BankDenom: collections.NewMultiIndex( diff --git a/x/evm/keeper/funtoken_state_test.go b/x/evm/keeper/funtoken_state_test.go index d16b616b1..32ba7d3ed 100644 --- a/x/evm/keeper/funtoken_state_test.go +++ b/x/evm/keeper/funtoken_state_test.go @@ -3,7 +3,6 @@ package keeper_test import ( gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/NibiruChain/nibiru/v2/eth" "github.com/NibiruChain/nibiru/v2/x/evm" "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" ) @@ -21,9 +20,9 @@ func (s *Suite) TestInsertAndGet() { s.Require().NoError(err) // test Get - funToken, err := deps.EvmKeeper.FunTokens.Get(deps.Ctx, evm.NewFunTokenID(eth.NewHexAddr(erc20Addr), "unibi")) + funToken, err := deps.EvmKeeper.FunTokens.Get(deps.Ctx, evm.NewFunTokenID(erc20Addr, "unibi")) s.Require().NoError(err) - s.Require().Equal(eth.HexAddr("0xAEf9437FF23D48D73271a41a8A094DEc9ac71477"), funToken.Erc20Addr) + s.Require().Equal(gethcommon.HexToAddress("0xAEf9437FF23D48D73271a41a8A094DEc9ac71477"), funToken.Erc20Addr.Address) s.Require().Equal("unibi", funToken.BankDenom) s.Require().True(funToken.IsMadeFromCoin) @@ -47,7 +46,7 @@ func (s *Suite) TestCollect() { iter := deps.EvmKeeper.FunTokens.Indexes.BankDenom.ExactMatch(deps.Ctx, "unibi") funTokens := deps.EvmKeeper.FunTokens.Collect(deps.Ctx, iter) s.Require().Len(funTokens, 1) - s.Require().Equal(eth.HexAddr("0xAEf9437FF23D48D73271a41a8A094DEc9ac71477"), funTokens[0].Erc20Addr) + s.Require().Equal(gethcommon.HexToAddress("0xAEf9437FF23D48D73271a41a8A094DEc9ac71477"), funTokens[0].Erc20Addr.Address) s.Require().Equal("unibi", funTokens[0].BankDenom) s.Require().True(funTokens[0].IsMadeFromCoin) @@ -55,7 +54,7 @@ func (s *Suite) TestCollect() { iter2 := deps.EvmKeeper.FunTokens.Indexes.ERC20Addr.ExactMatch(deps.Ctx, erc20Addr) funTokens = deps.EvmKeeper.FunTokens.Collect(deps.Ctx, iter2) s.Require().Len(funTokens, 1) - s.Require().Equal(eth.HexAddr("0xAEf9437FF23D48D73271a41a8A094DEc9ac71477"), funTokens[0].Erc20Addr) + s.Require().Equal(gethcommon.HexToAddress("0xAEf9437FF23D48D73271a41a8A094DEc9ac71477"), funTokens[0].Erc20Addr.Address) s.Require().Equal("unibi", funTokens[0].BankDenom) s.Require().True(funTokens[0].IsMadeFromCoin) } @@ -73,10 +72,10 @@ func (s *Suite) TestDelete() { s.Require().NoError(err) // test Delete - err = deps.EvmKeeper.FunTokens.Delete(deps.Ctx, evm.NewFunTokenID(eth.NewHexAddr(erc20Addr), "unibi")) + err = deps.EvmKeeper.FunTokens.Delete(deps.Ctx, evm.NewFunTokenID(erc20Addr, "unibi")) s.Require().NoError(err) // test Get - _, err = deps.EvmKeeper.FunTokens.Get(deps.Ctx, evm.NewFunTokenID(eth.NewHexAddr(erc20Addr), "unibi")) + _, err = deps.EvmKeeper.FunTokens.Get(deps.Ctx, evm.NewFunTokenID(erc20Addr, "unibi")) s.Require().Error(err) } diff --git a/x/evm/keeper/grpc_query_test.go b/x/evm/keeper/grpc_query_test.go index be0bdc8bd..2a1e2b86b 100644 --- a/x/evm/keeper/grpc_query_test.go +++ b/x/evm/keeper/grpc_query_test.go @@ -931,7 +931,9 @@ func (s *Suite) TestQueryFunTokenMapping() { } wantResp = &evm.QueryFunTokenMappingResponse{ FunToken: &evm.FunToken{ - Erc20Addr: "0xAEf9437FF23D48D73271a41a8A094DEc9ac71477", + Erc20Addr: eth.EIP55Addr{ + Address: gethcommon.HexToAddress("0xAEf9437FF23D48D73271a41a8A094DEc9ac71477"), + }, BankDenom: "unibi", IsMadeFromCoin: true, }, @@ -956,7 +958,9 @@ func (s *Suite) TestQueryFunTokenMapping() { } wantResp = &evm.QueryFunTokenMappingResponse{ FunToken: &evm.FunToken{ - Erc20Addr: "0xAEf9437FF23D48D73271a41a8A094DEc9ac71477", + Erc20Addr: eth.EIP55Addr{ + Address: gethcommon.HexToAddress("0xAEf9437FF23D48D73271a41a8A094DEc9ac71477"), + }, BankDenom: "unibi", IsMadeFromCoin: true, }, diff --git a/x/evm/keeper/msg_server.go b/x/evm/keeper/msg_server.go index f7b3b3d7f..275735d0a 100644 --- a/x/evm/keeper/msg_server.go +++ b/x/evm/keeper/msg_server.go @@ -500,7 +500,7 @@ func (k *Keeper) CreateFunToken( emptyErc20 := msg.FromErc20 == nil || msg.FromErc20.Size() == 0 switch { case !emptyErc20 && msg.FromBankDenom == "": - funtoken, err = k.createFunTokenFromERC20(ctx, msg.FromErc20.ToAddr()) + funtoken, err = k.createFunTokenFromERC20(ctx, msg.FromErc20.Address) case emptyErc20 && msg.FromBankDenom != "": funtoken, err = k.createFunTokenFromCoin(ctx, msg.FromBankDenom) default: @@ -552,7 +552,6 @@ func (k *Keeper) ConvertCoinToEvm( ctx := sdk.UnwrapSDKContext(goCtx) sender := sdk.MustAccAddressFromBech32(msg.Sender) - ethRecipient := msg.ToEthAddr.ToAddr() funTokens := k.FunTokens.Collect(ctx, k.FunTokens.Indexes.BankDenom.ExactMatch(ctx, msg.BankCoin.Denom)) if len(funTokens) == 0 { @@ -565,9 +564,9 @@ func (k *Keeper) ConvertCoinToEvm( fungibleTokenMapping := funTokens[0] if fungibleTokenMapping.IsMadeFromCoin { - return k.convertCoinNativeCoin(ctx, sender, ethRecipient, msg.BankCoin, fungibleTokenMapping) + return k.convertCoinNativeCoin(ctx, sender, msg.ToEthAddr.Address, msg.BankCoin, fungibleTokenMapping) } else { - return k.convertCoinNativeERC20(ctx, sender, ethRecipient, msg.BankCoin, fungibleTokenMapping) + return k.convertCoinNativeERC20(ctx, sender, msg.ToEthAddr.Address, msg.BankCoin, fungibleTokenMapping) } } @@ -578,7 +577,7 @@ func (k Keeper) convertCoinNativeCoin( sender sdk.AccAddress, recipient gethcommon.Address, coin sdk.Coin, - fungibleTokenMapping evm.FunToken, + funTokenMapping evm.FunToken, ) (*evm.MsgConvertCoinToEvmResponse, error) { // Step 1: Escrow bank coins with EVM module account err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, sender, evm.ModuleName, sdk.NewCoins(coin)) @@ -586,14 +585,14 @@ func (k Keeper) convertCoinNativeCoin( return nil, errors.Wrap(err, "failed to send coins to module account") } - erc20ContractAddr := fungibleTokenMapping.Erc20Addr.ToAddr() + erc20Addr := funTokenMapping.Erc20Addr.Address // Step 2: mint ERC-20 tokens for recipient evmResp, err := k.CallContract( ctx, embeds.SmartContract_ERC20Minter.ABI, evm.EVM_MODULE_ADDRESS, - &erc20ContractAddr, + &erc20Addr, true, "mint", recipient, @@ -604,11 +603,11 @@ func (k Keeper) convertCoinNativeCoin( } if evmResp.Failed() { return nil, - fmt.Errorf("failed to mint erc-20 tokens of contract %s", erc20ContractAddr.String()) + fmt.Errorf("failed to mint erc-20 tokens of contract %s", erc20Addr.String()) } _ = ctx.EventManager().EmitTypedEvent(&evm.EventConvertCoinToEvm{ Sender: sender.String(), - Erc20ContractAddress: erc20ContractAddr.String(), + Erc20ContractAddress: erc20Addr.String(), ToEthAddr: recipient.String(), BankCoin: coin, }) @@ -624,9 +623,9 @@ func (k Keeper) convertCoinNativeERC20( sender sdk.AccAddress, recipient gethcommon.Address, coin sdk.Coin, - fungibleTokenMapping evm.FunToken, + funTokenMapping evm.FunToken, ) (*evm.MsgConvertCoinToEvmResponse, error) { - erc20Addr := fungibleTokenMapping.Erc20Addr.ToAddr() + erc20Addr := funTokenMapping.Erc20Addr.Address recipientBalanceBefore, err := k.ERC20().BalanceOf(erc20Addr, recipient, ctx) if err != nil { @@ -700,7 +699,7 @@ func (k Keeper) convertCoinNativeERC20( _ = ctx.EventManager().EmitTypedEvent(&evm.EventConvertCoinToEvm{ Sender: sender.String(), - Erc20ContractAddress: fungibleTokenMapping.Erc20Addr.String(), + Erc20ContractAddress: funTokenMapping.Erc20Addr.String(), ToEthAddr: recipient.String(), BankCoin: coin, }) diff --git a/x/evm/msg.go b/x/evm/msg.go index 3d10c5ff6..d7d190aca 100644 --- a/x/evm/msg.go +++ b/x/evm/msg.go @@ -525,7 +525,7 @@ func (m *MsgConvertCoinToEvm) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(m.Sender); err != nil { return fmt.Errorf("invalid sender addr") } - if m.ToEthAddr == "" { + if m.ToEthAddr.Address.String() == "" || m.ToEthAddr.Size() == 0 { return fmt.Errorf("empty to_eth_addr") } return nil diff --git a/x/evm/precompile/funtoken_test.go b/x/evm/precompile/funtoken_test.go index 629487596..14f6368ad 100644 --- a/x/evm/precompile/funtoken_test.go +++ b/x/evm/precompile/funtoken_test.go @@ -67,7 +67,7 @@ func (s *Suite) TestHappyPath() { s.T().Log("Create FunToken mapping and ERC20") bankDenom := "unibi" funtoken := evmtest.CreateFunTokenForBankCoin(&deps, bankDenom, &s.Suite) - contract := funtoken.Erc20Addr.ToAddr() + contract := funtoken.Erc20Addr.Address s.T().Log("Balances of the ERC20 should start empty") evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, deps.Sender.EthAddr, big.NewInt(0)) @@ -83,9 +83,11 @@ func (s *Suite) TestHappyPath() { _, err := deps.EvmKeeper.ConvertCoinToEvm( sdk.WrapSDKContext(deps.Ctx), &evm.MsgConvertCoinToEvm{ - Sender: deps.Sender.NibiruAddr.String(), - BankCoin: sdk.NewCoin(bankDenom, sdk.NewInt(69_420)), - ToEthAddr: eth.NewHexAddr(deps.Sender.EthAddr), + Sender: deps.Sender.NibiruAddr.String(), + BankCoin: sdk.NewCoin(bankDenom, sdk.NewInt(69_420)), + ToEthAddr: eth.EIP55Addr{ + Address: deps.Sender.EthAddr, + }, }, ) s.Require().NoError(err) diff --git a/x/evm/tx.pb.go b/x/evm/tx.pb.go index 19daadd03..6c61d6357 100644 --- a/x/evm/tx.pb.go +++ b/x/evm/tx.pb.go @@ -447,7 +447,7 @@ var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo // denomination for a bank coin can be given to create the mapping to an ERC20. type MsgCreateFunToken struct { // Hexadecimal address of the ERC20 token to which the `FunToken` maps - FromErc20 *github_com_NibiruChain_nibiru_v2_eth.HexAddr `protobuf:"bytes,1,opt,name=from_erc20,json=fromErc20,proto3,customtype=github.com/NibiruChain/nibiru/v2/eth.HexAddr" json:"from_erc20,omitempty"` + FromErc20 *github_com_NibiruChain_nibiru_v2_eth.EIP55Addr `protobuf:"bytes,1,opt,name=from_erc20,json=fromErc20,proto3,customtype=github.com/NibiruChain/nibiru/v2/eth.EIP55Addr" json:"from_erc20,omitempty"` // Coin denomination in the Bank Module. FromBankDenom string `protobuf:"bytes,2,opt,name=from_bank_denom,json=fromBankDenom,proto3" json:"from_bank_denom,omitempty"` // Sender: Address for the signer of the transaction. @@ -549,7 +549,7 @@ func (m *MsgCreateFunTokenResponse) GetFuntokenMapping() FunToken { // MsgConvertCoinToEvm: Arguments to send a bank coin to ERC-20 representation type MsgConvertCoinToEvm struct { // Hexadecimal address of the ERC20 token to which the `FunToken` maps - ToEthAddr github_com_NibiruChain_nibiru_v2_eth.HexAddr `protobuf:"bytes,1,opt,name=to_eth_addr,json=toEthAddr,proto3,customtype=github.com/NibiruChain/nibiru/v2/eth.HexAddr" json:"to_eth_addr"` + ToEthAddr github_com_NibiruChain_nibiru_v2_eth.EIP55Addr `protobuf:"bytes,1,opt,name=to_eth_addr,json=toEthAddr,proto3,customtype=github.com/NibiruChain/nibiru/v2/eth.EIP55Addr" json:"to_eth_addr"` // Sender: Address for the signer of the transaction. Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` // Bank coin to get converted to ERC20 @@ -657,85 +657,85 @@ func init() { func init() { proto.RegisterFile("eth/evm/v1/tx.proto", fileDescriptor_82a0bfe4f0bab953) } var fileDescriptor_82a0bfe4f0bab953 = []byte{ - // 1243 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xda, 0x8e, 0x3f, 0x9e, 0xdd, 0x24, 0x6c, 0x53, 0xba, 0x76, 0x5b, 0x6f, 0xd8, 0x8a, - 0x12, 0x21, 0xb2, 0xdb, 0x18, 0x84, 0xd4, 0x9c, 0x88, 0x13, 0x17, 0x8a, 0x12, 0x88, 0xb6, 0x2e, - 0x07, 0x84, 0x64, 0x8d, 0x77, 0x27, 0xeb, 0x55, 0xb2, 0x33, 0xab, 0x9d, 0xf1, 0xca, 0xe1, 0xd8, - 0x13, 0x12, 0x07, 0x40, 0xdc, 0x11, 0x47, 0xc4, 0x89, 0x43, 0x0f, 0xfc, 0x09, 0x15, 0xa7, 0x0a, - 0x84, 0x84, 0x7a, 0x30, 0x28, 0x45, 0x42, 0xea, 0xb1, 0x07, 0x6e, 0x48, 0x68, 0x66, 0xd7, 0x8e, - 0x9d, 0x90, 0x94, 0x56, 0x88, 0xdb, 0xbc, 0x79, 0x1f, 0xf3, 0xde, 0xef, 0xf7, 0xe6, 0xcd, 0xc0, - 0x79, 0xcc, 0x7b, 0x16, 0x8e, 0x03, 0x2b, 0x5e, 0xb5, 0xf8, 0xc0, 0x0c, 0x23, 0xca, 0xa9, 0x0a, - 0x98, 0xf7, 0x4c, 0x1c, 0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x27, 0x5f, 0xeb, 0x33, - 0xc6, 0x17, 0x19, 0x28, 0x6e, 0x61, 0x0f, 0x39, 0x07, 0xed, 0x81, 0xba, 0x08, 0xb3, 0x84, 0x12, - 0x07, 0xcb, 0x6c, 0x72, 0x76, 0x22, 0xa8, 0x6f, 0x42, 0xc9, 0x43, 0x02, 0x33, 0xdf, 0x49, 0x4e, - 0x2f, 0x35, 0xab, 0x0f, 0x87, 0xfa, 0x85, 0x04, 0x3e, 0xe6, 0xee, 0x99, 0x3e, 0xb5, 0x02, 0xc4, - 0x7b, 0xe6, 0x2d, 0xc2, 0xed, 0xa2, 0x87, 0xd8, 0x8e, 0x30, 0x55, 0xeb, 0x90, 0xf5, 0x10, 0x93, - 0x49, 0xe5, 0x9a, 0x95, 0xc3, 0xa1, 0x5e, 0x7c, 0x1b, 0xb1, 0x2d, 0x3f, 0xf0, 0xb9, 0x2d, 0x14, - 0xea, 0x1c, 0x64, 0x38, 0x4d, 0x53, 0xca, 0x70, 0xaa, 0xde, 0x80, 0xd9, 0x18, 0xed, 0xf7, 0xb1, - 0x36, 0x2b, 0xcf, 0xb8, 0x7a, 0xea, 0x19, 0x87, 0x43, 0x3d, 0xbf, 0x1e, 0xd0, 0x3e, 0xe1, 0x76, - 0xe2, 0x21, 0xea, 0x93, 0x28, 0xe6, 0x97, 0x94, 0xe5, 0x4a, 0x8a, 0x57, 0x05, 0x94, 0x58, 0x2b, - 0xc8, 0x0d, 0x25, 0x16, 0x52, 0xa4, 0x15, 0x13, 0x29, 0x12, 0x12, 0xd3, 0x4a, 0x89, 0xc4, 0xd6, - 0xe6, 0x04, 0x12, 0x3f, 0xdc, 0x5b, 0xc9, 0xb7, 0x07, 0x9b, 0x88, 0x23, 0xe3, 0xfb, 0x2c, 0x54, - 0xd6, 0x1d, 0x07, 0x33, 0xb6, 0xe5, 0x33, 0xde, 0x1e, 0xa8, 0xef, 0x42, 0xd1, 0xe9, 0x21, 0x9f, - 0x74, 0x7c, 0x57, 0x42, 0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de, 0x0f, 0xe5, 0x38, 0x3e, 0x9a, - 0xb2, 0xe9, 0xac, 0xfb, 0x4a, 0x81, 0x0b, 0x53, 0xd3, 0xd7, 0xc6, 0x2c, 0xa4, 0x84, 0xc9, 0x12, - 0xe5, 0x00, 0x55, 0x92, 0xf9, 0x28, 0x67, 0xe6, 0x55, 0xc8, 0xed, 0x53, 0x8f, 0x69, 0x19, 0x59, - 0xde, 0xfc, 0x64, 0x79, 0x5b, 0xd4, 0xb3, 0xa5, 0x52, 0x5d, 0x80, 0x6c, 0x84, 0xb9, 0x24, 0xbd, - 0x62, 0x8b, 0xa5, 0x5a, 0x85, 0x62, 0x1c, 0x74, 0x70, 0x14, 0xd1, 0x28, 0x9d, 0x6d, 0x85, 0x38, - 0x68, 0x09, 0x51, 0xa8, 0x04, 0xdd, 0x7d, 0x86, 0xdd, 0x84, 0x38, 0xbb, 0xe0, 0x21, 0x76, 0x87, - 0x61, 0x37, 0x4d, 0xf0, 0x53, 0x05, 0xe6, 0xb7, 0x99, 0x77, 0x27, 0x74, 0x11, 0xc7, 0x3b, 0x28, - 0x42, 0x01, 0x13, 0x93, 0x01, 0xf5, 0x79, 0x8f, 0x46, 0x3e, 0x3f, 0x48, 0x3b, 0x58, 0xfb, 0xf1, - 0xde, 0xca, 0x62, 0xfa, 0x78, 0xad, 0xbb, 0x6e, 0x84, 0x19, 0xbb, 0xcd, 0x23, 0x9f, 0x78, 0xf6, - 0x91, 0xa9, 0x7a, 0x1d, 0xf2, 0xa1, 0x8c, 0x20, 0xbb, 0xb5, 0xdc, 0x50, 0x27, 0x0b, 0x48, 0x62, - 0x37, 0x73, 0x82, 0x1a, 0x3b, 0xb5, 0x5b, 0x9b, 0xbb, 0xfb, 0xc7, 0x77, 0xaf, 0x1e, 0x45, 0x30, - 0xaa, 0x70, 0xf1, 0x58, 0x32, 0x23, 0xbc, 0x8c, 0x6f, 0x14, 0x78, 0x61, 0x9b, 0x79, 0x1b, 0x11, - 0x46, 0x1c, 0xdf, 0xec, 0x93, 0x36, 0xdd, 0xc3, 0x44, 0xbd, 0x0d, 0x20, 0x5e, 0x96, 0x0e, 0x8e, - 0x9c, 0xc6, 0xf5, 0x34, 0xd7, 0x37, 0xee, 0x0f, 0x75, 0xe5, 0xe1, 0x50, 0x7f, 0xcd, 0xf3, 0x79, + // 1246 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0xda, 0x8e, 0x7f, 0x3c, 0xbb, 0x49, 0xbe, 0xdb, 0xf4, 0xdb, 0xb5, 0xdb, 0x7a, 0xc3, + 0x56, 0x94, 0x08, 0x29, 0xbb, 0x8d, 0x51, 0x2b, 0x35, 0x27, 0xe2, 0xc4, 0x45, 0x45, 0x09, 0x44, + 0x8b, 0xd3, 0x03, 0x42, 0xb2, 0xc6, 0xbb, 0x93, 0xf5, 0x2a, 0xd9, 0x99, 0xd5, 0xce, 0x78, 0xe5, + 0x70, 0xec, 0x09, 0x89, 0x03, 0x20, 0xee, 0x88, 0x73, 0x4f, 0x1c, 0x7a, 0xe0, 0x4f, 0xa8, 0x38, + 0x55, 0x70, 0x00, 0xf5, 0x60, 0x50, 0x8a, 0x84, 0xd4, 0x63, 0x0f, 0xdc, 0x90, 0xd0, 0xcc, 0xae, + 0x1d, 0x3b, 0x21, 0x29, 0x54, 0x88, 0xdb, 0xbc, 0x79, 0x3f, 0xe6, 0xbd, 0xcf, 0xe7, 0xcd, 0x9b, + 0x81, 0x8b, 0x98, 0xf7, 0x2c, 0x1c, 0x07, 0x56, 0xbc, 0x6a, 0xf1, 0x81, 0x19, 0x46, 0x94, 0x53, + 0x15, 0x30, 0xef, 0x99, 0x38, 0x0e, 0xcc, 0x78, 0xb5, 0x76, 0xd9, 0xa1, 0x2c, 0xa0, 0xcc, 0x0a, + 0x98, 0x27, 0x6c, 0x02, 0xe6, 0x25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f9, 0x8b, 0xc2, 0x46, 0xf8, 0x35, 0xfe, 0xc8, 0x40, 0x76, 0x9b, + 0x79, 0x2a, 0x01, 0x98, 0xf8, 0xd5, 0x54, 0x27, 0xb1, 0x9b, 0xba, 0x72, 0xb5, 0xd7, 0xce, 0x54, + 0x8d, 0xbb, 0xcb, 0x78, 0xf0, 0xc3, 0xaf, 0x5f, 0x66, 0xae, 0x1a, 0xb5, 0x11, 0x12, 0xa3, 0x6f, + 0x59, 0x6a, 0xda, 0xe1, 0x03, 0x75, 0x07, 0x2a, 0x53, 0xd7, 0xe4, 0xca, 0x89, 0xb0, 0x93, 0xca, + 0xda, 0xf5, 0x73, 0x94, 0xe3, 0x4e, 0xb8, 0x0f, 0x73, 0x27, 0xfa, 0xf9, 0xda, 0x09, 0xb7, 0x69, + 0x75, 0xed, 0xf5, 0x73, 0xd5, 0xe3, 0xb8, 0x1f, 0xc1, 0xc2, 0xa9, 0xb6, 0xd0, 0x4f, 0xba, 0x9e, + 0x30, 0xa8, 0xbd, 0xf1, 0x12, 0x83, 0x51, 0xf4, 0xe6, 0xdb, 0x8f, 0x8f, 0xea, 0xca, 0x93, 0xa3, + 0xba, 0xf2, 0xcb, 0x51, 0x5d, 0xf9, 0xfc, 0x59, 0x7d, 0xe6, 0xc9, 0xb3, 0xfa, 0xcc, 0x4f, 0xcf, + 0xea, 0x33, 0x1f, 0xde, 0x78, 0x69, 0x77, 0x0d, 0x04, 0xb0, 0xdd, 0xbc, 0xfc, 0x6b, 0xbe, 0xf5, + 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x32, 0xcb, 0xec, 0xc3, 0x76, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3754,7 +3754,7 @@ func (m *MsgCreateFunToken) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_NibiruChain_nibiru_v2_eth.HexAddr + var v github_com_NibiruChain_nibiru_v2_eth.EIP55Addr m.FromErc20 = &v if err := m.FromErc20.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err From 0a68933dc353232460d1ce94d487f3145bec3d98 Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Mon, 19 Aug 2024 13:31:35 -0700 Subject: [PATCH 8/8] refactor(evm): precompile setup (#2008) * add TestFailToPackABI * remove addPrecompileToVM * move comments * delete TestOrderedPrecompileAddresses There's no strict requirement for the precompiles to be sorted * remove unused IsAvailablePrecompile method * remove redundant darwin LDFLAGS * Update CHANGELOG.md --- CHANGELOG.md | 1 + app/app.go | 3 +- contrib/make/build.mk | 4 +- x/evm/keeper/precompiles.go | 20 +---- x/evm/precompile/funtoken.go | 38 +++++++--- x/evm/precompile/funtoken_test.go | 109 ++++++++++++++++------------ x/evm/precompile/precompile.go | 65 ++++------------- x/evm/precompile/precompile_test.go | 50 ------------- 8 files changed, 107 insertions(+), 183 deletions(-) delete mode 100644 x/evm/precompile/precompile_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index f6c2f1877..f6f536f43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -107,6 +107,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#2001](https://github.com/NibiruChain/nibiru/pull/2001) - refactor(evm): simplify FunToken methods and tests - [#2003](https://github.com/NibiruChain/nibiru/pull/2003) - fix(evm): fix FunToken conversions between Cosmos and EVM - [#2004](https://github.com/NibiruChain/nibiru/pull/2004) - refactor(evm)!: replace `HexAddr` with `EIP55Addr` +- [#2008](https://github.com/NibiruChain/nibiru/pull/2008) - refactor(evm): clean up precompile setups #### Dapp modules: perp, spot, oracle, etc diff --git a/app/app.go b/app/app.go index 94abf46e9..72e728927 100644 --- a/app/app.go +++ b/app/app.go @@ -186,8 +186,7 @@ func NewNibiruApp( skipGenesisInvariants := cast.ToBool( appOpts.Get(crisis.FlagSkipGenesisInvariants)) - precompilesToAdd := precompile.InitPrecompiles(app.AppKeepers.PublicKeepers) - app.EvmKeeper.AddPrecompiles(precompilesToAdd) + app.EvmKeeper.AddPrecompiles(precompile.InitPrecompiles(app.AppKeepers.PublicKeepers)) app.initModuleManager(encodingConfig, skipGenesisInvariants) diff --git a/contrib/make/build.mk b/contrib/make/build.mk index 8a4c27d58..019ac6f6a 100644 --- a/contrib/make/build.mk +++ b/contrib/make/build.mk @@ -70,9 +70,7 @@ ldflags := $(strip $(ldflags)) BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)' CGO_CFLAGS := -I$(TEMPDIR)/include CGO_LDFLAGS := -L$(TEMPDIR)/lib -ifeq ($(OS_NAME),darwin) - CGO_LDFLAGS += -lrocksdb -lstdc++ -lz -lbz2 -else +ifneq ($(OS_NAME),darwin) CGO_LDFLAGS += -static -lm -lbz2 endif diff --git a/x/evm/keeper/precompiles.go b/x/evm/keeper/precompiles.go index 0ee0bbf21..965866660 100644 --- a/x/evm/keeper/precompiles.go +++ b/x/evm/keeper/precompiles.go @@ -12,30 +12,12 @@ func (k *Keeper) AddPrecompiles( precompileMap map[gethcommon.Address]vm.PrecompiledContract, ) { if k.precompiles.Len() == 0 { - newPrecompileMap := omap.SortedMap_EthAddress[vm.PrecompiledContract]( + k.precompiles = omap.SortedMap_EthAddress( precompileMap, ) - k.precompiles = newPrecompileMap } else { for addr, precompile := range precompileMap { k.precompiles.Set(addr, precompile) } } - - // TODO: feat(evm): implement precompiled contracts for ibc transfer - // Check if there is sufficient demand for this. - - // TODO: feat(evm): implement precompiled contracts for staking - // Note that liquid staked assets can be a useful alternative to adding a - // staking precompile. - // Check if there is sufficient demand for this. - - // TODO: feat(evm): implement precompiled contracts for wasm calls - // Check if there is sufficient demand for this. -} - -// IsAvailablePrecompile returns true if the given precompile address is contained in the -// EVM keeper's available precompiles map. -func (k Keeper) IsAvailablePrecompile(address gethcommon.Address) bool { - return k.precompiles.Has(address) } diff --git a/x/evm/precompile/funtoken.go b/x/evm/precompile/funtoken.go index 42f14ff22..4e1f131cd 100644 --- a/x/evm/precompile/funtoken.go +++ b/x/evm/precompile/funtoken.go @@ -8,6 +8,7 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" + bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" gethabi "github.com/ethereum/go-ethereum/accounts/abi" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" @@ -15,6 +16,8 @@ import ( "github.com/NibiruChain/nibiru/v2/app/keepers" "github.com/NibiruChain/nibiru/v2/x/evm" "github.com/NibiruChain/nibiru/v2/x/evm/embeds" + evmkeeper "github.com/NibiruChain/nibiru/v2/x/evm/keeper" + "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) var _ vm.PrecompiledContract = (*precompileFunToken)(nil) @@ -56,7 +59,15 @@ func (p precompileFunToken) Run( } }() - ctx, method, args, err := OnRunStart(embeds.SmartContract_FunToken.ABI, evm, contract.Input) + // 1 | Get context from StateDB + stateDB, ok := evm.StateDB.(*statedb.StateDB) + if !ok { + err = fmt.Errorf("failed to load the sdk.Context from the EVM StateDB") + return + } + ctx := stateDB.GetContext() + + method, args, err := DecomposeInput(embeds.SmartContract_FunToken.ABI, contract.Input) if err != nil { return nil, err } @@ -71,17 +82,20 @@ func (p precompileFunToken) Run( err = fmt.Errorf("invalid method called with name \"%s\"", method.Name) return } + return } func PrecompileFunToken(keepers keepers.PublicKeepers) vm.PrecompiledContract { return precompileFunToken{ - PublicKeepers: keepers, + bankKeeper: keepers.BankKeeper, + evmKeeper: keepers.EvmKeeper, } } type precompileFunToken struct { - keepers.PublicKeepers + bankKeeper bankkeeper.Keeper + evmKeeper evmkeeper.Keeper } var executionGuard sync.Mutex @@ -114,14 +128,14 @@ func (p precompileFunToken) bankSend( } defer executionGuard.Unlock() - erc20, amount, to, err := p.AssertArgTypesBankSend(args) + erc20, amount, to, err := p.decomposeBankSendArgs(args) if err != nil { return } // ERC20 must have FunToken mapping - funtokens := p.EvmKeeper.FunTokens.Collect( - ctx, p.EvmKeeper.FunTokens.Indexes.ERC20Addr.ExactMatch(ctx, erc20), + funtokens := p.evmKeeper.FunTokens.Collect( + ctx, p.evmKeeper.FunTokens.Indexes.ERC20Addr.ExactMatch(ctx, erc20), ) if len(funtokens) != 1 { err = fmt.Errorf("no FunToken mapping exists for ERC20 \"%s\"", erc20.Hex()) @@ -142,7 +156,7 @@ func (p precompileFunToken) bankSend( // Caller transfers ERC20 to the EVM account transferTo := evm.EVM_MODULE_ADDRESS - _, err = p.EvmKeeper.ERC20().Transfer(erc20, caller, transferTo, amount, ctx) + _, err = p.evmKeeper.ERC20().Transfer(erc20, caller, transferTo, amount, ctx) if err != nil { return nil, fmt.Errorf("failed to send from caller to the EVM account: %w", err) } @@ -155,13 +169,13 @@ func (p precompileFunToken) bankSend( // owns the ERC20 contract and was the original minter of the ERC20 tokens. // Since we're sending them away and want accurate total supply tracking, the // tokens need to be burned. - _, err = p.EvmKeeper.ERC20().Burn(erc20, evm.EVM_MODULE_ADDRESS, amount, ctx) + _, err = p.evmKeeper.ERC20().Burn(erc20, evm.EVM_MODULE_ADDRESS, amount, ctx) if err != nil { err = fmt.Errorf("ERC20.Burn: %w", err) return } } else { - err = p.BankKeeper.MintCoins(ctx, evm.ModuleName, coins) + err = p.bankKeeper.MintCoins(ctx, evm.ModuleName, coins) if err != nil { return nil, fmt.Errorf("mint failed for module \"%s\" (%s): contract caller %s: %w", evm.ModuleName, evm.EVM_MODULE_ADDRESS.Hex(), caller.Hex(), err, @@ -170,7 +184,7 @@ func (p precompileFunToken) bankSend( } // Transfer the bank coin - err = p.BankKeeper.SendCoinsFromModuleToAccount(ctx, evm.ModuleName, toAddr, coins) + err = p.bankKeeper.SendCoinsFromModuleToAccount(ctx, evm.ModuleName, toAddr, coins) if err != nil { return nil, fmt.Errorf("send failed for module \"%s\" (%s): contract caller %s: %w", evm.ModuleName, evm.EVM_MODULE_ADDRESS.Hex(), caller.Hex(), err, @@ -180,10 +194,10 @@ func (p precompileFunToken) bankSend( // TODO: UD-DEBUG: feat: Emit EVM events // TODO: UD-DEBUG: feat: Emit ABCI events - return method.Outputs.Pack() // TODO: change interface + return method.Outputs.Pack() } -func (p precompileFunToken) AssertArgTypesBankSend(args []any) ( +func (p precompileFunToken) decomposeBankSendArgs(args []any) ( erc20 gethcommon.Address, amount *big.Int, to string, diff --git a/x/evm/precompile/funtoken_test.go b/x/evm/precompile/funtoken_test.go index 14f6368ad..31f9413af 100644 --- a/x/evm/precompile/funtoken_test.go +++ b/x/evm/precompile/funtoken_test.go @@ -1,11 +1,11 @@ package precompile_test import ( - "fmt" "math/big" "testing" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/suite" "github.com/NibiruChain/nibiru/v2/eth" @@ -17,61 +17,67 @@ import ( "github.com/NibiruChain/nibiru/v2/x/evm/precompile" ) -type Suite struct { - suite.Suite -} - -// TestPrecompileSuite: Runs all the tests in the suite. -func TestSuite(t *testing.T) { - suite.Run(t, new(Suite)) -} - -// PrecompileExists: An integration test showing that a "PrecompileError" occurs -// when calling the FunToken -func (s *Suite) TestPrecompileExists() { - abi := embeds.SmartContract_FunToken.ABI - deps := evmtest.NewTestDeps() - - codeResp, err := deps.EvmKeeper.Code( - sdk.WrapSDKContext(deps.Ctx), - &evm.QueryCodeRequest{ - Address: precompile.PrecompileAddr_FunToken.String(), +func (s *Suite) TestFailToPackABI() { + testcases := []struct { + name string + methodName string + callArgs []any + wantError string + }{ + { + name: "wrong amount of call args", + methodName: string(precompile.FunTokenMethod_BankSend), + callArgs: []any{"nonsense", "args here", "to see if", "precompile is", "called"}, + wantError: "argument count mismatch: got 5 for 3", }, - ) - s.Require().NoError(err) - s.Equal(string(codeResp.Code), "") - - s.True(deps.EvmKeeper.IsAvailablePrecompile(precompile.PrecompileAddr_FunToken), - "did not see precompile address during \"InitPrecompiles\"") + { + name: "wrong type for address", + methodName: string(precompile.FunTokenMethod_BankSend), + callArgs: []any{"nonsense", "foo", "bar"}, + wantError: "abi: cannot use string as type array as argument", + }, + { + name: "wrong type for amount", + methodName: string(precompile.FunTokenMethod_BankSend), + callArgs: []any{common.HexToAddress("0x7D4B7B8CA7E1a24928Bb96D59249c7a5bd1DfBe6"), "foo", testutil.AccAddress().String()}, + wantError: "abi: cannot use string as type ptr as argument", + }, + { + name: "wrong type for recipient", + methodName: string(precompile.FunTokenMethod_BankSend), + callArgs: []any{common.HexToAddress("0x7D4B7B8CA7E1a24928Bb96D59249c7a5bd1DfBe6"), big.NewInt(1), 111}, + wantError: "abi: cannot use int as type string as argument", + }, + { + name: "invalid method name", + methodName: "foo", + callArgs: []any{common.HexToAddress("0x7D4B7B8CA7E1a24928Bb96D59249c7a5bd1DfBe6"), big.NewInt(1), testutil.AccAddress().String()}, + wantError: "method 'foo' not found", + }, + } - callArgs := []any{"nonsense", "args here", "to see if", "precompile is", "called"} - input, err := abi.Pack(string(precompile.FunTokenMethod_BankSend), callArgs...) - s.Require().ErrorContains( - err, fmt.Sprintf("argument count mismatch: got %d for 3", len(callArgs)), - "callArgs: ", callArgs) - s.Require().Nil(input) + abi := embeds.SmartContract_FunToken.ABI - _, err = deps.EvmKeeper.CallContractWithInput( - deps.Ctx, evm.EVM_MODULE_ADDRESS, &precompile.PrecompileAddr_FunToken, true, - input, - ) - s.ErrorContains(err, "precompile error") + for _, tc := range testcases { + s.Run(tc.name, func() { + input, err := abi.Pack(tc.methodName, tc.callArgs...) + s.ErrorContains(err, tc.wantError) + s.Nil(input) + }) + } } func (s *Suite) TestHappyPath() { deps := evmtest.NewTestDeps() - s.True(deps.EvmKeeper.IsAvailablePrecompile(precompile.PrecompileAddr_FunToken), - "did not see precompile address during \"InitPrecompiles\"") - s.T().Log("Create FunToken mapping and ERC20") bankDenom := "unibi" funtoken := evmtest.CreateFunTokenForBankCoin(&deps, bankDenom, &s.Suite) - contract := funtoken.Erc20Addr.Address + erc20 := funtoken.Erc20Addr.Address s.T().Log("Balances of the ERC20 should start empty") - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, deps.Sender.EthAddr, big.NewInt(0)) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, evm.EVM_MODULE_ADDRESS, big.NewInt(0)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, erc20, deps.Sender.EthAddr, big.NewInt(0)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, erc20, evm.EVM_MODULE_ADDRESS, big.NewInt(0)) s.Require().NoError(testapp.FundAccount( deps.App.BankKeeper, @@ -97,7 +103,7 @@ func (s *Suite) TestHappyPath() { input, err := embeds.SmartContract_ERC20Minter.ABI.Pack("mint", deps.Sender.EthAddr, big.NewInt(69_420)) s.NoError(err) _, err = deps.EvmKeeper.CallContractWithInput( - deps.Ctx, deps.Sender.EthAddr, &contract, true, input, + deps.Ctx, deps.Sender.EthAddr, &erc20, true, input, ) s.ErrorContains(err, "Ownable: caller is not the owner") } @@ -106,7 +112,7 @@ func (s *Suite) TestHappyPath() { s.T().Log("Send using precompile") amtToSend := int64(420) - callArgs := []any{contract, big.NewInt(amtToSend), randomAcc.String()} + callArgs := []any{erc20, big.NewInt(amtToSend), randomAcc.String()} input, err := embeds.SmartContract_FunToken.ABI.Pack(string(precompile.FunTokenMethod_BankSend), callArgs...) s.NoError(err) @@ -115,9 +121,18 @@ func (s *Suite) TestHappyPath() { ) s.Require().NoError(err) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, deps.Sender.EthAddr, big.NewInt(69_000)) - evmtest.AssertERC20BalanceEqual(s.T(), deps, contract, evm.EVM_MODULE_ADDRESS, big.NewInt(0)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, erc20, deps.Sender.EthAddr, big.NewInt(69_000)) + evmtest.AssertERC20BalanceEqual(s.T(), deps, erc20, evm.EVM_MODULE_ADDRESS, big.NewInt(0)) s.Equal(sdk.NewInt(420), deps.App.BankKeeper.GetBalance(deps.Ctx, randomAcc, funtoken.BankDenom).Amount, ) } + +type Suite struct { + suite.Suite +} + +// TestPrecompileSuite: Runs all the tests in the suite. +func TestSuite(t *testing.T) { + suite.Run(t, new(Suite)) +} diff --git a/x/evm/precompile/precompile.go b/x/evm/precompile/precompile.go index c42b40c26..90bb97aee 100644 --- a/x/evm/precompile/precompile.go +++ b/x/evm/precompile/precompile.go @@ -16,9 +16,6 @@ package precompile import ( "bytes" "fmt" - "sync" - - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/NibiruChain/collections" gethabi "github.com/ethereum/go-ethereum/accounts/abi" @@ -26,8 +23,6 @@ import ( "github.com/ethereum/go-ethereum/core/vm" "github.com/NibiruChain/nibiru/v2/app/keepers" - "github.com/NibiruChain/nibiru/v2/x/common/set" - "github.com/NibiruChain/nibiru/v2/x/evm/statedb" ) // InitPrecompiles initializes and returns a map of precompiled contracts for the EVM. @@ -41,9 +36,6 @@ import ( func InitPrecompiles( k keepers.PublicKeepers, ) (precompiles map[gethcommon.Address]vm.PrecompiledContract) { - initMutex.Lock() - defer initMutex.Unlock() - precompiles = make(map[gethcommon.Address]vm.PrecompiledContract) // Default precompiles @@ -56,39 +48,21 @@ func InitPrecompiles( PrecompileFunToken, } { pc := precompileSetupFn(k) - addPrecompileToVM(pc) precompiles[pc.Address()] = pc } - return precompiles -} -// initMutex: Mutual exclusion lock (mutex) to prevent race conditions with -// consecutive calls of InitPrecompiles. -var initMutex = &sync.Mutex{} - -// addPrecompileToVM adds a precompiled contract to the EVM's set of recognized -// precompiles. It updates both the contract map and the list of precompile -// addresses for the latest major upgrade or hard fork of Ethereum (Berlin). -func addPrecompileToVM(p vm.PrecompiledContract) { - addr := p.Address() - - vm.PrecompiledContractsBerlin[addr] = p - // TODO: 2024-07-05 feat: Cancun after go-ethereum upgrade - // https://github.com/NibiruChain/nibiru/issues/1921 - // vm.PrecompiledContractsCancun, - - // Done if the precompiled contracts are already added - // This check is only relevant during tests to prevent races. The iteration - // doesn't get repeated in production. - vmSet := set.New(vm.PrecompiledAddressesBerlin...) - if vmSet.Has(addr) { - return - } + // TODO: feat(evm): implement precompiled contracts for ibc transfer + // Check if there is sufficient demand for this. - vm.PrecompiledAddressesBerlin = append(vm.PrecompiledAddressesBerlin, addr) - // TODO: 2024-07-05 feat: Cancun after go-ethereum upgrade - // https://github.com/NibiruChain/nibiru/issues/1921 - // vm.PrecompiledAddressesCancun, + // TODO: feat(evm): implement precompiled contracts for staking + // Note that liquid staked assets can be a useful alternative to adding a + // staking precompile. + // Check if there is sufficient demand for this. + + // TODO: feat(evm): implement precompiled contracts for wasm calls + // Check if there is sufficient demand for this. + + return precompiles } // methodById: Looks up an ABI method by the 4-byte id. @@ -107,18 +81,9 @@ func methodById(abi *gethabi.ABI, sigdata []byte) (*gethabi.Method, error) { return nil, fmt.Errorf("no method with id: %#x", sigdata[:4]) } -func OnRunStart( - abi *gethabi.ABI, evm *vm.EVM, input []byte, -) (ctx sdk.Context, method *gethabi.Method, args []interface{}, err error) { - // 1 | Get context from StateDB - stateDB, ok := evm.StateDB.(*statedb.StateDB) - if !ok { - err = fmt.Errorf("failed to load the sdk.Context from the EVM StateDB") - return - } - ctx = stateDB.GetContext() - - // 2 | Parse the ABI method +func DecomposeInput( + abi *gethabi.ABI, input []byte, +) (method *gethabi.Method, args []interface{}, err error) { // ABI method IDs are exactly 4 bytes according to "gethabi.ABI.MethodByID". if len(input) < 4 { readableBz := collections.HumanizeBytes(input) @@ -137,5 +102,5 @@ func OnRunStart( return } - return ctx, method, args, nil + return method, args, nil } diff --git a/x/evm/precompile/precompile_test.go b/x/evm/precompile/precompile_test.go deleted file mode 100644 index 22dbbc8e6..000000000 --- a/x/evm/precompile/precompile_test.go +++ /dev/null @@ -1,50 +0,0 @@ -package precompile_test - -import ( - "math/big" - "sort" - - gethcommon "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/vm" - - "github.com/NibiruChain/nibiru/v2/x/common/omap" - "github.com/NibiruChain/nibiru/v2/x/evm/evmtest" - "github.com/NibiruChain/nibiru/v2/x/evm/precompile" -) - -// This test proves that: -// 1. The VM precompiles are ordered -// 2. The output map from InitPrecompiles has the same addresses as the slice -// of VM precompile addresses -// 3. The ordered map produces the same ordered address slice. -// -// The VM precompiles are expected to be sorted. You'll notice from reading -// the constants for precompile addresses imported from -// "github.com/ethereum/go-ethereum/core/vm" that the order goes 1, 2, 3, ... -func (s *Suite) TestOrderedPrecompileAddresses() { - s.T().Log("1 | Prepare test inputs from output of \"precompile.InitPrecompiles\"") - // Types are written out to make the test easier to read. - // Note that orderedKeys must be set after InitPrecompiles to mirror the - // behavior of the Nibiru BaseApp. - deps := evmtest.NewTestDeps() - var unorderedMap map[gethcommon.Address]vm.PrecompiledContract = precompile.InitPrecompiles(deps.App.PublicKeepers) - var orderedKeys []gethcommon.Address = vm.PrecompiledAddressesBerlin - - s.T().Log("2 | Compute ordered keys from VM") - var vmAddrInts []*big.Int - var vmAddrIntsBefore []*big.Int // unchanged copy of vmAddrInts - for _, addr := range vm.PrecompiledAddressesBerlin { - vmAddrInt := new(big.Int).SetBytes(addr.Bytes()) - vmAddrInts = append(vmAddrInts, vmAddrInt) - vmAddrIntsBefore = append(vmAddrIntsBefore, vmAddrInt) - } - lessFunc := func(i, j int) bool { - return vmAddrInts[i].Cmp(vmAddrInts[j]) < 0 - } - sort.Slice(vmAddrInts, lessFunc) - s.Require().EqualValues(vmAddrInts, vmAddrIntsBefore, "vm precompiles not ordered in InitPrecompiles") - - s.T().Log("3 | The ordered map produces the same ordered address slice") - om := omap.SortedMap_EthAddress[vm.PrecompiledContract](unorderedMap) - s.Require().EqualValues(orderedKeys, om.Keys()) -}