From 7b3f72b8df81501b2b7ee1d3133b1c3000211c45 Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Fri, 3 Feb 2023 23:44:10 -0500 Subject: [PATCH 1/6] refactor(spot): rename x/dex to x/spot --- app/app.go | 36 +- go.mod | 5 +- go.sum | 12 +- proto/{dex => spot}/v1/event.proto | 2 +- proto/{dex => spot}/v1/genesis.proto | 6 +- proto/{dex => spot}/v1/params.proto | 2 +- proto/{dex => spot}/v1/pool.proto | 2 +- proto/{dex => spot}/v1/query.proto | 8 +- proto/{dex => spot}/v1/tx.proto | 4 +- x/common/testutil/mock/dex_pool.go | 2 +- x/dex/genesis_test.go | 16 +- x/dex/keeper/liquidity_test.go | 10 +- x/dex/keeper/params_test.go | 2 +- x/dex/keeper/swap_test.go | 2 +- x/dex/spec/02_state.md | 15 - x/dex/spec/05_params.md | 20 - x/dex/spec/07_hooks.md | 3 - x/dex/spec/README.md | 3 - x/{dex => spot}/client/cli/flags.go | 2 +- x/{dex => spot}/client/cli/query.go | 20 +- x/{dex => spot}/client/cli/tx.go | 8 +- x/{dex => spot}/client/testutil/cli_test.go | 0 x/{dex => spot}/client/testutil/suite.go | 10 +- .../client/testutil/test_helpers.go | 4 +- x/{dex => spot}/genesis.go | 10 +- x/spot/genesis_test.go | 28 ++ x/{dex => spot}/handler.go | 6 +- x/{dex => spot}/keeper/balances.go | 0 x/{dex => spot}/keeper/balances_test.go | 0 x/{dex => spot}/keeper/grpc_query.go | 2 +- x/{dex => spot}/keeper/grpc_query_test.go | 4 +- x/{dex => spot}/keeper/keeper.go | 8 +- x/{dex => spot}/keeper/keeper_test.go | 2 +- x/{dex => spot}/keeper/liquidity.go | 12 +- x/spot/keeper/liquidity_test.go | 125 ++++++ x/{dex => spot}/keeper/msg_server.go | 2 +- x/{dex => spot}/keeper/msg_server_test.go | 4 +- x/{dex => spot}/keeper/params.go | 2 +- x/spot/keeper/params_test.go | 19 + x/{dex => spot}/keeper/swap.go | 2 +- x/spot/keeper/swap_test.go | 399 ++++++++++++++++++ x/{dex => spot}/math/constant_function.go | 0 .../math/constant_function_test.go | 0 x/{dex => spot}/module.go | 8 +- x/{dex => spot}/module_simulation.go | 8 +- x/{dex => spot}/simulation/operations.go | 4 +- x/{dex => spot}/spec/01_concepts.md | 0 x/spot/spec/02_state.md | 15 + x/{dex => spot}/spec/03_messages.md | 0 x/{dex => spot}/spec/04_client.md | 38 +- x/spot/spec/05_params.md | 20 + x/{dex => spot}/spec/06_events.md | 0 x/spot/spec/07_hooks.md | 3 + x/{dex => spot}/spec/08_begin_block.md | 0 x/{dex => spot}/spec/09_end_block.md | 0 .../spec/10_future_improvements.md | 0 x/{dex => spot}/spec/11_tests.md | 0 x/spot/spec/README.md | 3 + x/{dex => spot}/types/codec.go | 0 x/{dex => spot}/types/constants.go | 0 x/{dex => spot}/types/errors.go | 2 +- x/{dex => spot}/types/event.pb.go | 70 +-- x/{dex => spot}/types/expected_keepers.go | 0 x/{dex => spot}/types/genesis.go | 0 x/{dex => spot}/types/genesis.pb.go | 38 +- x/{dex => spot}/types/genesis_test.go | 2 +- x/{dex => spot}/types/keys.go | 0 x/{dex => spot}/types/message.go | 0 x/{dex => spot}/types/message_test.go | 0 x/{dex => spot}/types/misc/stabletests.csv | 0 x/{dex => spot}/types/params.go | 0 x/{dex => spot}/types/params.pb.go | 50 +-- x/{dex => spot}/types/pool.go | 0 x/{dex => spot}/types/pool.pb.go | 94 ++--- x/{dex => spot}/types/pool_asset.go | 0 x/{dex => spot}/types/pool_asset_test.go | 0 x/{dex => spot}/types/pool_test.go | 0 x/{dex => spot}/types/price.go | 0 x/{dex => spot}/types/price_test.go | 0 x/{dex => spot}/types/query.pb.go | 266 ++++++------ x/{dex => spot}/types/query.pb.gw.go | 2 +- x/{dex => spot}/types/shares.go | 0 x/{dex => spot}/types/shares_test.go | 0 x/{dex => spot}/types/swap.go | 2 +- x/{dex => spot}/types/swap_test.go | 0 x/{dex => spot}/types/tx.pb.go | 132 +++--- x/{dex => spot}/types/tx.pb.gw.go | 2 +- x/{dex => spot}/types/utils.go | 0 x/{dex => spot}/types/utils_test.go | 0 x/stablecoin/keeper/keeper.go | 6 +- x/stablecoin/keeper/supply.go | 2 +- x/stablecoin/keeper/supply_test.go | 22 +- x/stablecoin/mock/dex_keeper.go | 2 +- x/stablecoin/types/expected_keepers.go | 8 +- x/vpool/client/cli/query.go | 2 +- 95 files changed, 1093 insertions(+), 527 deletions(-) rename proto/{dex => spot}/v1/event.proto (93%) rename proto/{dex => spot}/v1/genesis.proto (50%) rename proto/{dex => spot}/v1/params.proto (92%) rename proto/{dex => spot}/v1/pool.proto (97%) rename proto/{dex => spot}/v1/query.proto (98%) rename proto/{dex => spot}/v1/tx.proto (97%) delete mode 100644 x/dex/spec/02_state.md delete mode 100644 x/dex/spec/05_params.md delete mode 100644 x/dex/spec/07_hooks.md delete mode 100644 x/dex/spec/README.md rename x/{dex => spot}/client/cli/flags.go (98%) rename x/{dex => spot}/client/cli/query.go (92%) rename x/{dex => spot}/client/cli/tx.go (95%) rename x/{dex => spot}/client/testutil/cli_test.go (100%) rename x/{dex => spot}/client/testutil/suite.go (98%) rename x/{dex => spot}/client/testutil/test_helpers.go (98%) rename x/{dex => spot}/genesis.go (62%) create mode 100644 x/spot/genesis_test.go rename x/{dex => spot}/handler.go (90%) rename x/{dex => spot}/keeper/balances.go (100%) rename x/{dex => spot}/keeper/balances_test.go (100%) rename x/{dex => spot}/keeper/grpc_query.go (99%) rename x/{dex => spot}/keeper/grpc_query_test.go (99%) rename x/{dex => spot}/keeper/keeper.go (98%) rename x/{dex => spot}/keeper/keeper_test.go (99%) rename x/{dex => spot}/keeper/liquidity.go (90%) create mode 100644 x/spot/keeper/liquidity_test.go rename x/{dex => spot}/keeper/msg_server.go (98%) rename x/{dex => spot}/keeper/msg_server_test.go (99%) rename x/{dex => spot}/keeper/params.go (88%) create mode 100644 x/spot/keeper/params_test.go rename x/{dex => spot}/keeper/swap.go (98%) create mode 100644 x/spot/keeper/swap_test.go rename x/{dex => spot}/math/constant_function.go (100%) rename x/{dex => spot}/math/constant_function_test.go (100%) rename x/{dex => spot}/module.go (97%) rename x/{dex => spot}/module_simulation.go (85%) rename x/{dex => spot}/simulation/operations.go (99%) rename x/{dex => spot}/spec/01_concepts.md (100%) create mode 100644 x/spot/spec/02_state.md rename x/{dex => spot}/spec/03_messages.md (100%) rename x/{dex => spot}/spec/04_client.md (76%) create mode 100644 x/spot/spec/05_params.md rename x/{dex => spot}/spec/06_events.md (100%) create mode 100644 x/spot/spec/07_hooks.md rename x/{dex => spot}/spec/08_begin_block.md (100%) rename x/{dex => spot}/spec/09_end_block.md (100%) rename x/{dex => spot}/spec/10_future_improvements.md (100%) rename x/{dex => spot}/spec/11_tests.md (100%) create mode 100644 x/spot/spec/README.md rename x/{dex => spot}/types/codec.go (100%) rename x/{dex => spot}/types/constants.go (100%) rename x/{dex => spot}/types/errors.go (98%) rename x/{dex => spot}/types/event.pb.go (91%) rename x/{dex => spot}/types/expected_keepers.go (100%) rename x/{dex => spot}/types/genesis.go (100%) rename x/{dex => spot}/types/genesis.pb.go (82%) rename x/{dex => spot}/types/genesis_test.go (92%) rename x/{dex => spot}/types/keys.go (100%) rename x/{dex => spot}/types/message.go (100%) rename x/{dex => spot}/types/message_test.go (100%) rename x/{dex => spot}/types/misc/stabletests.csv (100%) rename x/{dex => spot}/types/params.go (100%) rename x/{dex => spot}/types/params.pb.go (81%) rename x/{dex => spot}/types/pool.go (100%) rename x/{dex => spot}/types/pool.pb.go (86%) rename x/{dex => spot}/types/pool_asset.go (100%) rename x/{dex => spot}/types/pool_asset_test.go (100%) rename x/{dex => spot}/types/pool_test.go (100%) rename x/{dex => spot}/types/price.go (100%) rename x/{dex => spot}/types/price_test.go (100%) rename x/{dex => spot}/types/query.pb.go (93%) rename x/{dex => spot}/types/query.pb.gw.go (99%) rename x/{dex => spot}/types/shares.go (100%) rename x/{dex => spot}/types/shares_test.go (100%) rename x/{dex => spot}/types/swap.go (99%) rename x/{dex => spot}/types/swap_test.go (100%) rename x/{dex => spot}/types/tx.pb.go (90%) rename x/{dex => spot}/types/tx.pb.gw.go (99%) rename x/{dex => spot}/types/utils.go (100%) rename x/{dex => spot}/types/utils_test.go (100%) diff --git a/app/app.go b/app/app.go index d7cc3ad16..cff012844 100644 --- a/app/app.go +++ b/app/app.go @@ -8,9 +8,8 @@ import ( "os" "path/filepath" + "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - "github.com/prometheus/client_golang/prometheus" - "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" _ "github.com/cosmos/cosmos-sdk/client/docs/statik" @@ -94,6 +93,7 @@ import ( ibckeeper "github.com/cosmos/ibc-go/v3/modules/core/keeper" ibctesting "github.com/cosmos/ibc-go/v3/testing" "github.com/gorilla/mux" + "github.com/prometheus/client_golang/prometheus" "github.com/rakyll/statik/fs" "github.com/spf13/cast" abci "github.com/tendermint/tendermint/abci/types" @@ -101,12 +101,7 @@ import ( tmos "github.com/tendermint/tendermint/libs/os" dbm "github.com/tendermint/tm-db" - "github.com/CosmWasm/wasmd/x/wasm" - "github.com/NibiruChain/nibiru/x/common" - "github.com/NibiruChain/nibiru/x/dex" - dexkeeper "github.com/NibiruChain/nibiru/x/dex/keeper" - dextypes "github.com/NibiruChain/nibiru/x/dex/types" "github.com/NibiruChain/nibiru/x/epochs" epochskeeper "github.com/NibiruChain/nibiru/x/epochs/keeper" epochstypes "github.com/NibiruChain/nibiru/x/epochs/types" @@ -116,6 +111,9 @@ import ( "github.com/NibiruChain/nibiru/x/perp" perpkeeper "github.com/NibiruChain/nibiru/x/perp/keeper" perptypes "github.com/NibiruChain/nibiru/x/perp/types" + "github.com/NibiruChain/nibiru/x/spot" + spotkeeper "github.com/NibiruChain/nibiru/x/spot/keeper" + spottypes "github.com/NibiruChain/nibiru/x/spot/types" "github.com/NibiruChain/nibiru/x/stablecoin" stablecoinkeeper "github.com/NibiruChain/nibiru/x/stablecoin/keeper" stablecointypes "github.com/NibiruChain/nibiru/x/stablecoin/types" @@ -171,7 +169,7 @@ var ( ibc.AppModuleBasic{}, ibctransfer.AppModuleBasic{}, // native x/ - dex.AppModuleBasic{}, + spot.AppModuleBasic{}, oracle.AppModuleBasic{}, epochs.AppModuleBasic{}, stablecoin.AppModuleBasic{}, @@ -189,7 +187,7 @@ var ( stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, govtypes.ModuleName: {authtypes.Burner}, - dextypes.ModuleName: {authtypes.Minter, authtypes.Burner}, + spottypes.ModuleName: {authtypes.Minter, authtypes.Burner}, oracletypes.ModuleName: {}, ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner}, stablecointypes.ModuleName: {authtypes.Minter, authtypes.Burner}, @@ -270,7 +268,7 @@ type NibiruApp struct { EpochsKeeper epochskeeper.Keeper PerpKeeper perpkeeper.Keeper VpoolKeeper vpoolkeeper.Keeper - DexKeeper dexkeeper.Keeper + DexKeeper spotkeeper.Keeper OracleKeeper oraclekeeper.Keeper StablecoinKeeper stablecoinkeeper.Keeper @@ -348,7 +346,7 @@ func NewNibiruApp( ibchost.StoreKey, ibctransfertypes.StoreKey, // nibiru x/ keys - dextypes.StoreKey, + spottypes.StoreKey, stablecointypes.StoreKey, oracletypes.StoreKey, epochstypes.StoreKey, @@ -437,8 +435,8 @@ func NewNibiruApp( // ---------------------------------- Nibiru Chain x/ keepers - app.DexKeeper = dexkeeper.NewKeeper( - appCodec, keys[dextypes.StoreKey], app.GetSubspace(dextypes.ModuleName), + app.DexKeeper = spotkeeper.NewKeeper( + appCodec, keys[spottypes.StoreKey], app.GetSubspace(spottypes.ModuleName), app.AccountKeeper, app.BankKeeper, app.distrKeeper) app.OracleKeeper = oraclekeeper.NewKeeper(appCodec, keys[oracletypes.StoreKey], app.GetSubspace(oracletypes.ModuleName), @@ -572,7 +570,7 @@ func NewNibiruApp( var skipGenesisInvariants = cast.ToBool( appOpts.Get(crisis.FlagSkipGenesisInvariants)) - dexModule := dex.NewAppModule( + spotModule := spot.NewAppModule( appCodec, app.DexKeeper, app.AccountKeeper, app.BankKeeper) oracleModule := oracle.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper) epochsModule := epochs.NewAppModule(appCodec, app.EpochsKeeper) @@ -612,7 +610,7 @@ func NewNibiruApp( authzmodule.NewAppModule(appCodec, app.authzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), // native x/ - dexModule, + spotModule, stablecoinModule, oracleModule, epochsModule, @@ -651,7 +649,7 @@ func NewNibiruApp( vestingtypes.ModuleName, stakingtypes.ModuleName, // native x/ - dextypes.ModuleName, + spottypes.ModuleName, oracletypes.ModuleName, epochstypes.ModuleName, stablecointypes.ModuleName, @@ -683,7 +681,7 @@ func NewNibiruApp( // native x/ epochstypes.ModuleName, stablecointypes.ModuleName, - dextypes.ModuleName, + spottypes.ModuleName, oracletypes.ModuleName, vpooltypes.ModuleName, perptypes.ModuleName, @@ -719,7 +717,7 @@ func NewNibiruApp( // native x/ epochstypes.ModuleName, stablecointypes.ModuleName, - dextypes.ModuleName, + spottypes.ModuleName, oracletypes.ModuleName, vpooltypes.ModuleName, perptypes.ModuleName, @@ -1016,7 +1014,7 @@ func initParamsKeeper( paramsKeeper.Subspace(govtypes.ModuleName).WithKeyTable(govtypes.ParamKeyTable()) paramsKeeper.Subspace(crisistypes.ModuleName) // Native params keepers - paramsKeeper.Subspace(dextypes.ModuleName) + paramsKeeper.Subspace(spottypes.ModuleName) paramsKeeper.Subspace(oracletypes.ModuleName) paramsKeeper.Subspace(epochstypes.ModuleName) paramsKeeper.Subspace(stablecointypes.ModuleName) diff --git a/go.mod b/go.mod index c302e74e5..a56a982ec 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.19 require ( github.com/CosmWasm/wasmd v0.29.1 github.com/NibiruChain/collections v0.1.1 - github.com/cosmos/cosmos-sdk v0.45.12 + github.com/cosmos/cosmos-sdk v0.45.10 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/ibc-go/v3 v3.4.0 github.com/gogo/protobuf v1.3.3 @@ -113,8 +113,9 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect + github.com/tendermint/btcd v0.1.1 // indirect + github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.5.0 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.etcd.io/bbolt v1.3.6 // indirect diff --git a/go.sum b/go.sum index 23980e5c9..92b4d8c7f 100644 --- a/go.sum +++ b/go.sum @@ -171,8 +171,8 @@ github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44= github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= github.com/cosmos/cosmos-proto v1.0.0-alpha7 h1:yqYUOHF2jopwZh4dVQp3xgqwftE5/2hkrwIV6vkUbO0= github.com/cosmos/cosmos-proto v1.0.0-alpha7/go.mod h1:dosO4pSAbJF8zWCzCoTWP7nNsjcvSUBQmniFxDg5daw= -github.com/cosmos/cosmos-sdk v0.45.12 h1:Z0kOOjOfHP+loO42KZZo3Y+PAZsoYycyiSckVXzwOm4= -github.com/cosmos/cosmos-sdk v0.45.12/go.mod h1:ZAdIs09zttoA3aSwQCTK9gecOThUVNnzBSVj3DiS6UY= +github.com/cosmos/cosmos-sdk v0.45.10 h1:YRf1N6C7OFCc8FJ5wuhcnDDySJNDn5DxSscVgbeXgz4= +github.com/cosmos/cosmos-sdk v0.45.10/go.mod h1:CbfWNs4PuxxsvRD/snQuSBDwIhtsD7rIDTVQyYMKTa0= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -462,7 +462,7 @@ github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jhump/protoreflect v1.13.1-0.20220928232736-101791cb1b4c h1:XImQJfpJLmGEEd8ll5yPVyL/aEvmgGHW4WYTyNseLOM= +github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b h1:izTof8BKh/nE1wrKOrloNA5q4odOarjf+Xpe+4qow98= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= @@ -766,14 +766,16 @@ github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNG github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s= +github.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U= +github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI= +github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tendermint/tendermint v0.34.24 h1:879MKKJWYYPJEMMKME+DWUTY4V9f/FBpnZDI82ky+4k= github.com/tendermint/tendermint v0.34.24/go.mod h1:rXVrl4OYzmIa1I91av3iLv2HS0fGSiucyW9J4aMTpKI= github.com/tendermint/tm-db v0.6.7 h1:fE00Cbl0jayAoqlExN6oyQJ7fR/ZtoVOmvPJ//+shu8= github.com/tendermint/tm-db v0.6.7/go.mod h1:byQDzFkZV1syXr/ReXS808NxA2xvyuuVgXOJ/088L6I= -github.com/tidwall/btree v1.5.0 h1:iV0yVY/frd7r6qGBXfEYs7DH0gTDgrKTrDjS7xt/IyQ= -github.com/tidwall/btree v1.5.0/go.mod h1:LGm8L/DZjPLmeWGjv5kFrY8dL4uVhMmzmmLYmsObdKE= github.com/tidwall/gjson v1.6.7/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= diff --git a/proto/dex/v1/event.proto b/proto/spot/v1/event.proto similarity index 93% rename from proto/dex/v1/event.proto rename to proto/spot/v1/event.proto index ba25d253a..eb8dcbdb1 100644 --- a/proto/dex/v1/event.proto +++ b/proto/spot/v1/event.proto @@ -5,7 +5,7 @@ package nibiru.dex.v1; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/dex/types"; +option go_package = "github.com/NibiruChain/nibiru/x/spot/types"; message EventPoolJoined { string address = 1; diff --git a/proto/dex/v1/genesis.proto b/proto/spot/v1/genesis.proto similarity index 50% rename from proto/dex/v1/genesis.proto rename to proto/spot/v1/genesis.proto index d2c5bda94..3dfc6f9ac 100644 --- a/proto/dex/v1/genesis.proto +++ b/proto/spot/v1/genesis.proto @@ -2,12 +2,12 @@ syntax = "proto3"; package nibiru.dex.v1; -import "dex/v1/params.proto"; +import "spot/v1/params.proto"; import "gogoproto/gogo.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/dex/types"; +option go_package = "github.com/NibiruChain/nibiru/x/spot/types"; -// GenesisState defines the dex module's genesis state. +// GenesisState defines the spot module's genesis state. message GenesisState { Params params = 1 [(gogoproto.nullable) = false]; } diff --git a/proto/dex/v1/params.proto b/proto/spot/v1/params.proto similarity index 92% rename from proto/dex/v1/params.proto rename to proto/spot/v1/params.proto index 2b458a876..e594751e7 100644 --- a/proto/dex/v1/params.proto +++ b/proto/spot/v1/params.proto @@ -6,7 +6,7 @@ import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos_proto/cosmos.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/dex/types"; +option go_package = "github.com/NibiruChain/nibiru/x/spot/types"; // Params defines the parameters for the module. message Params { diff --git a/proto/dex/v1/pool.proto b/proto/spot/v1/pool.proto similarity index 97% rename from proto/dex/v1/pool.proto rename to proto/spot/v1/pool.proto index 100a11780..1f4478581 100644 --- a/proto/dex/v1/pool.proto +++ b/proto/spot/v1/pool.proto @@ -6,7 +6,7 @@ import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos_proto/cosmos.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/dex/types"; +option go_package = "github.com/NibiruChain/nibiru/x/spot/types"; // Configuration parameters for the pool. message PoolParams { diff --git a/proto/dex/v1/query.proto b/proto/spot/v1/query.proto similarity index 98% rename from proto/dex/v1/query.proto rename to proto/spot/v1/query.proto index 663feb758..a52b14a41 100644 --- a/proto/dex/v1/query.proto +++ b/proto/spot/v1/query.proto @@ -5,15 +5,15 @@ package nibiru.dex.v1; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; -import "dex/v1/params.proto"; -import "dex/v1/pool.proto"; +import "spot/v1/params.proto"; +import "spot/v1/pool.proto"; import "cosmos/base/v1beta1/coin.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/dex/types"; +option go_package = "github.com/NibiruChain/nibiru/x/spot/types"; // Query defines the gRPC querier service. service Query { - // Parameters of the dex module. + // Parameters of the spot module. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/nibiru/dex/params"; } diff --git a/proto/dex/v1/tx.proto b/proto/spot/v1/tx.proto similarity index 97% rename from proto/dex/v1/tx.proto rename to proto/spot/v1/tx.proto index 7749e6eaf..ef52a493d 100644 --- a/proto/dex/v1/tx.proto +++ b/proto/spot/v1/tx.proto @@ -2,12 +2,12 @@ syntax = "proto3"; package nibiru.dex.v1; -import "dex/v1/pool.proto"; +import "spot/v1/pool.proto"; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; import "google/api/annotations.proto"; -option go_package = "github.com/NibiruChain/nibiru/x/dex/types"; +option go_package = "github.com/NibiruChain/nibiru/x/spot/types"; // Msg defines the Msg service. service Msg { diff --git a/x/common/testutil/mock/dex_pool.go b/x/common/testutil/mock/dex_pool.go index f3c2906d9..0fde19ec0 100644 --- a/x/common/testutil/mock/dex_pool.go +++ b/x/common/testutil/mock/dex_pool.go @@ -3,7 +3,7 @@ package mock import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/types" ) // helper function to create dummy test pools diff --git a/x/dex/genesis_test.go b/x/dex/genesis_test.go index fe6f3217a..3b522cc71 100644 --- a/x/dex/genesis_test.go +++ b/x/dex/genesis_test.go @@ -1,16 +1,14 @@ -package dex_test +package spot_test import ( "testing" - "github.com/NibiruChain/nibiru/x/common/testutil" - - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/dex" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/common/testutil" + "github.com/NibiruChain/nibiru/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/x/spot" + "github.com/NibiruChain/nibiru/x/spot/types" ) func TestGenesis(t *testing.T) { @@ -19,8 +17,8 @@ func TestGenesis(t *testing.T) { } app, ctx := testapp.NewTestNibiruAppAndContext(true) - dex.InitGenesis(ctx, app.DexKeeper, genesisState) - got := dex.ExportGenesis(ctx, app.DexKeeper) + spot.InitGenesis(ctx, app.DexKeeper, genesisState) + got := spot.ExportGenesis(ctx, app.DexKeeper) require.NotNil(t, got) testutil.Fill(&genesisState) diff --git a/x/dex/keeper/liquidity_test.go b/x/dex/keeper/liquidity_test.go index 1b059c522..b1a6acbab 100644 --- a/x/dex/keeper/liquidity_test.go +++ b/x/dex/keeper/liquidity_test.go @@ -3,12 +3,12 @@ package keeper_test import ( "testing" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - dexkeeper "github.com/NibiruChain/nibiru/x/dex/keeper" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/NibiruChain/nibiru/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/x/spot/keeper" ) func TestGetSetDenomLiquidity(t *testing.T) { @@ -53,11 +53,11 @@ func TestGetTotalLiquidity(t *testing.T) { func assertLiqValues( t *testing.T, ctx sdk.Context, - dexKeeper dexkeeper.Keeper, + spotKeeper keeper.Keeper, expected map[string]sdk.Int, ) { for denom, expectedLiq := range expected { - liq, err := dexKeeper.GetDenomLiquidity(ctx, denom) + liq, err := spotKeeper.GetDenomLiquidity(ctx, denom) assert.NoError(t, err) assert.EqualValues(t, liq, expectedLiq) } diff --git a/x/dex/keeper/params_test.go b/x/dex/keeper/params_test.go index 75c8edd9c..6ecd0a065 100644 --- a/x/dex/keeper/params_test.go +++ b/x/dex/keeper/params_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/types" ) func TestGetParams(t *testing.T) { diff --git a/x/dex/keeper/swap_test.go b/x/dex/keeper/swap_test.go index f0cdfe2d4..6a5993d05 100644 --- a/x/dex/keeper/swap_test.go +++ b/x/dex/keeper/swap_test.go @@ -15,7 +15,7 @@ import ( "github.com/stretchr/testify/require" "github.com/NibiruChain/nibiru/x/common/testutil/mock" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/types" ) func TestSwapExactAmountIn(t *testing.T) { diff --git a/x/dex/spec/02_state.md b/x/dex/spec/02_state.md deleted file mode 100644 index 715bbf25a..000000000 --- a/x/dex/spec/02_state.md +++ /dev/null @@ -1,15 +0,0 @@ -# State - -## Next Pool Number - -The dex module stores a monotonically increasing counter denoting the next available integer pool number. Pool numbers start at 1 and increase every time a pool is created. The `Keeper.GetNextPoolNumberAndIncrement` function always fetches the next availble pool number and increments the stored value by 1. - -## Pools - -Serialized protobufs representing pools are stored in the state, with the key 0x02 | poolId. See the [pool proto file](../../../proto/dex/v1/pool.proto) for what fields a pool has. - -## Total Liquidity - -The dex module also stores the total liquidity in the module's account, which is the sum of all assets aggregated across all pools. The total liquidity is updated every time a pool's liquidity is updated (either through creation, joining, exiting, or swaps). - -The total liquidity is stored with key 0x03 | denom. diff --git a/x/dex/spec/05_params.md b/x/dex/spec/05_params.md deleted file mode 100644 index c16cedbf7..000000000 --- a/x/dex/spec/05_params.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# Parameters - -The dex module contains the following parameters: - -| Key | Type | Example | -| ------------------ | ------------- | ------------ | -| StartingPoolNumber | uint64 | 1 | -| PoolCreationFee | sdk.Coins | 1000000ubini | - -## StartingPoolNumber - -The initial pool number to start creating pools at. - -## PoolCreationFee - -The amount of coins taken as a fee for creating a pool, from the pool creator's address. diff --git a/x/dex/spec/07_hooks.md b/x/dex/spec/07_hooks.md deleted file mode 100644 index 1a2bcad26..000000000 --- a/x/dex/spec/07_hooks.md +++ /dev/null @@ -1,3 +0,0 @@ -# Hooks - -As of this time, there are no hooks into the x/dex module. \ No newline at end of file diff --git a/x/dex/spec/README.md b/x/dex/spec/README.md deleted file mode 100644 index d0930c02c..000000000 --- a/x/dex/spec/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# DEX Module - -The x/dex module is responsible for creating, joining, and exiting liquidity pools. It also allows users to swap between two assets in an existing pool. It's a fully functional AMM. diff --git a/x/dex/client/cli/flags.go b/x/spot/client/cli/flags.go similarity index 98% rename from x/dex/client/cli/flags.go rename to x/spot/client/cli/flags.go index 68abfa9c1..a6aa3b94b 100644 --- a/x/dex/client/cli/flags.go +++ b/x/spot/client/cli/flags.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" flag "github.com/spf13/pflag" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/types" ) const ( diff --git a/x/dex/client/cli/query.go b/x/spot/client/cli/query.go similarity index 92% rename from x/dex/client/cli/query.go rename to x/spot/client/cli/query.go index d5930bf6f..793829b16 100644 --- a/x/dex/client/cli/query.go +++ b/x/spot/client/cli/query.go @@ -11,7 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/spf13/cobra" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/types" "github.com/cosmos/cosmos-sdk/client/flags" ) @@ -20,8 +20,8 @@ var _ = strconv.Itoa(0) // GetQueryCmd returns the cli query commands for this module func GetQueryCmd() *cobra.Command { - // Group dex queries under a subcommand - dexQueryCommand := &cobra.Command{ + // Group spot queries under a subcommand + spotQueryCmd := &cobra.Command{ Use: types.ModuleName, Short: fmt.Sprintf( "Querying commands for the %s module", types.ModuleName), @@ -30,19 +30,15 @@ func GetQueryCmd() *cobra.Command { RunE: client.ValidateCmd, } - commands := []*cobra.Command{ + spotQueryCmd.AddCommand( CmdQueryParams(), CmdGetPoolNumber(), CmdGetPool(), CmdTotalLiquidity(), CmdTotalPoolLiquidity(), - } - - for _, cmd := range commands { - dexQueryCommand.AddCommand(cmd) - } + ) - return dexQueryCommand + return spotQueryCmd } func CmdGetPoolNumber() *cobra.Command { @@ -138,7 +134,7 @@ func CmdTotalLiquidity() *cobra.Command { Long: strings.TrimSpace( fmt.Sprintf(`Query total-liquidity. Example: -$ %s query dex total-liquidity +$ %s query spot total-liquidity `, version.AppName, ), ), @@ -169,7 +165,7 @@ func CmdTotalPoolLiquidity() *cobra.Command { Long: strings.TrimSpace( fmt.Sprintf(`Query total-liquidity. Example: -$ %s query dex pool-liquidity 1 +$ %s query spot pool-liquidity 1 `, version.AppName, ), ), diff --git a/x/dex/client/cli/tx.go b/x/spot/client/cli/tx.go similarity index 95% rename from x/dex/client/cli/tx.go rename to x/spot/client/cli/tx.go index 1a10b9c56..2b77791cb 100644 --- a/x/dex/client/cli/tx.go +++ b/x/spot/client/cli/tx.go @@ -13,7 +13,7 @@ import ( "github.com/cosmos/cosmos-sdk/version" "github.com/spf13/cobra" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/types" ) // GetTxCmd returns the transaction commands for this module @@ -43,7 +43,7 @@ func CmdSwapAssets() *cobra.Command { Long: strings.TrimSpace( fmt.Sprintf(` Example: -$ %s tx dex swap-assets --pool-id 1 --tokens-in 100stake --token-out-denom validatortoken --from validator +$ %s tx spot swap-assets --pool-id 1 --tokens-in 100stake --token-out-denom validatortoken --from validator `, version.AppName, ), @@ -165,7 +165,7 @@ func CmdExitPool() *cobra.Command { Long: strings.TrimSpace( fmt.Sprintf(` Example: -$ %s tx dex exit-pool --pool-id 1 --pool-shares-out 100nibiru/pool/1 --from validator +$ %s tx spot exit-pool --pool-id 1 --pool-shares-out 100nibiru/pool/1 --from validator `, version.AppName, ), @@ -224,7 +224,7 @@ func CmdCreatePool() *cobra.Command { Pool initialization parameters must be provided through a pool JSON file. Example: -$ %s tx dex create-pool --pool-file="path/to/pool.json" --from validator +$ %s tx spot create-pool --pool-file="path/to/pool.json" --from validator Where pool.json contains: { diff --git a/x/dex/client/testutil/cli_test.go b/x/spot/client/testutil/cli_test.go similarity index 100% rename from x/dex/client/testutil/cli_test.go rename to x/spot/client/testutil/cli_test.go diff --git a/x/dex/client/testutil/suite.go b/x/spot/client/testutil/suite.go similarity index 98% rename from x/dex/client/testutil/suite.go rename to x/spot/client/testutil/suite.go index 588da138f..81f34a453 100644 --- a/x/dex/client/testutil/suite.go +++ b/x/spot/client/testutil/suite.go @@ -16,8 +16,8 @@ import ( tmcli "github.com/tendermint/tendermint/libs/cli" testutilcli "github.com/NibiruChain/nibiru/x/common/testutil/cli" - "github.com/NibiruChain/nibiru/x/dex/client/cli" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/client/cli" + "github.com/NibiruChain/nibiru/x/spot/types" ) type IntegrationTestSuite struct { @@ -377,7 +377,7 @@ func (s *IntegrationTestSuite) TestNewExitPoolCmd() { poolSharesOut: "100nibiru/pool/100", expectErr: false, respType: &sdk.TxResponse{}, - expectedCode: 1, // dex.types.ErrNonExistingPool + expectedCode: 1, // spot.types.ErrNonExistingPool expectedunibi: sdk.NewInt(-10), expectedOtherToken: sdk.NewInt(0), }, @@ -491,7 +491,7 @@ func (s *IntegrationTestSuite) TestNewExitStablePoolCmd() { poolSharesOut: "100nibiru/pool/100", expectErr: false, respType: &sdk.TxResponse{}, - expectedCode: 1, // dex.types.ErrNonExistingPool + expectedCode: 1, // spot.types.ErrNonExistingPool expectedunibi: sdk.NewInt(-10), expectedOtherToken: sdk.NewInt(0), }, @@ -577,7 +577,7 @@ func (s *IntegrationTestSuite) TestGetCmdTotalLiquidity() { expectErr bool }{ { - "query total liquidity", // nibid query dex total-liquidity + "query total liquidity", // nibid query spot total-liquidity []string{ fmt.Sprintf("--%s=%s", tmcli.OutputFlag, "json"), }, diff --git a/x/dex/client/testutil/test_helpers.go b/x/spot/client/testutil/test_helpers.go similarity index 98% rename from x/dex/client/testutil/test_helpers.go rename to x/spot/client/testutil/test_helpers.go index 082334c2d..7ec5f03d3 100644 --- a/x/dex/client/testutil/test_helpers.go +++ b/x/spot/client/testutil/test_helpers.go @@ -15,8 +15,8 @@ import ( "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/dex/client/cli" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/client/cli" + "github.com/NibiruChain/nibiru/x/spot/types" ) // commonArgs is args for CLI test commands. diff --git a/x/dex/genesis.go b/x/spot/genesis.go similarity index 62% rename from x/dex/genesis.go rename to x/spot/genesis.go index b9f398186..c19021849 100644 --- a/x/dex/genesis.go +++ b/x/spot/genesis.go @@ -1,19 +1,19 @@ -package dex +package spot import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/dex/keeper" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/keeper" + "github.com/NibiruChain/nibiru/x/spot/types" ) -// InitGenesis initializes the dex module's state from a provided genesis state. +// InitGenesis initializes the spot module's state from a provided genesis state. func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) { k.SetParams(ctx, genState.Params) k.SetNextPoolNumber(ctx, uint64(genState.Params.StartingPoolNumber)) } -// ExportGenesis returns the dex module's exported genesis. +// ExportGenesis returns the spot module's exported genesis. func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { genesis := types.DefaultGenesis() genesis.Params = k.GetParams(ctx) diff --git a/x/spot/genesis_test.go b/x/spot/genesis_test.go new file mode 100644 index 000000000..3b522cc71 --- /dev/null +++ b/x/spot/genesis_test.go @@ -0,0 +1,28 @@ +package spot_test + +import ( + "testing" + + "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/spot" + "github.com/NibiruChain/nibiru/x/spot/types" +) + +func TestGenesis(t *testing.T) { + genesisState := types.GenesisState{ + Params: types.DefaultParams(), + } + + app, ctx := testapp.NewTestNibiruAppAndContext(true) + spot.InitGenesis(ctx, app.DexKeeper, genesisState) + got := spot.ExportGenesis(ctx, app.DexKeeper) + require.NotNil(t, got) + + testutil.Fill(&genesisState) + testutil.Fill(got) + + require.Equal(t, genesisState, *got) +} diff --git a/x/dex/handler.go b/x/spot/handler.go similarity index 90% rename from x/dex/handler.go rename to x/spot/handler.go index 27f2e692a..c9990614c 100644 --- a/x/dex/handler.go +++ b/x/spot/handler.go @@ -1,4 +1,4 @@ -package dex +package spot import ( "fmt" @@ -6,8 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/NibiruChain/nibiru/x/dex/keeper" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/keeper" + "github.com/NibiruChain/nibiru/x/spot/types" ) // NewHandler ... diff --git a/x/dex/keeper/balances.go b/x/spot/keeper/balances.go similarity index 100% rename from x/dex/keeper/balances.go rename to x/spot/keeper/balances.go diff --git a/x/dex/keeper/balances_test.go b/x/spot/keeper/balances_test.go similarity index 100% rename from x/dex/keeper/balances_test.go rename to x/spot/keeper/balances_test.go diff --git a/x/dex/keeper/grpc_query.go b/x/spot/keeper/grpc_query.go similarity index 99% rename from x/dex/keeper/grpc_query.go rename to x/spot/keeper/grpc_query.go index 28fc762fe..5ee4ca028 100644 --- a/x/dex/keeper/grpc_query.go +++ b/x/spot/keeper/grpc_query.go @@ -11,7 +11,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/types" ) type queryServer struct { diff --git a/x/dex/keeper/grpc_query_test.go b/x/spot/keeper/grpc_query_test.go similarity index 99% rename from x/dex/keeper/grpc_query_test.go rename to x/spot/keeper/grpc_query_test.go index 6eebad600..85a947972 100644 --- a/x/dex/keeper/grpc_query_test.go +++ b/x/spot/keeper/grpc_query_test.go @@ -12,8 +12,8 @@ import ( "github.com/NibiruChain/nibiru/x/common/testutil" "github.com/NibiruChain/nibiru/x/common/testutil/mock" "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/dex/keeper" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/keeper" + "github.com/NibiruChain/nibiru/x/spot/types" ) func TestParamsQuery(t *testing.T) { diff --git a/x/dex/keeper/keeper.go b/x/spot/keeper/keeper.go similarity index 98% rename from x/dex/keeper/keeper.go rename to x/spot/keeper/keeper.go index fb5436a8e..e4bbb074c 100644 --- a/x/dex/keeper/keeper.go +++ b/x/spot/keeper/keeper.go @@ -12,7 +12,7 @@ import ( gogotypes "github.com/gogo/protobuf/types" "github.com/tendermint/tendermint/libs/log" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/types" ) type ( @@ -28,7 +28,7 @@ type ( ) /* -Creates a new keeper for the dex module. +Creates a new keeper for the spot module. args @@ -40,7 +40,7 @@ args ret - Keeper: a keeper for the dex module + Keeper: a keeper for the spot module */ func NewKeeper( cdc codec.BinaryCodec, @@ -377,7 +377,7 @@ func (k Keeper) NewPool( poolShareBaseDenom := types.GetPoolShareBaseDenom(pool.Id) poolShareDisplayDenom := types.GetPoolShareDisplayDenom(pool.Id) k.bankKeeper.SetDenomMetaData(ctx, banktypes.Metadata{ - Description: fmt.Sprintf("The share token of the nibiru dex pool %d", pool.Id), + Description: fmt.Sprintf("The share token of the nibiru spot amm pool %d", pool.Id), DenomUnits: []*banktypes.DenomUnit{ { Denom: poolShareBaseDenom, diff --git a/x/dex/keeper/keeper_test.go b/x/spot/keeper/keeper_test.go similarity index 99% rename from x/dex/keeper/keeper_test.go rename to x/spot/keeper/keeper_test.go index 7e52ebe13..6feff4d53 100644 --- a/x/dex/keeper/keeper_test.go +++ b/x/spot/keeper/keeper_test.go @@ -16,7 +16,7 @@ import ( "github.com/tendermint/tendermint/crypto/ed25519" "github.com/NibiruChain/nibiru/x/common/testutil/mock" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/types" ) func TestGetAndSetNextPoolNumber(t *testing.T) { diff --git a/x/dex/keeper/liquidity.go b/x/spot/keeper/liquidity.go similarity index 90% rename from x/dex/keeper/liquidity.go rename to x/spot/keeper/liquidity.go index ea71c8f1d..bb820bf8c 100644 --- a/x/dex/keeper/liquidity.go +++ b/x/spot/keeper/liquidity.go @@ -1,6 +1,6 @@ package keeper -// Everything to do with total liquidity in the dex and liquidity of specific coin denoms. +// Everything to do with total liquidity in the spot and liquidity of specific coin denoms. import ( "fmt" @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/NibiruChain/nibiru/x/common" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/types" ) /* @@ -60,7 +60,7 @@ func (k Keeper) SetDenomLiquidity(ctx sdk.Context, denom string, amount sdk.Int) } /* -Fetches the liquidity for all tokens in the dex. +Fetches the liquidity for all tokens in the spot. args: @@ -68,7 +68,7 @@ args: ret: - coins: an array of liquidities in the dex + coins: an array of liquidities in the spot */ func (k Keeper) GetTotalLiquidity(ctx sdk.Context) (coins sdk.Coins) { store := ctx.KVStore(k.storeKey) @@ -113,7 +113,7 @@ Increases the total liquidity of the provided coins by the coin amount. args: ctx: the cosmos-sdk context - coins: the coins added to the dex + coins: the coins added to the spot */ func (k Keeper) RecordTotalLiquidityIncrease(ctx sdk.Context, coins sdk.Coins) error { for _, coin := range coins { @@ -135,7 +135,7 @@ Increases the total liquidity of the provided coins by the coin amount. args: ctx: the cosmos-sdk context - coins: the coins removed from the dex + coins: the coins removed from the spot */ func (k Keeper) RecordTotalLiquidityDecrease(ctx sdk.Context, coins sdk.Coins) error { for _, coin := range coins { diff --git a/x/spot/keeper/liquidity_test.go b/x/spot/keeper/liquidity_test.go new file mode 100644 index 000000000..4b3fd19dd --- /dev/null +++ b/x/spot/keeper/liquidity_test.go @@ -0,0 +1,125 @@ +package keeper_test + +import ( + "testing" + + "github.com/NibiruChain/nibiru/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/x/spot/keeper" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestGetSetDenomLiquidity(t *testing.T) { + app, ctx := testapp.NewTestNibiruAppAndContext(true) + + // Write to store + coin := sdk.NewCoin("nibi", sdk.NewInt(1_000)) + assert.NoError(t, app.DexKeeper.SetDenomLiquidity(ctx, coin.Denom, coin.Amount)) + + // Read from store + amount, err := app.DexKeeper.GetDenomLiquidity(ctx, "nibi") + assert.NoError(t, err) + require.EqualValues(t, sdk.NewInt(1000), amount) +} + +func TestGetTotalLiquidity(t *testing.T) { + app, ctx := testapp.NewTestNibiruAppAndContext(true) + + // Write to store + coinMap := map[string]sdk.Int{ + "atom": sdk.NewInt(123), + "nibi": sdk.NewInt(456), + "foo": sdk.NewInt(789), + } + for denom, amount := range coinMap { + coin := sdk.NewCoin(denom, amount) + assert.NoError(t, app.DexKeeper.SetDenomLiquidity(ctx, coin.Denom, coin.Amount)) + } + + // Read from store + coins := app.DexKeeper.GetTotalLiquidity(ctx) + + require.EqualValues(t, sdk.NewCoins( + sdk.NewCoin("atom", coinMap["atom"]), + sdk.NewCoin("nibi", coinMap["nibi"]), + sdk.NewCoin("foo", coinMap["foo"]), + ), coins) +} + +// assertLiqValues checks if the total liquidity for each denom (key) of the +// expected map matches what's given by the DexKeeper +func assertLiqValues( + t *testing.T, + ctx sdk.Context, + spotKeeper keeper.Keeper, + expected map[string]sdk.Int, +) { + for denom, expectedLiq := range expected { + liq, err := spotKeeper.GetDenomLiquidity(ctx, denom) + assert.NoError(t, err) + assert.EqualValues(t, liq, expectedLiq) + } +} + +func TestSetTotalLiquidity(t *testing.T) { + app, ctx := testapp.NewTestNibiruAppAndContext(true) + + // Write to store + assert.NoError(t, app.DexKeeper.SetTotalLiquidity(ctx, sdk.NewCoins( + sdk.NewCoin("atom", sdk.NewInt(123)), + sdk.NewCoin("nibi", sdk.NewInt(456)), + sdk.NewCoin("foo", sdk.NewInt(789)), + ))) + + // Read from store + expectedLiqValues := map[string]sdk.Int{ + "atom": sdk.NewInt(123), + "nibi": sdk.NewInt(456), + "foo": sdk.NewInt(789), + } + assertLiqValues(t, ctx, app.DexKeeper, expectedLiqValues) +} + +func TestRecordTotalLiquidityIncrease(t *testing.T) { + app, ctx := testapp.NewTestNibiruAppAndContext(true) + + // Write to store + assert.NoError(t, app.DexKeeper.SetTotalLiquidity(ctx, sdk.NewCoins( + sdk.NewCoin("atom", sdk.NewInt(100)), + sdk.NewCoin("nibi", sdk.NewInt(200)), + ))) + err := app.DexKeeper.RecordTotalLiquidityIncrease(ctx, sdk.NewCoins( + sdk.NewCoin("atom", sdk.NewInt(50)), + sdk.NewCoin("nibi", sdk.NewInt(75)), + )) + assert.NoError(t, err) + + expectedLiqValues := map[string]sdk.Int{ + "atom": sdk.NewInt(150), + "nibi": sdk.NewInt(275), + } + assertLiqValues(t, ctx, app.DexKeeper, expectedLiqValues) +} + +func TestRecordTotalLiquidityDecrease(t *testing.T) { + app, ctx := testapp.NewTestNibiruAppAndContext(true) + + // Write to store + assert.NoError(t, app.DexKeeper.SetTotalLiquidity(ctx, sdk.NewCoins( + sdk.NewCoin("atom", sdk.NewInt(100)), + sdk.NewCoin("nibi", sdk.NewInt(200)), + ))) + err := app.DexKeeper.RecordTotalLiquidityDecrease(ctx, sdk.NewCoins( + sdk.NewCoin("atom", sdk.NewInt(50)), + sdk.NewCoin("nibi", sdk.NewInt(75)), + )) + assert.NoError(t, err) + + expectedLiqValues := map[string]sdk.Int{ + "atom": sdk.NewInt(50), + "nibi": sdk.NewInt(125), + } + assertLiqValues(t, ctx, app.DexKeeper, expectedLiqValues) +} diff --git a/x/dex/keeper/msg_server.go b/x/spot/keeper/msg_server.go similarity index 98% rename from x/dex/keeper/msg_server.go rename to x/spot/keeper/msg_server.go index da15f4fae..15ebdac13 100644 --- a/x/dex/keeper/msg_server.go +++ b/x/spot/keeper/msg_server.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/types" ) type msgServer struct { diff --git a/x/dex/keeper/msg_server_test.go b/x/spot/keeper/msg_server_test.go similarity index 99% rename from x/dex/keeper/msg_server_test.go rename to x/spot/keeper/msg_server_test.go index d2bf0f2b9..24bdb73f4 100644 --- a/x/dex/keeper/msg_server_test.go +++ b/x/spot/keeper/msg_server_test.go @@ -16,8 +16,8 @@ import ( "github.com/tendermint/tendermint/crypto/ed25519" "github.com/NibiruChain/nibiru/x/common/testutil/mock" - "github.com/NibiruChain/nibiru/x/dex/keeper" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/keeper" + "github.com/NibiruChain/nibiru/x/spot/types" ) func TestCreatePool(t *testing.T) { diff --git a/x/dex/keeper/params.go b/x/spot/keeper/params.go similarity index 88% rename from x/dex/keeper/params.go rename to x/spot/keeper/params.go index 3ab3d3e15..f59a429ee 100644 --- a/x/dex/keeper/params.go +++ b/x/spot/keeper/params.go @@ -3,7 +3,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/types" ) // GetParams get all parameters as types.Params diff --git a/x/spot/keeper/params_test.go b/x/spot/keeper/params_test.go new file mode 100644 index 000000000..9dbed7994 --- /dev/null +++ b/x/spot/keeper/params_test.go @@ -0,0 +1,19 @@ +package keeper_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/NibiruChain/nibiru/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/x/spot/types" +) + +func TestGetParams(t *testing.T) { + app, ctx := testapp.NewTestNibiruAppAndContext(true) + + params := types.DefaultParams() + app.DexKeeper.SetParams(ctx, params) + + require.EqualValues(t, params, app.DexKeeper.GetParams(ctx)) +} diff --git a/x/dex/keeper/swap.go b/x/spot/keeper/swap.go similarity index 98% rename from x/dex/keeper/swap.go rename to x/spot/keeper/swap.go index 38be63217..a7057b7f2 100644 --- a/x/dex/keeper/swap.go +++ b/x/spot/keeper/swap.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/types" ) func (k Keeper) updatePoolForSwap( diff --git a/x/spot/keeper/swap_test.go b/x/spot/keeper/swap_test.go new file mode 100644 index 000000000..09a0a4d75 --- /dev/null +++ b/x/spot/keeper/swap_test.go @@ -0,0 +1,399 @@ +package keeper_test + +import ( + "fmt" + "testing" + + "github.com/cosmos/cosmos-sdk/simapp" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/stretchr/testify/require" + + "github.com/NibiruChain/nibiru/x/common/denoms" + "github.com/NibiruChain/nibiru/x/common/testutil" + "github.com/NibiruChain/nibiru/x/common/testutil/mock" + "github.com/NibiruChain/nibiru/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/x/spot/types" +) + +func TestSwapExactAmountIn(t *testing.T) { + tests := []struct { + name string + + // test setup + userInitialFunds sdk.Coins + initialPool types.Pool + tokenIn sdk.Coin + tokenOutDenom string + + // expected results + expectedError error + expectedTokenOut sdk.Coin + expectedUserFinalFunds sdk.Coins + expectedFinalPool types.Pool + }{ + { + name: "testnet 2 BUG, should not panic", + userInitialFunds: sdk.NewCoins( + sdk.NewInt64Coin("unibi", 236534500), + sdk.NewInt64Coin("unusd", 1700000000), + sdk.NewInt64Coin("uusdt", 701785070), + ), + initialPool: types.Pool{ + Id: 1, + PoolParams: types.PoolParams{ + SwapFee: sdk.MustNewDecFromStr("0.01"), + ExitFee: sdk.MustNewDecFromStr("0.01"), + PoolType: types.PoolType_STABLESWAP, + A: sdk.NewInt(10), + }, + PoolAssets: []types.PoolAsset{ + {Token: sdk.NewInt64Coin("unusd", 1_510_778_598), + Weight: sdk.NewInt(1)}, + {Token: sdk.NewInt64Coin("uusdt", 7_712_056), + Weight: sdk.NewInt(1)}, + }, + TotalWeight: sdk.NewInt(2), + TotalShares: sdk.NewInt64Coin("nibiru/pool/1", 100), + }, + tokenIn: sdk.NewInt64Coin("unusd", 1_500_000_000), + tokenOutDenom: "uusdt", + expectedTokenOut: sdk.NewInt64Coin("uusdt", 6_670_336), + expectedUserFinalFunds: sdk.NewCoins( + sdk.NewInt64Coin("unibi", 236_534_500), + sdk.NewInt64Coin("unusd", 200_000_000), + sdk.NewInt64Coin("uusdt", 708_455_406), + ), + expectedFinalPool: types.Pool{ + Id: 1, + PoolParams: types.PoolParams{ + SwapFee: sdk.MustNewDecFromStr("0.01"), + ExitFee: sdk.MustNewDecFromStr("0.01"), + PoolType: types.PoolType_STABLESWAP, + A: sdk.NewInt(10), + }, + PoolAssets: []types.PoolAsset{ + {Token: sdk.NewInt64Coin("unusd", 3_010_778_598), + Weight: sdk.NewInt(1)}, + {Token: sdk.NewInt64Coin("uusdt", 1_041_720), + Weight: sdk.NewInt(1)}, + }, + TotalWeight: sdk.NewInt(2), + TotalShares: sdk.NewInt64Coin("nibiru/pool/1", 100), + }, + expectedError: nil, + }, + { + name: "regular stableswap", + userInitialFunds: sdk.NewCoins( + sdk.NewInt64Coin(denoms.USDC, 10), + ), + initialPool: mock.DexStablePool( + /*poolId=*/ 1, + /*assets=*/ sdk.NewCoins( + sdk.NewInt64Coin(denoms.USDC, 100), + sdk.NewInt64Coin(denoms.NUSD, 100), + ), + /*shares=*/ 100, + ), + tokenIn: sdk.NewInt64Coin(denoms.USDC, 10), + tokenOutDenom: denoms.NUSD, + expectedTokenOut: sdk.NewInt64Coin(denoms.NUSD, 10), + expectedUserFinalFunds: sdk.NewCoins( + sdk.NewInt64Coin(denoms.NUSD, 10), + ), + expectedFinalPool: mock.DexStablePool( + /*poolId=*/ 1, + /*assets=*/ sdk.NewCoins( + sdk.NewInt64Coin(denoms.USDC, 110), + sdk.NewInt64Coin(denoms.NUSD, 90), + ), + /*shares=*/ 100, + ), + expectedError: nil, + }, + { + name: "regular swap", + userInitialFunds: sdk.NewCoins( + sdk.NewInt64Coin("unibi", 100), + ), + initialPool: mock.DexPool( + /*poolId=*/ 1, + /*assets=*/ sdk.NewCoins( + sdk.NewInt64Coin("unibi", 100), + sdk.NewInt64Coin(denoms.NUSD, 100), + ), + /*shares=*/ 100, + ), + tokenIn: sdk.NewInt64Coin("unibi", 100), + tokenOutDenom: denoms.NUSD, + expectedTokenOut: sdk.NewInt64Coin(denoms.NUSD, 50), + expectedUserFinalFunds: sdk.NewCoins( + sdk.NewInt64Coin(denoms.NUSD, 50), + ), + expectedFinalPool: mock.DexPool( + /*poolId=*/ 1, + /*assets=*/ sdk.NewCoins( + sdk.NewInt64Coin("unibi", 200), + sdk.NewInt64Coin(denoms.NUSD, 50), + ), + /*shares=*/ 100, + ), + expectedError: nil, + }, + { + name: "not enough user funds", + userInitialFunds: sdk.NewCoins( + sdk.NewInt64Coin("unibi", 1), + ), + initialPool: mock.DexPool( + /*poolId=*/ 1, + /*assets=*/ sdk.NewCoins( + sdk.NewInt64Coin("unibi", 100), + sdk.NewInt64Coin(denoms.NUSD, 100), + ), + /*shares=*/ 100, + ), + tokenIn: sdk.NewInt64Coin("unibi", 100), + tokenOutDenom: denoms.NUSD, + expectedUserFinalFunds: sdk.NewCoins( + sdk.NewInt64Coin("unibi", 1), + ), + expectedFinalPool: mock.DexPool( + /*poolId=*/ 1, + /*assets=*/ sdk.NewCoins( + sdk.NewInt64Coin("unibi", 100), + sdk.NewInt64Coin(denoms.NUSD, 100), + ), + /*shares=*/ 100, + ), + expectedError: sdkerrors.ErrInsufficientFunds, + }, + { + name: "invalid token in denom", + userInitialFunds: sdk.NewCoins( + sdk.NewInt64Coin("foo", 100), + ), + initialPool: mock.DexPool( + /*poolId=*/ 1, + /*assets=*/ sdk.NewCoins( + sdk.NewInt64Coin("unibi", 100), + sdk.NewInt64Coin(denoms.NUSD, 100), + ), + /*shares=*/ 100, + ), + tokenIn: sdk.NewInt64Coin("foo", 100), + tokenOutDenom: denoms.NUSD, + expectedUserFinalFunds: sdk.NewCoins( + sdk.NewInt64Coin("foo", 100), + ), + expectedFinalPool: mock.DexPool( + /*poolId=*/ 1, + /*assets=*/ sdk.NewCoins( + sdk.NewInt64Coin("unibi", 100), + sdk.NewInt64Coin(denoms.NUSD, 100), + ), + /*shares=*/ 100, + ), + expectedError: types.ErrTokenDenomNotFound, + }, + { + name: "invalid token out denom", + userInitialFunds: sdk.NewCoins( + sdk.NewInt64Coin("unibi", 100), + ), + initialPool: mock.DexPool( + /*poolId=*/ 1, + /*assets=*/ sdk.NewCoins( + sdk.NewInt64Coin("unibi", 100), + sdk.NewInt64Coin(denoms.NUSD, 100), + ), + /*shares=*/ 100, + ), + tokenIn: sdk.NewInt64Coin("unibi", 100), + tokenOutDenom: "foo", + expectedUserFinalFunds: sdk.NewCoins( + sdk.NewInt64Coin("unibi", 100), + ), + expectedFinalPool: mock.DexPool( + /*poolId=*/ 1, + /*assets=*/ sdk.NewCoins( + sdk.NewInt64Coin("unibi", 100), + sdk.NewInt64Coin(denoms.NUSD, 100), + ), + /*shares=*/ 100, + ), + expectedError: types.ErrTokenDenomNotFound, + }, + { + name: "same token in and token out denom", + userInitialFunds: sdk.NewCoins( + sdk.NewInt64Coin("unibi", 100), + ), + initialPool: mock.DexPool( + /*poolId=*/ 1, + /*assets=*/ sdk.NewCoins( + sdk.NewInt64Coin("unibi", 100), + sdk.NewInt64Coin(denoms.NUSD, 100), + ), + /*shares=*/ 100, + ), + tokenIn: sdk.NewInt64Coin("unibi", 100), + tokenOutDenom: "unibi", + expectedUserFinalFunds: sdk.NewCoins( + sdk.NewInt64Coin("unibi", 100), + ), + expectedFinalPool: mock.DexPool( + /*poolId=*/ 1, + /*assets=*/ sdk.NewCoins( + sdk.NewInt64Coin("unibi", 100), + sdk.NewInt64Coin(denoms.NUSD, 100), + ), + /*shares=*/ 100, + ), + expectedError: types.ErrSameTokenDenom, + }, + } + + for _, tc := range tests { + tc := tc + t.Run(tc.name, func(t *testing.T) { + app, ctx := testapp.NewTestNibiruAppAndContext(true) + + // fund pool account + poolAddr := testutil.AccAddress() + tc.initialPool.Address = poolAddr.String() + tc.expectedFinalPool.Address = poolAddr.String() + require.NoError(t, + simapp.FundAccount( + app.BankKeeper, + ctx, + poolAddr, + tc.initialPool.PoolBalances(), + ), + ) + app.DexKeeper.SetPool(ctx, tc.initialPool) + + // fund user account + sender := testutil.AccAddress() + require.NoError(t, simapp.FundAccount(app.BankKeeper, ctx, sender, tc.userInitialFunds)) + + // swap assets + tokenOut, err := app.DexKeeper.SwapExactAmountIn(ctx, sender, tc.initialPool.Id, tc.tokenIn, tc.tokenOutDenom) + + if tc.expectedError != nil { + require.ErrorIs(t, err, tc.expectedError) + } else { + require.NoError(t, err) + require.Equal(t, tc.expectedTokenOut, tokenOut) + } + + // check user's final funds + require.Equal(t, + tc.expectedUserFinalFunds, + app.BankKeeper.GetAllBalances(ctx, sender), + ) + + // check final pool state + finalPool, err := app.DexKeeper.FetchPool(ctx, tc.initialPool.Id) + require.NoError(t, err) + require.Equal(t, tc.expectedFinalPool, finalPool) + }) + } +} + +func TestDoubleSwapExactAmountIn(t *testing.T) { + tests := []struct { + name string + + // test setup + userInitialFunds sdk.Coins + initialPool types.Pool + tokenIns []sdk.Coin + tokenOutDenoms []string + + // expected results + expectedTokenOuts []sdk.Coin + expectedUserFinalFunds sdk.Coins + expectedFinalPool types.Pool + }{ + { + name: "double stableswap", + userInitialFunds: sdk.NewCoins( + sdk.NewInt64Coin(denoms.USDC, 10_000), + ), + initialPool: mock.DexStablePool( + /*poolId=*/ 1, + /*assets=*/ sdk.NewCoins( + sdk.NewInt64Coin(denoms.USDC, 100_000_000), + sdk.NewInt64Coin(denoms.NUSD, 100_000_000), + ), + /*shares=*/ 100, + ), + tokenIns: []sdk.Coin{sdk.NewInt64Coin(denoms.USDC, 10_000), sdk.NewInt64Coin("unusd", 10_000)}, + tokenOutDenoms: []string{denoms.NUSD, denoms.USDC}, + expectedTokenOuts: []sdk.Coin{sdk.NewInt64Coin(denoms.NUSD, 10_000), sdk.NewInt64Coin(denoms.USDC, 10_001)}, + expectedUserFinalFunds: sdk.NewCoins( + sdk.NewInt64Coin(denoms.USDC, 10_001), // TODO: fix https://github.com/NibiruChain/nibiru/issues/1152 + ), + expectedFinalPool: mock.DexStablePool( + /*poolId=*/ 1, + /*assets=*/ sdk.NewCoins( + sdk.NewInt64Coin(denoms.USDC, 99_999_999), + sdk.NewInt64Coin(denoms.NUSD, 100_000_000), + ), + /*shares=*/ 100, + ), + }, + } + + for _, tc := range tests { + tc := tc + t.Run(tc.name, func(t *testing.T) { + app, ctx := testapp.NewTestNibiruAppAndContext(true) + + // fund pool account + poolAddr := testutil.AccAddress() + tc.initialPool.Address = poolAddr.String() + tc.expectedFinalPool.Address = poolAddr.String() + require.NoError(t, + simapp.FundAccount( + app.BankKeeper, + ctx, + poolAddr, + tc.initialPool.PoolBalances(), + ), + ) + app.DexKeeper.SetPool(ctx, tc.initialPool) + + // fund user account + sender := testutil.AccAddress() + require.NoError(t, simapp.FundAccount(app.BankKeeper, ctx, sender, tc.userInitialFunds)) + + // swap assets + for i, tokenIn := range tc.tokenIns { + tokenOut, err := app.DexKeeper.SwapExactAmountIn(ctx, sender, tc.initialPool.Id, tokenIn, tc.tokenOutDenoms[i]) + require.NoError(t, err) + + fmt.Println("-------------", i) + finalPool, err := app.DexKeeper.FetchPool(ctx, tc.initialPool.Id) + require.NoError(t, err) + fmt.Println(finalPool.PoolAssets) + + require.NoError(t, err) + require.Equal(t, tc.expectedTokenOuts[i], tokenOut) + } + + // check user's final funds + require.Equal(t, + tc.expectedUserFinalFunds, + app.BankKeeper.GetAllBalances(ctx, sender), + ) + + // check final pool state + finalPool, err := app.DexKeeper.FetchPool(ctx, tc.initialPool.Id) + require.NoError(t, err) + require.Equal(t, tc.expectedFinalPool, finalPool) + }) + } +} diff --git a/x/dex/math/constant_function.go b/x/spot/math/constant_function.go similarity index 100% rename from x/dex/math/constant_function.go rename to x/spot/math/constant_function.go diff --git a/x/dex/math/constant_function_test.go b/x/spot/math/constant_function_test.go similarity index 100% rename from x/dex/math/constant_function_test.go rename to x/spot/math/constant_function_test.go diff --git a/x/dex/module.go b/x/spot/module.go similarity index 97% rename from x/dex/module.go rename to x/spot/module.go index 5c91f0bb0..b017c03c7 100644 --- a/x/dex/module.go +++ b/x/spot/module.go @@ -1,4 +1,4 @@ -package dex +package spot import ( "context" @@ -17,9 +17,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/NibiruChain/nibiru/x/dex/client/cli" - "github.com/NibiruChain/nibiru/x/dex/keeper" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/client/cli" + "github.com/NibiruChain/nibiru/x/spot/keeper" + "github.com/NibiruChain/nibiru/x/spot/types" ) var ( diff --git a/x/dex/module_simulation.go b/x/spot/module_simulation.go similarity index 85% rename from x/dex/module_simulation.go rename to x/spot/module_simulation.go index ebf4ae12c..3d4f7b1b1 100644 --- a/x/dex/module_simulation.go +++ b/x/spot/module_simulation.go @@ -1,4 +1,4 @@ -package dex +package spot import ( "math/rand" @@ -7,8 +7,8 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/NibiruChain/nibiru/x/dex/simulation" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/simulation" + "github.com/NibiruChain/nibiru/x/spot/types" ) // GenerateGenesisState creates a default GenState of the module @@ -34,7 +34,7 @@ func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.ParamChange { // RegisterStoreDecoder registers a decoder func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} -// WeightedOperations returns the all the dex module operations with their respective weights. +// WeightedOperations returns the all the spot module operations with their respective weights. func (am AppModule) WeightedOperations(_ module.SimulationState) []simtypes.WeightedOperation { return simulation.WeightedOperations(am.accountKeeper, am.bankKeeper, am.keeper) } diff --git a/x/dex/simulation/operations.go b/x/spot/simulation/operations.go similarity index 99% rename from x/dex/simulation/operations.go rename to x/spot/simulation/operations.go index f93ff6260..cc7956774 100644 --- a/x/dex/simulation/operations.go +++ b/x/spot/simulation/operations.go @@ -14,8 +14,8 @@ import ( "github.com/NibiruChain/nibiru/x/common" "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/dex/keeper" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/keeper" + "github.com/NibiruChain/nibiru/x/spot/types" ) const defaultWeight = 100 diff --git a/x/dex/spec/01_concepts.md b/x/spot/spec/01_concepts.md similarity index 100% rename from x/dex/spec/01_concepts.md rename to x/spot/spec/01_concepts.md diff --git a/x/spot/spec/02_state.md b/x/spot/spec/02_state.md new file mode 100644 index 000000000..36dfe744b --- /dev/null +++ b/x/spot/spec/02_state.md @@ -0,0 +1,15 @@ +# State + +## Next Pool Number + +The spot module stores a monotonically increasing counter denoting the next available integer pool number. Pool numbers start at 1 and increase every time a pool is created. The `Keeper.GetNextPoolNumberAndIncrement` function always fetches the next availble pool number and increments the stored value by 1. + +## Pools + +Serialized protobufs representing pools are stored in the state, with the key 0x02 | poolId. See the [pool proto file](../../../proto/dex/v1/pool.proto) for what fields a pool has. + +## Total Liquidity + +The spot module also stores the total liquidity in the module's account, which is the sum of all assets aggregated across all pools. The total liquidity is updated every time a pool's liquidity is updated (either through creation, joining, exiting, or swaps). + +The total liquidity is stored with key 0x03 | denom. diff --git a/x/dex/spec/03_messages.md b/x/spot/spec/03_messages.md similarity index 100% rename from x/dex/spec/03_messages.md rename to x/spot/spec/03_messages.md diff --git a/x/dex/spec/04_client.md b/x/spot/spec/04_client.md similarity index 76% rename from x/dex/spec/04_client.md rename to x/spot/spec/04_client.md index f57a5f814..d73b5cd10 100644 --- a/x/dex/spec/04_client.md +++ b/x/spot/spec/04_client.md @@ -11,21 +11,21 @@ A user can query and interact with the `dex` module using the CLI. The `query` commands allow users to query `dex` state. ```bash -nibid query dex --help +nibid query spot --help ``` ### params -The `params` command allows users to query genesis parameters for the dex module. +The `params` command allows users to query genesis parameters for the spot module. ```bash -nibid query dex params [flags] +nibid query spot params [flags] ``` Example: ```bash -nibid query dex params +nibid query spot params ``` Example Output: @@ -43,13 +43,13 @@ params: The `get-pool-number` command allows users to query the next available pool id number. ```bash -nibid query dex get-pool-number [flags] +nibid query spot get-pool-number [flags] ``` Example: ```bash -nibid query dex get-pool-number +nibid query spot get-pool-number ``` Example Output: @@ -63,13 +63,13 @@ poolId: "1" The `get-pool` command allows users to query a pool by id number. ```bash -nibid query dex get-pool [pool-id] [flags] +nibid query spot get-pool [pool-id] [flags] ``` Example: ```bash -nibid query dex get-pool 1 +nibid query spot get-pool 1 ``` Example Output: @@ -98,16 +98,16 @@ pool: ### total-liquidity -The `total-liquidity` command allows users to query the total amount of liquidity in the dex. +The `total-liquidity` command allows users to query the total amount of liquidity in the spot. ```bash -nibid query dex total-liquidity [flags] +nibid query spot total-liquidity [flags] ``` Example: ```bash -nibid query dex total-liquidity +nibid query spot total-liquidity ``` Example Output: @@ -122,16 +122,16 @@ liquidity: ### pool-liquidity -The `pool-liquidity` command allows users to query the total amount of liquidity in the dex. +The `pool-liquidity` command allows users to query the total amount of liquidity in the spot. ```bash -nibid query dex pool-liquidity [pool-id] [flags] +nibid query spot pool-liquidity [pool-id] [flags] ``` Example: ```bash -nibid query dex pool-liquidity 1 +nibid query spot pool-liquidity 1 ``` Example Output: @@ -149,7 +149,7 @@ liquidity: The `tx` commands allow users to interact with the `dex` module. ```bash -nibid tx dex --help +nibid tx spot --help ``` ### create-pool @@ -157,13 +157,13 @@ nibid tx dex --help The `create-pool` command allows users to create pools. ```bash -nibid tx dex create-pool [flags] +nibid tx spot create-pool [flags] ``` Example: ```bash -nibid tx dex create-pool --pool-file ./new-pool.json +nibid tx spot create-pool --pool-file ./new-pool.json ``` Where the pool file JSON has format: @@ -182,13 +182,13 @@ Where the pool file JSON has format: The `join-pool` command allows users to join pools with liquidty. ```bash -nibid tx dex join-pool [flags] +nibid tx spot join-pool [flags] ``` Example: ```bash -nibid tx dex join-pool --pool-id 1 --tokens-in 1validatortoken,1stake +nibid tx spot join-pool --pool-id 1 --tokens-in 1validatortoken,1stake ``` # TODO diff --git a/x/spot/spec/05_params.md b/x/spot/spec/05_params.md new file mode 100644 index 000000000..a91dd4ff1 --- /dev/null +++ b/x/spot/spec/05_params.md @@ -0,0 +1,20 @@ + + +# Parameters + +The spot module contains the following parameters: + +| Key | Type | Example | +| ------------------ | --------- | ------------ | +| StartingPoolNumber | uint64 | 1 | +| PoolCreationFee | sdk.Coins | 1000000ubini | + +## StartingPoolNumber + +The initial pool number to start creating pools at. + +## PoolCreationFee + +The amount of coins taken as a fee for creating a pool, from the pool creator's address. diff --git a/x/dex/spec/06_events.md b/x/spot/spec/06_events.md similarity index 100% rename from x/dex/spec/06_events.md rename to x/spot/spec/06_events.md diff --git a/x/spot/spec/07_hooks.md b/x/spot/spec/07_hooks.md new file mode 100644 index 000000000..ee47e29bf --- /dev/null +++ b/x/spot/spec/07_hooks.md @@ -0,0 +1,3 @@ +# Hooks + +As of this time, there are no hooks into the x/spot module. \ No newline at end of file diff --git a/x/dex/spec/08_begin_block.md b/x/spot/spec/08_begin_block.md similarity index 100% rename from x/dex/spec/08_begin_block.md rename to x/spot/spec/08_begin_block.md diff --git a/x/dex/spec/09_end_block.md b/x/spot/spec/09_end_block.md similarity index 100% rename from x/dex/spec/09_end_block.md rename to x/spot/spec/09_end_block.md diff --git a/x/dex/spec/10_future_improvements.md b/x/spot/spec/10_future_improvements.md similarity index 100% rename from x/dex/spec/10_future_improvements.md rename to x/spot/spec/10_future_improvements.md diff --git a/x/dex/spec/11_tests.md b/x/spot/spec/11_tests.md similarity index 100% rename from x/dex/spec/11_tests.md rename to x/spot/spec/11_tests.md diff --git a/x/spot/spec/README.md b/x/spot/spec/README.md new file mode 100644 index 000000000..2331c5def --- /dev/null +++ b/x/spot/spec/README.md @@ -0,0 +1,3 @@ +# DEX Module + +The x/spot module is responsible for creating, joining, and exiting liquidity pools. It also allows users to swap between two assets in an existing pool. It's a fully functional AMM. diff --git a/x/dex/types/codec.go b/x/spot/types/codec.go similarity index 100% rename from x/dex/types/codec.go rename to x/spot/types/codec.go diff --git a/x/dex/types/constants.go b/x/spot/types/constants.go similarity index 100% rename from x/dex/types/constants.go rename to x/spot/types/constants.go diff --git a/x/dex/types/errors.go b/x/spot/types/errors.go similarity index 98% rename from x/dex/types/errors.go rename to x/spot/types/errors.go index 7d0d0b044..46b4d3721 100644 --- a/x/dex/types/errors.go +++ b/x/spot/types/errors.go @@ -6,7 +6,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) -// x/dex module sentinel errors +// x/spot module sentinel errors var ( ErrTooFewPoolAssets = sdkerrors.Register(ModuleName, 1, "pool should have at least 2 assets, as they must be swapping between at least two assets") ErrTooManyPoolAssets = sdkerrors.Register(ModuleName, 2, "pool has too many assets (currently capped at 2 assets per pool)") diff --git a/x/dex/types/event.pb.go b/x/spot/types/event.pb.go similarity index 91% rename from x/dex/types/event.pb.go rename to x/spot/types/event.pb.go index 96b6393bd..19b58fb84 100644 --- a/x/dex/types/event.pb.go +++ b/x/spot/types/event.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: dex/v1/event.proto +// source: spot/v1/event.proto package types @@ -36,7 +36,7 @@ func (m *EventPoolJoined) Reset() { *m = EventPoolJoined{} } func (m *EventPoolJoined) String() string { return proto.CompactTextString(m) } func (*EventPoolJoined) ProtoMessage() {} func (*EventPoolJoined) Descriptor() ([]byte, []int) { - return fileDescriptor_f9ee91b5e8b820cb, []int{0} + return fileDescriptor_b076fd0fab18c3a9, []int{0} } func (m *EventPoolJoined) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -109,7 +109,7 @@ func (m *EventPoolCreated) Reset() { *m = EventPoolCreated{} } func (m *EventPoolCreated) String() string { return proto.CompactTextString(m) } func (*EventPoolCreated) ProtoMessage() {} func (*EventPoolCreated) Descriptor() ([]byte, []int) { - return fileDescriptor_f9ee91b5e8b820cb, []int{1} + return fileDescriptor_b076fd0fab18c3a9, []int{1} } func (m *EventPoolCreated) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -163,7 +163,7 @@ func (m *EventPoolExited) Reset() { *m = EventPoolExited{} } func (m *EventPoolExited) String() string { return proto.CompactTextString(m) } func (*EventPoolExited) ProtoMessage() {} func (*EventPoolExited) Descriptor() ([]byte, []int) { - return fileDescriptor_f9ee91b5e8b820cb, []int{2} + return fileDescriptor_b076fd0fab18c3a9, []int{2} } func (m *EventPoolExited) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -231,7 +231,7 @@ func (m *EventAssetsSwapped) Reset() { *m = EventAssetsSwapped{} } func (m *EventAssetsSwapped) String() string { return proto.CompactTextString(m) } func (*EventAssetsSwapped) ProtoMessage() {} func (*EventAssetsSwapped) Descriptor() ([]byte, []int) { - return fileDescriptor_f9ee91b5e8b820cb, []int{3} + return fileDescriptor_b076fd0fab18c3a9, []int{3} } func (m *EventAssetsSwapped) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -295,37 +295,37 @@ func init() { proto.RegisterType((*EventAssetsSwapped)(nil), "nibiru.dex.v1.EventAssetsSwapped") } -func init() { proto.RegisterFile("dex/v1/event.proto", fileDescriptor_f9ee91b5e8b820cb) } +func init() { proto.RegisterFile("spot/v1/event.proto", fileDescriptor_b076fd0fab18c3a9) } -var fileDescriptor_f9ee91b5e8b820cb = []byte{ - // 427 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xcf, 0x6e, 0x13, 0x31, - 0x10, 0xc6, 0xe3, 0x36, 0x34, 0xd4, 0x50, 0x8a, 0x2c, 0x24, 0x96, 0x1e, 0x96, 0x28, 0xa7, 0x70, - 0xb1, 0x15, 0xb8, 0x21, 0x84, 0x44, 0xa3, 0x15, 0x5a, 0x0e, 0x04, 0xa5, 0x37, 0x2e, 0xab, 0xfd, - 0x63, 0x25, 0x16, 0x5d, 0xcf, 0xca, 0xf6, 0x2e, 0xcb, 0x23, 0x70, 0xe3, 0x95, 0xb8, 0x55, 0xe2, - 0xd2, 0x23, 0x27, 0x84, 0x92, 0x17, 0x41, 0xb6, 0xb7, 0xa5, 0x97, 0x4a, 0xdb, 0xdc, 0x3c, 0xb2, - 0x67, 0xc6, 0xdf, 0x6f, 0xe6, 0xc3, 0xa4, 0xe0, 0x2d, 0x6b, 0x66, 0x8c, 0x37, 0x5c, 0x1a, 0x5a, - 0x29, 0x30, 0x40, 0x8e, 0xa4, 0xc8, 0x84, 0xaa, 0x69, 0xc1, 0x5b, 0xda, 0xcc, 0x4e, 0x9e, 0xac, - 0x60, 0x05, 0xee, 0x86, 0xd9, 0x93, 0x7f, 0x74, 0x12, 0xe6, 0xa0, 0x4b, 0xd0, 0x2c, 0x4b, 0x35, - 0x67, 0xcd, 0x2c, 0xe3, 0x26, 0x9d, 0xb1, 0x1c, 0x84, 0xf4, 0xf7, 0x93, 0xef, 0x7b, 0xf8, 0x38, - 0xb2, 0x45, 0x3f, 0x01, 0x9c, 0x7f, 0x00, 0x21, 0x79, 0x41, 0x02, 0x3c, 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xdd, 0x04, 0xbd, 0xc6, 0x7e, 0xe2, 0x77, 0x90, 0x32, 0x72, 0x09, 0xb1, 0xbc, 0xde, 0xaf, - 0xbb, 0xec, 0x86, 0xef, 0xb6, 0xa8, 0xcd, 0xe9, 0xfc, 0x62, 0x13, 0xa2, 0xcb, 0x4d, 0x88, 0xfe, - 0x6e, 0x42, 0xf4, 0x63, 0x1b, 0x0e, 0x2e, 0xb7, 0xe1, 0xe0, 0xf7, 0x36, 0x1c, 0x7c, 0x7e, 0xb1, - 0x12, 0x66, 0x5d, 0x67, 0x34, 0x87, 0x92, 0x7d, 0x74, 0x76, 0x9a, 0xaf, 0x53, 0x21, 0x99, 0xb7, - 0x16, 0x6b, 0x99, 0xf5, 0x9d, 0xf9, 0x56, 0x71, 0x9d, 0x1d, 0x38, 0xc3, 0xbc, 0xfa, 0x17, 0x00, - 0x00, 0xff, 0xff, 0x7f, 0x2c, 0xe3, 0x4f, 0x8b, 0x03, 0x00, 0x00, +var fileDescriptor_b076fd0fab18c3a9 = []byte{ + // 428 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xcf, 0x6e, 0xd4, 0x30, + 0x10, 0xc6, 0xd7, 0xed, 0xd2, 0xa5, 0x86, 0x52, 0x14, 0x90, 0x08, 0x3d, 0x84, 0x28, 0xa7, 0x15, + 0x07, 0x5b, 0x81, 0x1b, 0x42, 0x48, 0x74, 0x89, 0x50, 0x38, 0xb0, 0x68, 0x7b, 0xe3, 0x12, 0xe5, + 0x8f, 0xb5, 0x6b, 0xd1, 0x78, 0x22, 0xdb, 0x09, 0xcb, 0x23, 0x70, 0xe3, 0x95, 0xb8, 0x55, 0xe2, + 0xd2, 0x23, 0x27, 0x84, 0x76, 0x5f, 0x04, 0xd9, 0x4e, 0x4b, 0x2f, 0x95, 0xd2, 0xde, 0x3c, 0xb2, + 0x67, 0xc6, 0xdf, 0x6f, 0xe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x82, 0x1f, 0x5e, 0xa2, 0x98, + 0x49, 0x96, 0x6b, 0xc7, 0xa2, 0x34, 0x47, 0x90, 0x17, 0x2c, 0xfa, 0xf0, 0x5a, 0x16, 0xd1, 0x2f, + 0x74, 0x05, 0x69, 0xb2, 0xe6, 0xfa, 0x76, 0x48, 0x13, 0xfc, 0xe0, 0x2a, 0x14, 0xcb, 0x75, 0x10, + 0x93, 0xfb, 0xff, 0x99, 0xa4, 0xc2, 0x7b, 0x83, 0x71, 0x3f, 0x19, 0x87, 0x75, 0x10, 0x93, 0x7e, + 0x98, 0xf3, 0x56, 0x47, 0x3f, 0x11, 0xf6, 0xac, 0x9a, 0xb7, 0x4a, 0x31, 0xad, 0x4e, 0xbe, 0xe6, + 0x4d, 0x73, 0x3b, 0x41, 0xaf, 0xb0, 0x9b, 0xf8, 0x0d, 0xa4, 0x4c, 0x6c, 0x42, 0x2a, 0x2e, 0xf7, + 0xeb, 0x26, 0xbb, 0xe1, 0xba, 0xcd, 0x5b, 0x7d, 0xfc, 0xee, 0x6c, 0x13, 0xa0, 0xf3, 0x4d, 0x80, + 0xfe, 0x6e, 0x02, 0xf4, 0x63, 0x1b, 0x8c, 0xce, 0xb7, 0xc1, 0xe8, 0xf7, 0x36, 0x18, 0x7d, 0x7e, + 0xbe, 0xe4, 0x7a, 0xd5, 0x16, 0xa4, 0x84, 0x9a, 0x7e, 0xb4, 0x76, 0x9a, 0xad, 0x72, 0x2e, 0xa8, + 0xb3, 0x16, 0x5d, 0x53, 0x6b, 0x3c, 0xfd, 0xad, 0x61, 0xaa, 0xd8, 0xb3, 0x8e, 0x79, 0xf9, 0x2f, + 0x00, 0x00, 0xff, 0xff, 0xf3, 0xfb, 0x3b, 0x1a, 0x8d, 0x03, 0x00, 0x00, } func (m *EventPoolJoined) Marshal() (dAtA []byte, err error) { diff --git a/x/dex/types/expected_keepers.go b/x/spot/types/expected_keepers.go similarity index 100% rename from x/dex/types/expected_keepers.go rename to x/spot/types/expected_keepers.go diff --git a/x/dex/types/genesis.go b/x/spot/types/genesis.go similarity index 100% rename from x/dex/types/genesis.go rename to x/spot/types/genesis.go diff --git a/x/dex/types/genesis.pb.go b/x/spot/types/genesis.pb.go similarity index 82% rename from x/dex/types/genesis.pb.go rename to x/spot/types/genesis.pb.go index c3f8181a2..e60b64f09 100644 --- a/x/dex/types/genesis.pb.go +++ b/x/spot/types/genesis.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: dex/v1/genesis.proto +// source: spot/v1/genesis.proto package types @@ -23,7 +23,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// GenesisState defines the dex module's genesis state. +// GenesisState defines the spot module's genesis state. type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` } @@ -32,7 +32,7 @@ func (m *GenesisState) Reset() { *m = GenesisState{} } func (m *GenesisState) String() string { return proto.CompactTextString(m) } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_12a0429c56f27456, []int{0} + return fileDescriptor_9a1a42f122eaf6b3, []int{0} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -72,23 +72,23 @@ func init() { proto.RegisterType((*GenesisState)(nil), "nibiru.dex.v1.GenesisState") } -func init() { proto.RegisterFile("dex/v1/genesis.proto", fileDescriptor_12a0429c56f27456) } +func init() { proto.RegisterFile("spot/v1/genesis.proto", fileDescriptor_9a1a42f122eaf6b3) } -var fileDescriptor_12a0429c56f27456 = []byte{ - // 194 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x49, 0x49, 0xad, 0xd0, - 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, - 0x17, 0xe2, 0xcd, 0xcb, 0x4c, 0xca, 0x2c, 0x2a, 0xd5, 0x4b, 0x49, 0xad, 0xd0, 0x2b, 0x33, 0x94, - 0x12, 0x86, 0x2a, 0x2a, 0x48, 0x2c, 0x4a, 0xcc, 0x85, 0xaa, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, - 0x07, 0x33, 0xf5, 0x41, 0x2c, 0x88, 0xa8, 0x92, 0x33, 0x17, 0x8f, 0x3b, 0xc4, 0xa8, 0xe0, 0x92, - 0xc4, 0x92, 0x54, 0x21, 0x63, 0x2e, 0x36, 0x88, 0x2e, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, - 0x51, 0x3d, 0x14, 0xa3, 0xf5, 0x02, 0xc0, 0x92, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0x41, - 0x95, 0x3a, 0x39, 0x9f, 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, 0x66, 0x7a, - 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0xbe, 0x1f, 0xd8, 0x20, 0xe7, 0x8c, 0xc4, - 0xcc, 0x3c, 0x7d, 0x88, 0xa1, 0xfa, 0x15, 0xfa, 0x20, 0x97, 0x96, 0x54, 0x16, 0xa4, 0x16, 0x27, - 0xb1, 0x81, 0x1d, 0x64, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x37, 0xbc, 0x63, 0xf3, 0xe2, 0x00, - 0x00, 0x00, +var fileDescriptor_9a1a42f122eaf6b3 = []byte{ + // 195 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2d, 0x2e, 0xc8, 0x2f, + 0xd1, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0xe2, 0xcd, 0xcb, 0x4c, 0xca, 0x2c, 0x2a, 0xd5, 0x4b, 0x49, 0xad, 0xd0, 0x2b, 0x33, + 0x94, 0x12, 0x81, 0xa9, 0x2a, 0x48, 0x2c, 0x4a, 0xcc, 0x85, 0x2a, 0x92, 0x12, 0x49, 0xcf, 0x4f, + 0xcf, 0x07, 0x33, 0xf5, 0x41, 0x2c, 0x88, 0xa8, 0x92, 0x33, 0x17, 0x8f, 0x3b, 0xc4, 0xac, 0xe0, + 0x92, 0xc4, 0x92, 0x54, 0x21, 0x63, 0x2e, 0x36, 0x88, 0x2e, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, + 0x23, 0x51, 0x3d, 0x14, 0xb3, 0xf5, 0x02, 0xc0, 0x92, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, + 0x41, 0x95, 0x3a, 0xb9, 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, 0x56, + 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0xbe, 0x1f, 0xd8, 0x20, 0xe7, 0x8c, + 0xc4, 0xcc, 0x3c, 0x7d, 0x88, 0xa1, 0xfa, 0x15, 0xfa, 0x60, 0xa7, 0x96, 0x54, 0x16, 0xa4, 0x16, + 0x27, 0xb1, 0x81, 0x5d, 0x64, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x2d, 0xed, 0x83, 0x47, 0xe5, + 0x00, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/dex/types/genesis_test.go b/x/spot/types/genesis_test.go similarity index 92% rename from x/dex/types/genesis_test.go rename to x/spot/types/genesis_test.go index 0c6060577..eae38d740 100644 --- a/x/dex/types/genesis_test.go +++ b/x/spot/types/genesis_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/types" ) func TestGenesisState_Validate(t *testing.T) { diff --git a/x/dex/types/keys.go b/x/spot/types/keys.go similarity index 100% rename from x/dex/types/keys.go rename to x/spot/types/keys.go diff --git a/x/dex/types/message.go b/x/spot/types/message.go similarity index 100% rename from x/dex/types/message.go rename to x/spot/types/message.go diff --git a/x/dex/types/message_test.go b/x/spot/types/message_test.go similarity index 100% rename from x/dex/types/message_test.go rename to x/spot/types/message_test.go diff --git a/x/dex/types/misc/stabletests.csv b/x/spot/types/misc/stabletests.csv similarity index 100% rename from x/dex/types/misc/stabletests.csv rename to x/spot/types/misc/stabletests.csv diff --git a/x/dex/types/params.go b/x/spot/types/params.go similarity index 100% rename from x/dex/types/params.go rename to x/spot/types/params.go diff --git a/x/dex/types/params.pb.go b/x/spot/types/params.pb.go similarity index 81% rename from x/dex/types/params.pb.go rename to x/spot/types/params.pb.go index 1468a14d3..0c5e9ff81 100644 --- a/x/dex/types/params.pb.go +++ b/x/spot/types/params.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: dex/v1/params.proto +// source: spot/v1/params.proto package types @@ -39,7 +39,7 @@ type Params struct { func (m *Params) Reset() { *m = Params{} } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_692291d4cdccc867, []int{0} + return fileDescriptor_802c8fa434d5a8d8, []int{0} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -93,32 +93,32 @@ func init() { proto.RegisterType((*Params)(nil), "nibiru.dex.v1.Params") } -func init() { proto.RegisterFile("dex/v1/params.proto", fileDescriptor_692291d4cdccc867) } +func init() { proto.RegisterFile("spot/v1/params.proto", fileDescriptor_802c8fa434d5a8d8) } -var fileDescriptor_692291d4cdccc867 = []byte{ +var fileDescriptor_802c8fa434d5a8d8 = []byte{ // 351 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0x3f, 0x4f, 0xc2, 0x40, - 0x18, 0xc6, 0x5b, 0x20, 0x24, 0xd6, 0x18, 0xa5, 0x32, 0x14, 0x86, 0x96, 0x30, 0xd5, 0x18, 0x7b, - 0x56, 0x37, 0x36, 0x69, 0xe2, 0x64, 0x08, 0x61, 0x74, 0x69, 0xae, 0xed, 0x59, 0x2e, 0xb6, 0xf7, - 0x36, 0xbd, 0x03, 0x61, 0xf6, 0x0b, 0x98, 0xb8, 0x38, 0x3a, 0xfb, 0x49, 0x18, 0x19, 0x9d, 0xd0, - 0xc0, 0x37, 0xf0, 0x13, 0x98, 0x5e, 0x6b, 0x42, 0xe2, 0x74, 0x7f, 0x7e, 0xef, 0xf3, 0xbe, 0x4f, - 0xde, 0x47, 0x3b, 0x8d, 0xc8, 0x02, 0xcd, 0x5d, 0x94, 0xe1, 0x1c, 0xa7, 0xdc, 0xc9, 0x72, 0x10, - 0xa0, 0x1f, 0x31, 0x1a, 0xd0, 0x7c, 0xe6, 0x44, 0x64, 0xe1, 0xcc, 0xdd, 0x6e, 0x3b, 0x86, 0x18, - 0x24, 0x41, 0xc5, 0xad, 0x2c, 0xea, 0x9a, 0x21, 0xf0, 0x14, 0x38, 0x0a, 0x30, 0x27, 0x68, 0xee, - 0x06, 0x44, 0x60, 0x17, 0x85, 0x40, 0x59, 0xc5, 0x3b, 0x25, 0xf7, 0x4b, 0x61, 0xf9, 0x28, 0x51, - 0xff, 0xb9, 0xa6, 0x35, 0xc7, 0x72, 0xa0,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0x4d, 0xb9, 0xd1, - 0xeb, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xea, 0x35, 0xf4, 0x3b, 0xc8, 0x01, 0x00, 0x00, + 0x18, 0xc6, 0x5b, 0x20, 0x24, 0xd6, 0x18, 0xa5, 0x61, 0x28, 0x0c, 0x2d, 0x61, 0x6a, 0x34, 0xde, + 0x59, 0xdd, 0xd8, 0x04, 0xe3, 0x64, 0x08, 0x61, 0x74, 0x69, 0xae, 0xe5, 0x2c, 0x17, 0xdb, 0x7b, + 0x9b, 0xde, 0x81, 0x30, 0xfb, 0x05, 0x4c, 0x5c, 0x1c, 0x9d, 0xfd, 0x24, 0x8c, 0x8c, 0x4e, 0x68, + 0xe0, 0x1b, 0xf8, 0x09, 0x4c, 0xaf, 0x35, 0x21, 0x71, 0xba, 0x3f, 0xbf, 0xf7, 0x79, 0xdf, 0x27, + 0xef, 0x63, 0x34, 0x45, 0x0a, 0x12, 0xcf, 0x3d, 0x9c, 0x92, 0x8c, 0x24, 0x02, 0xa5, 0x19, 0x48, + 0x30, 0x8f, 0x38, 0x0b, 0x58, 0x36, 0x43, 0x13, 0xba, 0x40, 0x73, 0xaf, 0xdd, 0x8c, 0x20, 0x02, + 0x45, 0x70, 0x7e, 0x2b, 0x8a, 0xda, 0x76, 0x08, 0x22, 0x01, 0x81, 0x03, 0x22, 0x28, 0x9e, 0x7b, + 0x01, 0x95, 0xc4, 0xc3, 0x21, 0x30, 0x5e, 0xf2, 0x56, 0xc1, 0xfd, 0x42, 0x58, 0x3c, 0x0a, 0xd4, + 0x7d, 0xae, 0x18, 0xf5, 0x91, 0x1a, 0x68, 0x5e, 0x18, 0x4d, 0x21, 0x49, 0x26, 0x19, 0x8f, 0xfc, + 0x14, 0x20, 0xf6, 0xf9, 0x2c, 0x09, 0x68, 0x66, 0xe9, 0x1d, 0xdd, 0xad, 0x8d, 0xcd, 0x3f, 0x36, + 0x02, 0x88, 0x87, 0x8a, 0x98, 0xaf, 0xba, 0xd1, 0x50, 0x95, 0x61, 0x46, 0x89, 0x64, 0xc0, 0xfd, + 0x07, 0x4a, 0xad, 0x4a, 0xa7, 0xea, 0x1e, 0x5e, 0xb6, 0x50, 0x39, 0x27, 0x37, 0x85, 0x4a, 0x53, + 0x68, 0x00, 0x8c, 0xf7, 0xef, 0x56, 0x1b, 0x47, 0xfb, 0xd9, 0x38, 0xd6, 0x92, 0x24, 0x71, 0xaf, + 0xfb, 0xaf, 0x43, 0xf7, 0xe3, 0xcb, 0x71, 0x23, 0x26, 0xa7, 0xb3, 0x00, 0x85, 0x90, 0x94, 0x86, + 0xcb, 0xe3, 0x5c, 0x4c, 0x1e, 0xb1, 0x5c, 0xa6, 0x54, 0xa8, 0x66, 0x62, 0x7c, 0x9c, 0xeb, 0x07, + 0xa5, 0xfc, 0x96, 0x52, 0xf3, 0xcc, 0x68, 0x3c, 0x4d, 0x99, 0xa4, 0x31, 0x13, 0x92, 0x4e, 0x7c, + 0x22, 0x04, 0x95, 0x56, 0xb5, 0x53, 0x75, 0x0f, 0xc6, 0x27, 0x7b, 0xe0, 0x3a, 0xff, 0xef, 0xd5, + 0xde, 0xde, 0x1d, 0xad, 0x7f, 0xb3, 0xda, 0xda, 0xfa, 0x7a, 0x6b, 0xeb, 0xdf, 0x5b, 0x5b, 0x7f, + 0xd9, 0xd9, 0xda, 0x7a, 0x67, 0x6b, 0x9f, 0x3b, 0x5b, 0xbb, 0x3f, 0xdd, 0xf3, 0x31, 0x54, 0x51, + 0x0c, 0xa6, 0x84, 0x71, 0x5c, 0xc4, 0x82, 0x17, 0x58, 0xa5, 0xa6, 0xfc, 0x04, 0x75, 0xb5, 0xd2, + 0xab, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe6, 0xf0, 0x25, 0x6e, 0xca, 0x01, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/x/dex/types/pool.go b/x/spot/types/pool.go similarity index 100% rename from x/dex/types/pool.go rename to x/spot/types/pool.go diff --git a/x/dex/types/pool.pb.go b/x/spot/types/pool.pb.go similarity index 86% rename from x/dex/types/pool.pb.go rename to x/spot/types/pool.pb.go index c3c3cd62a..0bfdd0758 100644 --- a/x/dex/types/pool.pb.go +++ b/x/spot/types/pool.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: dex/v1/pool.proto +// source: spot/v1/pool.proto package types @@ -50,7 +50,7 @@ func (x PoolType) String() string { } func (PoolType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_a6713224330b59ad, []int{0} + return fileDescriptor_52166e3414afb619, []int{0} } // Configuration parameters for the pool. @@ -69,7 +69,7 @@ func (m *PoolParams) Reset() { *m = PoolParams{} } func (m *PoolParams) String() string { return proto.CompactTextString(m) } func (*PoolParams) ProtoMessage() {} func (*PoolParams) Descriptor() ([]byte, []int) { - return fileDescriptor_a6713224330b59ad, []int{0} + return fileDescriptor_52166e3414afb619, []int{0} } func (m *PoolParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -118,7 +118,7 @@ func (m *PoolAsset) Reset() { *m = PoolAsset{} } func (m *PoolAsset) String() string { return proto.CompactTextString(m) } func (*PoolAsset) ProtoMessage() {} func (*PoolAsset) Descriptor() ([]byte, []int) { - return fileDescriptor_a6713224330b59ad, []int{1} + return fileDescriptor_52166e3414afb619, []int{1} } func (m *PoolAsset) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -174,7 +174,7 @@ func (m *Pool) Reset() { *m = Pool{} } func (m *Pool) String() string { return proto.CompactTextString(m) } func (*Pool) ProtoMessage() {} func (*Pool) Descriptor() ([]byte, []int) { - return fileDescriptor_a6713224330b59ad, []int{2} + return fileDescriptor_52166e3414afb619, []int{2} } func (m *Pool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -210,49 +210,49 @@ func init() { proto.RegisterType((*Pool)(nil), "nibiru.dex.v1.Pool") } -func init() { proto.RegisterFile("dex/v1/pool.proto", fileDescriptor_a6713224330b59ad) } +func init() { proto.RegisterFile("spot/v1/pool.proto", fileDescriptor_52166e3414afb619) } -var fileDescriptor_a6713224330b59ad = []byte{ - // 622 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xcf, 0x4f, 0x13, 0x41, - 0x14, 0xc7, 0x77, 0x4b, 0x81, 0x32, 0x85, 0x8a, 0x63, 0x13, 0x17, 0x4c, 0x76, 0xc9, 0x1c, 0x4c, - 0x35, 0xba, 0x9b, 0xe2, 0x8d, 0x8b, 0xd9, 0xad, 0x25, 0xd1, 0x10, 0x42, 0x16, 0x94, 0x68, 0x4c, - 0x9a, 0x69, 0x77, 0x68, 0x27, 0xb4, 0x3b, 0x9b, 0xce, 0x00, 0xe5, 0x3f, 0xf0, 0xe8, 0x9f, 0xe0, - 0xdd, 0xff, 0xc1, 0x33, 0x47, 0x8e, 0xc6, 0xc3, 0xc6, 0xc0, 0xcd, 0x63, 0xff, 0x02, 0x33, 0x3f, - 0x56, 0x20, 0x92, 0x18, 0xe2, 0x69, 0xe7, 0xe5, 0xbd, 0xf7, 0xd9, 0xf9, 0x7e, 0xdf, 0xcb, 0x80, - 0xfb, 0x09, 0x99, 0x04, 0xc7, 0xcd, 0x20, 0x63, 0x6c, 0xe8, 0x67, 0x63, 0x26, 0x18, 0x5c, 0x4a, - 0x69, 0x97, 0x8e, 0x8f, 0xfc, 0x84, 0x4c, 0xfc, 0xe3, 0xe6, 0x6a, 0xbd, 0xcf, 0xfa, 0x4c, 0x65, - 0x02, 0x79, 0xd2, 0x45, 0xab, 0x6e, 0x8f, 0xf1, 0x11, 0xe3, 0x41, 0x17, 0x73, 0x12, 0x1c, 0x37, - 0xbb, 0x44, 0xe0, 0x66, 0xd0, 0x63, 0x34, 0x35, 0xf9, 0x15, 0x9d, 0xef, 0xe8, 0x46, 0x1d, 0xe8, - 0x14, 0xfa, 0x55, 0x02, 0x60, 0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, 0x40, 0xa5, 0x58, 0x4d, 0xb8, 0x08, 0x2a, 0x51, 0xb8, 0x15, 0x6e, 0xb7, 0xda, 0xf1, - 0xb2, 0x05, 0x6b, 0x00, 0xec, 0xee, 0x85, 0xd1, 0x56, 0x7b, 0x77, 0x3f, 0xdc, 0x59, 0xb6, 0xa3, - 0xd6, 0xd9, 0x85, 0x6b, 0x9f, 0x5f, 0xb8, 0xf6, 0xcf, 0x0b, 0xd7, 0xfe, 0x7c, 0xe9, 0x5a, 0xe7, - 0x97, 0xae, 0xf5, 0xfd, 0xd2, 0xb5, 0x3e, 0x3c, 0xb9, 0x26, 0x78, 0x5b, 0x59, 0xdb, 0x1a, 0x60, - 0x9a, 0x06, 0xda, 0xe6, 0x60, 0x12, 0xc8, 0x27, 0x4b, 0xe9, 0xee, 0xce, 0xa9, 0x17, 0xe5, 0xc5, - 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x87, 0xaf, 0x64, 0xaf, 0xc6, 0x04, 0x00, 0x00, +var fileDescriptor_52166e3414afb619 = []byte{ + // 621 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xcf, 0x4b, 0x1b, 0x41, + 0x14, 0xc7, 0x77, 0x63, 0xd4, 0x38, 0xd1, 0x54, 0xa6, 0x81, 0xae, 0x16, 0x76, 0x65, 0x0e, 0x25, + 0x48, 0xbb, 0x4b, 0xec, 0xcd, 0x4b, 0xd9, 0xd5, 0x08, 0x2d, 0x22, 0xb2, 0xda, 0x4a, 0x4b, 0x21, + 0x4c, 0xb2, 0x63, 0x32, 0x98, 0xec, 0x2c, 0x99, 0xf1, 0xd7, 0x7f, 0xd0, 0x63, 0xff, 0x84, 0xde, + 0xfb, 0x3f, 0xf4, 0xec, 0xd1, 0x63, 0xe9, 0x61, 0x29, 0xe6, 0xd6, 0x63, 0xfe, 0x82, 0x32, 0x3f, + 0xb6, 0x2a, 0x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, 0xd5, + 0xb7, 0x86, 0x8b, 0xa5, 0x99, 0xdc, 0x29, 0xaf, 0xcd, 0x34, 0xaa, 0x1b, 0xce, 0x03, 0x5c, 0xe5, + 0xf6, 0x83, 0x58, 0xdd, 0x6a, 0xb0, 0xaa, 0x8c, 0xc3, 0x3e, 0x58, 0x14, 0x4c, 0xe0, 0x41, 0xdb, + 0x98, 0x3a, 0xab, 0x14, 0xb6, 0xa6, 0x36, 0xf5, 0x71, 0x31, 0xab, 0x5b, 0x16, 0x8a, 0xab, 0x2a, + 0x3c, 0x52, 0x11, 0x7c, 0x5f, 0xfc, 0x89, 0xf7, 0xf1, 0x88, 0x70, 0x67, 0xee, 0x5f, 0x6b, 0xf0, + 0xd4, 0x48, 0xb8, 0x87, 0xd6, 0xcd, 0x05, 0xfa, 0x40, 0x45, 0x9b, 0xe5, 0x4f, 0x5f, 0x3c, 0x6b, + 0xbd, 0x01, 0x2a, 0xc5, 0x6a, 0xc2, 0x45, 0x50, 0x89, 0xc2, 0xdd, 0x70, 0x6f, 0xab, 0x15, 0x2f, + 0x5b, 0xb0, 0x06, 0xc0, 0xc1, 0x61, 0x18, 0xed, 0xb6, 0x0e, 0x8e, 0xc2, 0xfd, 0x65, 0x3b, 0xda, + 0xbe, 0xba, 0x71, 0xed, 0xeb, 0x1b, 0xd7, 0xfe, 0x79, 0xe3, 0xda, 0x9f, 0xc7, 0xae, 0x75, 0x3d, + 0x76, 0xad, 0xef, 0x63, 0xd7, 0xfa, 0xb0, 0x7e, 0x47, 0xf0, 0x9e, 0xb2, 0x76, 0xab, 0x8f, 0x69, + 0x1a, 0x68, 0x9b, 0x83, 0x8b, 0x40, 0xbd, 0x59, 0x4a, 0x78, 0x67, 0x4e, 0x3d, 0x29, 0x2f, 0x7f, + 0x07, 0x00, 0x00, 0xff, 0xff, 0xdb, 0xd9, 0x15, 0xdb, 0xc8, 0x04, 0x00, 0x00, } func (m *PoolParams) Marshal() (dAtA []byte, err error) { diff --git a/x/dex/types/pool_asset.go b/x/spot/types/pool_asset.go similarity index 100% rename from x/dex/types/pool_asset.go rename to x/spot/types/pool_asset.go diff --git a/x/dex/types/pool_asset_test.go b/x/spot/types/pool_asset_test.go similarity index 100% rename from x/dex/types/pool_asset_test.go rename to x/spot/types/pool_asset_test.go diff --git a/x/dex/types/pool_test.go b/x/spot/types/pool_test.go similarity index 100% rename from x/dex/types/pool_test.go rename to x/spot/types/pool_test.go diff --git a/x/dex/types/price.go b/x/spot/types/price.go similarity index 100% rename from x/dex/types/price.go rename to x/spot/types/price.go diff --git a/x/dex/types/price_test.go b/x/spot/types/price_test.go similarity index 100% rename from x/dex/types/price_test.go rename to x/spot/types/price_test.go diff --git a/x/dex/types/query.pb.go b/x/spot/types/query.pb.go similarity index 93% rename from x/dex/types/query.pb.go rename to x/spot/types/query.pb.go index 2c62e4da7..0cc0eb847 100644 --- a/x/dex/types/query.pb.go +++ b/x/spot/types/query.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: dex/v1/query.proto +// source: spot/v1/query.proto package types @@ -40,7 +40,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{0} + return fileDescriptor_2d81346ec2a640a1, []int{0} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,7 +79,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{1} + return fileDescriptor_2d81346ec2a640a1, []int{1} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -122,7 +122,7 @@ func (m *QueryPoolNumberRequest) Reset() { *m = QueryPoolNumberRequest{} func (m *QueryPoolNumberRequest) String() string { return proto.CompactTextString(m) } func (*QueryPoolNumberRequest) ProtoMessage() {} func (*QueryPoolNumberRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{2} + return fileDescriptor_2d81346ec2a640a1, []int{2} } func (m *QueryPoolNumberRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,7 +159,7 @@ func (m *QueryPoolNumberResponse) Reset() { *m = QueryPoolNumberResponse func (m *QueryPoolNumberResponse) String() string { return proto.CompactTextString(m) } func (*QueryPoolNumberResponse) ProtoMessage() {} func (*QueryPoolNumberResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{3} + return fileDescriptor_2d81346ec2a640a1, []int{3} } func (m *QueryPoolNumberResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -203,7 +203,7 @@ func (m *QueryPoolRequest) Reset() { *m = QueryPoolRequest{} } func (m *QueryPoolRequest) String() string { return proto.CompactTextString(m) } func (*QueryPoolRequest) ProtoMessage() {} func (*QueryPoolRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{4} + return fileDescriptor_2d81346ec2a640a1, []int{4} } func (m *QueryPoolRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,7 +247,7 @@ func (m *QueryPoolResponse) Reset() { *m = QueryPoolResponse{} } func (m *QueryPoolResponse) String() string { return proto.CompactTextString(m) } func (*QueryPoolResponse) ProtoMessage() {} func (*QueryPoolResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{5} + return fileDescriptor_2d81346ec2a640a1, []int{5} } func (m *QueryPoolResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -292,7 +292,7 @@ func (m *QueryPoolsRequest) Reset() { *m = QueryPoolsRequest{} } func (m *QueryPoolsRequest) String() string { return proto.CompactTextString(m) } func (*QueryPoolsRequest) ProtoMessage() {} func (*QueryPoolsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{6} + return fileDescriptor_2d81346ec2a640a1, []int{6} } func (m *QueryPoolsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -338,7 +338,7 @@ func (m *QueryPoolsResponse) Reset() { *m = QueryPoolsResponse{} } func (m *QueryPoolsResponse) String() string { return proto.CompactTextString(m) } func (*QueryPoolsResponse) ProtoMessage() {} func (*QueryPoolsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{7} + return fileDescriptor_2d81346ec2a640a1, []int{7} } func (m *QueryPoolsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -389,7 +389,7 @@ func (m *QueryPoolParamsRequest) Reset() { *m = QueryPoolParamsRequest{} func (m *QueryPoolParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryPoolParamsRequest) ProtoMessage() {} func (*QueryPoolParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{8} + return fileDescriptor_2d81346ec2a640a1, []int{8} } func (m *QueryPoolParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -433,7 +433,7 @@ func (m *QueryPoolParamsResponse) Reset() { *m = QueryPoolParamsResponse func (m *QueryPoolParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryPoolParamsResponse) ProtoMessage() {} func (*QueryPoolParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{9} + return fileDescriptor_2d81346ec2a640a1, []int{9} } func (m *QueryPoolParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -476,7 +476,7 @@ func (m *QueryNumPoolsRequest) Reset() { *m = QueryNumPoolsRequest{} } func (m *QueryNumPoolsRequest) String() string { return proto.CompactTextString(m) } func (*QueryNumPoolsRequest) ProtoMessage() {} func (*QueryNumPoolsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{10} + return fileDescriptor_2d81346ec2a640a1, []int{10} } func (m *QueryNumPoolsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -513,7 +513,7 @@ func (m *QueryNumPoolsResponse) Reset() { *m = QueryNumPoolsResponse{} } func (m *QueryNumPoolsResponse) String() string { return proto.CompactTextString(m) } func (*QueryNumPoolsResponse) ProtoMessage() {} func (*QueryNumPoolsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{11} + return fileDescriptor_2d81346ec2a640a1, []int{11} } func (m *QueryNumPoolsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -558,7 +558,7 @@ func (m *QueryTotalLiquidityRequest) Reset() { *m = QueryTotalLiquidityR func (m *QueryTotalLiquidityRequest) String() string { return proto.CompactTextString(m) } func (*QueryTotalLiquidityRequest) ProtoMessage() {} func (*QueryTotalLiquidityRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{12} + return fileDescriptor_2d81346ec2a640a1, []int{12} } func (m *QueryTotalLiquidityRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -595,7 +595,7 @@ func (m *QueryTotalLiquidityResponse) Reset() { *m = QueryTotalLiquidity func (m *QueryTotalLiquidityResponse) String() string { return proto.CompactTextString(m) } func (*QueryTotalLiquidityResponse) ProtoMessage() {} func (*QueryTotalLiquidityResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{13} + return fileDescriptor_2d81346ec2a640a1, []int{13} } func (m *QueryTotalLiquidityResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -641,7 +641,7 @@ func (m *QueryTotalPoolLiquidityRequest) Reset() { *m = QueryTotalPoolLi func (m *QueryTotalPoolLiquidityRequest) String() string { return proto.CompactTextString(m) } func (*QueryTotalPoolLiquidityRequest) ProtoMessage() {} func (*QueryTotalPoolLiquidityRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{14} + return fileDescriptor_2d81346ec2a640a1, []int{14} } func (m *QueryTotalPoolLiquidityRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -685,7 +685,7 @@ func (m *QueryTotalPoolLiquidityResponse) Reset() { *m = QueryTotalPoolL func (m *QueryTotalPoolLiquidityResponse) String() string { return proto.CompactTextString(m) } func (*QueryTotalPoolLiquidityResponse) ProtoMessage() {} func (*QueryTotalPoolLiquidityResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{15} + return fileDescriptor_2d81346ec2a640a1, []int{15} } func (m *QueryTotalPoolLiquidityResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -729,7 +729,7 @@ func (m *QueryTotalSharesRequest) Reset() { *m = QueryTotalSharesRequest func (m *QueryTotalSharesRequest) String() string { return proto.CompactTextString(m) } func (*QueryTotalSharesRequest) ProtoMessage() {} func (*QueryTotalSharesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{16} + return fileDescriptor_2d81346ec2a640a1, []int{16} } func (m *QueryTotalSharesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -774,7 +774,7 @@ func (m *QueryTotalSharesResponse) Reset() { *m = QueryTotalSharesRespon func (m *QueryTotalSharesResponse) String() string { return proto.CompactTextString(m) } func (*QueryTotalSharesResponse) ProtoMessage() {} func (*QueryTotalSharesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{17} + return fileDescriptor_2d81346ec2a640a1, []int{17} } func (m *QueryTotalSharesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -825,7 +825,7 @@ func (m *QuerySpotPriceRequest) Reset() { *m = QuerySpotPriceRequest{} } func (m *QuerySpotPriceRequest) String() string { return proto.CompactTextString(m) } func (*QuerySpotPriceRequest) ProtoMessage() {} func (*QuerySpotPriceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{18} + return fileDescriptor_2d81346ec2a640a1, []int{18} } func (m *QuerySpotPriceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -883,7 +883,7 @@ func (m *QuerySpotPriceResponse) Reset() { *m = QuerySpotPriceResponse{} func (m *QuerySpotPriceResponse) String() string { return proto.CompactTextString(m) } func (*QuerySpotPriceResponse) ProtoMessage() {} func (*QuerySpotPriceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{19} + return fileDescriptor_2d81346ec2a640a1, []int{19} } func (m *QuerySpotPriceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -931,7 +931,7 @@ func (m *QuerySwapExactAmountInRequest) Reset() { *m = QuerySwapExactAmo func (m *QuerySwapExactAmountInRequest) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountInRequest) ProtoMessage() {} func (*QuerySwapExactAmountInRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{20} + return fileDescriptor_2d81346ec2a640a1, []int{20} } func (m *QuerySwapExactAmountInRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -989,7 +989,7 @@ func (m *QuerySwapExactAmountInResponse) Reset() { *m = QuerySwapExactAm func (m *QuerySwapExactAmountInResponse) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountInResponse) ProtoMessage() {} func (*QuerySwapExactAmountInResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{21} + return fileDescriptor_2d81346ec2a640a1, []int{21} } func (m *QuerySwapExactAmountInResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1037,7 +1037,7 @@ func (m *QuerySwapExactAmountOutRequest) Reset() { *m = QuerySwapExactAm func (m *QuerySwapExactAmountOutRequest) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountOutRequest) ProtoMessage() {} func (*QuerySwapExactAmountOutRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{22} + return fileDescriptor_2d81346ec2a640a1, []int{22} } func (m *QuerySwapExactAmountOutRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1095,7 +1095,7 @@ func (m *QuerySwapExactAmountOutResponse) Reset() { *m = QuerySwapExactA func (m *QuerySwapExactAmountOutResponse) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountOutResponse) ProtoMessage() {} func (*QuerySwapExactAmountOutResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{23} + return fileDescriptor_2d81346ec2a640a1, []int{23} } func (m *QuerySwapExactAmountOutResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1140,7 +1140,7 @@ func (m *QueryJoinExactAmountInRequest) Reset() { *m = QueryJoinExactAmo func (m *QueryJoinExactAmountInRequest) String() string { return proto.CompactTextString(m) } func (*QueryJoinExactAmountInRequest) ProtoMessage() {} func (*QueryJoinExactAmountInRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{24} + return fileDescriptor_2d81346ec2a640a1, []int{24} } func (m *QueryJoinExactAmountInRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1194,7 +1194,7 @@ func (m *QueryJoinExactAmountInResponse) Reset() { *m = QueryJoinExactAm func (m *QueryJoinExactAmountInResponse) String() string { return proto.CompactTextString(m) } func (*QueryJoinExactAmountInResponse) ProtoMessage() {} func (*QueryJoinExactAmountInResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{25} + return fileDescriptor_2d81346ec2a640a1, []int{25} } func (m *QueryJoinExactAmountInResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1238,7 +1238,7 @@ func (m *QueryJoinExactAmountOutRequest) Reset() { *m = QueryJoinExactAm func (m *QueryJoinExactAmountOutRequest) String() string { return proto.CompactTextString(m) } func (*QueryJoinExactAmountOutRequest) ProtoMessage() {} func (*QueryJoinExactAmountOutRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{26} + return fileDescriptor_2d81346ec2a640a1, []int{26} } func (m *QueryJoinExactAmountOutRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1281,7 +1281,7 @@ func (m *QueryJoinExactAmountOutResponse) Reset() { *m = QueryJoinExactA func (m *QueryJoinExactAmountOutResponse) String() string { return proto.CompactTextString(m) } func (*QueryJoinExactAmountOutResponse) ProtoMessage() {} func (*QueryJoinExactAmountOutResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{27} + return fileDescriptor_2d81346ec2a640a1, []int{27} } func (m *QueryJoinExactAmountOutResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1320,7 +1320,7 @@ func (m *QueryExitExactAmountInRequest) Reset() { *m = QueryExitExactAmo func (m *QueryExitExactAmountInRequest) String() string { return proto.CompactTextString(m) } func (*QueryExitExactAmountInRequest) ProtoMessage() {} func (*QueryExitExactAmountInRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{28} + return fileDescriptor_2d81346ec2a640a1, []int{28} } func (m *QueryExitExactAmountInRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1365,7 +1365,7 @@ func (m *QueryExitExactAmountInResponse) Reset() { *m = QueryExitExactAm func (m *QueryExitExactAmountInResponse) String() string { return proto.CompactTextString(m) } func (*QueryExitExactAmountInResponse) ProtoMessage() {} func (*QueryExitExactAmountInResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{29} + return fileDescriptor_2d81346ec2a640a1, []int{29} } func (m *QueryExitExactAmountInResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1409,7 +1409,7 @@ func (m *QueryExitExactAmountOutRequest) Reset() { *m = QueryExitExactAm func (m *QueryExitExactAmountOutRequest) String() string { return proto.CompactTextString(m) } func (*QueryExitExactAmountOutRequest) ProtoMessage() {} func (*QueryExitExactAmountOutRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{30} + return fileDescriptor_2d81346ec2a640a1, []int{30} } func (m *QueryExitExactAmountOutRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1452,7 +1452,7 @@ func (m *QueryExitExactAmountOutResponse) Reset() { *m = QueryExitExactA func (m *QueryExitExactAmountOutResponse) String() string { return proto.CompactTextString(m) } func (*QueryExitExactAmountOutResponse) ProtoMessage() {} func (*QueryExitExactAmountOutResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4ba1e1ef24357ddf, []int{31} + return fileDescriptor_2d81346ec2a640a1, []int{31} } func (m *QueryExitExactAmountOutResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1516,103 +1516,103 @@ func init() { proto.RegisterType((*QueryExitExactAmountOutResponse)(nil), "nibiru.dex.v1.QueryExitExactAmountOutResponse") } -func init() { proto.RegisterFile("dex/v1/query.proto", fileDescriptor_4ba1e1ef24357ddf) } - -var fileDescriptor_4ba1e1ef24357ddf = []byte{ - // 1478 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xdf, 0x6f, 0x14, 0x55, - 0x14, 0xee, 0x40, 0x29, 0xdd, 0x53, 0x7e, 0xf5, 0xb6, 0xa5, 0xed, 0x96, 0xee, 0xc2, 0x05, 0x0a, - 0x54, 0xd9, 0xa1, 0x05, 0x7f, 0x80, 0xbc, 0x58, 0xa8, 0x58, 0xa2, 0x50, 0x17, 0x7d, 0x50, 0x1f, - 0x36, 0xd3, 0xee, 0x64, 0x19, 0xe9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, 0xe2, 0xed, 0x74, 0x31, 0x9d, 0x62, 0x3f, 0xb3, 0x4a, 0x4b, 0x55, 0xed, 0x2d, 0xfe, 0x4b, - 0x60, 0x8f, 0x8c, 0x21, 0x77, 0x60, 0x48, 0x59, 0x30, 0x72, 0x2c, 0xe6, 0xd4, 0x92, 0x3f, 0x0e, - 0xca, 0xb4, 0x57, 0x08, 0xae, 0x41, 0xf9, 0xb3, 0xdf, 0xff, 0xf9, 0x7a, 0xd7, 0x38, 0x21, 0xba, - 0x8a, 0xd5, 0xc5, 0x2f, 0x13, 0x65, 0x09, 0xc9, 0x03, 0x80, 0xae, 0xe3, 0x27, 0x27, 0x53, 0xab, - 0xc5, 0x7f, 0x2b, 0x94, 0xe7, 0xf2, 0xc2, 0x10, 0xb8, 0x2a, 0x81, 0xa7, 0xc9, 0x64, 0x04, 0x58, - 0x28, 0x64, 0x2b, 0xbc, 0x75, 0x18, 0x14, 0x69, 0xa4, 0x9a, 0x55, 0xd0, 0x47, 0x3c, 0x9a, 0x1d, - 0x80, 0x58, 0x53, 0x12, 0x8b, 0x90, 0x43, 0x71, 0x2c, 0xd2, 0x82, 0x3d, 0xd2, 0x83, 0x92, 0xcc, - 0x22, 0x81, 0x9a, 0xc7, 0x7a, 0x44, 0x20, 0xce, 0xb4, 0xc4, 0x19, 0x23, 0xa3, 0x71, 0x1c, 0x97, - 0x7c, 0xa1, 0x29, 0x31, 0x71, 0x7a, 0x99, 0x62, 0x46, 0x27, 0x38, 0x97, 0x17, 0x86, 0xc0, 0xf3, - 0x12, 0xf8, 0x04, 0xa1, 0x09, 0x60, 0xfd, 0x63, 0xdc, 0xba, 0x87, 0xfe, 0x54, 0x39, 0x0c, 0xfb, - 0xf6, 0x9c, 0x1c, 0x4f, 0xab, 0x1f, 0x33, 0xf5, 0xe5, 0x13, 0xbd, 0x83, 0x90, 0xc2, 0xac, 0xa4, - 0x30, 0x49, 0x26, 0xc2, 0x14, 0x02, 0xcf, 0x4f, 0xbe, 0xd2,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fa, 0xcb, 0xe4, 0x42, 0xdf, 0xd4, 0x99, 0xc7, 0x23, 0x9a, 0x27, 0xfc, 0x5a, 0xba, 0xe6, 0x59, - 0x7e, 0x34, 0x5d, 0xf3, 0x4c, 0x13, 0x58, 0x58, 0xf3, 0x8f, 0x98, 0x65, 0xf7, 0xd4, 0x3c, 0x69, - 0x8d, 0x48, 0x11, 0x2a, 0x79, 0x9a, 0xf7, 0x70, 0x5c, 0x45, 0x35, 0x4f, 0x52, 0x8f, 0x6b, 0x9e, - 0x30, 0x42, 0xe9, 0x9a, 0x67, 0x39, 0xbb, 0x74, 0xcd, 0x33, 0xdd, 0x55, 0x61, 0xcd, 0xcd, 0x4d, - 0x8b, 0xf7, 0xd4, 0x3c, 0x69, 0x71, 0x48, 0x11, 0x2a, 0x79, 0x9a, 0x67, 0x3b, 0xa7, 0xc2, 0x9a, - 0x27, 0xa9, 0x33, 0x8f, 0x2f, 0x5d, 0x79, 0xfc, 0xb4, 0xa2, 0x3d, 0x79, 0x5a, 0xd1, 0xfe, 0x7e, - 0x5a, 0xd1, 0x1e, 0xed, 0x54, 0x06, 0x9e, 0xec, 0x54, 0x06, 0xfe, 0xd8, 0xa9, 0x0c, 0x7c, 0x70, - 0x26, 0x64, 0x12, 0x6f, 0xc8, 0xca, 0x57, 0x6e, 0x1b, 0x96, 0xed, 0xa3, 0x6c, 0xaa, 0x2f, 0x1d, - 0xe1, 0x15, 0xd7, 0x86, 0xe4, 0xff, 0xdf, 0x9e, 0xff, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x00, - 0xe4, 0x34, 0x8c, 0x16, 0x00, 0x00, +func init() { proto.RegisterFile("spot/v1/query.proto", fileDescriptor_2d81346ec2a640a1) } + +var fileDescriptor_2d81346ec2a640a1 = []byte{ + // 1479 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x6f, 0x15, 0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 0x23, 0x83, 0x31, 0x76, 0x2c, 0xe0, 0xe0, 0x1a, 0x1d, 0xc3, 0x0e, 0x2a, + 0x90, 0xf0, 0x94, 0xb1, 0x0d, 0x3c, 0xab, 0x45, 0xab, 0x06, 0xf5, 0xd6, 0x98, 0x85, 0x95, 0xe8, + 0x18, 0x90, 0x77, 0x04, 0xd6, 0x8a, 0x2c, 0xd4, 0x34, 0xef, 0xf8, 0xa6, 0xc7, 0xe9, 0x35, 0x18, + 0x8d, 0x9d, 0x7a, 0x2e, 0x73, 0x3c, 0x93, 0x9c, 0x83, 0x21, 0x05, 0x38, 0xa9, 0x1d, 0xd1, 0x4e, + 0x8d, 0x2c, 0x8c, 0x37, 0x62, 0x6d, 0x37, 0x54, 0xf8, 0xe2, 0xe0, 0xa3, 0xed, 0xfa, 0x40, 0x13, + 0x43, 0xe9, 0x24, 0x1c, 0x52, 0xb5, 0x18, 0xdb, 0xb8, 0xee, 0xdb, 0xab, 0x66, 0x27, 0x40, 0x59, + 0x80, 0x89, 0xd4, 0x15, 0x44, 0x9a, 0x80, 0xdd, 0xa2, 0x89, 0x96, 0xb5, 0x2e, 0xa1, 0x06, 0x9b, + 0x43, 0xe2, 0xdf, 0xe5, 0x75, 0xfa, 0x02, 0x1c, 0x08, 0x73, 0xb0, 0x4e, 0x7e, 0xf0, 0x25, 0x38, + 0x18, 0x09, 0xc6, 0xd2, 0x27, 0x61, 0x50, 0x5c, 0xc6, 0x16, 0x46, 0x93, 0x2d, 0x88, 0x50, 0x19, + 0x40, 0x3f, 0x8c, 0x64, 0x07, 0xca, 0x90, 0x37, 0x00, 0xba, 0xd3, 0xc0, 0x1a, 0xb3, 0x0d, 0x25, + 0x72, 0x43, 0x88, 0xdc, 0x50, 0x6b, 0x81, 0x52, 0x37, 0x56, 0x8c, 0xb6, 0x89, 0xb9, 0xcd, 0x48, + 0x26, 0xfd, 0x52, 0x0b, 0x84, 0x57, 0xd5, 0x91, 0xdc, 0x69, 0xd8, 0x25, 0xb0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 0xff, 0xff, 0xa5, + 0xc6, 0x55, 0x74, 0x90, 0x16, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1627,7 +1627,7 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { - // Parameters of the dex module. + // Parameters of the spot module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Next available pool id number. PoolNumber(ctx context.Context, in *QueryPoolNumberRequest, opts ...grpc.CallOption) (*QueryPoolNumberResponse, error) @@ -1821,7 +1821,7 @@ func (c *queryClient) EstimateExitExactAmountOut(ctx context.Context, in *QueryE // QueryServer is the server API for Query service. type QueryServer interface { - // Parameters of the dex module. + // Parameters of the spot module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Next available pool id number. PoolNumber(context.Context, *QueryPoolNumberRequest) (*QueryPoolNumberResponse, error) @@ -2276,7 +2276,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "dex/v1/query.proto", + Metadata: "spot/v1/query.proto", } func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { diff --git a/x/dex/types/query.pb.gw.go b/x/spot/types/query.pb.gw.go similarity index 99% rename from x/dex/types/query.pb.gw.go rename to x/spot/types/query.pb.gw.go index 1903976ad..a56e4d9c5 100644 --- a/x/dex/types/query.pb.gw.go +++ b/x/spot/types/query.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: dex/v1/query.proto +// source: spot/v1/query.proto /* Package types is a reverse proxy. diff --git a/x/dex/types/shares.go b/x/spot/types/shares.go similarity index 100% rename from x/dex/types/shares.go rename to x/spot/types/shares.go diff --git a/x/dex/types/shares_test.go b/x/spot/types/shares_test.go similarity index 100% rename from x/dex/types/shares_test.go rename to x/spot/types/shares_test.go diff --git a/x/dex/types/swap.go b/x/spot/types/swap.go similarity index 99% rename from x/dex/types/swap.go rename to x/spot/types/swap.go index e81a25c75..4c274e734 100644 --- a/x/dex/types/swap.go +++ b/x/spot/types/swap.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/dex/math" + "github.com/NibiruChain/nibiru/x/spot/math" ) /* diff --git a/x/dex/types/swap_test.go b/x/spot/types/swap_test.go similarity index 100% rename from x/dex/types/swap_test.go rename to x/spot/types/swap_test.go diff --git a/x/dex/types/tx.pb.go b/x/spot/types/tx.pb.go similarity index 90% rename from x/dex/types/tx.pb.go rename to x/spot/types/tx.pb.go index 59347bfbf..51f05e53b 100644 --- a/x/dex/types/tx.pb.go +++ b/x/spot/types/tx.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: dex/v1/tx.proto +// source: spot/v1/tx.proto package types @@ -40,7 +40,7 @@ func (m *MsgCreatePool) Reset() { *m = MsgCreatePool{} } func (m *MsgCreatePool) String() string { return proto.CompactTextString(m) } func (*MsgCreatePool) ProtoMessage() {} func (*MsgCreatePool) Descriptor() ([]byte, []int) { - return fileDescriptor_18e8aa85ff669608, []int{0} + return fileDescriptor_7f826c866f00b65d, []int{0} } func (m *MsgCreatePool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -98,7 +98,7 @@ func (m *MsgCreatePoolResponse) Reset() { *m = MsgCreatePoolResponse{} } func (m *MsgCreatePoolResponse) String() string { return proto.CompactTextString(m) } func (*MsgCreatePoolResponse) ProtoMessage() {} func (*MsgCreatePoolResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_18e8aa85ff669608, []int{1} + return fileDescriptor_7f826c866f00b65d, []int{1} } func (m *MsgCreatePoolResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -147,7 +147,7 @@ func (m *MsgJoinPool) Reset() { *m = MsgJoinPool{} } func (m *MsgJoinPool) String() string { return proto.CompactTextString(m) } func (*MsgJoinPool) ProtoMessage() {} func (*MsgJoinPool) Descriptor() ([]byte, []int) { - return fileDescriptor_18e8aa85ff669608, []int{2} + return fileDescriptor_7f826c866f00b65d, []int{2} } func (m *MsgJoinPool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -219,7 +219,7 @@ func (m *MsgJoinPoolResponse) Reset() { *m = MsgJoinPoolResponse{} } func (m *MsgJoinPoolResponse) String() string { return proto.CompactTextString(m) } func (*MsgJoinPoolResponse) ProtoMessage() {} func (*MsgJoinPoolResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_18e8aa85ff669608, []int{3} + return fileDescriptor_7f826c866f00b65d, []int{3} } func (m *MsgJoinPoolResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -279,7 +279,7 @@ func (m *MsgExitPool) Reset() { *m = MsgExitPool{} } func (m *MsgExitPool) String() string { return proto.CompactTextString(m) } func (*MsgExitPool) ProtoMessage() {} func (*MsgExitPool) Descriptor() ([]byte, []int) { - return fileDescriptor_18e8aa85ff669608, []int{4} + return fileDescriptor_7f826c866f00b65d, []int{4} } func (m *MsgExitPool) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -337,7 +337,7 @@ func (m *MsgExitPoolResponse) Reset() { *m = MsgExitPoolResponse{} } func (m *MsgExitPoolResponse) String() string { return proto.CompactTextString(m) } func (*MsgExitPoolResponse) ProtoMessage() {} func (*MsgExitPoolResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_18e8aa85ff669608, []int{5} + return fileDescriptor_7f826c866f00b65d, []int{5} } func (m *MsgExitPoolResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -384,7 +384,7 @@ func (m *MsgSwapAssets) Reset() { *m = MsgSwapAssets{} } func (m *MsgSwapAssets) String() string { return proto.CompactTextString(m) } func (*MsgSwapAssets) ProtoMessage() {} func (*MsgSwapAssets) Descriptor() ([]byte, []int) { - return fileDescriptor_18e8aa85ff669608, []int{6} + return fileDescriptor_7f826c866f00b65d, []int{6} } func (m *MsgSwapAssets) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -449,7 +449,7 @@ func (m *MsgSwapAssetsResponse) Reset() { *m = MsgSwapAssetsResponse{} } func (m *MsgSwapAssetsResponse) String() string { return proto.CompactTextString(m) } func (*MsgSwapAssetsResponse) ProtoMessage() {} func (*MsgSwapAssetsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_18e8aa85ff669608, []int{7} + return fileDescriptor_7f826c866f00b65d, []int{7} } func (m *MsgSwapAssetsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -496,62 +496,62 @@ func init() { proto.RegisterType((*MsgSwapAssetsResponse)(nil), "nibiru.dex.v1.MsgSwapAssetsResponse") } -func init() { proto.RegisterFile("dex/v1/tx.proto", fileDescriptor_18e8aa85ff669608) } - -var fileDescriptor_18e8aa85ff669608 = []byte{ - // 829 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcf, 0x6b, 0xe3, 0x46, - 0x14, 0xb6, 0x62, 0x93, 0x38, 0x63, 0xbc, 0x4e, 0x26, 0xdb, 0x5d, 0x45, 0x04, 0xdb, 0x0c, 0x85, - 0x7a, 0x29, 0x48, 0xb5, 0x7b, 0x2b, 0x85, 0xb2, 0x72, 0x7b, 0x48, 0xc1, 0x4d, 0x50, 0xa0, 0x87, - 0x52, 0x30, 0x63, 0x7b, 0x50, 0x26, 0x95, 0x66, 0x84, 0x67, 0x94, 0xf5, 0x52, 0x7a, 0xe9, 0xb1, - 0xa7, 0x42, 0xff, 0x9e, 0xf6, 0xda, 0x3d, 0x2e, 0xf4, 0xd2, 0x93, 0x29, 0x49, 0xff, 0x02, 0x43, - 0x2f, 0x3d, 0x15, 0xcd, 0x8c, 0x14, 0x79, 0xd7, 0xa9, 0x29, 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 0x00, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x4e, 0x90, 0x89, 0x2a, 0x08, 0x00, 0x00, +func init() { proto.RegisterFile("spot/v1/tx.proto", fileDescriptor_7f826c866f00b65d) } + +var fileDescriptor_7f826c866f00b65d = []byte{ + // 832 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x41, 0x6b, 0x23, 0x37, + 0x14, 0xf6, 0xc4, 0x26, 0x71, 0x64, 0xbc, 0xf1, 0x2a, 0xdb, 0xdd, 0xc9, 0x10, 0x6c, 0x23, 0x0a, + 0x75, 0x5b, 0x98, 0xa9, 0xdd, 0x5b, 0x29, 0x94, 0x1d, 0x6f, 0x0f, 0x29, 0xb8, 0x09, 0x13, 0xe8, + 0xa1, 0x14, 0x8c, 0x6c, 0x8b, 0x89, 0xd2, 0x19, 0x69, 0xb0, 0x34, 0x59, 0x2f, 0xa5, 0x97, 0x1e, + 0x7b, 0x2a, 0xf4, 0xf7, 0xb4, 0xd7, 0xee, 0x71, 0xa1, 0x97, 0x9e, 0x4c, 0x49, 0xfa, 0x0b, 0x0c, + 0xbd, 0xf4, 0x54, 0x46, 0xd2, 0x4c, 0xc6, 0xbb, 0x4e, 0x4d, 0x59, 0x72, 0x93, 0xf4, 0x9e, 0xde, + 0xf7, 0xbe, 0xef, 0xbd, 0x27, 0x81, 0x96, 0x48, 0xb8, 0xf4, 0xae, 0xfa, 0x9e, 0x5c, 0xb8, 0xc9, + 0x9c, 0x4b, 0x0e, 0x9b, 0x8c, 0x4e, 0xe8, 0x3c, 0x75, 0x67, 0x64, 0xe1, 0x5e, 0xf5, 0x1d, 0x98, + 0x3b, 0x24, 0x9c, 0x47, 0xda, 0xc5, 0x79, 0x14, 0xf2, 0x90, 0xab, 0xa5, 0x97, 0xad, 0xcc, 0x69, + 0x7b, 0xca, 0x45, 0xcc, 0x85, 0x37, 0xc1, 0x82, 0x78, 0x57, 0xfd, 0x09, 0x91, 0xb8, 0xef, 0x4d, + 0x39, 0x65, 0xc6, 0x7e, 0x1c, 0x72, 0x1e, 0x46, 0xc4, 0xc3, 0x09, 0xf5, 0x30, 0x63, 0x5c, 0x62, + 0x49, 0x39, 0x13, 0xda, 0x8a, 0x7e, 0xb5, 0x40, 0x73, 0x24, 0xc2, 0xe1, 0x9c, 0x60, 0x49, 0xce, + 0x38, 0x8f, 0xa0, 0x0d, 0xf6, 0xa6, 0xd9, 0x8e, 0xcf, 0x6d, 0xab, 0x6b, 0xf5, 0xf6, 0x83, 0x7c, + 0x0b, 0x03, 0xd0, 0xc8, 0xb2, 0x19, 0x27, 0x78, 0x8e, 0x63, 0x61, 0xef, 0x74, 0xad, 0x5e, 0x63, + 0x70, 0xe4, 0xae, 0x25, 0xee, 0x66, 0x31, 0xce, 0x94, 0x83, 0xff, 0x78, 0xb5, 0xec, 0xc0, 0x17, + 0x38, 0x8e, 0x3e, 0x41, 0xa5, 0x7b, 0x28, 0x00, 0x49, 0xe1, 0x03, 0x3f, 0x33, 0x31, 0xb1, 0x10, + 0x44, 0x0a, 0xbb, 0xda, 0xad, 0xf6, 0x1a, 0x03, 0x7b, 0x43, 0xcc, 0xa7, 0x99, 0x83, 0x5f, 0x7b, + 0xb9, 0xec, 0x54, 0x74, 0x00, 0x75, 0x20, 0xd0, 0x47, 0xe0, 0x9d, 0xb5, 0xfc, 0x03, 0x22, 0x12, + 0xce, 0x04, 0x81, 0x4f, 0xc0, 0x9e, 0x8a, 0x4c, 0x67, 0x8a, 0x47, 0x2d, 0xd8, 0xcd, 0xb6, 0x27, + 0x33, 0xf4, 0xb7, 0x05, 0x1a, 0x23, 0x11, 0x7e, 0xc1, 0x29, 0x53, 0x84, 0xdf, 0x07, 0xbb, 0x82, + 0xb0, 0x19, 0x31, 0x7c, 0xfd, 0x87, 0xab, 0x65, 0xa7, 0xa9, 0xd3, 0xd6, 0xe7, 0x28, 0x30, 0x0e, + 0xf0, 0x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, 0x73, + 0xd0, 0xdd, 0xb6, 0x02, 0x05, 0x29, 0x94, 0x63, 0xe4, 0x94, 0x51, 0xbe, 0x33, 0x45, 0xfe, 0xde, + 0xbb, 0xe4, 0x94, 0x65, 0x78, 0xc5, 0xcc, 0x6d, 0xc0, 0xcb, 0x6d, 0x9b, 0xf0, 0x5e, 0x6f, 0xf6, + 0x6d, 0x78, 0x64, 0x41, 0x25, 0x94, 0x00, 0x94, 0xfa, 0x76, 0x83, 0x96, 0xb7, 0xd6, 0x4d, 0x5a, + 0xbe, 0x59, 0xf7, 0x6d, 0xa8, 0xe2, 0x39, 0x4e, 0xfc, 0x67, 0x2f, 0xaf, 0xdb, 0xd6, 0xab, 0xeb, + 0xb6, 0xf5, 0xe7, 0x75, 0xdb, 0xfa, 0xe9, 0xa6, 0x5d, 0x79, 0x75, 0xd3, 0xae, 0xfc, 0x71, 0xd3, + 0xae, 0x7c, 0xfd, 0x41, 0x48, 0xe5, 0x45, 0x3a, 0x71, 0xa7, 0x3c, 0xf6, 0xbe, 0x54, 0xf7, 0x87, + 0x17, 0x98, 0xb2, 0x3c, 0xd6, 0xc2, 0x53, 0xff, 0xbe, 0x7c, 0x91, 0x10, 0x31, 0xd9, 0x55, 0x5f, + 0xf4, 0xc7, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x54, 0x5a, 0xa0, 0x87, 0x2d, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -747,7 +747,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "dex/v1/tx.proto", + Metadata: "spot/v1/tx.proto", } func (m *MsgCreatePool) Marshal() (dAtA []byte, err error) { diff --git a/x/dex/types/tx.pb.gw.go b/x/spot/types/tx.pb.gw.go similarity index 99% rename from x/dex/types/tx.pb.gw.go rename to x/spot/types/tx.pb.gw.go index 7f88fe566..8d70b4315 100644 --- a/x/dex/types/tx.pb.gw.go +++ b/x/spot/types/tx.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: dex/v1/tx.proto +// source: spot/v1/tx.proto /* Package types is a reverse proxy. diff --git a/x/dex/types/utils.go b/x/spot/types/utils.go similarity index 100% rename from x/dex/types/utils.go rename to x/spot/types/utils.go diff --git a/x/dex/types/utils_test.go b/x/spot/types/utils_test.go similarity index 100% rename from x/dex/types/utils_test.go rename to x/spot/types/utils_test.go diff --git a/x/stablecoin/keeper/keeper.go b/x/stablecoin/keeper/keeper.go index 591e553df..c0954208d 100644 --- a/x/stablecoin/keeper/keeper.go +++ b/x/stablecoin/keeper/keeper.go @@ -22,7 +22,7 @@ type Keeper struct { AccountKeeper types.AccountKeeper BankKeeper types.BankKeeper OracleKeeper types.OracleKeeper - DexKeeper types.DexKeeper + SpotKeeper types.SpotKeeper } // NewKeeper Creates a new x/stablecoin Keeper instance. @@ -35,7 +35,7 @@ func NewKeeper( accountKeeper types.AccountKeeper, bankKeeper types.BankKeeper, priceKeeper types.OracleKeeper, - dexKeeper types.DexKeeper, + spotKeeper types.SpotKeeper, ) Keeper { // Ensure that the module account is set. if moduleAcc := accountKeeper.GetModuleAddress(types.ModuleName); moduleAcc == nil { @@ -56,7 +56,7 @@ func NewKeeper( AccountKeeper: accountKeeper, BankKeeper: bankKeeper, OracleKeeper: priceKeeper, - DexKeeper: dexKeeper, + SpotKeeper: spotKeeper, } } diff --git a/x/stablecoin/keeper/supply.go b/x/stablecoin/keeper/supply.go index 5c55a8767..1363dbc47 100644 --- a/x/stablecoin/keeper/supply.go +++ b/x/stablecoin/keeper/supply.go @@ -27,7 +27,7 @@ func (k Keeper) GetStableMarketCap(ctx sdk.Context) sdk.Int { } func (k Keeper) GetGovMarketCap(ctx sdk.Context) (sdk.Int, error) { - pool, err := k.DexKeeper.FetchPoolFromPair(ctx, denoms.NIBI, denoms.NUSD) + pool, err := k.SpotKeeper.FetchPoolFromPair(ctx, denoms.NIBI, denoms.NUSD) if err != nil { return sdk.Int{}, err } diff --git a/x/stablecoin/keeper/supply_test.go b/x/stablecoin/keeper/supply_test.go index cc3768485..c03a03562 100644 --- a/x/stablecoin/keeper/supply_test.go +++ b/x/stablecoin/keeper/supply_test.go @@ -12,7 +12,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - dextypes "github.com/NibiruChain/nibiru/x/dex/types" + spottypes "github.com/NibiruChain/nibiru/x/spot/types" "github.com/NibiruChain/nibiru/x/stablecoin/mock" "github.com/NibiruChain/nibiru/x/stablecoin/types" ) @@ -38,12 +38,12 @@ func TestKeeper_GetGovMarketCap(t *testing.T) { keeper := nibiruApp.StablecoinKeeper poolAccountAddr := testutil.AccAddress() - poolParams := dextypes.PoolParams{ + poolParams := spottypes.PoolParams{ SwapFee: sdk.NewDecWithPrec(3, 2), ExitFee: sdk.NewDecWithPrec(3, 2), - PoolType: dextypes.PoolType_BALANCER, + PoolType: spottypes.PoolType_BALANCER, } - poolAssets := []dextypes.PoolAsset{ + poolAssets := []spottypes.PoolAsset{ { Token: sdk.NewInt64Coin(denoms.NIBI, 2*common.Precision), Weight: sdk.NewInt(100), @@ -54,9 +54,9 @@ func TestKeeper_GetGovMarketCap(t *testing.T) { }, } - pool, err := dextypes.NewPool(1, poolAccountAddr, poolParams, poolAssets) + pool, err := spottypes.NewPool(1, poolAccountAddr, poolParams, poolAssets) require.NoError(t, err) - keeper.DexKeeper = mock.NewKeeper(pool) + keeper.SpotKeeper = mock.NewKeeper(pool) // We set some supply err = keeper.BankKeeper.MintCoins(ctx, types.ModuleName, sdk.NewCoins( @@ -75,12 +75,12 @@ func TestKeeper_GetLiquidityRatio_AndBands(t *testing.T) { keeper := nibiruApp.StablecoinKeeper poolAccountAddr := testutil.AccAddress() - poolParams := dextypes.PoolParams{ + poolParams := spottypes.PoolParams{ SwapFee: sdk.NewDecWithPrec(3, 2), ExitFee: sdk.NewDecWithPrec(3, 2), - PoolType: dextypes.PoolType_BALANCER, + PoolType: spottypes.PoolType_BALANCER, } - poolAssets := []dextypes.PoolAsset{ + poolAssets := []spottypes.PoolAsset{ { Token: sdk.NewInt64Coin(denoms.NIBI, 2*common.Precision), Weight: sdk.NewInt(100), @@ -91,9 +91,9 @@ func TestKeeper_GetLiquidityRatio_AndBands(t *testing.T) { }, } - pool, err := dextypes.NewPool(1, poolAccountAddr, poolParams, poolAssets) + pool, err := spottypes.NewPool(1, poolAccountAddr, poolParams, poolAssets) require.NoError(t, err) - keeper.DexKeeper = mock.NewKeeper(pool) + keeper.SpotKeeper = mock.NewKeeper(pool) // We set some supply err = keeper.BankKeeper.MintCoins(ctx, types.ModuleName, sdk.NewCoins( diff --git a/x/stablecoin/mock/dex_keeper.go b/x/stablecoin/mock/dex_keeper.go index 2edf7cd13..9f348b35c 100644 --- a/x/stablecoin/mock/dex_keeper.go +++ b/x/stablecoin/mock/dex_keeper.go @@ -3,7 +3,7 @@ package mock import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/NibiruChain/nibiru/x/dex/types" + "github.com/NibiruChain/nibiru/x/spot/types" ) type Keeper struct { diff --git a/x/stablecoin/types/expected_keepers.go b/x/stablecoin/types/expected_keepers.go index 0d4acaab9..dc7d2c1f5 100644 --- a/x/stablecoin/types/expected_keepers.go +++ b/x/stablecoin/types/expected_keepers.go @@ -5,7 +5,7 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/NibiruChain/nibiru/x/common/asset" - dextypes "github.com/NibiruChain/nibiru/x/dex/types" + spottypes "github.com/NibiruChain/nibiru/x/spot/types" ) // AccountKeeper defines the expected account keeper used for simulations (noalias) @@ -39,8 +39,8 @@ type OracleKeeper interface { GetExchangeRateTwap(ctx sdk.Context, pair asset.Pair) (sdk.Dec, error) } -type DexKeeper interface { +type SpotKeeper interface { FetchPoolFromPair(ctx sdk.Context, denomA string, denomB string, - ) (pool dextypes.Pool, err error) - FetchPool(ctx sdk.Context, poolId uint64) (pool dextypes.Pool, err error) + ) (pool spottypes.Pool, err error) + FetchPool(ctx sdk.Context, poolId uint64) (pool spottypes.Pool, err error) } diff --git a/x/vpool/client/cli/query.go b/x/vpool/client/cli/query.go index 8b3a1f9be..d20f39844 100644 --- a/x/vpool/client/cli/query.go +++ b/x/vpool/client/cli/query.go @@ -19,7 +19,7 @@ var _ = strconv.Itoa(0) // GetQueryCmd returns the cli query commands for this module func GetQueryCmd() *cobra.Command { - // Group dex queries under a subcommand + // Group spot queries under a subcommand queryCommand := &cobra.Command{ Use: types.ModuleName, Short: fmt.Sprintf( From 191a61e3828599aa2694bb912b7489150bf75d6d Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Fri, 3 Feb 2023 23:46:52 -0500 Subject: [PATCH 2/6] chore: update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0ad444d3..a8aaa2317 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#1158](https://github.com/NibiruChain/nibiru/pull/1158) - feat(asset-registry)!: Add `AssetRegistry` * [#1171](https://github.com/NibiruChain/nibiru/pull/1171) - refactor(asset)!: Replace `common.AssetPair` with `asset.Pair`. * [#1164](https://github.com/NibiruChain/nibiru/pull/1164) - refactor: remove client interface for liquidate msg +* [#1173](https://github.com/NibiruChain/nibiru/pull/1173) - refactor(spot)!: replace `x/dex` module with `x/spot`. ### State Machine Breaking From 40714acc4ed46cca6c82a8a2efeddd347510cbd2 Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Fri, 3 Feb 2023 23:49:07 -0500 Subject: [PATCH 3/6] refactor(spot): rename dex with spot --- app/app.go | 8 +- proto/spot/v1/event.proto | 2 +- proto/spot/v1/genesis.proto | 2 +- proto/spot/v1/params.proto | 2 +- proto/spot/v1/pool.proto | 2 +- proto/spot/v1/query.proto | 2 +- proto/spot/v1/tx.proto | 2 +- x/common/testutil/mock/dex_pool.go | 4 +- x/dex/genesis_test.go | 4 +- x/dex/keeper/liquidity_test.go | 26 +-- x/dex/keeper/params_test.go | 4 +- x/dex/keeper/swap_test.go | 42 ++-- x/spot/genesis_test.go | 4 +- x/spot/keeper/balances_test.go | 2 +- x/spot/keeper/grpc_query_test.go | 96 ++++----- x/spot/keeper/keeper_test.go | 92 ++++----- x/spot/keeper/liquidity_test.go | 26 +-- x/spot/keeper/msg_server_test.go | 98 ++++----- x/spot/keeper/params_test.go | 4 +- x/spot/keeper/swap_test.go | 42 ++-- x/spot/types/event.pb.go | 58 +++--- x/spot/types/genesis.pb.go | 26 +-- x/spot/types/params.pb.go | 49 ++--- x/spot/types/pool.pb.go | 90 ++++---- x/spot/types/query.pb.go | 318 ++++++++++++++--------------- x/spot/types/tx.pb.go | 141 ++++++------- 26 files changed, 574 insertions(+), 572 deletions(-) diff --git a/app/app.go b/app/app.go index cff012844..fd85f532d 100644 --- a/app/app.go +++ b/app/app.go @@ -268,7 +268,7 @@ type NibiruApp struct { EpochsKeeper epochskeeper.Keeper PerpKeeper perpkeeper.Keeper VpoolKeeper vpoolkeeper.Keeper - DexKeeper spotkeeper.Keeper + SpotKeeper spotkeeper.Keeper OracleKeeper oraclekeeper.Keeper StablecoinKeeper stablecoinkeeper.Keeper @@ -435,7 +435,7 @@ func NewNibiruApp( // ---------------------------------- Nibiru Chain x/ keepers - app.DexKeeper = spotkeeper.NewKeeper( + app.SpotKeeper = spotkeeper.NewKeeper( appCodec, keys[spottypes.StoreKey], app.GetSubspace(spottypes.ModuleName), app.AccountKeeper, app.BankKeeper, app.distrKeeper) @@ -446,7 +446,7 @@ func NewNibiruApp( app.StablecoinKeeper = stablecoinkeeper.NewKeeper( appCodec, keys[stablecointypes.StoreKey], memKeys[stablecointypes.MemStoreKey], app.GetSubspace(stablecointypes.ModuleName), - app.AccountKeeper, app.BankKeeper, app.OracleKeeper, app.DexKeeper, + app.AccountKeeper, app.BankKeeper, app.OracleKeeper, app.SpotKeeper, ) app.VpoolKeeper = vpoolkeeper.NewKeeper( @@ -571,7 +571,7 @@ func NewNibiruApp( appOpts.Get(crisis.FlagSkipGenesisInvariants)) spotModule := spot.NewAppModule( - appCodec, app.DexKeeper, app.AccountKeeper, app.BankKeeper) + appCodec, app.SpotKeeper, app.AccountKeeper, app.BankKeeper) oracleModule := oracle.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper) epochsModule := epochs.NewAppModule(appCodec, app.EpochsKeeper) stablecoinModule := stablecoin.NewAppModule( diff --git a/proto/spot/v1/event.proto b/proto/spot/v1/event.proto index eb8dcbdb1..4421410ef 100644 --- a/proto/spot/v1/event.proto +++ b/proto/spot/v1/event.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package nibiru.dex.v1; +package nibiru.spot.v1; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; diff --git a/proto/spot/v1/genesis.proto b/proto/spot/v1/genesis.proto index 3dfc6f9ac..dd2494673 100644 --- a/proto/spot/v1/genesis.proto +++ b/proto/spot/v1/genesis.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package nibiru.dex.v1; +package nibiru.spot.v1; import "spot/v1/params.proto"; import "gogoproto/gogo.proto"; diff --git a/proto/spot/v1/params.proto b/proto/spot/v1/params.proto index e594751e7..d16d71e85 100644 --- a/proto/spot/v1/params.proto +++ b/proto/spot/v1/params.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package nibiru.dex.v1; +package nibiru.spot.v1; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; diff --git a/proto/spot/v1/pool.proto b/proto/spot/v1/pool.proto index 1f4478581..6d6ad2710 100644 --- a/proto/spot/v1/pool.proto +++ b/proto/spot/v1/pool.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package nibiru.dex.v1; +package nibiru.spot.v1; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; diff --git a/proto/spot/v1/query.proto b/proto/spot/v1/query.proto index a52b14a41..9f596b4d8 100644 --- a/proto/spot/v1/query.proto +++ b/proto/spot/v1/query.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package nibiru.dex.v1; +package nibiru.spot.v1; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; diff --git a/proto/spot/v1/tx.proto b/proto/spot/v1/tx.proto index ef52a493d..0d1068dc7 100644 --- a/proto/spot/v1/tx.proto +++ b/proto/spot/v1/tx.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package nibiru.dex.v1; +package nibiru.spot.v1; import "spot/v1/pool.proto"; import "gogoproto/gogo.proto"; diff --git a/x/common/testutil/mock/dex_pool.go b/x/common/testutil/mock/dex_pool.go index 0fde19ec0..4b8deaf6d 100644 --- a/x/common/testutil/mock/dex_pool.go +++ b/x/common/testutil/mock/dex_pool.go @@ -7,7 +7,7 @@ import ( ) // helper function to create dummy test pools -func DexPool(poolId uint64, assets sdk.Coins, shares int64) types.Pool { +func SpotPool(poolId uint64, assets sdk.Coins, shares int64) types.Pool { poolAssets := make([]types.PoolAsset, len(assets)) for i, asset := range assets { poolAssets[i] = types.PoolAsset{ @@ -30,7 +30,7 @@ func DexPool(poolId uint64, assets sdk.Coins, shares int64) types.Pool { } // helper function to create dummy test pools -func DexStablePool(poolId uint64, assets sdk.Coins, shares int64) types.Pool { +func SpotStablePool(poolId uint64, assets sdk.Coins, shares int64) types.Pool { poolAssets := make([]types.PoolAsset, len(assets)) for i, asset := range assets { poolAssets[i] = types.PoolAsset{ diff --git a/x/dex/genesis_test.go b/x/dex/genesis_test.go index 3b522cc71..73dd37cbf 100644 --- a/x/dex/genesis_test.go +++ b/x/dex/genesis_test.go @@ -17,8 +17,8 @@ func TestGenesis(t *testing.T) { } app, ctx := testapp.NewTestNibiruAppAndContext(true) - spot.InitGenesis(ctx, app.DexKeeper, genesisState) - got := spot.ExportGenesis(ctx, app.DexKeeper) + spot.InitGenesis(ctx, app.SpotKeeper, genesisState) + got := spot.ExportGenesis(ctx, app.SpotKeeper) require.NotNil(t, got) testutil.Fill(&genesisState) diff --git a/x/dex/keeper/liquidity_test.go b/x/dex/keeper/liquidity_test.go index b1a6acbab..db2cbb8d1 100644 --- a/x/dex/keeper/liquidity_test.go +++ b/x/dex/keeper/liquidity_test.go @@ -16,10 +16,10 @@ func TestGetSetDenomLiquidity(t *testing.T) { // Write to store coin := sdk.NewCoin("nibi", sdk.NewInt(1_000)) - assert.NoError(t, app.DexKeeper.SetDenomLiquidity(ctx, coin.Denom, coin.Amount)) + assert.NoError(t, app.SpotKeeper.SetDenomLiquidity(ctx, coin.Denom, coin.Amount)) // Read from store - amount, err := app.DexKeeper.GetDenomLiquidity(ctx, "nibi") + amount, err := app.SpotKeeper.GetDenomLiquidity(ctx, "nibi") assert.NoError(t, err) require.EqualValues(t, sdk.NewInt(1000), amount) } @@ -35,11 +35,11 @@ func TestGetTotalLiquidity(t *testing.T) { } for denom, amount := range coinMap { coin := sdk.NewCoin(denom, amount) - assert.NoError(t, app.DexKeeper.SetDenomLiquidity(ctx, coin.Denom, coin.Amount)) + assert.NoError(t, app.SpotKeeper.SetDenomLiquidity(ctx, coin.Denom, coin.Amount)) } // Read from store - coins := app.DexKeeper.GetTotalLiquidity(ctx) + coins := app.SpotKeeper.GetTotalLiquidity(ctx) require.EqualValues(t, sdk.NewCoins( sdk.NewCoin("atom", coinMap["atom"]), @@ -49,7 +49,7 @@ func TestGetTotalLiquidity(t *testing.T) { } // assertLiqValues checks if the total liquidity for each denom (key) of the -// expected map matches what's given by the DexKeeper +// expected map matches what's given by the SpotKeeper func assertLiqValues( t *testing.T, ctx sdk.Context, @@ -67,7 +67,7 @@ func TestSetTotalLiquidity(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) // Write to store - assert.NoError(t, app.DexKeeper.SetTotalLiquidity(ctx, sdk.NewCoins( + assert.NoError(t, app.SpotKeeper.SetTotalLiquidity(ctx, sdk.NewCoins( sdk.NewCoin("atom", sdk.NewInt(123)), sdk.NewCoin("nibi", sdk.NewInt(456)), sdk.NewCoin("foo", sdk.NewInt(789)), @@ -79,18 +79,18 @@ func TestSetTotalLiquidity(t *testing.T) { "nibi": sdk.NewInt(456), "foo": sdk.NewInt(789), } - assertLiqValues(t, ctx, app.DexKeeper, expectedLiqValues) + assertLiqValues(t, ctx, app.SpotKeeper, expectedLiqValues) } func TestRecordTotalLiquidityIncrease(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) // Write to store - assert.NoError(t, app.DexKeeper.SetTotalLiquidity(ctx, sdk.NewCoins( + assert.NoError(t, app.SpotKeeper.SetTotalLiquidity(ctx, sdk.NewCoins( sdk.NewCoin("atom", sdk.NewInt(100)), sdk.NewCoin("nibi", sdk.NewInt(200)), ))) - err := app.DexKeeper.RecordTotalLiquidityIncrease(ctx, sdk.NewCoins( + err := app.SpotKeeper.RecordTotalLiquidityIncrease(ctx, sdk.NewCoins( sdk.NewCoin("atom", sdk.NewInt(50)), sdk.NewCoin("nibi", sdk.NewInt(75)), )) @@ -100,18 +100,18 @@ func TestRecordTotalLiquidityIncrease(t *testing.T) { "atom": sdk.NewInt(150), "nibi": sdk.NewInt(275), } - assertLiqValues(t, ctx, app.DexKeeper, expectedLiqValues) + assertLiqValues(t, ctx, app.SpotKeeper, expectedLiqValues) } func TestRecordTotalLiquidityDecrease(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) // Write to store - assert.NoError(t, app.DexKeeper.SetTotalLiquidity(ctx, sdk.NewCoins( + assert.NoError(t, app.SpotKeeper.SetTotalLiquidity(ctx, sdk.NewCoins( sdk.NewCoin("atom", sdk.NewInt(100)), sdk.NewCoin("nibi", sdk.NewInt(200)), ))) - err := app.DexKeeper.RecordTotalLiquidityDecrease(ctx, sdk.NewCoins( + err := app.SpotKeeper.RecordTotalLiquidityDecrease(ctx, sdk.NewCoins( sdk.NewCoin("atom", sdk.NewInt(50)), sdk.NewCoin("nibi", sdk.NewInt(75)), )) @@ -121,5 +121,5 @@ func TestRecordTotalLiquidityDecrease(t *testing.T) { "atom": sdk.NewInt(50), "nibi": sdk.NewInt(125), } - assertLiqValues(t, ctx, app.DexKeeper, expectedLiqValues) + assertLiqValues(t, ctx, app.SpotKeeper, expectedLiqValues) } diff --git a/x/dex/keeper/params_test.go b/x/dex/keeper/params_test.go index 6ecd0a065..842575c19 100644 --- a/x/dex/keeper/params_test.go +++ b/x/dex/keeper/params_test.go @@ -14,7 +14,7 @@ func TestGetParams(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) params := types.DefaultParams() - app.DexKeeper.SetParams(ctx, params) + app.SpotKeeper.SetParams(ctx, params) - require.EqualValues(t, params, app.DexKeeper.GetParams(ctx)) + require.EqualValues(t, params, app.SpotKeeper.GetParams(ctx)) } diff --git a/x/dex/keeper/swap_test.go b/x/dex/keeper/swap_test.go index 6a5993d05..1b859680e 100644 --- a/x/dex/keeper/swap_test.go +++ b/x/dex/keeper/swap_test.go @@ -90,7 +90,7 @@ func TestSwapExactAmountIn(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.USDC, 10), ), - initialPool: mock.DexStablePool( + initialPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.USDC, 100), @@ -104,7 +104,7 @@ func TestSwapExactAmountIn(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NUSD, 10), ), - expectedFinalPool: mock.DexStablePool( + expectedFinalPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.USDC, 110), @@ -119,7 +119,7 @@ func TestSwapExactAmountIn(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -133,7 +133,7 @@ func TestSwapExactAmountIn(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NUSD, 50), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 200), @@ -148,7 +148,7 @@ func TestSwapExactAmountIn(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin("unibi", 1), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -161,7 +161,7 @@ func TestSwapExactAmountIn(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin("unibi", 1), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -176,7 +176,7 @@ func TestSwapExactAmountIn(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin("foo", 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -189,7 +189,7 @@ func TestSwapExactAmountIn(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin("foo", 100), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -204,7 +204,7 @@ func TestSwapExactAmountIn(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -217,7 +217,7 @@ func TestSwapExactAmountIn(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -232,7 +232,7 @@ func TestSwapExactAmountIn(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -245,7 +245,7 @@ func TestSwapExactAmountIn(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -274,14 +274,14 @@ func TestSwapExactAmountIn(t *testing.T) { tc.initialPool.PoolBalances(), ), ) - app.DexKeeper.SetPool(ctx, tc.initialPool) + app.SpotKeeper.SetPool(ctx, tc.initialPool) // fund user account sender := testutil.AccAddress() require.NoError(t, simapp.FundAccount(app.BankKeeper, ctx, sender, tc.userInitialFunds)) // swap assets - tokenOut, err := app.DexKeeper.SwapExactAmountIn(ctx, sender, tc.initialPool.Id, tc.tokenIn, tc.tokenOutDenom) + tokenOut, err := app.SpotKeeper.SwapExactAmountIn(ctx, sender, tc.initialPool.Id, tc.tokenIn, tc.tokenOutDenom) if tc.expectedError != nil { require.ErrorIs(t, err, tc.expectedError) @@ -297,7 +297,7 @@ func TestSwapExactAmountIn(t *testing.T) { ) // check final pool state - finalPool, err := app.DexKeeper.FetchPool(ctx, tc.initialPool.Id) + finalPool, err := app.SpotKeeper.FetchPool(ctx, tc.initialPool.Id) require.NoError(t, err) require.Equal(t, tc.expectedFinalPool, finalPool) }) @@ -324,7 +324,7 @@ func TestDoubleSwapExactAmountIn(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.USDC, 10_000), ), - initialPool: mock.DexStablePool( + initialPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.USDC, 100_000_000), @@ -338,7 +338,7 @@ func TestDoubleSwapExactAmountIn(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.USDC, 10_001), // TODO: fix https://github.com/NibiruChain/nibiru/issues/1152 ), - expectedFinalPool: mock.DexStablePool( + expectedFinalPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.USDC, 99_999_999), @@ -366,7 +366,7 @@ func TestDoubleSwapExactAmountIn(t *testing.T) { tc.initialPool.PoolBalances(), ), ) - app.DexKeeper.SetPool(ctx, tc.initialPool) + app.SpotKeeper.SetPool(ctx, tc.initialPool) // fund user account sender := testutil.AccAddress() @@ -374,11 +374,11 @@ func TestDoubleSwapExactAmountIn(t *testing.T) { // swap assets for i, tokenIn := range tc.tokenIns { - tokenOut, err := app.DexKeeper.SwapExactAmountIn(ctx, sender, tc.initialPool.Id, tokenIn, tc.tokenOutDenoms[i]) + tokenOut, err := app.SpotKeeper.SwapExactAmountIn(ctx, sender, tc.initialPool.Id, tokenIn, tc.tokenOutDenoms[i]) require.NoError(t, err) fmt.Println("-------------", i) - finalPool, err := app.DexKeeper.FetchPool(ctx, tc.initialPool.Id) + finalPool, err := app.SpotKeeper.FetchPool(ctx, tc.initialPool.Id) require.NoError(t, err) fmt.Println(finalPool.PoolAssets) @@ -393,7 +393,7 @@ func TestDoubleSwapExactAmountIn(t *testing.T) { ) // check final pool state - finalPool, err := app.DexKeeper.FetchPool(ctx, tc.initialPool.Id) + finalPool, err := app.SpotKeeper.FetchPool(ctx, tc.initialPool.Id) require.NoError(t, err) require.Equal(t, tc.expectedFinalPool, finalPool) }) diff --git a/x/spot/genesis_test.go b/x/spot/genesis_test.go index 3b522cc71..73dd37cbf 100644 --- a/x/spot/genesis_test.go +++ b/x/spot/genesis_test.go @@ -17,8 +17,8 @@ func TestGenesis(t *testing.T) { } app, ctx := testapp.NewTestNibiruAppAndContext(true) - spot.InitGenesis(ctx, app.DexKeeper, genesisState) - got := spot.ExportGenesis(ctx, app.DexKeeper) + spot.InitGenesis(ctx, app.SpotKeeper, genesisState) + got := spot.ExportGenesis(ctx, app.SpotKeeper) require.NotNil(t, got) testutil.Fill(&genesisState) diff --git a/x/spot/keeper/balances_test.go b/x/spot/keeper/balances_test.go index 038a7d8eb..5f8ca96aa 100644 --- a/x/spot/keeper/balances_test.go +++ b/x/spot/keeper/balances_test.go @@ -60,7 +60,7 @@ func TestCheckBalances(t *testing.T) { require.NoError(t, simapp.FundAccount(app.BankKeeper, ctx, sender, tc.userInitialFunds)) // swap assets - err := app.DexKeeper.CheckEnoughBalances(ctx, tc.coinsToSpend, sender) + err := app.SpotKeeper.CheckEnoughBalances(ctx, tc.coinsToSpend, sender) if tc.expectedError != nil { require.ErrorIs(t, err, tc.expectedError) diff --git a/x/spot/keeper/grpc_query_test.go b/x/spot/keeper/grpc_query_test.go index 85a947972..a23d4ade2 100644 --- a/x/spot/keeper/grpc_query_test.go +++ b/x/spot/keeper/grpc_query_test.go @@ -20,9 +20,9 @@ func TestParamsQuery(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) params := types.DefaultParams() - app.DexKeeper.SetParams(ctx, params) + app.SpotKeeper.SetParams(ctx, params) - queryServer := keeper.NewQuerier(app.DexKeeper) + queryServer := keeper.NewQuerier(app.SpotKeeper) response, err := queryServer.Params(sdk.WrapSDKContext(ctx), &types.QueryParamsRequest{}) require.NoError(t, err) @@ -90,9 +90,9 @@ func TestQueryPoolHappyPath(t *testing.T) { tc := tc t.Run(tc.name, func(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) - app.DexKeeper.SetPool(ctx, tc.existingPool) + app.SpotKeeper.SetPool(ctx, tc.existingPool) - queryServer := keeper.NewQuerier(app.DexKeeper) + queryServer := keeper.NewQuerier(app.SpotKeeper) resp, err := queryServer.Pool(sdk.WrapSDKContext(ctx), &types.QueryPoolRequest{ PoolId: 1, @@ -116,7 +116,7 @@ func TestQueryPoolFail(t *testing.T) { tc := tc t.Run(tc.name, func(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) - queryServer := keeper.NewQuerier(app.DexKeeper) + queryServer := keeper.NewQuerier(app.SpotKeeper) resp, err := queryServer.Pool(sdk.WrapSDKContext(ctx), nil) require.Error(t, err) require.Nil(t, resp) @@ -134,7 +134,7 @@ func TestQueryPools(t *testing.T) { { name: "successful query single pool", existingPools: []types.Pool{ - mock.DexPool( + mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("foo", 100), @@ -144,7 +144,7 @@ func TestQueryPools(t *testing.T) { ), }, expectedPools: []types.Pool{ - mock.DexPool( + mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("foo", 100), @@ -157,7 +157,7 @@ func TestQueryPools(t *testing.T) { { name: "successful query multiple pools", existingPools: []types.Pool{ - mock.DexPool( + mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("foo", 100), @@ -165,7 +165,7 @@ func TestQueryPools(t *testing.T) { ), /*shares=*/ 100, ), - mock.DexPool( + mock.SpotPool( /*poolId=*/ 2, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 100), @@ -175,7 +175,7 @@ func TestQueryPools(t *testing.T) { ), }, expectedPools: []types.Pool{ - mock.DexPool( + mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("foo", 100), @@ -183,7 +183,7 @@ func TestQueryPools(t *testing.T) { ), /*shares=*/ 100, ), - mock.DexPool( + mock.SpotPool( /*poolId=*/ 2, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 100), @@ -196,7 +196,7 @@ func TestQueryPools(t *testing.T) { { name: "query pools with pagination", existingPools: []types.Pool{ - mock.DexPool( + mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("foo", 100), @@ -204,7 +204,7 @@ func TestQueryPools(t *testing.T) { ), /*shares=*/ 100, ), - mock.DexPool( + mock.SpotPool( /*poolId=*/ 2, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 100), @@ -217,7 +217,7 @@ func TestQueryPools(t *testing.T) { Limit: 1, }, expectedPools: []types.Pool{ - mock.DexPool( + mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("foo", 100), @@ -234,10 +234,10 @@ func TestQueryPools(t *testing.T) { t.Run(tc.name, func(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) for _, existingPool := range tc.existingPools { - app.DexKeeper.SetPool(ctx, existingPool) + app.SpotKeeper.SetPool(ctx, existingPool) } - queryServer := keeper.NewQuerier(app.DexKeeper) + queryServer := keeper.NewQuerier(app.SpotKeeper) resp, err := queryServer.Pools( sdk.WrapSDKContext(ctx), @@ -265,7 +265,7 @@ func TestQueryNumPools(t *testing.T) { { name: "one pool", newPools: []types.Pool{ - mock.DexPool( + mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -279,7 +279,7 @@ func TestQueryNumPools(t *testing.T) { { name: "multiple pools", newPools: []types.Pool{ - mock.DexPool( + mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -287,7 +287,7 @@ func TestQueryNumPools(t *testing.T) { ), /*shares=*/ 100, ), - mock.DexPool( + mock.SpotPool( /*poolId=*/ 2, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.USDC, 100), @@ -295,7 +295,7 @@ func TestQueryNumPools(t *testing.T) { ), /*shares=*/ 100, ), - mock.DexPool( + mock.SpotPool( /*poolId=*/ 3, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NUSD, 100), @@ -326,7 +326,7 @@ func TestQueryNumPools(t *testing.T) { )) for _, newPool := range tc.newPools { - _, err := app.DexKeeper.NewPool( + _, err := app.SpotKeeper.NewPool( ctx, sender, newPool.PoolParams, @@ -335,7 +335,7 @@ func TestQueryNumPools(t *testing.T) { require.NoError(t, err) } - queryServer := keeper.NewQuerier(app.DexKeeper) + queryServer := keeper.NewQuerier(app.SpotKeeper) resp, err := queryServer.NumPools( sdk.WrapSDKContext(ctx), @@ -421,9 +421,9 @@ func TestQueryPoolParams(t *testing.T) { tc := tc t.Run(tc.name, func(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) - app.DexKeeper.SetPool(ctx, tc.existingPool) + app.SpotKeeper.SetPool(ctx, tc.existingPool) - queryServer := keeper.NewQuerier(app.DexKeeper) + queryServer := keeper.NewQuerier(app.SpotKeeper) resp, err := queryServer.PoolParams(sdk.WrapSDKContext(ctx), &types.QueryPoolParamsRequest{ PoolId: 1, @@ -442,7 +442,7 @@ func TestQueryTotalShares(t *testing.T) { }{ { name: "successfully get existing shares", - existingPool: mock.DexPool( + existingPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -459,9 +459,9 @@ func TestQueryTotalShares(t *testing.T) { t.Run(tc.name, func(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) - app.DexKeeper.SetPool(ctx, tc.existingPool) + app.SpotKeeper.SetPool(ctx, tc.existingPool) - queryServer := keeper.NewQuerier(app.DexKeeper) + queryServer := keeper.NewQuerier(app.SpotKeeper) resp, err := queryServer.TotalShares( sdk.WrapSDKContext(ctx), @@ -485,7 +485,7 @@ func TestQuerySpotPrice(t *testing.T) { }{ { name: "same quantity", - existingPool: mock.DexPool( + existingPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -499,7 +499,7 @@ func TestQuerySpotPrice(t *testing.T) { }, { name: "price of 2 unusd per unibi", - existingPool: mock.DexPool( + existingPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -513,7 +513,7 @@ func TestQuerySpotPrice(t *testing.T) { }, { name: "price of 0.5 unibi per unusd", - existingPool: mock.DexPool( + existingPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -532,9 +532,9 @@ func TestQuerySpotPrice(t *testing.T) { t.Run(tc.name, func(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) - app.DexKeeper.SetPool(ctx, tc.existingPool) + app.SpotKeeper.SetPool(ctx, tc.existingPool) - queryServer := keeper.NewQuerier(app.DexKeeper) + queryServer := keeper.NewQuerier(app.SpotKeeper) resp, err := queryServer.SpotPrice( sdk.WrapSDKContext(ctx), @@ -560,7 +560,7 @@ func TestQueryEstimateSwapExactAmountIn(t *testing.T) { }{ { name: "simple swap", - existingPool: mock.DexPool( + existingPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -574,7 +574,7 @@ func TestQueryEstimateSwapExactAmountIn(t *testing.T) { }, { name: "complex swap", - existingPool: mock.DexPool( + existingPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 34844867), @@ -593,8 +593,8 @@ func TestQueryEstimateSwapExactAmountIn(t *testing.T) { tc := tc t.Run(tc.name, func(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) - app.DexKeeper.SetPool(ctx, tc.existingPool) - queryServer := keeper.NewQuerier(app.DexKeeper) + app.SpotKeeper.SetPool(ctx, tc.existingPool) + queryServer := keeper.NewQuerier(app.SpotKeeper) resp, err := queryServer.EstimateSwapExactAmountIn( sdk.WrapSDKContext(ctx), @@ -621,7 +621,7 @@ func TestQueryEstimateSwapExactAmountOut(t *testing.T) { }{ { name: "simple swap", - existingPool: mock.DexPool( + existingPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -636,7 +636,7 @@ func TestQueryEstimateSwapExactAmountOut(t *testing.T) { }, { name: "complex swap", - existingPool: mock.DexPool( + existingPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 34844867), @@ -655,8 +655,8 @@ func TestQueryEstimateSwapExactAmountOut(t *testing.T) { tc := tc t.Run(tc.name, func(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) - app.DexKeeper.SetPool(ctx, tc.existingPool) - queryServer := keeper.NewQuerier(app.DexKeeper) + app.SpotKeeper.SetPool(ctx, tc.existingPool) + queryServer := keeper.NewQuerier(app.SpotKeeper) resp, err := queryServer.EstimateSwapExactAmountOut( sdk.WrapSDKContext(ctx), @@ -683,7 +683,7 @@ func TestQueryEstimateJoinExactAmountIn(t *testing.T) { }{ { name: "complete join", - existingPool: mock.DexPool( + existingPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -700,7 +700,7 @@ func TestQueryEstimateJoinExactAmountIn(t *testing.T) { }, { name: "leftover coins", - existingPool: mock.DexPool( + existingPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -723,8 +723,8 @@ func TestQueryEstimateJoinExactAmountIn(t *testing.T) { tc := tc t.Run(tc.name, func(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) - app.DexKeeper.SetPool(ctx, tc.existingPool) - queryServer := keeper.NewQuerier(app.DexKeeper) + app.SpotKeeper.SetPool(ctx, tc.existingPool) + queryServer := keeper.NewQuerier(app.SpotKeeper) resp, err := queryServer.EstimateJoinExactAmountIn( sdk.WrapSDKContext(ctx), @@ -750,7 +750,7 @@ func TestQueryEstimateExitExactAmountIn(t *testing.T) { }{ { name: "complete exit", - existingPool: mock.DexPool( + existingPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -767,7 +767,7 @@ func TestQueryEstimateExitExactAmountIn(t *testing.T) { }, { name: "leftover coins", - existingPool: mock.DexPool( + existingPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -788,8 +788,8 @@ func TestQueryEstimateExitExactAmountIn(t *testing.T) { tc := tc t.Run(tc.name, func(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) - app.DexKeeper.SetPool(ctx, tc.existingPool) - queryServer := keeper.NewQuerier(app.DexKeeper) + app.SpotKeeper.SetPool(ctx, tc.existingPool) + queryServer := keeper.NewQuerier(app.SpotKeeper) resp, err := queryServer.EstimateExitExactAmountIn( sdk.WrapSDKContext(ctx), diff --git a/x/spot/keeper/keeper_test.go b/x/spot/keeper/keeper_test.go index 6feff4d53..f872c7639 100644 --- a/x/spot/keeper/keeper_test.go +++ b/x/spot/keeper/keeper_test.go @@ -23,10 +23,10 @@ func TestGetAndSetNextPoolNumber(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) // Write to store - app.DexKeeper.SetNextPoolNumber(ctx, 150) + app.SpotKeeper.SetNextPoolNumber(ctx, 150) // Read from store - poolNumber, err := app.DexKeeper.GetNextPoolNumber(ctx) + poolNumber, err := app.SpotKeeper.GetNextPoolNumber(ctx) assert.NoError(t, err) require.EqualValues(t, poolNumber, 150) } @@ -35,15 +35,15 @@ func TestGetNextPoolNumberAndIncrement(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) // Write a pool number - app.DexKeeper.SetNextPoolNumber(ctx, 200) + app.SpotKeeper.SetNextPoolNumber(ctx, 200) // Get next and increment should return the current pool number - poolNumber, err := app.DexKeeper.GetNextPoolNumberAndIncrement(ctx) + poolNumber, err := app.SpotKeeper.GetNextPoolNumberAndIncrement(ctx) assert.NoError(t, err) require.EqualValues(t, poolNumber, 200) // Check that the previous call incremented the number - poolNumber, err = app.DexKeeper.GetNextPoolNumber(ctx) + poolNumber, err = app.SpotKeeper.GetNextPoolNumber(ctx) assert.NoError(t, err) require.EqualValues(t, poolNumber, 201) } @@ -73,9 +73,9 @@ func TestSetAndFetchPool(t *testing.T) { TotalShares: sdk.NewInt64Coin("nibiru/pool/150", 100), } - app.DexKeeper.SetPool(ctx, pool) + app.SpotKeeper.SetPool(ctx, pool) - retrievedPool, err := app.DexKeeper.FetchPool(ctx, 150) + retrievedPool, err := app.SpotKeeper.FetchPool(ctx, 150) assert.NoError(t, err) require.Equal(t, pool, retrievedPool) } @@ -160,7 +160,7 @@ func TestFetchPoolFromPair(t *testing.T) { t.Run(tc.name, func(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) - app.DexKeeper.SetPool(ctx, types.Pool{ + app.SpotKeeper.SetPool(ctx, types.Pool{ Id: 1, PoolParams: types.PoolParams{ SwapFee: sdk.NewDecWithPrec(3, 2), @@ -183,7 +183,7 @@ func TestFetchPoolFromPair(t *testing.T) { Address: "address1", }) - app.DexKeeper.SetPool(ctx, types.Pool{ + app.SpotKeeper.SetPool(ctx, types.Pool{ Id: 2, PoolParams: types.PoolParams{ SwapFee: sdk.NewDecWithPrec(3, 2), @@ -206,7 +206,7 @@ func TestFetchPoolFromPair(t *testing.T) { Address: "address2", }) - retrievedPool, err := app.DexKeeper.FetchPoolFromPair(ctx, tc.firstToken, tc.secondToken) + retrievedPool, err := app.SpotKeeper.FetchPoolFromPair(ctx, tc.firstToken, tc.secondToken) retrievedPoolId := retrievedPool.Id if tc.expectedPass { require.NoError(t, err) @@ -223,7 +223,7 @@ func TestNewPool(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) poolCreationFeeCoin := sdk.NewInt64Coin(denoms.NIBI, 1000*common.Precision) - app.DexKeeper.SetParams(ctx, types.NewParams( + app.SpotKeeper.SetParams(ctx, types.NewParams( /*startingPoolNumber=*/ 1, /*poolCreationFee=*/ sdk.NewCoins(poolCreationFeeCoin), /*whitelistedAssets*/ []string{ @@ -241,7 +241,7 @@ func TestNewPool(t *testing.T) { )) require.NoError(t, err) - poolId, err := app.DexKeeper.NewPool(ctx, + poolId, err := app.SpotKeeper.NewPool(ctx, // sender userAddr, // poolParams @@ -264,7 +264,7 @@ func TestNewPool(t *testing.T) { }) require.NoError(t, err) - retrievedPool, _ := app.DexKeeper.FetchPool(ctx, poolId) + retrievedPool, _ := app.SpotKeeper.FetchPool(ctx, poolId) require.Equal(t, types.Pool{ Id: 1, @@ -293,7 +293,7 @@ func TestNewPool(t *testing.T) { func TestNewPoolNotEnoughFunds(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) - app.DexKeeper.SetParams(ctx, types.NewParams( + app.SpotKeeper.SetParams(ctx, types.NewParams( /*startingPoolNumber=*/ 1, /*poolCreationFee=*/ sdk.NewCoins(sdk.NewInt64Coin(denoms.NIBI, 1000*common.Precision)), /*whitelistedAssets*/ []string{}, @@ -308,7 +308,7 @@ func TestNewPoolNotEnoughFunds(t *testing.T) { )) require.NoError(t, err) - _, err = app.DexKeeper.NewPool(ctx, + _, err = app.SpotKeeper.NewPool(ctx, // sender userAddr, // poolParams @@ -347,7 +347,7 @@ func TestNewPoolTooLittleAssets(t *testing.T) { }, } - poolId, err := app.DexKeeper.NewPool(ctx, userAddr, poolParams, poolAssets) + poolId, err := app.SpotKeeper.NewPool(ctx, userAddr, poolParams, poolAssets) require.ErrorIs(t, err, types.ErrTooFewPoolAssets) require.Equal(t, uint64(0), poolId) } @@ -372,7 +372,7 @@ func TestKeeperNewPoolNotWhitelistedAssets(t *testing.T) { }, } - poolId, err := app.DexKeeper.NewPool(ctx, userAddr, poolParams, poolAssets) + poolId, err := app.SpotKeeper.NewPool(ctx, userAddr, poolParams, poolAssets) require.ErrorIs(t, err, types.ErrTokenNotAllowed) require.Equal(t, uint64(0), poolId) } @@ -417,7 +417,7 @@ func TestNewPoolTooManyAssets(t *testing.T) { }, } - poolId, err := app.DexKeeper.NewPool(ctx, userAddr, poolParams, poolAssets) + poolId, err := app.SpotKeeper.NewPool(ctx, userAddr, poolParams, poolAssets) require.ErrorIs(t, err, types.ErrTooManyPoolAssets) require.Equal(t, uint64(0), poolId) } @@ -434,7 +434,7 @@ func TestNewPoolDups(t *testing.T) { sdk.NewCoin("foo", sdk.NewInt(1000)), )) require.NoError(t, err) - app.DexKeeper.SetParams(ctx, types.NewParams( + app.SpotKeeper.SetParams(ctx, types.NewParams( /*startingPoolNumber=*/ 1, /*poolCreationFee=*/ poolCreationFeeCoin, /*whitelistedAssets*/ []string{ @@ -458,11 +458,11 @@ func TestNewPoolDups(t *testing.T) { }, } - poolId, err := app.DexKeeper.NewPool(ctx, userAddr, poolParams, poolAssets) + poolId, err := app.SpotKeeper.NewPool(ctx, userAddr, poolParams, poolAssets) require.NoError(t, err) require.Equal(t, uint64(1), poolId) - _, err = app.DexKeeper.NewPool(ctx, userAddr, poolParams, poolAssets) + _, err = app.SpotKeeper.NewPool(ctx, userAddr, poolParams, poolAssets) require.ErrorIs(t, err, types.ErrPoolWithSameAssetsExists) } @@ -485,7 +485,7 @@ func TestJoinPool(t *testing.T) { sdk.NewInt64Coin("bar", 100), sdk.NewInt64Coin("foo", 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 100), @@ -499,7 +499,7 @@ func TestJoinPool(t *testing.T) { expectedNumSharesOut: sdk.NewInt64Coin(shareDenom, 100), expectedRemCoins: sdk.NewCoins(), expectedJoinerFinalFunds: sdk.NewCoins(sdk.NewInt64Coin(shareDenom, 100)), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 200), @@ -513,7 +513,7 @@ func TestJoinPool(t *testing.T) { sdk.NewInt64Coin("bar", 100), sdk.NewInt64Coin("foo", 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 100), @@ -531,7 +531,7 @@ func TestJoinPool(t *testing.T) { sdk.NewInt64Coin("bar", 50), sdk.NewInt64Coin("foo", 50), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 150), @@ -545,7 +545,7 @@ func TestJoinPool(t *testing.T) { sdk.NewInt64Coin("bar", 100), sdk.NewInt64Coin("foo", 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 100), @@ -565,7 +565,7 @@ func TestJoinPool(t *testing.T) { sdk.NewInt64Coin("bar", 50), sdk.NewInt64Coin("foo", 50), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 150), @@ -583,12 +583,12 @@ func TestJoinPool(t *testing.T) { poolAddr := testutil.AccAddress() tc.initialPool.Address = poolAddr.String() tc.expectedFinalPool.Address = poolAddr.String() - app.DexKeeper.SetPool(ctx, tc.initialPool) + app.SpotKeeper.SetPool(ctx, tc.initialPool) joinerAddr := testutil.AccAddress() require.NoError(t, simapp.FundAccount(app.BankKeeper, ctx, joinerAddr, tc.joinerInitialFunds)) - pool, numSharesOut, remCoins, err := app.DexKeeper.JoinPool(ctx, joinerAddr, 1, tc.tokensIn, false) + pool, numSharesOut, remCoins, err := app.SpotKeeper.JoinPool(ctx, joinerAddr, 1, tc.tokensIn, false) require.NoError(t, err) require.Equal(t, tc.expectedFinalPool, pool) require.Equal(t, tc.expectedNumSharesOut, numSharesOut) @@ -616,7 +616,7 @@ func TestJoinPoolAllAssets(t *testing.T) { sdk.NewInt64Coin("bar", 100), sdk.NewInt64Coin("foo", 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 100), @@ -630,7 +630,7 @@ func TestJoinPoolAllAssets(t *testing.T) { expectedNumSharesOut: sdk.NewInt64Coin(shareDenom, 100), expectedRemCoins: sdk.NewCoins(), expectedJoinerFinalFunds: sdk.NewCoins(sdk.NewInt64Coin(shareDenom, 100)), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 200), @@ -644,7 +644,7 @@ func TestJoinPoolAllAssets(t *testing.T) { sdk.NewInt64Coin("bar", 100), sdk.NewInt64Coin("foo", 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 100), @@ -662,7 +662,7 @@ func TestJoinPoolAllAssets(t *testing.T) { sdk.NewInt64Coin("bar", 50), sdk.NewInt64Coin("foo", 50), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 150), @@ -675,7 +675,7 @@ func TestJoinPoolAllAssets(t *testing.T) { joinerInitialFunds: sdk.NewCoins( sdk.NewInt64Coin("foo", 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 100), @@ -692,7 +692,7 @@ func TestJoinPoolAllAssets(t *testing.T) { sdk.NewInt64Coin("bar", 0), sdk.NewInt64Coin("foo", 0), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 100), @@ -706,7 +706,7 @@ func TestJoinPoolAllAssets(t *testing.T) { sdk.NewInt64Coin("bar", 100), sdk.NewInt64Coin("foo", 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 100), @@ -724,7 +724,7 @@ func TestJoinPoolAllAssets(t *testing.T) { sdk.NewInt64Coin("bar", 50), sdk.NewInt64Coin("foo", 25), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 150), @@ -742,12 +742,12 @@ func TestJoinPoolAllAssets(t *testing.T) { poolAddr := testutil.AccAddress() tc.initialPool.Address = poolAddr.String() tc.expectedFinalPool.Address = poolAddr.String() - app.DexKeeper.SetPool(ctx, tc.initialPool) + app.SpotKeeper.SetPool(ctx, tc.initialPool) joinerAddr := testutil.AccAddress() require.NoError(t, simapp.FundAccount(app.BankKeeper, ctx, joinerAddr, tc.joinerInitialFunds)) - pool, numSharesOut, remCoins, err := app.DexKeeper.JoinPool(ctx, joinerAddr, 1, tc.tokensIn, true) + pool, numSharesOut, remCoins, err := app.SpotKeeper.JoinPool(ctx, joinerAddr, 1, tc.tokensIn, true) require.NoError(t, err) require.Equal(t, tc.expectedFinalPool, pool) require.Equal(t, tc.expectedNumSharesOut, numSharesOut) @@ -781,7 +781,7 @@ func TestExitPool(t *testing.T) { sdk.NewInt64Coin("bar", 100), sdk.NewInt64Coin("foo", 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 100), @@ -798,7 +798,7 @@ func TestExitPool(t *testing.T) { sdk.NewInt64Coin("bar", 199), sdk.NewInt64Coin("foo", 199), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 1), @@ -818,7 +818,7 @@ func TestExitPool(t *testing.T) { sdk.NewInt64Coin("bar", 100), sdk.NewInt64Coin("foo", 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 100), @@ -836,7 +836,7 @@ func TestExitPool(t *testing.T) { sdk.NewInt64Coin("foo", 149), sdk.NewInt64Coin(shareDenom, 50), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("bar", 51), @@ -855,17 +855,17 @@ func TestExitPool(t *testing.T) { poolAddr := testutil.AccAddress() tc.initialPool.Address = poolAddr.String() tc.expectedFinalPool.Address = poolAddr.String() - app.DexKeeper.SetPool(ctx, tc.initialPool) + app.SpotKeeper.SetPool(ctx, tc.initialPool) sender := testutil.AccAddress() require.NoError(t, simapp.FundAccount(app.BankKeeper, ctx, sender, tc.joinerInitialFunds)) require.NoError(t, simapp.FundAccount(app.BankKeeper, ctx, tc.initialPool.GetAddress(), tc.initialPoolFunds)) - tokensOut, err := app.DexKeeper.ExitPool(ctx, sender, 1, tc.poolSharesIn) + tokensOut, err := app.SpotKeeper.ExitPool(ctx, sender, 1, tc.poolSharesIn) require.NoError(t, err) require.Equal(t, tc.expectedTokensOut, tokensOut) require.Equal(t, tc.expectedJoinerFinalFunds, app.BankKeeper.GetAllBalances(ctx, sender)) - pool, _ := app.DexKeeper.FetchPool(ctx, 1) + pool, _ := app.SpotKeeper.FetchPool(ctx, 1) require.Equal(t, tc.expectedFinalPool, pool) }) } diff --git a/x/spot/keeper/liquidity_test.go b/x/spot/keeper/liquidity_test.go index 4b3fd19dd..461966bf1 100644 --- a/x/spot/keeper/liquidity_test.go +++ b/x/spot/keeper/liquidity_test.go @@ -16,10 +16,10 @@ func TestGetSetDenomLiquidity(t *testing.T) { // Write to store coin := sdk.NewCoin("nibi", sdk.NewInt(1_000)) - assert.NoError(t, app.DexKeeper.SetDenomLiquidity(ctx, coin.Denom, coin.Amount)) + assert.NoError(t, app.SpotKeeper.SetDenomLiquidity(ctx, coin.Denom, coin.Amount)) // Read from store - amount, err := app.DexKeeper.GetDenomLiquidity(ctx, "nibi") + amount, err := app.SpotKeeper.GetDenomLiquidity(ctx, "nibi") assert.NoError(t, err) require.EqualValues(t, sdk.NewInt(1000), amount) } @@ -35,11 +35,11 @@ func TestGetTotalLiquidity(t *testing.T) { } for denom, amount := range coinMap { coin := sdk.NewCoin(denom, amount) - assert.NoError(t, app.DexKeeper.SetDenomLiquidity(ctx, coin.Denom, coin.Amount)) + assert.NoError(t, app.SpotKeeper.SetDenomLiquidity(ctx, coin.Denom, coin.Amount)) } // Read from store - coins := app.DexKeeper.GetTotalLiquidity(ctx) + coins := app.SpotKeeper.GetTotalLiquidity(ctx) require.EqualValues(t, sdk.NewCoins( sdk.NewCoin("atom", coinMap["atom"]), @@ -49,7 +49,7 @@ func TestGetTotalLiquidity(t *testing.T) { } // assertLiqValues checks if the total liquidity for each denom (key) of the -// expected map matches what's given by the DexKeeper +// expected map matches what's given by the SpotKeeper func assertLiqValues( t *testing.T, ctx sdk.Context, @@ -67,7 +67,7 @@ func TestSetTotalLiquidity(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) // Write to store - assert.NoError(t, app.DexKeeper.SetTotalLiquidity(ctx, sdk.NewCoins( + assert.NoError(t, app.SpotKeeper.SetTotalLiquidity(ctx, sdk.NewCoins( sdk.NewCoin("atom", sdk.NewInt(123)), sdk.NewCoin("nibi", sdk.NewInt(456)), sdk.NewCoin("foo", sdk.NewInt(789)), @@ -79,18 +79,18 @@ func TestSetTotalLiquidity(t *testing.T) { "nibi": sdk.NewInt(456), "foo": sdk.NewInt(789), } - assertLiqValues(t, ctx, app.DexKeeper, expectedLiqValues) + assertLiqValues(t, ctx, app.SpotKeeper, expectedLiqValues) } func TestRecordTotalLiquidityIncrease(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) // Write to store - assert.NoError(t, app.DexKeeper.SetTotalLiquidity(ctx, sdk.NewCoins( + assert.NoError(t, app.SpotKeeper.SetTotalLiquidity(ctx, sdk.NewCoins( sdk.NewCoin("atom", sdk.NewInt(100)), sdk.NewCoin("nibi", sdk.NewInt(200)), ))) - err := app.DexKeeper.RecordTotalLiquidityIncrease(ctx, sdk.NewCoins( + err := app.SpotKeeper.RecordTotalLiquidityIncrease(ctx, sdk.NewCoins( sdk.NewCoin("atom", sdk.NewInt(50)), sdk.NewCoin("nibi", sdk.NewInt(75)), )) @@ -100,18 +100,18 @@ func TestRecordTotalLiquidityIncrease(t *testing.T) { "atom": sdk.NewInt(150), "nibi": sdk.NewInt(275), } - assertLiqValues(t, ctx, app.DexKeeper, expectedLiqValues) + assertLiqValues(t, ctx, app.SpotKeeper, expectedLiqValues) } func TestRecordTotalLiquidityDecrease(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) // Write to store - assert.NoError(t, app.DexKeeper.SetTotalLiquidity(ctx, sdk.NewCoins( + assert.NoError(t, app.SpotKeeper.SetTotalLiquidity(ctx, sdk.NewCoins( sdk.NewCoin("atom", sdk.NewInt(100)), sdk.NewCoin("nibi", sdk.NewInt(200)), ))) - err := app.DexKeeper.RecordTotalLiquidityDecrease(ctx, sdk.NewCoins( + err := app.SpotKeeper.RecordTotalLiquidityDecrease(ctx, sdk.NewCoins( sdk.NewCoin("atom", sdk.NewInt(50)), sdk.NewCoin("nibi", sdk.NewInt(75)), )) @@ -121,5 +121,5 @@ func TestRecordTotalLiquidityDecrease(t *testing.T) { "atom": sdk.NewInt(50), "nibi": sdk.NewInt(125), } - assertLiqValues(t, ctx, app.DexKeeper, expectedLiqValues) + assertLiqValues(t, ctx, app.SpotKeeper, expectedLiqValues) } diff --git a/x/spot/keeper/msg_server_test.go b/x/spot/keeper/msg_server_test.go index 24bdb73f4..10e39de1d 100644 --- a/x/spot/keeper/msg_server_test.go +++ b/x/spot/keeper/msg_server_test.go @@ -275,7 +275,7 @@ func TestCreatePool(t *testing.T) { tc := tc t.Run(tc.name, func(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) - msgServer := keeper.NewMsgServerImpl(app.DexKeeper) + msgServer := keeper.NewMsgServerImpl(app.SpotKeeper) if tc.creatorAddr == nil { tc.creatorAddr = ed25519.GenPrivKey().PubKey().Address().Bytes() @@ -408,7 +408,7 @@ func TestCreateExitJoinPool(t *testing.T) { tc := tc t.Run(tc.name, func(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) - msgServer := keeper.NewMsgServerImpl(app.DexKeeper) + msgServer := keeper.NewMsgServerImpl(app.SpotKeeper) if tc.creatorAddr == nil { tc.creatorAddr = ed25519.GenPrivKey().PubKey().Address().Bytes() @@ -481,7 +481,7 @@ func TestMsgServerJoinPool(t *testing.T) { sdk.NewInt64Coin(denoms.NIBI, 100), sdk.NewInt64Coin(denoms.NUSD, 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -495,7 +495,7 @@ func TestMsgServerJoinPool(t *testing.T) { expectedNumSharesOut: sdk.NewInt64Coin(shareDenom, 100), expectedRemCoins: sdk.NewCoins(), expectedJoinerFinalFunds: sdk.NewCoins(sdk.NewInt64Coin(shareDenom, 100)), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 200), @@ -509,7 +509,7 @@ func TestMsgServerJoinPool(t *testing.T) { sdk.NewInt64Coin(denoms.NIBI, 100), sdk.NewInt64Coin(denoms.NUSD, 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -527,7 +527,7 @@ func TestMsgServerJoinPool(t *testing.T) { sdk.NewInt64Coin(denoms.NIBI, 50), sdk.NewInt64Coin(denoms.NUSD, 50), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 150), @@ -541,7 +541,7 @@ func TestMsgServerJoinPool(t *testing.T) { sdk.NewInt64Coin(denoms.NIBI, 100), sdk.NewInt64Coin(denoms.NUSD, 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -561,7 +561,7 @@ func TestMsgServerJoinPool(t *testing.T) { sdk.NewInt64Coin(denoms.NIBI, 50), sdk.NewInt64Coin(denoms.NUSD, 50), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 150), @@ -575,7 +575,7 @@ func TestMsgServerJoinPool(t *testing.T) { sdk.NewInt64Coin(denoms.NIBI, 100), sdk.NewInt64Coin(denoms.NUSD, 100), ), - initialPool: mock.DexStablePool( + initialPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -589,7 +589,7 @@ func TestMsgServerJoinPool(t *testing.T) { expectedNumSharesOut: sdk.NewInt64Coin(shareDenom, 100), expectedRemCoins: sdk.NewCoins(), expectedJoinerFinalFunds: sdk.NewCoins(sdk.NewInt64Coin(shareDenom, 100)), - expectedFinalPool: mock.DexStablePool( + expectedFinalPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 200), @@ -603,7 +603,7 @@ func TestMsgServerJoinPool(t *testing.T) { sdk.NewInt64Coin(denoms.NIBI, 100), sdk.NewInt64Coin(denoms.NUSD, 100), ), - initialPool: mock.DexStablePool( + initialPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -621,7 +621,7 @@ func TestMsgServerJoinPool(t *testing.T) { sdk.NewInt64Coin(denoms.NIBI, 50), sdk.NewInt64Coin(denoms.NUSD, 50), ), - expectedFinalPool: mock.DexStablePool( + expectedFinalPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 150), @@ -635,7 +635,7 @@ func TestMsgServerJoinPool(t *testing.T) { sdk.NewInt64Coin(denoms.NIBI, 100), sdk.NewInt64Coin(denoms.NUSD, 100), ), - initialPool: mock.DexStablePool( + initialPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -653,7 +653,7 @@ func TestMsgServerJoinPool(t *testing.T) { sdk.NewInt64Coin(denoms.NIBI, 50), sdk.NewInt64Coin(denoms.NUSD, 25), ), - expectedFinalPool: mock.DexStablePool( + expectedFinalPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 150), @@ -671,12 +671,12 @@ func TestMsgServerJoinPool(t *testing.T) { poolAddr := testutil.AccAddress() tc.initialPool.Address = poolAddr.String() tc.expectedFinalPool.Address = poolAddr.String() - app.DexKeeper.SetPool(ctx, tc.initialPool) + app.SpotKeeper.SetPool(ctx, tc.initialPool) joinerAddr := testutil.AccAddress() require.NoError(t, simapp.FundAccount(app.BankKeeper, ctx, joinerAddr, tc.joinerInitialFunds)) - msgServer := keeper.NewMsgServerImpl(app.DexKeeper) + msgServer := keeper.NewMsgServerImpl(app.SpotKeeper) resp, err := msgServer.JoinPool( sdk.WrapSDKContext(ctx), types.NewMsgJoinPool(joinerAddr.String(), tc.initialPool.Id, tc.tokensIn, false), @@ -724,7 +724,7 @@ func TestMsgServerExitPool(t *testing.T) { sdk.NewInt64Coin(denoms.NIBI, 100), sdk.NewInt64Coin(denoms.NUSD, 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -741,7 +741,7 @@ func TestMsgServerExitPool(t *testing.T) { sdk.NewInt64Coin(denoms.NIBI, 199), sdk.NewInt64Coin(denoms.NUSD, 199), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 1), @@ -761,7 +761,7 @@ func TestMsgServerExitPool(t *testing.T) { sdk.NewInt64Coin(denoms.NIBI, 100), sdk.NewInt64Coin(denoms.NUSD, 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -779,7 +779,7 @@ func TestMsgServerExitPool(t *testing.T) { sdk.NewInt64Coin(denoms.NUSD, 149), sdk.NewInt64Coin(shareDenom, 50), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 51), @@ -799,7 +799,7 @@ func TestMsgServerExitPool(t *testing.T) { sdk.NewInt64Coin(denoms.NIBI, 100), sdk.NewInt64Coin(denoms.NUSD, 100), ), - initialPool: mock.DexStablePool( + initialPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -816,7 +816,7 @@ func TestMsgServerExitPool(t *testing.T) { sdk.NewInt64Coin(denoms.NIBI, 200), sdk.NewInt64Coin(denoms.NUSD, 200), ), - expectedFinalPool: mock.DexStablePool( + expectedFinalPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 1), @@ -836,7 +836,7 @@ func TestMsgServerExitPool(t *testing.T) { sdk.NewInt64Coin(denoms.NIBI, 100), sdk.NewInt64Coin(denoms.NUSD, 100), ), - initialPool: mock.DexStablePool( + initialPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -854,7 +854,7 @@ func TestMsgServerExitPool(t *testing.T) { sdk.NewInt64Coin(denoms.NUSD, 150), sdk.NewInt64Coin(shareDenom, 50), ), - expectedFinalPool: mock.DexStablePool( + expectedFinalPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 50), @@ -873,7 +873,7 @@ func TestMsgServerExitPool(t *testing.T) { poolAddr := testutil.AccAddress() tc.initialPool.Address = poolAddr.String() tc.expectedFinalPool.Address = poolAddr.String() - app.DexKeeper.SetPool(ctx, tc.initialPool) + app.SpotKeeper.SetPool(ctx, tc.initialPool) sender := testutil.AccAddress() require.NoError(t, simapp.FundAccount( @@ -881,7 +881,7 @@ func TestMsgServerExitPool(t *testing.T) { require.NoError(t, simapp.FundAccount( app.BankKeeper, ctx, tc.initialPool.GetAddress(), tc.poolFundsToAdd)) - msgServer := keeper.NewMsgServerImpl(app.DexKeeper) + msgServer := keeper.NewMsgServerImpl(app.SpotKeeper) resp, err := msgServer.ExitPool( sdk.WrapSDKContext(ctx), types.NewMsgExitPool(sender.String(), tc.initialPool.Id, tc.poolSharesIn), @@ -931,7 +931,7 @@ func TestMsgServerSwapAssets(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -945,7 +945,7 @@ func TestMsgServerSwapAssets(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NUSD, 50), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 200), @@ -960,7 +960,7 @@ func TestMsgServerSwapAssets(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 1), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -973,7 +973,7 @@ func TestMsgServerSwapAssets(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 1), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -988,7 +988,7 @@ func TestMsgServerSwapAssets(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin("foo", 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -1001,7 +1001,7 @@ func TestMsgServerSwapAssets(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin("foo", 100), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -1016,7 +1016,7 @@ func TestMsgServerSwapAssets(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -1029,7 +1029,7 @@ func TestMsgServerSwapAssets(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -1044,7 +1044,7 @@ func TestMsgServerSwapAssets(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -1057,7 +1057,7 @@ func TestMsgServerSwapAssets(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -1072,7 +1072,7 @@ func TestMsgServerSwapAssets(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), ), - initialPool: mock.DexStablePool( + initialPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -1086,7 +1086,7 @@ func TestMsgServerSwapAssets(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NUSD, 95), ), - expectedFinalPool: mock.DexStablePool( + expectedFinalPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 200), @@ -1101,7 +1101,7 @@ func TestMsgServerSwapAssets(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 1), ), - initialPool: mock.DexStablePool( + initialPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -1114,7 +1114,7 @@ func TestMsgServerSwapAssets(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 1), ), - expectedFinalPool: mock.DexStablePool( + expectedFinalPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -1129,7 +1129,7 @@ func TestMsgServerSwapAssets(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin("foo", 100), ), - initialPool: mock.DexStablePool( + initialPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -1142,7 +1142,7 @@ func TestMsgServerSwapAssets(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin("foo", 100), ), - expectedFinalPool: mock.DexStablePool( + expectedFinalPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -1157,7 +1157,7 @@ func TestMsgServerSwapAssets(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), ), - initialPool: mock.DexStablePool( + initialPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -1170,7 +1170,7 @@ func TestMsgServerSwapAssets(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), ), - expectedFinalPool: mock.DexStablePool( + expectedFinalPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -1185,7 +1185,7 @@ func TestMsgServerSwapAssets(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), ), - initialPool: mock.DexStablePool( + initialPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -1198,7 +1198,7 @@ func TestMsgServerSwapAssets(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), ), - expectedFinalPool: mock.DexStablePool( + expectedFinalPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.NIBI, 100), @@ -1214,7 +1214,7 @@ func TestMsgServerSwapAssets(t *testing.T) { tc := tc t.Run(tc.name, func(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) - msgServer := keeper.NewMsgServerImpl(app.DexKeeper) + msgServer := keeper.NewMsgServerImpl(app.SpotKeeper) // fund pool account poolAddr := testutil.AccAddress() @@ -1228,7 +1228,7 @@ func TestMsgServerSwapAssets(t *testing.T) { tc.initialPool.PoolBalances(), ), ) - app.DexKeeper.SetPool(ctx, tc.initialPool) + app.SpotKeeper.SetPool(ctx, tc.initialPool) // fund user account sender := testutil.AccAddress() @@ -1267,7 +1267,7 @@ func TestMsgServerSwapAssets(t *testing.T) { ) // check final pool state - finalPool, err := app.DexKeeper.FetchPool(ctx, tc.initialPool.Id) + finalPool, err := app.SpotKeeper.FetchPool(ctx, tc.initialPool.Id) require.NoError(t, err) require.Equal(t, tc.expectedFinalPool, finalPool) }) diff --git a/x/spot/keeper/params_test.go b/x/spot/keeper/params_test.go index 9dbed7994..ee034c0ce 100644 --- a/x/spot/keeper/params_test.go +++ b/x/spot/keeper/params_test.go @@ -13,7 +13,7 @@ func TestGetParams(t *testing.T) { app, ctx := testapp.NewTestNibiruAppAndContext(true) params := types.DefaultParams() - app.DexKeeper.SetParams(ctx, params) + app.SpotKeeper.SetParams(ctx, params) - require.EqualValues(t, params, app.DexKeeper.GetParams(ctx)) + require.EqualValues(t, params, app.SpotKeeper.GetParams(ctx)) } diff --git a/x/spot/keeper/swap_test.go b/x/spot/keeper/swap_test.go index 09a0a4d75..c73b74861 100644 --- a/x/spot/keeper/swap_test.go +++ b/x/spot/keeper/swap_test.go @@ -88,7 +88,7 @@ func TestSwapExactAmountIn(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.USDC, 10), ), - initialPool: mock.DexStablePool( + initialPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.USDC, 100), @@ -102,7 +102,7 @@ func TestSwapExactAmountIn(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NUSD, 10), ), - expectedFinalPool: mock.DexStablePool( + expectedFinalPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.USDC, 110), @@ -117,7 +117,7 @@ func TestSwapExactAmountIn(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -131,7 +131,7 @@ func TestSwapExactAmountIn(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.NUSD, 50), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 200), @@ -146,7 +146,7 @@ func TestSwapExactAmountIn(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin("unibi", 1), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -159,7 +159,7 @@ func TestSwapExactAmountIn(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin("unibi", 1), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -174,7 +174,7 @@ func TestSwapExactAmountIn(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin("foo", 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -187,7 +187,7 @@ func TestSwapExactAmountIn(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin("foo", 100), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -202,7 +202,7 @@ func TestSwapExactAmountIn(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -215,7 +215,7 @@ func TestSwapExactAmountIn(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -230,7 +230,7 @@ func TestSwapExactAmountIn(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), ), - initialPool: mock.DexPool( + initialPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -243,7 +243,7 @@ func TestSwapExactAmountIn(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), ), - expectedFinalPool: mock.DexPool( + expectedFinalPool: mock.SpotPool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin("unibi", 100), @@ -272,14 +272,14 @@ func TestSwapExactAmountIn(t *testing.T) { tc.initialPool.PoolBalances(), ), ) - app.DexKeeper.SetPool(ctx, tc.initialPool) + app.SpotKeeper.SetPool(ctx, tc.initialPool) // fund user account sender := testutil.AccAddress() require.NoError(t, simapp.FundAccount(app.BankKeeper, ctx, sender, tc.userInitialFunds)) // swap assets - tokenOut, err := app.DexKeeper.SwapExactAmountIn(ctx, sender, tc.initialPool.Id, tc.tokenIn, tc.tokenOutDenom) + tokenOut, err := app.SpotKeeper.SwapExactAmountIn(ctx, sender, tc.initialPool.Id, tc.tokenIn, tc.tokenOutDenom) if tc.expectedError != nil { require.ErrorIs(t, err, tc.expectedError) @@ -295,7 +295,7 @@ func TestSwapExactAmountIn(t *testing.T) { ) // check final pool state - finalPool, err := app.DexKeeper.FetchPool(ctx, tc.initialPool.Id) + finalPool, err := app.SpotKeeper.FetchPool(ctx, tc.initialPool.Id) require.NoError(t, err) require.Equal(t, tc.expectedFinalPool, finalPool) }) @@ -322,7 +322,7 @@ func TestDoubleSwapExactAmountIn(t *testing.T) { userInitialFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.USDC, 10_000), ), - initialPool: mock.DexStablePool( + initialPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.USDC, 100_000_000), @@ -336,7 +336,7 @@ func TestDoubleSwapExactAmountIn(t *testing.T) { expectedUserFinalFunds: sdk.NewCoins( sdk.NewInt64Coin(denoms.USDC, 10_001), // TODO: fix https://github.com/NibiruChain/nibiru/issues/1152 ), - expectedFinalPool: mock.DexStablePool( + expectedFinalPool: mock.SpotStablePool( /*poolId=*/ 1, /*assets=*/ sdk.NewCoins( sdk.NewInt64Coin(denoms.USDC, 99_999_999), @@ -364,7 +364,7 @@ func TestDoubleSwapExactAmountIn(t *testing.T) { tc.initialPool.PoolBalances(), ), ) - app.DexKeeper.SetPool(ctx, tc.initialPool) + app.SpotKeeper.SetPool(ctx, tc.initialPool) // fund user account sender := testutil.AccAddress() @@ -372,11 +372,11 @@ func TestDoubleSwapExactAmountIn(t *testing.T) { // swap assets for i, tokenIn := range tc.tokenIns { - tokenOut, err := app.DexKeeper.SwapExactAmountIn(ctx, sender, tc.initialPool.Id, tokenIn, tc.tokenOutDenoms[i]) + tokenOut, err := app.SpotKeeper.SwapExactAmountIn(ctx, sender, tc.initialPool.Id, tokenIn, tc.tokenOutDenoms[i]) require.NoError(t, err) fmt.Println("-------------", i) - finalPool, err := app.DexKeeper.FetchPool(ctx, tc.initialPool.Id) + finalPool, err := app.SpotKeeper.FetchPool(ctx, tc.initialPool.Id) require.NoError(t, err) fmt.Println(finalPool.PoolAssets) @@ -391,7 +391,7 @@ func TestDoubleSwapExactAmountIn(t *testing.T) { ) // check final pool state - finalPool, err := app.DexKeeper.FetchPool(ctx, tc.initialPool.Id) + finalPool, err := app.SpotKeeper.FetchPool(ctx, tc.initialPool.Id) require.NoError(t, err) require.Equal(t, tc.expectedFinalPool, finalPool) }) diff --git a/x/spot/types/event.pb.go b/x/spot/types/event.pb.go index 19b58fb84..caf95894f 100644 --- a/x/spot/types/event.pb.go +++ b/x/spot/types/event.pb.go @@ -289,10 +289,10 @@ func (m *EventAssetsSwapped) GetTokenOut() types.Coin { } func init() { - proto.RegisterType((*EventPoolJoined)(nil), "nibiru.dex.v1.EventPoolJoined") - proto.RegisterType((*EventPoolCreated)(nil), "nibiru.dex.v1.EventPoolCreated") - proto.RegisterType((*EventPoolExited)(nil), "nibiru.dex.v1.EventPoolExited") - proto.RegisterType((*EventAssetsSwapped)(nil), "nibiru.dex.v1.EventAssetsSwapped") + proto.RegisterType((*EventPoolJoined)(nil), "nibiru.spot.v1.EventPoolJoined") + proto.RegisterType((*EventPoolCreated)(nil), "nibiru.spot.v1.EventPoolCreated") + proto.RegisterType((*EventPoolExited)(nil), "nibiru.spot.v1.EventPoolExited") + proto.RegisterType((*EventAssetsSwapped)(nil), "nibiru.spot.v1.EventAssetsSwapped") } func init() { proto.RegisterFile("spot/v1/event.proto", fileDescriptor_b076fd0fab18c3a9) } @@ -300,32 +300,32 @@ func init() { proto.RegisterFile("spot/v1/event.proto", fileDescriptor_b076fd0fa var fileDescriptor_b076fd0fab18c3a9 = []byte{ // 428 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xcf, 0x6e, 0xd4, 0x30, - 0x10, 0xc6, 0xd7, 0xed, 0xd2, 0xa5, 0x86, 0x52, 0x14, 0x90, 0x08, 0x3d, 0x84, 0x28, 0xa7, 0x15, + 0x10, 0xc6, 0xd7, 0xed, 0xd2, 0xa5, 0x06, 0x5a, 0x14, 0x90, 0x08, 0x3d, 0x84, 0x28, 0xa7, 0x15, 0x07, 0x5b, 0x81, 0x1b, 0x42, 0x48, 0x74, 0x89, 0x50, 0x38, 0xb0, 0x68, 0x7b, 0xe3, 0x12, 0xe5, - 0x8f, 0xb5, 0x6b, 0xd1, 0x78, 0x22, 0xdb, 0x09, 0xcb, 0x23, 0x70, 0xe3, 0x95, 0xb8, 0x55, 0xe2, - 0xd2, 0x23, 0x27, 0x84, 0x76, 0x5f, 0x04, 0xd9, 0x4e, 0x4b, 0x2f, 0x95, 0xd2, 0xde, 0x3c, 0xb2, - 0x67, 0xc6, 0xdf, 0x6f, 0xe6, 0xc3, 0x8f, 0x54, 0x03, 0x9a, 0x76, 0x31, 0x65, 0x1d, 0x13, 0x9a, - 0x34, 0x12, 0x34, 0x78, 0x07, 0x82, 0x17, 0x5c, 0xb6, 0xa4, 0x62, 0x6b, 0xd2, 0xc5, 0x47, 0x8f, - 0x97, 0xb0, 0x04, 0x7b, 0x43, 0xcd, 0xc9, 0x3d, 0x3a, 0x0a, 0x4a, 0x50, 0x35, 0x28, 0x5a, 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e4, 0x8c, 0xeb, 0xed, 0x90, 0x26, 0xf8, 0xe0, 0x3a, 0x14, 0xcb, 0x75, 0x10, 0x93, + 0xfb, 0xff, 0x99, 0xa4, 0xc2, 0x7b, 0x83, 0x71, 0xbf, 0x19, 0x87, 0x75, 0x10, 0x93, 0x7e, 0x99, + 0xf3, 0x56, 0x47, 0x3f, 0x11, 0xf6, 0xac, 0x9a, 0xb7, 0x4a, 0x31, 0xad, 0x4e, 0xbe, 0xe6, 0x4d, + 0xb3, 0x9d, 0xa0, 0x57, 0xd8, 0x6d, 0xfc, 0x16, 0x52, 0x26, 0xb6, 0x20, 0x15, 0x57, 0xff, 0xeb, + 0x36, 0x7f, 0xc3, 0x4d, 0x9b, 0xb7, 0xfa, 0xf8, 0xdd, 0xf9, 0x3a, 0x40, 0x17, 0xeb, 0x00, 0xfd, + 0x5d, 0x07, 0xe8, 0xc7, 0x26, 0x18, 0x5d, 0x6c, 0x82, 0xd1, 0xef, 0x4d, 0x30, 0xfa, 0xfc, 0x7c, + 0xc9, 0xf5, 0xaa, 0x2d, 0x48, 0x09, 0x35, 0xfd, 0x68, 0xfd, 0x34, 0x5b, 0xe5, 0x5c, 0x50, 0xe7, + 0x2d, 0x7a, 0x46, 0xad, 0xf3, 0xf4, 0xb7, 0x86, 0xa9, 0x62, 0xcf, 0x3a, 0xe6, 0xe5, 0xbf, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x34, 0x2f, 0xc7, 0x92, 0x8e, 0x03, 0x00, 0x00, } func (m *EventPoolJoined) Marshal() (dAtA []byte, err error) { diff --git a/x/spot/types/genesis.pb.go b/x/spot/types/genesis.pb.go index e60b64f09..8a4c71e9b 100644 --- a/x/spot/types/genesis.pb.go +++ b/x/spot/types/genesis.pb.go @@ -69,26 +69,26 @@ func (m *GenesisState) GetParams() Params { } func init() { - proto.RegisterType((*GenesisState)(nil), "nibiru.dex.v1.GenesisState") + proto.RegisterType((*GenesisState)(nil), "nibiru.spot.v1.GenesisState") } func init() { proto.RegisterFile("spot/v1/genesis.proto", fileDescriptor_9a1a42f122eaf6b3) } var fileDescriptor_9a1a42f122eaf6b3 = []byte{ - // 195 bytes of a gzipped FileDescriptorProto + // 194 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2d, 0x2e, 0xc8, 0x2f, 0xd1, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, - 0xc9, 0x17, 0xe2, 0xcd, 0xcb, 0x4c, 0xca, 0x2c, 0x2a, 0xd5, 0x4b, 0x49, 0xad, 0xd0, 0x2b, 0x33, - 0x94, 0x12, 0x81, 0xa9, 0x2a, 0x48, 0x2c, 0x4a, 0xcc, 0x85, 0x2a, 0x92, 0x12, 0x49, 0xcf, 0x4f, - 0xcf, 0x07, 0x33, 0xf5, 0x41, 0x2c, 0x88, 0xa8, 0x92, 0x33, 0x17, 0x8f, 0x3b, 0xc4, 0xac, 0xe0, - 0x92, 0xc4, 0x92, 0x54, 0x21, 0x63, 0x2e, 0x36, 0x88, 0x2e, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, - 0x23, 0x51, 0x3d, 0x14, 0xb3, 0xf5, 0x02, 0xc0, 0x92, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, - 0x41, 0x95, 0x3a, 0xb9, 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, 0x56, - 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0xbe, 0x1f, 0xd8, 0x20, 0xe7, 0x8c, - 0xc4, 0xcc, 0x3c, 0x7d, 0x88, 0xa1, 0xfa, 0x15, 0xfa, 0x60, 0xa7, 0x96, 0x54, 0x16, 0xa4, 0x16, - 0x27, 0xb1, 0x81, 0x5d, 0x64, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x2d, 0xed, 0x83, 0x47, 0xe5, - 0x00, 0x00, 0x00, + 0xc9, 0x17, 0xe2, 0xcb, 0xcb, 0x4c, 0xca, 0x2c, 0x2a, 0xd5, 0x03, 0xc9, 0xea, 0x95, 0x19, 0x4a, + 0x89, 0xc0, 0x94, 0x15, 0x24, 0x16, 0x25, 0xe6, 0x42, 0x55, 0x49, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, + 0x83, 0x99, 0xfa, 0x20, 0x16, 0x44, 0x54, 0xc9, 0x85, 0x8b, 0xc7, 0x1d, 0x62, 0x58, 0x70, 0x49, + 0x62, 0x49, 0xaa, 0x90, 0x09, 0x17, 0x1b, 0x44, 0x97, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, + 0x98, 0x1e, 0xaa, 0xe1, 0x7a, 0x01, 0x60, 0x59, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0xa0, + 0x6a, 0x9d, 0x5c, 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, 0x2b, 0x3d, + 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0xdf, 0x0f, 0x6c, 0x92, 0x73, 0x46, 0x62, + 0x66, 0x9e, 0x3e, 0xc4, 0x54, 0xfd, 0x0a, 0x7d, 0xb0, 0x5b, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, + 0xd8, 0xc0, 0x4e, 0x32, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x46, 0x0b, 0x11, 0x9b, 0xe7, 0x00, + 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/spot/types/params.pb.go b/x/spot/types/params.pb.go index 0c5e9ff81..a248e0876 100644 --- a/x/spot/types/params.pb.go +++ b/x/spot/types/params.pb.go @@ -90,35 +90,36 @@ func (m *Params) GetWhitelistedAsset() []string { } func init() { - proto.RegisterType((*Params)(nil), "nibiru.dex.v1.Params") + proto.RegisterType((*Params)(nil), "nibiru.spot.v1.Params") } func init() { proto.RegisterFile("spot/v1/params.proto", fileDescriptor_802c8fa434d5a8d8) } var fileDescriptor_802c8fa434d5a8d8 = []byte{ - // 351 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0x3f, 0x4f, 0xc2, 0x40, - 0x18, 0xc6, 0x5b, 0x20, 0x24, 0xd6, 0x18, 0xa5, 0x61, 0x28, 0x0c, 0x2d, 0x61, 0x6a, 0x34, 0xde, - 0x59, 0xdd, 0xd8, 0x04, 0xe3, 0x64, 0x08, 0x61, 0x74, 0x69, 0xae, 0xe5, 0x2c, 0x17, 0xdb, 0x7b, - 0x9b, 0xde, 0x81, 0x30, 0xfb, 0x05, 0x4c, 0x5c, 0x1c, 0x9d, 0xfd, 0x24, 0x8c, 0x8c, 0x4e, 0x68, - 0xe0, 0x1b, 0xf8, 0x09, 0x4c, 0xaf, 0x35, 0x21, 0x71, 0xba, 0x3f, 0xbf, 0xf7, 0x79, 0xdf, 0x27, - 0xef, 0x63, 0x34, 0x45, 0x0a, 0x12, 0xcf, 0x3d, 0x9c, 0x92, 0x8c, 0x24, 0x02, 0xa5, 0x19, 0x48, - 0x30, 0x8f, 0x38, 0x0b, 0x58, 0x36, 0x43, 0x13, 0xba, 0x40, 0x73, 0xaf, 0xdd, 0x8c, 0x20, 0x02, - 0x45, 0x70, 0x7e, 0x2b, 0x8a, 0xda, 0x76, 0x08, 0x22, 0x01, 0x81, 0x03, 0x22, 0x28, 0x9e, 0x7b, - 0x01, 0x95, 0xc4, 0xc3, 0x21, 0x30, 0x5e, 0xf2, 0x56, 0xc1, 0xfd, 0x42, 0x58, 0x3c, 0x0a, 0xd4, - 0x7d, 0xae, 0x18, 0xf5, 0x91, 0x1a, 0x68, 0x5e, 0x18, 0x4d, 0x21, 0x49, 0x26, 0x19, 0x8f, 0xfc, - 0x14, 0x20, 0xf6, 0xf9, 0x2c, 0x09, 0x68, 0x66, 0xe9, 0x1d, 0xdd, 0xad, 0x8d, 0xcd, 0x3f, 0x36, - 0x02, 0x88, 0x87, 0x8a, 0x98, 0xaf, 0xba, 0xd1, 0x50, 0x95, 0x61, 0x46, 0x89, 0x64, 0xc0, 0xfd, - 0x07, 0x4a, 0xad, 0x4a, 0xa7, 0xea, 0x1e, 0x5e, 0xb6, 0x50, 0x39, 0x27, 0x37, 0x85, 0x4a, 0x53, - 0x68, 0x00, 0x8c, 0xf7, 0xef, 0x56, 0x1b, 0x47, 0xfb, 0xd9, 0x38, 0xd6, 0x92, 0x24, 0x71, 0xaf, - 0xfb, 0xaf, 0x43, 0xf7, 0xe3, 0xcb, 0x71, 0x23, 0x26, 0xa7, 0xb3, 0x00, 0x85, 0x90, 0x94, 0x86, - 0xcb, 0xe3, 0x5c, 0x4c, 0x1e, 0xb1, 0x5c, 0xa6, 0x54, 0xa8, 0x66, 0x62, 0x7c, 0x9c, 0xeb, 0x07, - 0xa5, 0xfc, 0x96, 0x52, 0xf3, 0xcc, 0x68, 0x3c, 0x4d, 0x99, 0xa4, 0x31, 0x13, 0x92, 0x4e, 0x7c, - 0x22, 0x04, 0x95, 0x56, 0xb5, 0x53, 0x75, 0x0f, 0xc6, 0x27, 0x7b, 0xe0, 0x3a, 0xff, 0xef, 0xd5, - 0xde, 0xde, 0x1d, 0xad, 0x7f, 0xb3, 0xda, 0xda, 0xfa, 0x7a, 0x6b, 0xeb, 0xdf, 0x5b, 0x5b, 0x7f, - 0xd9, 0xd9, 0xda, 0x7a, 0x67, 0x6b, 0x9f, 0x3b, 0x5b, 0xbb, 0x3f, 0xdd, 0xf3, 0x31, 0x54, 0x51, - 0x0c, 0xa6, 0x84, 0x71, 0x5c, 0xc4, 0x82, 0x17, 0x58, 0xa5, 0xa6, 0xfc, 0x04, 0x75, 0xb5, 0xd2, - 0xab, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe6, 0xf0, 0x25, 0x6e, 0xca, 0x01, 0x00, 0x00, + // 353 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0xcf, 0x4e, 0xea, 0x40, + 0x14, 0xc6, 0x5b, 0x20, 0x24, 0xb7, 0x37, 0xb9, 0xf7, 0xd2, 0xb0, 0x28, 0x2c, 0xa6, 0x84, 0x55, + 0x73, 0x8d, 0x33, 0x56, 0x77, 0xec, 0x04, 0xe3, 0xca, 0x10, 0xc2, 0xd2, 0x4d, 0x33, 0x2d, 0x63, + 0x99, 0xd8, 0xce, 0x69, 0x3a, 0x03, 0xca, 0xda, 0x17, 0x30, 0x71, 0xe3, 0xd2, 0xb5, 0x4f, 0xc2, + 0x92, 0xa5, 0x2b, 0x34, 0xf0, 0x06, 0x3e, 0x81, 0xe9, 0xb4, 0x26, 0x24, 0xae, 0xe6, 0xcf, 0xef, + 0x7c, 0xe7, 0x7c, 0x39, 0x9f, 0xd5, 0x96, 0x19, 0x28, 0xb2, 0xf4, 0x49, 0x46, 0x73, 0x9a, 0x4a, + 0x9c, 0xe5, 0xa0, 0xc0, 0xfe, 0x23, 0x78, 0xc8, 0xf3, 0x05, 0x2e, 0x20, 0x5e, 0xfa, 0xdd, 0x76, + 0x0c, 0x31, 0x68, 0x44, 0x8a, 0x5b, 0x59, 0xd5, 0x45, 0x11, 0xc8, 0x14, 0x24, 0x09, 0xa9, 0x64, + 0x64, 0xe9, 0x87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xc8, 0xb8, 0xfe, 0x7f, 0xe0, 0x63, + 0xac, 0xb3, 0x18, 0xcd, 0x29, 0x17, 0xa4, 0xcc, 0x85, 0xdc, 0x13, 0x1d, 0x9b, 0xf6, 0x13, 0x36, + 0xf5, 0x4a, 0xcf, 0xbe, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4c, 0x6a, 0x07, 0xbf, 0xcb, 0x01, 0x00, + 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/x/spot/types/pool.pb.go b/x/spot/types/pool.pb.go index 0bfdd0758..336966d77 100644 --- a/x/spot/types/pool.pb.go +++ b/x/spot/types/pool.pb.go @@ -62,7 +62,7 @@ type PoolParams struct { // are closer together may be best with a higher value. // This is only used if the pool_type is set to 1 (stableswap) A github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=A,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"A" yaml:"amplification"` - PoolType PoolType `protobuf:"varint,4,opt,name=pool_type,json=poolType,proto3,enum=nibiru.dex.v1.PoolType" json:"pool_type,omitempty" yaml:"pool_type"` + PoolType PoolType `protobuf:"varint,4,opt,name=pool_type,json=poolType,proto3,enum=nibiru.spot.v1.PoolType" json:"pool_type,omitempty" yaml:"pool_type"` } func (m *PoolParams) Reset() { *m = PoolParams{} } @@ -204,55 +204,55 @@ func (m *Pool) XXX_DiscardUnknown() { var xxx_messageInfo_Pool proto.InternalMessageInfo func init() { - proto.RegisterEnum("nibiru.dex.v1.PoolType", PoolType_name, PoolType_value) - proto.RegisterType((*PoolParams)(nil), "nibiru.dex.v1.PoolParams") - proto.RegisterType((*PoolAsset)(nil), "nibiru.dex.v1.PoolAsset") - proto.RegisterType((*Pool)(nil), "nibiru.dex.v1.Pool") + proto.RegisterEnum("nibiru.spot.v1.PoolType", PoolType_name, PoolType_value) + proto.RegisterType((*PoolParams)(nil), "nibiru.spot.v1.PoolParams") + proto.RegisterType((*PoolAsset)(nil), "nibiru.spot.v1.PoolAsset") + proto.RegisterType((*Pool)(nil), "nibiru.spot.v1.Pool") } func init() { proto.RegisterFile("spot/v1/pool.proto", fileDescriptor_52166e3414afb619) } var fileDescriptor_52166e3414afb619 = []byte{ - // 621 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xcf, 0x4b, 0x1b, 0x41, - 0x14, 0xc7, 0x77, 0x63, 0xd4, 0x38, 0xd1, 0x54, 0xa6, 0x81, 0xae, 0x16, 0x76, 0x65, 0x0e, 0x25, - 0x48, 0xbb, 0x4b, 0xec, 0xcd, 0x4b, 0xd9, 0xd5, 0x08, 0x2d, 0x22, 0xb2, 0xda, 0x4a, 0x4b, 0x21, - 0x4c, 0xb2, 0x63, 0x32, 0x98, 0xec, 0x2c, 0x99, 0xf1, 0xd7, 0x7f, 0xd0, 0x63, 0xff, 0x84, 0xde, - 0xfb, 0x3f, 0xf4, 0xec, 0xd1, 0x63, 0xe9, 0x61, 0x29, 0xe6, 0xd6, 0x63, 0xfe, 0x82, 0x32, 0x3f, - 0xb6, 0x2a, 0x15, 0x4a, 0xe8, 0x69, 0xe7, 0xf1, 0xde, 0xfb, 0xec, 0x7c, 0xbf, 0xef, 0x31, 0x00, - 0xf2, 0x8c, 0x89, 0xe0, 0xac, 0x19, 0x64, 0x8c, 0x0d, 0xfc, 0x6c, 0xc4, 0x04, 0x83, 0x4b, 0x29, - 0xed, 0xd0, 0xd1, 0xa9, 0x9f, 0x90, 0x0b, 0xff, 0xac, 0xb9, 0x5a, 0xef, 0xb1, 0x1e, 0x53, 0x99, - 0x40, 0x9e, 0x74, 0xd1, 0xaa, 0xdb, 0x65, 0x7c, 0xc8, 0x78, 0xd0, 0xc1, 0x9c, 0x04, 0x67, 0xcd, - 0x0e, 0x11, 0xb8, 0x19, 0x74, 0x19, 0x4d, 0x4d, 0x7e, 0x45, 0xe7, 0xdb, 0xba, 0x51, 0x07, 0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 0xe5, 0x4f, 0x5f, 0x3c, 0x6b, - 0xbd, 0x01, 0x2a, 0xc5, 0x6a, 0xc2, 0x45, 0x50, 0x89, 0xc2, 0xdd, 0x70, 0x6f, 0xab, 0x15, 0x2f, - 0x5b, 0xb0, 0x06, 0xc0, 0xc1, 0x61, 0x18, 0xed, 0xb6, 0x0e, 0x8e, 0xc2, 0xfd, 0x65, 0x3b, 0xda, - 0xbe, 0xba, 0x71, 0xed, 0xeb, 0x1b, 0xd7, 0xfe, 0x79, 0xe3, 0xda, 0x9f, 0xc7, 0xae, 0x75, 0x3d, - 0x76, 0xad, 0xef, 0x63, 0xd7, 0xfa, 0xb0, 0x7e, 0x47, 0xf0, 0x9e, 0xb2, 0x76, 0xab, 0x8f, 0x69, - 0x1a, 0x68, 0x9b, 0x83, 0x8b, 0x40, 0xbd, 0x59, 0x4a, 0x78, 0x67, 0x4e, 0x3d, 0x29, 0x2f, 0x7f, - 0x07, 0x00, 0x00, 0xff, 0xff, 0xdb, 0xd9, 0x15, 0xdb, 0xc8, 0x04, 0x00, 0x00, + // 618 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xcd, 0x6a, 0xdb, 0x40, + 0x10, 0xc7, 0x25, 0xc7, 0x49, 0x9c, 0x75, 0xea, 0x86, 0xad, 0x0f, 0x8a, 0x0b, 0x52, 0xd8, 0x43, + 0x09, 0xa1, 0x95, 0x70, 0x7a, 0xcb, 0xa5, 0x48, 0x89, 0x03, 0xa5, 0x21, 0x04, 0x25, 0xd4, 0xb4, + 0x14, 0xcc, 0xda, 0xde, 0xd8, 0x4b, 0x6c, 0xad, 0xf0, 0x6e, 0x3e, 0xfc, 0x06, 0x3d, 0xf6, 0x11, + 0x7a, 0xef, 0x4b, 0xf4, 0x98, 0x63, 0x8e, 0xa5, 0x07, 0x51, 0xec, 0x63, 0x6f, 0x7e, 0x82, 0xb2, + 0x1f, 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ac, 0xef, + 0x0d, 0x18, 0x4b, 0x35, 0xb9, 0x53, 0xdc, 0x5a, 0x52, 0x2a, 0xce, 0x01, 0x2b, 0xbd, 0xe7, 0x72, + 0x75, 0xaf, 0xe1, 0xaa, 0x32, 0x0e, 0xfb, 0x60, 0x5d, 0x30, 0x81, 0x07, 0x2d, 0x23, 0xeb, 0xb2, + 0x9a, 0xb1, 0xb1, 0xb0, 0xac, 0xcf, 0x72, 0xb7, 0xee, 0x59, 0x28, 0x2e, 0xab, 0xb0, 0xa9, 0x22, + 0xf8, 0x21, 0xff, 0x13, 0xef, 0xe3, 0x11, 0xe1, 0xce, 0xca, 0xbf, 0x16, 0xe1, 0xb9, 0x19, 0xe1, + 0x11, 0x5a, 0x37, 0xe7, 0xe8, 0x53, 0x15, 0xed, 0x15, 0x3f, 0x7f, 0xf5, 0xac, 0x9d, 0x6d, 0x50, + 0xca, 0x97, 0x13, 0xae, 0x83, 0x52, 0x14, 0x1e, 0x85, 0xc7, 0xfb, 0x8d, 0x78, 0xc3, 0x82, 0x15, + 0x00, 0x4e, 0xcf, 0xc2, 0xe8, 0xa8, 0x71, 0xda, 0x0c, 0x4f, 0x36, 0xec, 0xe8, 0xe0, 0x76, 0xe2, + 0xda, 0x77, 0x13, 0xd7, 0xfe, 0x35, 0x71, 0xed, 0x2f, 0x53, 0xd7, 0xba, 0x9b, 0xba, 0xd6, 0x8f, + 0xa9, 0x6b, 0x7d, 0xdc, 0x79, 0x30, 0xf0, 0xb1, 0xd2, 0x76, 0xbf, 0x8f, 0x69, 0x12, 0x68, 0x9d, + 0x83, 0x9b, 0x40, 0xbd, 0x5b, 0x6a, 0xf0, 0xf6, 0x8a, 0x7a, 0x55, 0x5e, 0xff, 0x09, 0x00, 0x00, + 0xff, 0xff, 0x7a, 0x7f, 0xe2, 0x48, 0xcc, 0x04, 0x00, 0x00, } func (m *PoolParams) Marshal() (dAtA []byte, err error) { diff --git a/x/spot/types/query.pb.go b/x/spot/types/query.pb.go index 0cc0eb847..70bbc4976 100644 --- a/x/spot/types/query.pb.go +++ b/x/spot/types/query.pb.go @@ -1482,137 +1482,137 @@ func (m *QueryExitExactAmountOutResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryExitExactAmountOutResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "nibiru.dex.v1.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "nibiru.dex.v1.QueryParamsResponse") - proto.RegisterType((*QueryPoolNumberRequest)(nil), "nibiru.dex.v1.QueryPoolNumberRequest") - proto.RegisterType((*QueryPoolNumberResponse)(nil), "nibiru.dex.v1.QueryPoolNumberResponse") - proto.RegisterType((*QueryPoolRequest)(nil), "nibiru.dex.v1.QueryPoolRequest") - proto.RegisterType((*QueryPoolResponse)(nil), "nibiru.dex.v1.QueryPoolResponse") - proto.RegisterType((*QueryPoolsRequest)(nil), "nibiru.dex.v1.QueryPoolsRequest") - proto.RegisterType((*QueryPoolsResponse)(nil), "nibiru.dex.v1.QueryPoolsResponse") - proto.RegisterType((*QueryPoolParamsRequest)(nil), "nibiru.dex.v1.QueryPoolParamsRequest") - proto.RegisterType((*QueryPoolParamsResponse)(nil), "nibiru.dex.v1.QueryPoolParamsResponse") - proto.RegisterType((*QueryNumPoolsRequest)(nil), "nibiru.dex.v1.QueryNumPoolsRequest") - proto.RegisterType((*QueryNumPoolsResponse)(nil), "nibiru.dex.v1.QueryNumPoolsResponse") - proto.RegisterType((*QueryTotalLiquidityRequest)(nil), "nibiru.dex.v1.QueryTotalLiquidityRequest") - proto.RegisterType((*QueryTotalLiquidityResponse)(nil), "nibiru.dex.v1.QueryTotalLiquidityResponse") - proto.RegisterType((*QueryTotalPoolLiquidityRequest)(nil), "nibiru.dex.v1.QueryTotalPoolLiquidityRequest") - proto.RegisterType((*QueryTotalPoolLiquidityResponse)(nil), "nibiru.dex.v1.QueryTotalPoolLiquidityResponse") - proto.RegisterType((*QueryTotalSharesRequest)(nil), "nibiru.dex.v1.QueryTotalSharesRequest") - proto.RegisterType((*QueryTotalSharesResponse)(nil), "nibiru.dex.v1.QueryTotalSharesResponse") - proto.RegisterType((*QuerySpotPriceRequest)(nil), "nibiru.dex.v1.QuerySpotPriceRequest") - proto.RegisterType((*QuerySpotPriceResponse)(nil), "nibiru.dex.v1.QuerySpotPriceResponse") - proto.RegisterType((*QuerySwapExactAmountInRequest)(nil), "nibiru.dex.v1.QuerySwapExactAmountInRequest") - proto.RegisterType((*QuerySwapExactAmountInResponse)(nil), "nibiru.dex.v1.QuerySwapExactAmountInResponse") - proto.RegisterType((*QuerySwapExactAmountOutRequest)(nil), "nibiru.dex.v1.QuerySwapExactAmountOutRequest") - proto.RegisterType((*QuerySwapExactAmountOutResponse)(nil), "nibiru.dex.v1.QuerySwapExactAmountOutResponse") - proto.RegisterType((*QueryJoinExactAmountInRequest)(nil), "nibiru.dex.v1.QueryJoinExactAmountInRequest") - proto.RegisterType((*QueryJoinExactAmountInResponse)(nil), "nibiru.dex.v1.QueryJoinExactAmountInResponse") - proto.RegisterType((*QueryJoinExactAmountOutRequest)(nil), "nibiru.dex.v1.QueryJoinExactAmountOutRequest") - proto.RegisterType((*QueryJoinExactAmountOutResponse)(nil), "nibiru.dex.v1.QueryJoinExactAmountOutResponse") - proto.RegisterType((*QueryExitExactAmountInRequest)(nil), "nibiru.dex.v1.QueryExitExactAmountInRequest") - proto.RegisterType((*QueryExitExactAmountInResponse)(nil), "nibiru.dex.v1.QueryExitExactAmountInResponse") - proto.RegisterType((*QueryExitExactAmountOutRequest)(nil), "nibiru.dex.v1.QueryExitExactAmountOutRequest") - proto.RegisterType((*QueryExitExactAmountOutResponse)(nil), "nibiru.dex.v1.QueryExitExactAmountOutResponse") + proto.RegisterType((*QueryParamsRequest)(nil), "nibiru.spot.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "nibiru.spot.v1.QueryParamsResponse") + proto.RegisterType((*QueryPoolNumberRequest)(nil), "nibiru.spot.v1.QueryPoolNumberRequest") + proto.RegisterType((*QueryPoolNumberResponse)(nil), "nibiru.spot.v1.QueryPoolNumberResponse") + proto.RegisterType((*QueryPoolRequest)(nil), "nibiru.spot.v1.QueryPoolRequest") + proto.RegisterType((*QueryPoolResponse)(nil), "nibiru.spot.v1.QueryPoolResponse") + proto.RegisterType((*QueryPoolsRequest)(nil), "nibiru.spot.v1.QueryPoolsRequest") + proto.RegisterType((*QueryPoolsResponse)(nil), "nibiru.spot.v1.QueryPoolsResponse") + proto.RegisterType((*QueryPoolParamsRequest)(nil), "nibiru.spot.v1.QueryPoolParamsRequest") + proto.RegisterType((*QueryPoolParamsResponse)(nil), "nibiru.spot.v1.QueryPoolParamsResponse") + proto.RegisterType((*QueryNumPoolsRequest)(nil), "nibiru.spot.v1.QueryNumPoolsRequest") + proto.RegisterType((*QueryNumPoolsResponse)(nil), "nibiru.spot.v1.QueryNumPoolsResponse") + proto.RegisterType((*QueryTotalLiquidityRequest)(nil), "nibiru.spot.v1.QueryTotalLiquidityRequest") + proto.RegisterType((*QueryTotalLiquidityResponse)(nil), "nibiru.spot.v1.QueryTotalLiquidityResponse") + proto.RegisterType((*QueryTotalPoolLiquidityRequest)(nil), "nibiru.spot.v1.QueryTotalPoolLiquidityRequest") + proto.RegisterType((*QueryTotalPoolLiquidityResponse)(nil), "nibiru.spot.v1.QueryTotalPoolLiquidityResponse") + proto.RegisterType((*QueryTotalSharesRequest)(nil), "nibiru.spot.v1.QueryTotalSharesRequest") + proto.RegisterType((*QueryTotalSharesResponse)(nil), "nibiru.spot.v1.QueryTotalSharesResponse") + proto.RegisterType((*QuerySpotPriceRequest)(nil), "nibiru.spot.v1.QuerySpotPriceRequest") + proto.RegisterType((*QuerySpotPriceResponse)(nil), "nibiru.spot.v1.QuerySpotPriceResponse") + proto.RegisterType((*QuerySwapExactAmountInRequest)(nil), "nibiru.spot.v1.QuerySwapExactAmountInRequest") + proto.RegisterType((*QuerySwapExactAmountInResponse)(nil), "nibiru.spot.v1.QuerySwapExactAmountInResponse") + proto.RegisterType((*QuerySwapExactAmountOutRequest)(nil), "nibiru.spot.v1.QuerySwapExactAmountOutRequest") + proto.RegisterType((*QuerySwapExactAmountOutResponse)(nil), "nibiru.spot.v1.QuerySwapExactAmountOutResponse") + proto.RegisterType((*QueryJoinExactAmountInRequest)(nil), "nibiru.spot.v1.QueryJoinExactAmountInRequest") + proto.RegisterType((*QueryJoinExactAmountInResponse)(nil), "nibiru.spot.v1.QueryJoinExactAmountInResponse") + proto.RegisterType((*QueryJoinExactAmountOutRequest)(nil), "nibiru.spot.v1.QueryJoinExactAmountOutRequest") + proto.RegisterType((*QueryJoinExactAmountOutResponse)(nil), "nibiru.spot.v1.QueryJoinExactAmountOutResponse") + proto.RegisterType((*QueryExitExactAmountInRequest)(nil), "nibiru.spot.v1.QueryExitExactAmountInRequest") + proto.RegisterType((*QueryExitExactAmountInResponse)(nil), "nibiru.spot.v1.QueryExitExactAmountInResponse") + proto.RegisterType((*QueryExitExactAmountOutRequest)(nil), "nibiru.spot.v1.QueryExitExactAmountOutRequest") + proto.RegisterType((*QueryExitExactAmountOutResponse)(nil), "nibiru.spot.v1.QueryExitExactAmountOutResponse") } func init() { proto.RegisterFile("spot/v1/query.proto", fileDescriptor_2d81346ec2a640a1) } var fileDescriptor_2d81346ec2a640a1 = []byte{ - // 1479 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x6f, 0x15, 0x55, - 0x14, 0xee, 0x40, 0x29, 0x7d, 0xa7, 0xfc, 0xbc, 0x6d, 0x69, 0xfb, 0x4a, 0xdf, 0x83, 0x0b, 0x14, - 0xa8, 0xf2, 0x86, 0x16, 0xfc, 0x01, 0xb2, 0xb1, 0x50, 0xb1, 0x44, 0xa1, 0x3e, 0x74, 0xa1, 0x2e, - 0x5e, 0xa6, 0xed, 0xe4, 0x31, 0xd2, 0x99, 0x3b, 0xbc,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0x35, 0x18, - 0x8d, 0x9d, 0x7a, 0x2e, 0x73, 0x3c, 0x93, 0x9c, 0x83, 0x21, 0x05, 0x38, 0xa9, 0x1d, 0xd1, 0x4e, - 0x8d, 0x2c, 0x8c, 0x37, 0x62, 0x6d, 0x37, 0x54, 0xf8, 0xe2, 0xe0, 0xa3, 0xed, 0xfa, 0x40, 0x13, - 0x43, 0xe9, 0x24, 0x1c, 0x52, 0xb5, 0x18, 0xdb, 0xb8, 0xee, 0xdb, 0xab, 0x66, 0x27, 0x40, 0x59, - 0x80, 0x89, 0xd4, 0x15, 0x44, 0x9a, 0x80, 0xdd, 0xa2, 0x89, 0x96, 0xb5, 0x2e, 0xa1, 0x06, 0x9b, - 0x43, 0xe2, 0xdf, 0xe5, 0x75, 0xfa, 0x02, 0x1c, 0x08, 0x73, 0xb0, 0x4e, 0x7e, 0xf0, 0x25, 0x38, - 0x18, 0x09, 0xc6, 0xd2, 0x27, 0x61, 0x50, 0x5c, 0xc6, 0x16, 0x46, 0x93, 0x2d, 0x88, 0x50, 0x19, - 0x40, 0x3f, 0x8c, 0x64, 0x07, 0xca, 0x90, 0x37, 0x00, 0xba, 0xd3, 0xc0, 0x1a, 0xb3, 0x0d, 0x25, - 0x72, 0x43, 0x88, 0xdc, 0x50, 0x6b, 0x81, 0x52, 0x37, 0x56, 0x8c, 0xb6, 0x89, 0xb9, 0xcd, 0x48, - 0x26, 0xfd, 0x52, 0x0b, 0x84, 0x57, 0xd5, 0x91, 0xdc, 0x69, 0xd8, 0x25, 0xb0, 0x85, 0xc0, 0x3b, - 0xf3, 0xd8, 0xa9, 0x08, 0x72, 0x35, 0xc6, 0x64, 0x87, 0x64, 0x72, 0xb2, 0x90, 0x89, 0xc2, 0x89, - 0x51, 0x99, 0x8f, 0x0c, 0x28, 0xb6, 0x06, 0xf9, 0xc2, 0xbe, 0x17, 0x99, 0x5c, 0x62, 0x47, 0x2e, - 0xc2, 0x88, 0xcc, 0x89, 0x2d, 0xca, 0x54, 0x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53, 0x5c, 0x8d, 0xcf, 0x01, 0x70, 0x03, + 0xd5, 0x56, 0xe4, 0x4c, 0x6a, 0x19, 0x27, 0x75, 0x2c, 0xb6, 0xbc, 0x62, 0x03, 0x7a, 0xfb, 0x9e, + 0x54, 0x89, 0xe2, 0xed, 0x74, 0x29, 0x9d, 0x62, 0x2f, 0xb3, 0x4a, 0x4b, 0x55, 0xed, 0x2d, 0x7e, + 0x3b, 0x02, 0x07, 0x64, 0x0c, 0x71, 0x60, 0x40, 0x59, 0x30, 0x42, 0x3b, 0xad, 0x5a, 0xf2, 0x17, + 0x82, 0x7e, 0xba, 0x6b, 0x0c, 0x2e, 0x82, 0xfe, 0xc5, 0xef, 0xff, 0x7c, 0xb3, 0x6f, 0x94, 0x10, + 0x43, 0x05, 0x1b, 0x1b, 0xd6, 0x36, 0xfe, 0x64, 0x21, 0x0f, 0x00, 0xda, 0xb6, 0x9f, 0xcc, 0xa4, + 0x97, 0xeb, 0xfc, 0xc5, 0xa0, 0xcf, 0xe6, 0xc6, 0x21, 0x74, 0x45, 0x42, 0x4f, 0x92, 0xf1, 0x18, + 0xb4, 0x50, 0xc9, 0x55, 0x88, 0x16, 0xf4, 0x8b, 0x34, 0x72, 0x32, 0xb3, 0x62, 0x88, 0x79, 0xaa, + 0x4b, 0x04, 0xa2, 0x4d, 0x48, 0x34, 0x42, 0x8e, 0x76, 0xa2, 0x11, 0x1b, 0x0e, 0x48, 0x27, 0x4a, + 0xb2, 0xab, 0xb4, 0x34, 0xa5, 0xdd, 0x42, 0x10, 0x69, 0x52, 0x22, 0x8d, 0x90, 0x63, 0x9d, 0x48, + 0x3e, 0x79, 0xa8, 0x29, 0x49, 0x71, 0x8a, 0xd9, 0x92, 0xc6, 0x27, 0x39, 0x9b, 0x1b, 0x87, 0xd0, + 0xf3, 0x12, 0xfa, 0x0c, 0xa1, 0x09, 0x68, 0xe3, 0x33, 0xdc, 0xbf, 0xfb, 0xe1, 0x74, 0xb7, 0x60, + 0x30, 0x34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 0xa8, 0xdb, 0x2e, 0xf9, 0x4d, 0x03, 0x3d, 0x83, + 0xb9, 0x30, 0x24, 0x85, 0xb8, 0xb4, 0xbf, 0x74, 0x32, 0x36, 0x32, 0xdb, 0x8e, 0xd2, 0xd7, 0x24, + 0xf9, 0x97, 0xc8, 0xc5, 0x9e, 0xc9, 0xb3, 0x80, 0xc7, 0x74, 0x4f, 0xf8, 0xb8, 0x0c, 0xdd, 0xb3, + 0x8c, 0x6a, 0x86, 0xee, 0x99, 0xf6, 0xb0, 0xb0, 0xee, 0x9f, 0x32, 0xdb, 0xed, 0xaa, 0x7b, 0xd2, + 0x34, 0x91, 0x42, 0x5c, 0x72, 0x75, 0xef, 0xe2, 0xc6, 0x8a, 0xea, 0x9e, 0x24, 0xdf, 0xa9, 0x7b, + 0xc2, 0x24, 0x65, 0xe8, 0x9e, 0x65, 0xfb, 0x32, 0x74, 0xcf, 0xf4, 0x5e, 0x85, 0x75, 0xb7, 0xb6, + 0x6d, 0xde, 0x55, 0xf7, 0xa4, 0x01, 0x22, 0x85, 0xb8, 0xe4, 0xea, 0x9e, 0xed, 0xac, 0x0a, 0xeb, + 0x9e, 0x24, 0xcf, 0x02, 0xbe, 0x74, 0xf5, 0xc9, 0xb3, 0xb2, 0xf6, 0xf4, 0x59, 0x59, 0xfb, 0xfb, + 0x59, 0x59, 0x7b, 0xb4, 0x57, 0xee, 0x7b, 0xba, 0x57, 0xee, 0xfb, 0x63, 0xaf, 0xdc, 0xf7, 0xf1, + 0x7c, 0xc4, 0x44, 0x5e, 0x97, 0x95, 0xaf, 0xdc, 0x32, 0x6d, 0x37, 0x44, 0xd9, 0x36, 0xe4, 0x5f, + 0x81, 0xa5, 0x99, 0x5c, 0x1b, 0x90, 0x7f, 0xe4, 0xbd, 0xf0, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xe0, 0x21, 0x18, 0x81, 0xb5, 0x16, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1677,7 +1677,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Query/Params", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Query/Params", in, out, opts...) if err != nil { return nil, err } @@ -1686,7 +1686,7 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . func (c *queryClient) PoolNumber(ctx context.Context, in *QueryPoolNumberRequest, opts ...grpc.CallOption) (*QueryPoolNumberResponse, error) { out := new(QueryPoolNumberResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Query/PoolNumber", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Query/PoolNumber", in, out, opts...) if err != nil { return nil, err } @@ -1695,7 +1695,7 @@ func (c *queryClient) PoolNumber(ctx context.Context, in *QueryPoolNumberRequest func (c *queryClient) Pool(ctx context.Context, in *QueryPoolRequest, opts ...grpc.CallOption) (*QueryPoolResponse, error) { out := new(QueryPoolResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Query/Pool", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Query/Pool", in, out, opts...) if err != nil { return nil, err } @@ -1704,7 +1704,7 @@ func (c *queryClient) Pool(ctx context.Context, in *QueryPoolRequest, opts ...gr func (c *queryClient) Pools(ctx context.Context, in *QueryPoolsRequest, opts ...grpc.CallOption) (*QueryPoolsResponse, error) { out := new(QueryPoolsResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Query/Pools", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Query/Pools", in, out, opts...) if err != nil { return nil, err } @@ -1713,7 +1713,7 @@ func (c *queryClient) Pools(ctx context.Context, in *QueryPoolsRequest, opts ... func (c *queryClient) PoolParams(ctx context.Context, in *QueryPoolParamsRequest, opts ...grpc.CallOption) (*QueryPoolParamsResponse, error) { out := new(QueryPoolParamsResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Query/PoolParams", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Query/PoolParams", in, out, opts...) if err != nil { return nil, err } @@ -1722,7 +1722,7 @@ func (c *queryClient) PoolParams(ctx context.Context, in *QueryPoolParamsRequest func (c *queryClient) NumPools(ctx context.Context, in *QueryNumPoolsRequest, opts ...grpc.CallOption) (*QueryNumPoolsResponse, error) { out := new(QueryNumPoolsResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Query/NumPools", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Query/NumPools", in, out, opts...) if err != nil { return nil, err } @@ -1731,7 +1731,7 @@ func (c *queryClient) NumPools(ctx context.Context, in *QueryNumPoolsRequest, op func (c *queryClient) TotalLiquidity(ctx context.Context, in *QueryTotalLiquidityRequest, opts ...grpc.CallOption) (*QueryTotalLiquidityResponse, error) { out := new(QueryTotalLiquidityResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Query/TotalLiquidity", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Query/TotalLiquidity", in, out, opts...) if err != nil { return nil, err } @@ -1740,7 +1740,7 @@ func (c *queryClient) TotalLiquidity(ctx context.Context, in *QueryTotalLiquidit func (c *queryClient) TotalPoolLiquidity(ctx context.Context, in *QueryTotalPoolLiquidityRequest, opts ...grpc.CallOption) (*QueryTotalPoolLiquidityResponse, error) { out := new(QueryTotalPoolLiquidityResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Query/TotalPoolLiquidity", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Query/TotalPoolLiquidity", in, out, opts...) if err != nil { return nil, err } @@ -1749,7 +1749,7 @@ func (c *queryClient) TotalPoolLiquidity(ctx context.Context, in *QueryTotalPool func (c *queryClient) TotalShares(ctx context.Context, in *QueryTotalSharesRequest, opts ...grpc.CallOption) (*QueryTotalSharesResponse, error) { out := new(QueryTotalSharesResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Query/TotalShares", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Query/TotalShares", in, out, opts...) if err != nil { return nil, err } @@ -1758,7 +1758,7 @@ func (c *queryClient) TotalShares(ctx context.Context, in *QueryTotalSharesReque func (c *queryClient) SpotPrice(ctx context.Context, in *QuerySpotPriceRequest, opts ...grpc.CallOption) (*QuerySpotPriceResponse, error) { out := new(QuerySpotPriceResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Query/SpotPrice", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Query/SpotPrice", in, out, opts...) if err != nil { return nil, err } @@ -1767,7 +1767,7 @@ func (c *queryClient) SpotPrice(ctx context.Context, in *QuerySpotPriceRequest, func (c *queryClient) EstimateSwapExactAmountIn(ctx context.Context, in *QuerySwapExactAmountInRequest, opts ...grpc.CallOption) (*QuerySwapExactAmountInResponse, error) { out := new(QuerySwapExactAmountInResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Query/EstimateSwapExactAmountIn", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Query/EstimateSwapExactAmountIn", in, out, opts...) if err != nil { return nil, err } @@ -1776,7 +1776,7 @@ func (c *queryClient) EstimateSwapExactAmountIn(ctx context.Context, in *QuerySw func (c *queryClient) EstimateSwapExactAmountOut(ctx context.Context, in *QuerySwapExactAmountOutRequest, opts ...grpc.CallOption) (*QuerySwapExactAmountOutResponse, error) { out := new(QuerySwapExactAmountOutResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Query/EstimateSwapExactAmountOut", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Query/EstimateSwapExactAmountOut", in, out, opts...) if err != nil { return nil, err } @@ -1785,7 +1785,7 @@ func (c *queryClient) EstimateSwapExactAmountOut(ctx context.Context, in *QueryS func (c *queryClient) EstimateJoinExactAmountIn(ctx context.Context, in *QueryJoinExactAmountInRequest, opts ...grpc.CallOption) (*QueryJoinExactAmountInResponse, error) { out := new(QueryJoinExactAmountInResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Query/EstimateJoinExactAmountIn", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Query/EstimateJoinExactAmountIn", in, out, opts...) if err != nil { return nil, err } @@ -1794,7 +1794,7 @@ func (c *queryClient) EstimateJoinExactAmountIn(ctx context.Context, in *QueryJo func (c *queryClient) EstimateJoinExactAmountOut(ctx context.Context, in *QueryJoinExactAmountOutRequest, opts ...grpc.CallOption) (*QueryJoinExactAmountOutResponse, error) { out := new(QueryJoinExactAmountOutResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Query/EstimateJoinExactAmountOut", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Query/EstimateJoinExactAmountOut", in, out, opts...) if err != nil { return nil, err } @@ -1803,7 +1803,7 @@ func (c *queryClient) EstimateJoinExactAmountOut(ctx context.Context, in *QueryJ func (c *queryClient) EstimateExitExactAmountIn(ctx context.Context, in *QueryExitExactAmountInRequest, opts ...grpc.CallOption) (*QueryExitExactAmountInResponse, error) { out := new(QueryExitExactAmountInResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Query/EstimateExitExactAmountIn", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Query/EstimateExitExactAmountIn", in, out, opts...) if err != nil { return nil, err } @@ -1812,7 +1812,7 @@ func (c *queryClient) EstimateExitExactAmountIn(ctx context.Context, in *QueryEx func (c *queryClient) EstimateExitExactAmountOut(ctx context.Context, in *QueryExitExactAmountOutRequest, opts ...grpc.CallOption) (*QueryExitExactAmountOutResponse, error) { out := new(QueryExitExactAmountOutResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Query/EstimateExitExactAmountOut", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Query/EstimateExitExactAmountOut", in, out, opts...) if err != nil { return nil, err } @@ -1928,7 +1928,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Query/Params", + FullMethod: "/nibiru.spot.v1.Query/Params", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) @@ -1946,7 +1946,7 @@ func _Query_PoolNumber_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Query/PoolNumber", + FullMethod: "/nibiru.spot.v1.Query/PoolNumber", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).PoolNumber(ctx, req.(*QueryPoolNumberRequest)) @@ -1964,7 +1964,7 @@ func _Query_Pool_Handler(srv interface{}, ctx context.Context, dec func(interfac } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Query/Pool", + FullMethod: "/nibiru.spot.v1.Query/Pool", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Pool(ctx, req.(*QueryPoolRequest)) @@ -1982,7 +1982,7 @@ func _Query_Pools_Handler(srv interface{}, ctx context.Context, dec func(interfa } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Query/Pools", + FullMethod: "/nibiru.spot.v1.Query/Pools", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Pools(ctx, req.(*QueryPoolsRequest)) @@ -2000,7 +2000,7 @@ func _Query_PoolParams_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Query/PoolParams", + FullMethod: "/nibiru.spot.v1.Query/PoolParams", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).PoolParams(ctx, req.(*QueryPoolParamsRequest)) @@ -2018,7 +2018,7 @@ func _Query_NumPools_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Query/NumPools", + FullMethod: "/nibiru.spot.v1.Query/NumPools", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).NumPools(ctx, req.(*QueryNumPoolsRequest)) @@ -2036,7 +2036,7 @@ func _Query_TotalLiquidity_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Query/TotalLiquidity", + FullMethod: "/nibiru.spot.v1.Query/TotalLiquidity", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).TotalLiquidity(ctx, req.(*QueryTotalLiquidityRequest)) @@ -2054,7 +2054,7 @@ func _Query_TotalPoolLiquidity_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Query/TotalPoolLiquidity", + FullMethod: "/nibiru.spot.v1.Query/TotalPoolLiquidity", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).TotalPoolLiquidity(ctx, req.(*QueryTotalPoolLiquidityRequest)) @@ -2072,7 +2072,7 @@ func _Query_TotalShares_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Query/TotalShares", + FullMethod: "/nibiru.spot.v1.Query/TotalShares", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).TotalShares(ctx, req.(*QueryTotalSharesRequest)) @@ -2090,7 +2090,7 @@ func _Query_SpotPrice_Handler(srv interface{}, ctx context.Context, dec func(int } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Query/SpotPrice", + FullMethod: "/nibiru.spot.v1.Query/SpotPrice", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).SpotPrice(ctx, req.(*QuerySpotPriceRequest)) @@ -2108,7 +2108,7 @@ func _Query_EstimateSwapExactAmountIn_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Query/EstimateSwapExactAmountIn", + FullMethod: "/nibiru.spot.v1.Query/EstimateSwapExactAmountIn", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).EstimateSwapExactAmountIn(ctx, req.(*QuerySwapExactAmountInRequest)) @@ -2126,7 +2126,7 @@ func _Query_EstimateSwapExactAmountOut_Handler(srv interface{}, ctx context.Cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Query/EstimateSwapExactAmountOut", + FullMethod: "/nibiru.spot.v1.Query/EstimateSwapExactAmountOut", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).EstimateSwapExactAmountOut(ctx, req.(*QuerySwapExactAmountOutRequest)) @@ -2144,7 +2144,7 @@ func _Query_EstimateJoinExactAmountIn_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Query/EstimateJoinExactAmountIn", + FullMethod: "/nibiru.spot.v1.Query/EstimateJoinExactAmountIn", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).EstimateJoinExactAmountIn(ctx, req.(*QueryJoinExactAmountInRequest)) @@ -2162,7 +2162,7 @@ func _Query_EstimateJoinExactAmountOut_Handler(srv interface{}, ctx context.Cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Query/EstimateJoinExactAmountOut", + FullMethod: "/nibiru.spot.v1.Query/EstimateJoinExactAmountOut", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).EstimateJoinExactAmountOut(ctx, req.(*QueryJoinExactAmountOutRequest)) @@ -2180,7 +2180,7 @@ func _Query_EstimateExitExactAmountIn_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Query/EstimateExitExactAmountIn", + FullMethod: "/nibiru.spot.v1.Query/EstimateExitExactAmountIn", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).EstimateExitExactAmountIn(ctx, req.(*QueryExitExactAmountInRequest)) @@ -2198,7 +2198,7 @@ func _Query_EstimateExitExactAmountOut_Handler(srv interface{}, ctx context.Cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Query/EstimateExitExactAmountOut", + FullMethod: "/nibiru.spot.v1.Query/EstimateExitExactAmountOut", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).EstimateExitExactAmountOut(ctx, req.(*QueryExitExactAmountOutRequest)) @@ -2207,7 +2207,7 @@ func _Query_EstimateExitExactAmountOut_Handler(srv interface{}, ctx context.Cont } var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "nibiru.dex.v1.Query", + ServiceName: "nibiru.spot.v1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { diff --git a/x/spot/types/tx.pb.go b/x/spot/types/tx.pb.go index 51f05e53b..2f4dfa16b 100644 --- a/x/spot/types/tx.pb.go +++ b/x/spot/types/tx.pb.go @@ -486,72 +486,73 @@ func (m *MsgSwapAssetsResponse) GetTokenOut() types.Coin { } func init() { - proto.RegisterType((*MsgCreatePool)(nil), "nibiru.dex.v1.MsgCreatePool") - proto.RegisterType((*MsgCreatePoolResponse)(nil), "nibiru.dex.v1.MsgCreatePoolResponse") - proto.RegisterType((*MsgJoinPool)(nil), "nibiru.dex.v1.MsgJoinPool") - proto.RegisterType((*MsgJoinPoolResponse)(nil), "nibiru.dex.v1.MsgJoinPoolResponse") - proto.RegisterType((*MsgExitPool)(nil), "nibiru.dex.v1.MsgExitPool") - proto.RegisterType((*MsgExitPoolResponse)(nil), "nibiru.dex.v1.MsgExitPoolResponse") - proto.RegisterType((*MsgSwapAssets)(nil), "nibiru.dex.v1.MsgSwapAssets") - proto.RegisterType((*MsgSwapAssetsResponse)(nil), "nibiru.dex.v1.MsgSwapAssetsResponse") + proto.RegisterType((*MsgCreatePool)(nil), "nibiru.spot.v1.MsgCreatePool") + proto.RegisterType((*MsgCreatePoolResponse)(nil), "nibiru.spot.v1.MsgCreatePoolResponse") + proto.RegisterType((*MsgJoinPool)(nil), "nibiru.spot.v1.MsgJoinPool") + proto.RegisterType((*MsgJoinPoolResponse)(nil), "nibiru.spot.v1.MsgJoinPoolResponse") + proto.RegisterType((*MsgExitPool)(nil), "nibiru.spot.v1.MsgExitPool") + proto.RegisterType((*MsgExitPoolResponse)(nil), "nibiru.spot.v1.MsgExitPoolResponse") + proto.RegisterType((*MsgSwapAssets)(nil), "nibiru.spot.v1.MsgSwapAssets") + proto.RegisterType((*MsgSwapAssetsResponse)(nil), "nibiru.spot.v1.MsgSwapAssetsResponse") } func init() { proto.RegisterFile("spot/v1/tx.proto", fileDescriptor_7f826c866f00b65d) } var fileDescriptor_7f826c866f00b65d = []byte{ - // 832 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x41, 0x6b, 0x23, 0x37, - 0x14, 0xf6, 0xc4, 0x26, 0x71, 0x64, 0xbc, 0xf1, 0x2a, 0xdb, 0xdd, 0xc9, 0x10, 0x6c, 0x23, 0x0a, - 0x75, 0x5b, 0x98, 0xa9, 0xdd, 0x5b, 0x29, 0x94, 0x1d, 0x6f, 0x0f, 0x29, 0xb8, 0x09, 0x13, 0xe8, - 0xa1, 0x14, 0x8c, 0x6c, 0x8b, 0x89, 0xd2, 0x19, 0x69, 0xb0, 0x34, 0x59, 0x2f, 0xa5, 0x97, 0x1e, - 0x7b, 0x2a, 0xf4, 0xf7, 0xb4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, 0x31, 0xb1, 0x10, - 0x44, 0x0a, 0xbb, 0xda, 0xad, 0xf6, 0x1a, 0x03, 0x7b, 0x43, 0xcc, 0xa7, 0x99, 0x83, 0x5f, 0x7b, - 0xb9, 0xec, 0x54, 0x74, 0x00, 0x75, 0x20, 0xd0, 0x47, 0xe0, 0x9d, 0xb5, 0xfc, 0x03, 0x22, 0x12, - 0xce, 0x04, 0x81, 0x4f, 0xc0, 0x9e, 0x8a, 0x4c, 0x67, 0x8a, 0x47, 0x2d, 0xd8, 0xcd, 0xb6, 0x27, - 0x33, 0xf4, 0xb7, 0x05, 0x1a, 0x23, 0x11, 0x7e, 0xc1, 0x29, 0x53, 0x84, 0xdf, 0x07, 0xbb, 0x82, - 0xb0, 0x19, 0x31, 0x7c, 0xfd, 0x87, 0xab, 0x65, 0xa7, 0xa9, 0xd3, 0xd6, 0xe7, 0x28, 0x30, 0x0e, - 0xf0, 0xc3, 0xdb, 0x98, 0x19, 0xfb, 0x9a, 0x0f, 0x57, 0xcb, 0xce, 0x83, 0x12, 0x45, 0x3a, 0x43, - 0x39, 0x0e, 0x3c, 0x03, 0xfb, 0x92, 0x7f, 0x4b, 0x98, 0x18, 0x53, 0x66, 0x88, 0x1d, 0xb9, 0xba, - 0x58, 0x6e, 0x56, 0x2c, 0xd7, 0x14, 0xcb, 0x1d, 0x72, 0xca, 0x7c, 0x3b, 0x63, 0xb6, 0x5a, 0x76, - 0x5a, 0x3a, 0x5a, 0x71, 0x13, 0x05, 0x75, 0xbd, 0x3e, 0x61, 0xf0, 0x53, 0xd0, 0x4c, 0x05, 0x19, - 0xe3, 0x28, 0x1a, 0x67, 0x05, 0x16, 0x76, 0xad, 0x6b, 0xf5, 0xea, 0xbe, 0xbd, 0x5a, 0x76, 0x1e, - 0xe9, 0x6b, 0x6b, 0x66, 0x14, 0x34, 0x52, 0x41, 0x9e, 0x46, 0xd1, 0x50, 0xed, 0x7e, 0xdc, 0x01, - 0x87, 0x25, 0xde, 0x85, 0x50, 0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0x17, 0x98, 0xb2, 0x3c, 0xd6, 0xc2, 0x53, 0xff, 0xbe, 0x7c, 0x91, 0x10, 0x31, 0xd9, 0x55, 0x5f, - 0xf4, 0xc7, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x54, 0x5a, 0xa0, 0x87, 0x2d, 0x08, 0x00, 0x00, + // 833 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x8b, 0x23, 0x45, + 0x14, 0x9e, 0x9e, 0x84, 0xf9, 0x51, 0x61, 0x66, 0xb2, 0xb5, 0xe3, 0x6e, 0x6f, 0xbb, 0x26, 0xa1, + 0x44, 0x88, 0x0a, 0xdd, 0x26, 0xde, 0xc4, 0x83, 0xdb, 0x59, 0x0f, 0x23, 0xc4, 0x19, 0x3a, 0xe0, + 0x41, 0x84, 0x50, 0x49, 0x8a, 0x9e, 0x5a, 0xbb, 0xab, 0x9a, 0x54, 0x75, 0x36, 0x8b, 0x78, 0xf1, + 0xea, 0x45, 0xf0, 0xef, 0x11, 0x3c, 0xee, 0xcd, 0x05, 0x2f, 0x9e, 0x82, 0xcc, 0xf8, 0x17, 0x04, + 0xbc, 0x78, 0x92, 0xae, 0xaa, 0xee, 0xe9, 0xac, 0xcd, 0x04, 0x59, 0xe6, 0x56, 0x55, 0xef, 0xd5, + 0xfb, 0xde, 0xf7, 0xbd, 0xf7, 0xaa, 0x1b, 0x34, 0x45, 0xc2, 0xa5, 0xb7, 0xe8, 0x79, 0x72, 0xe9, + 0x26, 0x73, 0x2e, 0x39, 0x3c, 0x66, 0x74, 0x42, 0xe7, 0xa9, 0x9b, 0x19, 0xdc, 0x45, 0xcf, 0x81, + 0xb9, 0x47, 0xc2, 0x79, 0xa4, 0x7d, 0x9c, 0xd3, 0x90, 0x87, 0x5c, 0x2d, 0xbd, 0x6c, 0x65, 0x4e, + 0x5b, 0x53, 0x2e, 0x62, 0x2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0xc5, 0x5b, 0xf8, 0x76, 0x45, 0xb0, 0xdc, 0xe8, 0xbc, + 0x7b, 0x8b, 0xb1, 0xc0, 0x41, 0x0a, 0xe7, 0x31, 0x72, 0xca, 0x38, 0xdf, 0x99, 0x42, 0x7f, 0xef, + 0x3d, 0xe3, 0x94, 0x65, 0x88, 0xc5, 0xdc, 0x55, 0x21, 0xe6, 0xc6, 0x4a, 0xc4, 0xd7, 0x5b, 0x7e, + 0x1b, 0x22, 0x59, 0x52, 0x09, 0x17, 0x00, 0x94, 0xba, 0xb7, 0x4a, 0xd1, 0x1b, 0x73, 0xa5, 0xa2, + 0xff, 0xad, 0xff, 0x36, 0x5c, 0xf1, 0x1c, 0x27, 0xfe, 0xd3, 0x97, 0x57, 0x2d, 0xeb, 0xd5, 0x55, + 0xcb, 0xfa, 0xf3, 0xaa, 0x65, 0xfd, 0x74, 0xdd, 0xda, 0x79, 0x75, 0xdd, 0xda, 0xf9, 0xe3, 0xba, + 0xb5, 0xf3, 0xf5, 0x07, 0x21, 0x95, 0x97, 0xe9, 0xc4, 0x9d, 0xf2, 0xd8, 0xfb, 0x52, 0xdd, 0x1f, + 0x5c, 0x62, 0xca, 0xf2, 0x58, 0x4b, 0x4f, 0xfd, 0x02, 0xc8, 0x17, 0x09, 0x11, 0x93, 0x3d, 0xf5, + 0xb5, 0xfe, 0xf8, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xea, 0xe4, 0x34, 0x56, 0x39, 0x08, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -586,7 +587,7 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { func (c *msgClient) CreatePool(ctx context.Context, in *MsgCreatePool, opts ...grpc.CallOption) (*MsgCreatePoolResponse, error) { out := new(MsgCreatePoolResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Msg/CreatePool", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Msg/CreatePool", in, out, opts...) if err != nil { return nil, err } @@ -595,7 +596,7 @@ func (c *msgClient) CreatePool(ctx context.Context, in *MsgCreatePool, opts ...g func (c *msgClient) JoinPool(ctx context.Context, in *MsgJoinPool, opts ...grpc.CallOption) (*MsgJoinPoolResponse, error) { out := new(MsgJoinPoolResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Msg/JoinPool", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Msg/JoinPool", in, out, opts...) if err != nil { return nil, err } @@ -604,7 +605,7 @@ func (c *msgClient) JoinPool(ctx context.Context, in *MsgJoinPool, opts ...grpc. func (c *msgClient) ExitPool(ctx context.Context, in *MsgExitPool, opts ...grpc.CallOption) (*MsgExitPoolResponse, error) { out := new(MsgExitPoolResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Msg/ExitPool", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Msg/ExitPool", in, out, opts...) if err != nil { return nil, err } @@ -613,7 +614,7 @@ func (c *msgClient) ExitPool(ctx context.Context, in *MsgExitPool, opts ...grpc. func (c *msgClient) SwapAssets(ctx context.Context, in *MsgSwapAssets, opts ...grpc.CallOption) (*MsgSwapAssetsResponse, error) { out := new(MsgSwapAssetsResponse) - err := c.cc.Invoke(ctx, "/nibiru.dex.v1.Msg/SwapAssets", in, out, opts...) + err := c.cc.Invoke(ctx, "/nibiru.spot.v1.Msg/SwapAssets", in, out, opts...) if err != nil { return nil, err } @@ -663,7 +664,7 @@ func _Msg_CreatePool_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Msg/CreatePool", + FullMethod: "/nibiru.spot.v1.Msg/CreatePool", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).CreatePool(ctx, req.(*MsgCreatePool)) @@ -681,7 +682,7 @@ func _Msg_JoinPool_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Msg/JoinPool", + FullMethod: "/nibiru.spot.v1.Msg/JoinPool", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).JoinPool(ctx, req.(*MsgJoinPool)) @@ -699,7 +700,7 @@ func _Msg_ExitPool_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Msg/ExitPool", + FullMethod: "/nibiru.spot.v1.Msg/ExitPool", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).ExitPool(ctx, req.(*MsgExitPool)) @@ -717,7 +718,7 @@ func _Msg_SwapAssets_Handler(srv interface{}, ctx context.Context, dec func(inte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/nibiru.dex.v1.Msg/SwapAssets", + FullMethod: "/nibiru.spot.v1.Msg/SwapAssets", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).SwapAssets(ctx, req.(*MsgSwapAssets)) @@ -726,7 +727,7 @@ func _Msg_SwapAssets_Handler(srv interface{}, ctx context.Context, dec func(inte } var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "nibiru.dex.v1.Msg", + ServiceName: "nibiru.spot.v1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { From 608ad82eff005c3b3b696c2c38b0d55578a507c6 Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Fri, 3 Feb 2023 23:52:16 -0500 Subject: [PATCH 4/6] refactor(spot): replace dex with spot --- contrib/scripts/testing/stableswap_model.py | 6 +- proto/spot/v1/query.proto | 32 ++-- proto/spot/v1/tx.proto | 8 +- x/README.md | 2 +- x/spot/client/testutil/test_helpers.go | 2 +- x/spot/spec/01_concepts.md | 2 +- x/spot/spec/02_state.md | 2 +- x/spot/spec/04_client.md | 6 +- x/spot/spec/README.md | 2 +- x/spot/types/codec.go | 3 +- x/spot/types/keys.go | 2 +- x/spot/types/query.pb.go | 188 ++++++++++---------- x/spot/types/query.pb.gw.go | 32 ++-- x/spot/types/tx.pb.go | 107 ++++++----- x/spot/types/tx.pb.gw.go | 8 +- 15 files changed, 201 insertions(+), 201 deletions(-) diff --git a/contrib/scripts/testing/stableswap_model.py b/contrib/scripts/testing/stableswap_model.py index e903a0c84..6b9490c6d 100644 --- a/contrib/scripts/testing/stableswap_model.py +++ b/contrib/scripts/testing/stableswap_model.py @@ -3,7 +3,7 @@ The objective is to compare the performance of golang uint256 unit used against Python3 integer values. Python3 int type have no limit in term of size, which means that we can make arbitrary operations on ints and consider them as float. -The curve class comes directly from the curve codebase, and is being used to create the tests, stored in `x/dex/types/misc/stabletests.csv`;. +The curve class comes directly from the curve codebase, and is being used to create the tests, stored in `x/spot/types/misc/stabletests.csv`;. Theses test are then used to compare the value of python model's DY against the one obtained with our go code. These are created for pools with random amount of assets (from 2 to 5), random amplification parameter (from 1 to 4* common.Precision) and for random coins of the pool. @@ -188,7 +188,7 @@ def calc_withdraw_one_coin(self, token_amount, i): def generate_test_cases(n: int): """ - Create n test cases and store them in x/dex/types/misc/stable-swap-math.csv + Create n test cases and store them in x/spot/types/misc/stable-swap-math.csv Args: n (int): The number of test to create @@ -226,7 +226,7 @@ def generate_test_cases(n: int): ) file_path = os.path.join( - os.path.dirname(__file__), "../../x/dex/types/misc/stabletests.csv" + os.path.dirname(__file__), "../../x/spot/types/misc/stabletests.csv" ) with open(file_path, "w") as f: diff --git a/proto/spot/v1/query.proto b/proto/spot/v1/query.proto index 9f596b4d8..f535fb391 100644 --- a/proto/spot/v1/query.proto +++ b/proto/spot/v1/query.proto @@ -15,55 +15,55 @@ option go_package = "github.com/NibiruChain/nibiru/x/spot/types"; service Query { // Parameters of the spot module. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/nibiru/dex/params"; + option (google.api.http).get = "/nibiru/spot/params"; } // Next available pool id number. rpc PoolNumber(QueryPoolNumberRequest) returns (QueryPoolNumberResponse) { - option (google.api.http).get = "/nibiru/dex/pool_number"; + option (google.api.http).get = "/nibiru/spot/pool_number"; } // Fetch a pool by id. rpc Pool(QueryPoolRequest) returns (QueryPoolResponse) { - option (google.api.http).get = "/nibiru/dex/pool"; + option (google.api.http).get = "/nibiru/spot/pool"; } // Returns all pools. rpc Pools(QueryPoolsRequest) returns (QueryPoolsResponse) { - option (google.api.http).get = "/nibiru/dex/pools"; + option (google.api.http).get = "/nibiru/spot/pools"; } // Parameters of a single pool. rpc PoolParams(QueryPoolParamsRequest) returns (QueryPoolParamsResponse) { - option (google.api.http).get = "/nibiru/dex/pools/{pool_id}/params"; + option (google.api.http).get = "/nibiru/spot/pools/{pool_id}/params"; } // Number of pools. rpc NumPools(QueryNumPoolsRequest) returns (QueryNumPoolsResponse) { - option (google.api.http).get = "/nibiru/dex/num_pools"; + option (google.api.http).get = "/nibiru/spot/num_pools"; } // Total liquidity across all pools. rpc TotalLiquidity(QueryTotalLiquidityRequest) returns (QueryTotalLiquidityResponse) { - option (google.api.http).get = "/nibiru/dex/total_liquidity"; + option (google.api.http).get = "/nibiru/spot/total_liquidity"; } // Total liquidity in a single pool. rpc TotalPoolLiquidity(QueryTotalPoolLiquidityRequest) returns (QueryTotalPoolLiquidityResponse) { option (google.api.http).get = - "/nibiru/dex/pools/{pool_id}/total_pool_liquidity"; + "/nibiru/spot/pools/{pool_id}/total_pool_liquidity"; } // Total shares in a single pool. rpc TotalShares(QueryTotalSharesRequest) returns (QueryTotalSharesResponse) { - option (google.api.http).get = "/nibiru/dex/pools/{pool_id}/total_shares"; + option (google.api.http).get = "/nibiru/spot/pools/{pool_id}/total_shares"; } // Instantaneous price of an asset in a pool. rpc SpotPrice(QuerySpotPriceRequest) returns (QuerySpotPriceResponse) { - option (google.api.http).get = "/nibiru/dex/pools/{pool_id}/prices"; + option (google.api.http).get = "/nibiru/spot/pools/{pool_id}/prices"; } // Estimates the amount of assets returned given an exact amount of tokens to @@ -71,7 +71,7 @@ service Query { rpc EstimateSwapExactAmountIn(QuerySwapExactAmountInRequest) returns (QuerySwapExactAmountInResponse) { option (google.api.http).get = - "/nibiru/dex/{pool_id}/estimate/swap_exact_amount_in"; + "/nibiru/spot/{pool_id}/estimate/swap_exact_amount_in"; } // Estimates the amount of tokens required to return the exact amount of @@ -79,7 +79,7 @@ service Query { rpc EstimateSwapExactAmountOut(QuerySwapExactAmountOutRequest) returns (QuerySwapExactAmountOutResponse) { option (google.api.http).get = - "/nibiru/dex/{pool_id}/estimate/swap_exact_amount_out"; + "/nibiru/spot/{pool_id}/estimate/swap_exact_amount_out"; } // Estimates the amount of pool shares returned given an amount of tokens to @@ -87,7 +87,7 @@ service Query { rpc EstimateJoinExactAmountIn(QueryJoinExactAmountInRequest) returns (QueryJoinExactAmountInResponse) { option (google.api.http).get = - "/nibiru/dex/{pool_id}/estimate/join_exact_amount_in"; + "/nibiru/spot/{pool_id}/estimate/join_exact_amount_in"; } // Estimates the amount of tokens required to obtain an exact amount of pool @@ -95,7 +95,7 @@ service Query { rpc EstimateJoinExactAmountOut(QueryJoinExactAmountOutRequest) returns (QueryJoinExactAmountOutResponse) { option (google.api.http).get = - "/nibiru/dex/{pool_id}/estimate/join_exact_amount_out"; + "/nibiru/spot/{pool_id}/estimate/join_exact_amount_out"; } // Estimates the amount of tokens returned to the user given an exact amount @@ -103,7 +103,7 @@ service Query { rpc EstimateExitExactAmountIn(QueryExitExactAmountInRequest) returns (QueryExitExactAmountInResponse) { option (google.api.http).get = - "/nibiru/dex/{pool_id}/estimate/exit_exact_amount_in"; + "/nibiru/spot/{pool_id}/estimate/exit_exact_amount_in"; } // Estimates the amount of pool shares required to extract an exact amount of @@ -111,7 +111,7 @@ service Query { rpc EstimateExitExactAmountOut(QueryExitExactAmountOutRequest) returns (QueryExitExactAmountOutResponse) { option (google.api.http).get = - "/nibiru/dex/{pool_id}/estimate/exit_exact_amount_out"; + "/nibiru/spot/{pool_id}/estimate/exit_exact_amount_out"; } } diff --git a/proto/spot/v1/tx.proto b/proto/spot/v1/tx.proto index 0d1068dc7..bf072e5ac 100644 --- a/proto/spot/v1/tx.proto +++ b/proto/spot/v1/tx.proto @@ -13,22 +13,22 @@ option go_package = "github.com/NibiruChain/nibiru/x/spot/types"; service Msg { // Used to create a pool. rpc CreatePool(MsgCreatePool) returns (MsgCreatePoolResponse) { - option (google.api.http).post = "/nibiru/dex/pool"; + option (google.api.http).post = "/nibiru/spot/pool"; } // Join a pool as a liquidity provider. rpc JoinPool(MsgJoinPool) returns (MsgJoinPoolResponse) { - option (google.api.http).post = "/nibiru/dex/{pool_id}/join"; + option (google.api.http).post = "/nibiru/spot/{pool_id}/join"; } // Exit a pool position by returning LP shares rpc ExitPool(MsgExitPool) returns (MsgExitPoolResponse) { - option (google.api.http).post = "/nibiru/dex/{pool_id}/exit"; + option (google.api.http).post = "/nibiru/spot/{pool_id}/exit"; } // Swap assets in a pool rpc SwapAssets(MsgSwapAssets) returns (MsgSwapAssetsResponse) { - option (google.api.http).post = "/nibiru/dex/{pool_id}/swap"; + option (google.api.http).post = "/nibiru/spot/{pool_id}/swap"; } } diff --git a/x/README.md b/x/README.md index 3d4a83d68..e9aed73ef 100644 --- a/x/README.md +++ b/x/README.md @@ -2,7 +2,7 @@ - [common](common/spec/README.md): TODO -- [dex](dex/spec/README.md): TODO +- [spot](spot/spec/README.md): TODO - [perp](perp/README.md): The `x/perp` module powers the Nibi-Perps exchange. This module enables traders to open long and short leveraged positions and houses all of the PnL calculation and liquidation logic. diff --git a/x/spot/client/testutil/test_helpers.go b/x/spot/client/testutil/test_helpers.go index 7ec5f03d3..ed1b1c537 100644 --- a/x/spot/client/testutil/test_helpers.go +++ b/x/spot/client/testutil/test_helpers.go @@ -140,7 +140,7 @@ func ExecMsgSwapAssets( return clitestutil.ExecTestCLICmd(clientCtx, cli.CmdSwapAssets(), args) } -// WhitelistGenesisAssets given a testapp.GenesisState includes the whitelisted assets into Dex Whitelisted assets. +// WhitelistGenesisAssets given a testapp.GenesisState includes the whitelisted assets into spot Whitelisted assets. func WhitelistGenesisAssets(state testapp.GenesisState, assets []string) testapp.GenesisState { encConfig := app.MakeTestEncodingConfig() diff --git a/x/spot/spec/01_concepts.md b/x/spot/spec/01_concepts.md index 22ce1cb32..4aaea9362 100644 --- a/x/spot/spec/01_concepts.md +++ b/x/spot/spec/01_concepts.md @@ -4,7 +4,7 @@ order: 1 # Concepts -The `x/dex` module is responsible for for creating, joining, and exiting +The `x/spot` module is responsible for for creating, joining, and exiting liquidity pools that are dictated by an AMM for swaps. ## Pool diff --git a/x/spot/spec/02_state.md b/x/spot/spec/02_state.md index 36dfe744b..dd6070328 100644 --- a/x/spot/spec/02_state.md +++ b/x/spot/spec/02_state.md @@ -6,7 +6,7 @@ The spot module stores a monotonically increasing counter denoting the next avai ## Pools -Serialized protobufs representing pools are stored in the state, with the key 0x02 | poolId. See the [pool proto file](../../../proto/dex/v1/pool.proto) for what fields a pool has. +Serialized protobufs representing pools are stored in the state, with the key 0x02 | poolId. See the [pool proto file](../../../proto/spot/v1/pool.proto) for what fields a pool has. ## Total Liquidity diff --git a/x/spot/spec/04_client.md b/x/spot/spec/04_client.md index d73b5cd10..8391c12a7 100644 --- a/x/spot/spec/04_client.md +++ b/x/spot/spec/04_client.md @@ -4,11 +4,11 @@ order: 9 # CLI -A user can query and interact with the `dex` module using the CLI. +A user can query and interact with the `spot` module using the CLI. ## Query -The `query` commands allow users to query `dex` state. +The `query` commands allow users to query `spot` state. ```bash nibid query spot --help @@ -146,7 +146,7 @@ liquidity: ## Transactions -The `tx` commands allow users to interact with the `dex` module. +The `tx` commands allow users to interact with the `spot` module. ```bash nibid tx spot --help diff --git a/x/spot/spec/README.md b/x/spot/spec/README.md index 2331c5def..59b506c3d 100644 --- a/x/spot/spec/README.md +++ b/x/spot/spec/README.md @@ -1,3 +1,3 @@ -# DEX Module +# Spot Module The x/spot module is responsible for creating, joining, and exiting liquidity pools. It also allows users to swap between two assets in an existing pool. It's a fully functional AMM. diff --git a/x/spot/types/codec.go b/x/spot/types/codec.go index ff21f6553..cb55dc909 100644 --- a/x/spot/types/codec.go +++ b/x/spot/types/codec.go @@ -8,7 +8,8 @@ import ( ) func RegisterCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(&MsgCreatePool{}, "dex/CreatePool", nil) + cdc.RegisterConcrete(&MsgCreatePool{}, "spot/CreatePool", nil) + // TODO(k-yang): register MsgJoinPool } func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { diff --git a/x/spot/types/keys.go b/x/spot/types/keys.go index 49f0cfda2..da7fcf46b 100644 --- a/x/spot/types/keys.go +++ b/x/spot/types/keys.go @@ -9,7 +9,7 @@ import ( const ( // ModuleName defines the module name - ModuleName = "dex" + ModuleName = "spot" // StoreKey defines the primary module store key StoreKey = ModuleName diff --git a/x/spot/types/query.pb.go b/x/spot/types/query.pb.go index 70bbc4976..597af799e 100644 --- a/x/spot/types/query.pb.go +++ b/x/spot/types/query.pb.go @@ -1519,100 +1519,100 @@ func init() { func init() { proto.RegisterFile("spot/v1/query.proto", fileDescriptor_2d81346ec2a640a1) } var fileDescriptor_2d81346ec2a640a1 = []byte{ - // 1480 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4f, 0x6f, 0xd4, 0xd6, - 0x17, 0x8d, 0x21, 0x84, 0xcc, 0x0d, 0x04, 0x78, 0x09, 0xf9, 0xe3, 0x90, 0x19, 0x78, 0xf0, 0x4b, - 0xa2, 0x20, 0xc6, 0x24, 0xf0, 0x6b, 0x4b, 0x69, 0x17, 0x0d, 0xa4, 0x34, 0xfd, 0x03, 0xe9, 0x50, - 0x55, 0x6a, 0xbb, 0x18, 0x39, 0x89, 0x35, 0xb8, 0xc4, 0x7e, 0x66, 0xfc, 0x1c, 0x12, 0x15, 0xa8, - 0xd4, 0x45, 0x25, 0x36, 0x15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 0x02, 0x07, 0x64, 0x0c, 0x71, 0x60, 0x40, 0x59, 0x30, 0x42, 0x3b, 0xad, 0x5a, 0xf2, 0x17, - 0x82, 0x7e, 0xba, 0x6b, 0x0c, 0x2e, 0x82, 0xfe, 0xc5, 0xef, 0xff, 0x7c, 0xb3, 0x6f, 0x94, 0x10, - 0x43, 0x05, 0x1b, 0x1b, 0xd6, 0x36, 0xfe, 0x64, 0x21, 0x0f, 0x00, 0xda, 0xb6, 0x9f, 0xcc, 0xa4, - 0x97, 0xeb, 0xfc, 0xc5, 0xa0, 0xcf, 0xe6, 0xc6, 0x21, 0x74, 0x45, 0x42, 0x4f, 0x92, 0xf1, 0x18, - 0xb4, 0x50, 0xc9, 0x55, 0x88, 0x16, 0xf4, 0x8b, 0x34, 0x72, 0x32, 0xb3, 0x62, 0x88, 0x79, 0xaa, - 0x4b, 0x04, 0xa2, 0x4d, 0x48, 0x34, 0x42, 0x8e, 0x76, 0xa2, 0x11, 0x1b, 0x0e, 0x48, 0x27, 0x4a, - 0xb2, 0xab, 0xb4, 0x34, 0xa5, 0xdd, 0x42, 0x10, 0x69, 0x52, 0x22, 0x8d, 0x90, 0x63, 0x9d, 0x48, - 0x3e, 0x79, 0xa8, 0x29, 0x49, 0x71, 0x8a, 0xd9, 0x92, 0xc6, 0x27, 0x39, 0x9b, 0x1b, 0x87, 0xd0, - 0xf3, 0x12, 0xfa, 0x0c, 0xa1, 0x09, 0x68, 0xe3, 0x33, 0xdc, 0xbf, 0xfb, 0xe1, 0x74, 0xb7, 0x60, - 0x30, 0x34, 0xea, 0xe4, 0x4c, 0x2a, 0x40, 0x87, 0xbf, 0xd7, 0xff, 0x97, 0x13, 0x85, 0x24, 0xa6, - 0x25, 0x89, 0x71, 0x72, 0x3c, 0x4a, 0xa2, 0xe5, 0xff, 0xc9, 0x57, 0x1a, 0x0c, 0xc7, 0xcd, 0x3c, - 0x99, 0x4f, 0x2d, 0x9c, 0xfa, 0x83, 0x40, 0x3f, 0x5b, 0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, 0xb3, - 0x8c, 0x6a, 0x86, 0xee, 0x99, 0xf6, 0xb0, 0xb0, 0xee, 0x9f, 0x32, 0xdb, 0xed, 0xaa, 0x7b, 0xd2, - 0x34, 0x91, 0x42, 0x5c, 0x72, 0x75, 0xef, 0xe2, 0xc6, 0x8a, 0xea, 0x9e, 0x24, 0xdf, 0xa9, 0x7b, - 0xc2, 0x24, 0x65, 0xe8, 0x9e, 0x65, 0xfb, 0x32, 0x74, 0xcf, 0xf4, 0x5e, 0x85, 0x75, 0xb7, 0xb6, - 0x6d, 0xde, 0x55, 0xf7, 0xa4, 0x01, 0x22, 0x85, 0xb8, 0xe4, 0xea, 0x9e, 0xed, 0xac, 0x0a, 0xeb, - 0x9e, 0x24, 0xcf, 0x02, 0xbe, 0x74, 0xf5, 0xc9, 0xb3, 0xb2, 0xf6, 0xf4, 0x59, 0x59, 0xfb, 0xfb, - 0x59, 0x59, 0x7b, 0xb4, 0x57, 0xee, 0x7b, 0xba, 0x57, 0xee, 0xfb, 0x63, 0xaf, 0xdc, 0xf7, 0xf1, - 0x7c, 0xc4, 0x44, 0x5e, 0x97, 0x95, 0xaf, 0xdc, 0x32, 0x6d, 0x37, 0x44, 0xd9, 0x36, 0xe4, 0x5f, - 0x81, 0xa5, 0x99, 0x5c, 0x1b, 0x90, 0x7f, 0xe4, 0xbd, 0xf0, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xe0, 0x21, 0x18, 0x81, 0xb5, 0x16, 0x00, 0x00, + // 1477 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x6f, 0xd4, 0x46, + 0x14, 0x8e, 0x21, 0x84, 0xec, 0x0b, 0x04, 0x98, 0x84, 0x10, 0x1c, 0xd8, 0xc0, 0x00, 0x49, 0x9a, + 0x88, 0xb5, 0x16, 0x68, 0x11, 0x6d, 0x39, 0x34, 0x90, 0xd2, 0x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 0xc5, 0x71, 0xd3, 0x97, + 0xe7, 0xb8, 0x76, 0x3d, 0x3a, 0x9a, 0xc2, 0x8e, 0xc6, 0x54, 0x47, 0xf1, 0x64, 0xda, 0x18, 0xe1, + 0x1d, 0x08, 0xfa, 0x29, 0xee, 0xde, 0x75, 0x8f, 0xf1, 0x95, 0xb6, 0xbd, 0x66, 0x15, 0x11, 0x25, + 0x27, 0x61, 0x94, 0xb3, 0x5b, 0x96, 0xdb, 0xb4, 0xdd, 0xe6, 0xba, 0xe5, 0x32, 0x47, 0xde, 0xce, + 0x4a, 0x63, 0x8f, 0x3c, 0x5d, 0x76, 0x2f, 0x8b, 0x33, 0x32, 0x03, 0xfb, 0x54, 0x14, 0x0b, 0x38, + 0x86, 0xed, 0x94, 0x61, 0x7b, 0xe5, 0xf1, 0xb5, 0x80, 0xcb, 0x38, 0x7a, 0x1e, 0xaf, 0x67, 0x0c, + 0x1f, 0x9b, 0x3e, 0x0a, 0x20, 0xee, 0x53, 0xd3, 0x13, 0xa7, 0x92, 0x43, 0xa5, 0x51, 0xf1, 0xc3, + 0x30, 0xfa, 0x93, 0x06, 0x47, 0x55, 0xe6, 0x5d, 0xd3, 0x5b, 0xda, 0x34, 0xd7, 0xf8, 0x6b, 0x0e, + 0x0b, 0x5c, 0xbe, 0xec, 0x16, 0x76, 0xf0, 0x0e, 0x0c, 0x87, 0x1d, 0xe0, 0x9b, 0xa5, 0x87, 0x94, + 0x87, 0x50, 0xca, 0x7d, 0xa1, 0x94, 0x2a, 0x91, 0x36, 0x76, 0x63, 0xbf, 0xa5, 0x5b, 0x6d, 0xe3, + 0xce, 0x67, 0x10, 0xc6, 0x96, 0x57, 0xa0, 0x12, 0x55, 0x2a, 0x66, 0x36, 0x99, 0x5c, 0xdb, 0x28, + 0x93, 0x36, 0x86, 0x43, 0x60, 0xfa, 0x8b, 0x96, 0x0d, 0x7a, 0x2d, 0xe0, 0x85, 0x32, 0x3d, 0x77, + 0x36, 0x19, 0xab, 0xb3, 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 0xd9, 0xca, 0x7c, 0x67, 0x4a, 0x2f, 0x4a, 0xf6, 0xe7, + 0xc9, 0x8b, 0xfd, 0xb3, 0x67, 0x01, 0x4f, 0x28, 0x9f, 0xf2, 0x74, 0x39, 0xca, 0xe7, 0x99, 0xd6, + 0x1c, 0xe5, 0x73, 0xad, 0x62, 0x79, 0xe5, 0x6f, 0x32, 0xdb, 0xed, 0xa9, 0x7c, 0xda, 0x41, 0x91, + 0x52, 0x64, 0x0a, 0x95, 0xef, 0x61, 0xcd, 0x4a, 0x2b, 0x9f, 0x66, 0xdf, 0xad, 0x7c, 0xca, 0x32, + 0xe5, 0x28, 0x9f, 0x67, 0x02, 0x73, 0x94, 0xcf, 0x75, 0x62, 0xe5, 0x95, 0xb7, 0x36, 0x6d, 0xde, + 0x53, 0xf9, 0xb4, 0x1f, 0x22, 0xa5, 0xc8, 0x14, 0x2a, 0x9f, 0x6f, 0xb4, 0xca, 0x2b, 0x9f, 0x66, + 0xcf, 0x02, 0xbe, 0x78, 0xf9, 0xd1, 0x93, 0xaa, 0xf6, 0xf8, 0x49, 0x55, 0xfb, 0xe7, 0x49, 0x55, + 0x7b, 0xf0, 0xb4, 0x3a, 0xf0, 0xf8, 0x69, 0x75, 0xe0, 0xcf, 0xa7, 0xd5, 0x81, 0x0f, 0xe7, 0x63, + 0xa6, 0xf2, 0xaa, 0x2c, 0x7d, 0xe9, 0x86, 0x69, 0xbb, 0x21, 0xcc, 0x26, 0x7e, 0x21, 0x09, 0x73, + 0xb9, 0x3a, 0x24, 0xff, 0xd3, 0xf7, 0xec, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xfa, 0x53, 0x8e, + 0xa4, 0xc5, 0x16, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/spot/types/query.pb.gw.go b/x/spot/types/query.pb.gw.go index a56e4d9c5..5f4e3743b 100644 --- a/x/spot/types/query.pb.gw.go +++ b/x/spot/types/query.pb.gw.go @@ -1496,37 +1496,37 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "dex", "params"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "spot", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_PoolNumber_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "dex", "pool_number"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_PoolNumber_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "spot", "pool_number"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Pool_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "dex", "pool"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Pool_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "spot", "pool"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Pools_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "dex", "pools"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Pools_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "spot", "pools"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_PoolParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"nibiru", "dex", "pools", "pool_id", "params"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_PoolParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"nibiru", "spot", "pools", "pool_id", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_NumPools_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "dex", "num_pools"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_NumPools_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "spot", "num_pools"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_TotalLiquidity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "dex", "total_liquidity"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_TotalLiquidity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "spot", "total_liquidity"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_TotalPoolLiquidity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"nibiru", "dex", "pools", "pool_id", "total_pool_liquidity"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_TotalPoolLiquidity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"nibiru", "spot", "pools", "pool_id", "total_pool_liquidity"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_TotalShares_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"nibiru", "dex", "pools", "pool_id", "total_shares"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_TotalShares_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"nibiru", "spot", "pools", "pool_id", "total_shares"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_SpotPrice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"nibiru", "dex", "pools", "pool_id", "prices"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_SpotPrice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"nibiru", "spot", "pools", "pool_id", "prices"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_EstimateSwapExactAmountIn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"nibiru", "dex", "pool_id", "estimate", "swap_exact_amount_in"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_EstimateSwapExactAmountIn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"nibiru", "spot", "pool_id", "estimate", "swap_exact_amount_in"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_EstimateSwapExactAmountOut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"nibiru", "dex", "pool_id", "estimate", "swap_exact_amount_out"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_EstimateSwapExactAmountOut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"nibiru", "spot", "pool_id", "estimate", "swap_exact_amount_out"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_EstimateJoinExactAmountIn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"nibiru", "dex", "pool_id", "estimate", "join_exact_amount_in"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_EstimateJoinExactAmountIn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"nibiru", "spot", "pool_id", "estimate", "join_exact_amount_in"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_EstimateJoinExactAmountOut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"nibiru", "dex", "pool_id", "estimate", "join_exact_amount_out"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_EstimateJoinExactAmountOut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"nibiru", "spot", "pool_id", "estimate", "join_exact_amount_out"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_EstimateExitExactAmountIn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"nibiru", "dex", "pool_id", "estimate", "exit_exact_amount_in"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_EstimateExitExactAmountIn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"nibiru", "spot", "pool_id", "estimate", "exit_exact_amount_in"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_EstimateExitExactAmountOut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"nibiru", "dex", "pool_id", "estimate", "exit_exact_amount_out"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_EstimateExitExactAmountOut_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"nibiru", "spot", "pool_id", "estimate", "exit_exact_amount_out"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/spot/types/tx.pb.go b/x/spot/types/tx.pb.go index 2f4dfa16b..33e6a1d51 100644 --- a/x/spot/types/tx.pb.go +++ b/x/spot/types/tx.pb.go @@ -499,60 +499,59 @@ func init() { func init() { proto.RegisterFile("spot/v1/tx.proto", fileDescriptor_7f826c866f00b65d) } var fileDescriptor_7f826c866f00b65d = []byte{ - // 833 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x8b, 0x23, 0x45, - 0x14, 0x9e, 0x9e, 0x84, 0xf9, 0x51, 0x61, 0x66, 0xb2, 0xb5, 0xe3, 0x6e, 0x6f, 0xbb, 0x26, 0xa1, - 0x44, 0x88, 0x0a, 0xdd, 0x26, 0xde, 0xc4, 0x83, 0xdb, 0x59, 0x0f, 0x23, 0xc4, 0x19, 0x3a, 0xe0, - 0x41, 0x84, 0x50, 0x49, 0x8a, 0x9e, 0x5a, 0xbb, 0xab, 0x9a, 0x54, 0x75, 0x36, 0x8b, 0x78, 0xf1, - 0xea, 0x45, 0xf0, 0xef, 0x11, 0x3c, 0xee, 0xcd, 0x05, 0x2f, 0x9e, 0x82, 0xcc, 0xf8, 0x17, 0x04, - 0xbc, 0x78, 0x92, 0xae, 0xaa, 0xee, 0xe9, 0xac, 0xcd, 0x04, 0x59, 0xe6, 0x56, 0x55, 0xef, 0xd5, - 0xfb, 0xde, 0xf7, 0xbd, 0xf7, 0xaa, 0x1b, 0x34, 0x45, 0xc2, 0xa5, 0xb7, 0xe8, 0x79, 0x72, 0xe9, - 0x26, 0x73, 0x2e, 0x39, 0x3c, 0x66, 0x74, 0x42, 0xe7, 0xa9, 0x9b, 0x19, 0xdc, 0x45, 0xcf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, 0x67, 0x8b, 0xec, 0x1f, 0x7e, 0xff, 0xeb, 0xe7, 0x5d, 0x88, 0x9a, 0x9e, 0x76, 0xf7, 0x66, - 0x64, 0xa9, 0x3e, 0x2f, 0x30, 0x01, 0x07, 0xc5, 0x5b, 0xf8, 0x76, 0x45, 0xb0, 0xdc, 0xe8, 0xbc, - 0x7b, 0x8b, 0xb1, 0xc0, 0x41, 0x0a, 0xe7, 0x31, 0x72, 0xca, 0x38, 0xdf, 0x99, 0x42, 0x7f, 0xef, - 0x3d, 0xe3, 0x94, 0x65, 0x88, 0xc5, 0xdc, 0x55, 0x21, 0xe6, 0xc6, 0x4a, 0xc4, 0xd7, 0x5b, 0x7e, - 0x1b, 0x22, 0x59, 0x52, 0x09, 0x17, 0x00, 0x94, 0xba, 0xb7, 0x4a, 0xd1, 0x1b, 0x73, 0xa5, 0xa2, - 0xff, 0xad, 0xff, 0x36, 0x5c, 0xf1, 0x1c, 0x27, 0xfe, 0xd3, 0x97, 0x57, 0x2d, 0xeb, 0xd5, 0x55, - 0xcb, 0xfa, 0xf3, 0xaa, 0x65, 0xfd, 0x74, 0xdd, 0xda, 0x79, 0x75, 0xdd, 0xda, 0xf9, 0xe3, 0xba, - 0xb5, 0xf3, 0xf5, 0x07, 0x21, 0x95, 0x97, 0xe9, 0xc4, 0x9d, 0xf2, 0xd8, 0xfb, 0x52, 0xdd, 0x1f, - 0x5c, 0x62, 0xca, 0xf2, 0x58, 0x4b, 0x4f, 0xfd, 0x02, 0xc8, 0x17, 0x09, 0x11, 0x93, 0x3d, 0xf5, - 0xb5, 0xfe, 0xf8, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xea, 0xe4, 0x34, 0x56, 0x39, 0x08, 0x00, - 0x00, + // 831 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcf, 0x8b, 0x23, 0x45, + 0x14, 0x9e, 0x9e, 0x84, 0xf9, 0x51, 0x61, 0x7e, 0xd5, 0x8c, 0xbb, 0x3d, 0xbd, 0x6e, 0x12, 0x6a, + 0x11, 0xa2, 0x42, 0xb7, 0x89, 0x37, 0xf1, 0xe0, 0x76, 0xd6, 0xc3, 0x08, 0x71, 0x86, 0x0e, 0x78, + 0x10, 0x21, 0x54, 0x92, 0xa2, 0xa7, 0xd6, 0xee, 0xaa, 0x36, 0x55, 0x3d, 0x93, 0x45, 0xbc, 0x78, + 0xf5, 0x22, 0xf8, 0xf7, 0x08, 0x1e, 0xf7, 0xb8, 0xb0, 0x17, 0x4f, 0x41, 0x66, 0xfc, 0x0b, 0x02, + 0x5e, 0x3c, 0x49, 0x57, 0x55, 0xf7, 0x74, 0xd6, 0x66, 0x82, 0xc8, 0xde, 0xba, 0xde, 0x7b, 0xf5, + 0xbd, 0xf7, 0x7d, 0xef, 0xbd, 0x6a, 0x70, 0x28, 0x12, 0x2e, 0xbd, 0xab, 0xae, 0x27, 0xe7, 0x6e, + 0x32, 0xe3, 0x92, 0xc3, 0x7d, 0x46, 0xc7, 0x74, 0x96, 0xba, 0x99, 0xc3, 0xbd, 0xea, 0x3a, 0x30, + 0x8f, 0x48, 0x38, 0x8f, 0x74, 0x8c, 0x73, 0x12, 0xf2, 0x90, 0xab, 0x4f, 0x2f, 0xfb, 0x32, 0xd6, + 0xe6, 0x84, 0x8b, 0x98, 0x0b, 0x6f, 0x8c, 0x05, 0xf1, 0xae, 0xba, 0x63, 0x22, 0x71, 0xd7, 0x9b, + 0x70, 0xca, 0x8c, 0xff, 0xdd, 0x90, 0xf3, 0x30, 0x22, 0x1e, 0x4e, 0xa8, 0x87, 0x19, 0xe3, 0x12, + 0x4b, 0xca, 0x99, 0xd0, 0x5e, 0xf4, 0x9b, 0x05, 0xf6, 0x06, 0x22, 0xec, 0xcf, 0x08, 0x96, 0xe4, + 0x82, 0xf3, 0x08, 0xda, 0x60, 0x7b, 0x92, 0x9d, 0xf8, 0xcc, 0xb6, 0xda, 0x56, 0x67, 0x37, 0xc8, + 0x8f, 0x70, 0x08, 0x1a, 0x59, 0x35, 0xa3, 0x04, 0xcf, 0x70, 0x2c, 0xec, 0xcd, 0xb6, 0xd5, 0x69, + 0xf4, 0x1c, 0x77, 0xb5, 0x72, 0x37, 0x03, 0xb9, 0x50, 0x11, 0xfe, 0x83, 0xe5, 0xa2, 0x05, 0x5f, + 0xe0, 0x38, 0xfa, 0x04, 0x95, 0x2e, 0xa2, 0x00, 0x24, 0x45, 0x0c, 0xfc, 0xcc, 0x80, 0x62, 0x21, + 0x88, 0x14, 0x76, 0xad, 0x5d, 0xeb, 0x34, 0x7a, 0xa7, 0x55, 0xa0, 0x4f, 0xb3, 0x08, 0xbf, 0xfe, + 0x72, 0xd1, 0xda, 0xd0, 0x08, 0xca, 0x20, 0xd0, 0x47, 0xe0, 0x9d, 0x15, 0x06, 0x01, 0x11, 0x09, + 0x67, 0x82, 0xc0, 0x87, 0x60, 0x5b, 0x41, 0xd3, 0xa9, 0x62, 0x52, 0x0f, 0xb6, 0xb2, 0xe3, 0xd9, + 0x14, 0xfd, 0x65, 0x81, 0xc6, 0x40, 0x84, 0x5f, 0x70, 0xca, 0x14, 0xe5, 0xf7, 0xc1, 0x96, 0x20, + 0x6c, 0x4a, 0x0c, 0x63, 0xff, 0x68, 0xb9, 0x68, 0xed, 0xe9, 0xba, 0xb5, 0x1d, 0x05, 0x26, 0x00, + 0x7e, 0x78, 0x87, 0x99, 0xf1, 0xaf, 0xfb, 0x70, 0xb9, 0x68, 0xed, 0x97, 0x38, 0xd2, 0x29, 0xca, + 0xf3, 0xc0, 0x0b, 0xb0, 0x2b, 0xf9, 0xb7, 0x84, 0x89, 0x11, 0x65, 0x05, 0x33, 0xdd, 0x2e, 0x37, + 0x6b, 0x97, 0x6b, 0xda, 0xe5, 0xf6, 0x39, 0x65, 0xbe, 0x9d, 0x31, 0x5b, 0x2e, 0x5a, 0x87, 0x1a, + 0xad, 0xb8, 0x89, 0x82, 0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xf7, 0x08, 0xac, 0x4d, 0x2c, 0xae, 0x71, 0xe2, 0x3f, 0x7b, 0x79, 0xd3, 0xb4, 0x5e, 0xdd, + 0x34, 0xad, 0x3f, 0x6e, 0x9a, 0xd6, 0xcf, 0xb7, 0xcd, 0x8d, 0x57, 0xb7, 0xcd, 0x8d, 0xdf, 0x6f, + 0x9b, 0x1b, 0x5f, 0x7f, 0x10, 0x52, 0x79, 0x99, 0x8e, 0xdd, 0x09, 0x8f, 0xbd, 0x2f, 0x15, 0x40, + 0xff, 0x12, 0x53, 0x96, 0x83, 0xcd, 0x35, 0x9c, 0x7c, 0x91, 0x10, 0x31, 0xde, 0x52, 0x7f, 0xec, + 0x8f, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x96, 0xbf, 0xe1, 0x57, 0x3d, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/spot/types/tx.pb.gw.go b/x/spot/types/tx.pb.gw.go index 8d70b4315..bb7f76399 100644 --- a/x/spot/types/tx.pb.gw.go +++ b/x/spot/types/tx.pb.gw.go @@ -494,13 +494,13 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client } var ( - pattern_Msg_CreatePool_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "dex", "pool"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Msg_CreatePool_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"nibiru", "spot", "pool"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Msg_JoinPool_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"nibiru", "dex", "pool_id", "join"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Msg_JoinPool_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"nibiru", "spot", "pool_id", "join"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Msg_ExitPool_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"nibiru", "dex", "pool_id", "exit"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Msg_ExitPool_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"nibiru", "spot", "pool_id", "exit"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Msg_SwapAssets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"nibiru", "dex", "pool_id", "swap"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Msg_SwapAssets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"nibiru", "spot", "pool_id", "swap"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( From 824310b4ed7f374039f9aeaeda9428faa7cc09a0 Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Sat, 4 Feb 2023 10:49:31 -0500 Subject: [PATCH 5/6] refactor(spot): remove remaining x/dex files --- x/dex/genesis_test.go | 28 --- x/dex/keeper/liquidity_test.go | 125 ---------- x/dex/keeper/params_test.go | 20 -- x/dex/keeper/swap_test.go | 401 -------------------------------- x/spot/keeper/liquidity_test.go | 6 +- 5 files changed, 3 insertions(+), 577 deletions(-) delete mode 100644 x/dex/genesis_test.go delete mode 100644 x/dex/keeper/liquidity_test.go delete mode 100644 x/dex/keeper/params_test.go delete mode 100644 x/dex/keeper/swap_test.go diff --git a/x/dex/genesis_test.go b/x/dex/genesis_test.go deleted file mode 100644 index 73dd37cbf..000000000 --- a/x/dex/genesis_test.go +++ /dev/null @@ -1,28 +0,0 @@ -package spot_test - -import ( - "testing" - - "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/spot" - "github.com/NibiruChain/nibiru/x/spot/types" -) - -func TestGenesis(t *testing.T) { - genesisState := types.GenesisState{ - Params: types.DefaultParams(), - } - - app, ctx := testapp.NewTestNibiruAppAndContext(true) - spot.InitGenesis(ctx, app.SpotKeeper, genesisState) - got := spot.ExportGenesis(ctx, app.SpotKeeper) - require.NotNil(t, got) - - testutil.Fill(&genesisState) - testutil.Fill(got) - - require.Equal(t, genesisState, *got) -} diff --git a/x/dex/keeper/liquidity_test.go b/x/dex/keeper/liquidity_test.go deleted file mode 100644 index db2cbb8d1..000000000 --- a/x/dex/keeper/liquidity_test.go +++ /dev/null @@ -1,125 +0,0 @@ -package keeper_test - -import ( - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/spot/keeper" -) - -func TestGetSetDenomLiquidity(t *testing.T) { - app, ctx := testapp.NewTestNibiruAppAndContext(true) - - // Write to store - coin := sdk.NewCoin("nibi", sdk.NewInt(1_000)) - assert.NoError(t, app.SpotKeeper.SetDenomLiquidity(ctx, coin.Denom, coin.Amount)) - - // Read from store - amount, err := app.SpotKeeper.GetDenomLiquidity(ctx, "nibi") - assert.NoError(t, err) - require.EqualValues(t, sdk.NewInt(1000), amount) -} - -func TestGetTotalLiquidity(t *testing.T) { - app, ctx := testapp.NewTestNibiruAppAndContext(true) - - // Write to store - coinMap := map[string]sdk.Int{ - "atom": sdk.NewInt(123), - "nibi": sdk.NewInt(456), - "foo": sdk.NewInt(789), - } - for denom, amount := range coinMap { - coin := sdk.NewCoin(denom, amount) - assert.NoError(t, app.SpotKeeper.SetDenomLiquidity(ctx, coin.Denom, coin.Amount)) - } - - // Read from store - coins := app.SpotKeeper.GetTotalLiquidity(ctx) - - require.EqualValues(t, sdk.NewCoins( - sdk.NewCoin("atom", coinMap["atom"]), - sdk.NewCoin("nibi", coinMap["nibi"]), - sdk.NewCoin("foo", coinMap["foo"]), - ), coins) -} - -// assertLiqValues checks if the total liquidity for each denom (key) of the -// expected map matches what's given by the SpotKeeper -func assertLiqValues( - t *testing.T, - ctx sdk.Context, - spotKeeper keeper.Keeper, - expected map[string]sdk.Int, -) { - for denom, expectedLiq := range expected { - liq, err := spotKeeper.GetDenomLiquidity(ctx, denom) - assert.NoError(t, err) - assert.EqualValues(t, liq, expectedLiq) - } -} - -func TestSetTotalLiquidity(t *testing.T) { - app, ctx := testapp.NewTestNibiruAppAndContext(true) - - // Write to store - assert.NoError(t, app.SpotKeeper.SetTotalLiquidity(ctx, sdk.NewCoins( - sdk.NewCoin("atom", sdk.NewInt(123)), - sdk.NewCoin("nibi", sdk.NewInt(456)), - sdk.NewCoin("foo", sdk.NewInt(789)), - ))) - - // Read from store - expectedLiqValues := map[string]sdk.Int{ - "atom": sdk.NewInt(123), - "nibi": sdk.NewInt(456), - "foo": sdk.NewInt(789), - } - assertLiqValues(t, ctx, app.SpotKeeper, expectedLiqValues) -} - -func TestRecordTotalLiquidityIncrease(t *testing.T) { - app, ctx := testapp.NewTestNibiruAppAndContext(true) - - // Write to store - assert.NoError(t, app.SpotKeeper.SetTotalLiquidity(ctx, sdk.NewCoins( - sdk.NewCoin("atom", sdk.NewInt(100)), - sdk.NewCoin("nibi", sdk.NewInt(200)), - ))) - err := app.SpotKeeper.RecordTotalLiquidityIncrease(ctx, sdk.NewCoins( - sdk.NewCoin("atom", sdk.NewInt(50)), - sdk.NewCoin("nibi", sdk.NewInt(75)), - )) - assert.NoError(t, err) - - expectedLiqValues := map[string]sdk.Int{ - "atom": sdk.NewInt(150), - "nibi": sdk.NewInt(275), - } - assertLiqValues(t, ctx, app.SpotKeeper, expectedLiqValues) -} - -func TestRecordTotalLiquidityDecrease(t *testing.T) { - app, ctx := testapp.NewTestNibiruAppAndContext(true) - - // Write to store - assert.NoError(t, app.SpotKeeper.SetTotalLiquidity(ctx, sdk.NewCoins( - sdk.NewCoin("atom", sdk.NewInt(100)), - sdk.NewCoin("nibi", sdk.NewInt(200)), - ))) - err := app.SpotKeeper.RecordTotalLiquidityDecrease(ctx, sdk.NewCoins( - sdk.NewCoin("atom", sdk.NewInt(50)), - sdk.NewCoin("nibi", sdk.NewInt(75)), - )) - assert.NoError(t, err) - - expectedLiqValues := map[string]sdk.Int{ - "atom": sdk.NewInt(50), - "nibi": sdk.NewInt(125), - } - assertLiqValues(t, ctx, app.SpotKeeper, expectedLiqValues) -} diff --git a/x/dex/keeper/params_test.go b/x/dex/keeper/params_test.go deleted file mode 100644 index 842575c19..000000000 --- a/x/dex/keeper/params_test.go +++ /dev/null @@ -1,20 +0,0 @@ -package keeper_test - -import ( - "testing" - - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - - "github.com/stretchr/testify/require" - - "github.com/NibiruChain/nibiru/x/spot/types" -) - -func TestGetParams(t *testing.T) { - app, ctx := testapp.NewTestNibiruAppAndContext(true) - - params := types.DefaultParams() - app.SpotKeeper.SetParams(ctx, params) - - require.EqualValues(t, params, app.SpotKeeper.GetParams(ctx)) -} diff --git a/x/dex/keeper/swap_test.go b/x/dex/keeper/swap_test.go deleted file mode 100644 index 1b859680e..000000000 --- a/x/dex/keeper/swap_test.go +++ /dev/null @@ -1,401 +0,0 @@ -package keeper_test - -import ( - "fmt" - "testing" - - "github.com/NibiruChain/nibiru/x/common/denoms" - "github.com/NibiruChain/nibiru/x/common/testutil" - - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - - "github.com/cosmos/cosmos-sdk/simapp" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/stretchr/testify/require" - - "github.com/NibiruChain/nibiru/x/common/testutil/mock" - "github.com/NibiruChain/nibiru/x/spot/types" -) - -func TestSwapExactAmountIn(t *testing.T) { - tests := []struct { - name string - - // test setup - userInitialFunds sdk.Coins - initialPool types.Pool - tokenIn sdk.Coin - tokenOutDenom string - - // expected results - expectedError error - expectedTokenOut sdk.Coin - expectedUserFinalFunds sdk.Coins - expectedFinalPool types.Pool - }{ - { - name: "testnet 2 BUG, should not panic", - userInitialFunds: sdk.NewCoins( - sdk.NewInt64Coin("unibi", 236534500), - sdk.NewInt64Coin("unusd", 1700000000), - sdk.NewInt64Coin("uusdt", 701785070), - ), - initialPool: types.Pool{ - Id: 1, - PoolParams: types.PoolParams{ - SwapFee: sdk.MustNewDecFromStr("0.01"), - ExitFee: sdk.MustNewDecFromStr("0.01"), - PoolType: types.PoolType_STABLESWAP, - A: sdk.NewInt(10), - }, - PoolAssets: []types.PoolAsset{ - {Token: sdk.NewInt64Coin("unusd", 1_510_778_598), - Weight: sdk.NewInt(1)}, - {Token: sdk.NewInt64Coin("uusdt", 7_712_056), - Weight: sdk.NewInt(1)}, - }, - TotalWeight: sdk.NewInt(2), - TotalShares: sdk.NewInt64Coin("nibiru/pool/1", 100), - }, - tokenIn: sdk.NewInt64Coin("unusd", 1_500_000_000), - tokenOutDenom: "uusdt", - expectedTokenOut: sdk.NewInt64Coin("uusdt", 6_670_336), - expectedUserFinalFunds: sdk.NewCoins( - sdk.NewInt64Coin("unibi", 236_534_500), - sdk.NewInt64Coin("unusd", 200_000_000), - sdk.NewInt64Coin("uusdt", 708_455_406), - ), - expectedFinalPool: types.Pool{ - Id: 1, - PoolParams: types.PoolParams{ - SwapFee: sdk.MustNewDecFromStr("0.01"), - ExitFee: sdk.MustNewDecFromStr("0.01"), - PoolType: types.PoolType_STABLESWAP, - A: sdk.NewInt(10), - }, - PoolAssets: []types.PoolAsset{ - {Token: sdk.NewInt64Coin("unusd", 3_010_778_598), - Weight: sdk.NewInt(1)}, - {Token: sdk.NewInt64Coin("uusdt", 1_041_720), - Weight: sdk.NewInt(1)}, - }, - TotalWeight: sdk.NewInt(2), - TotalShares: sdk.NewInt64Coin("nibiru/pool/1", 100), - }, - expectedError: nil, - }, - { - name: "regular stableswap", - userInitialFunds: sdk.NewCoins( - sdk.NewInt64Coin(denoms.USDC, 10), - ), - initialPool: mock.SpotStablePool( - /*poolId=*/ 1, - /*assets=*/ sdk.NewCoins( - sdk.NewInt64Coin(denoms.USDC, 100), - sdk.NewInt64Coin(denoms.NUSD, 100), - ), - /*shares=*/ 100, - ), - tokenIn: sdk.NewInt64Coin(denoms.USDC, 10), - tokenOutDenom: denoms.NUSD, - expectedTokenOut: sdk.NewInt64Coin(denoms.NUSD, 10), - expectedUserFinalFunds: sdk.NewCoins( - sdk.NewInt64Coin(denoms.NUSD, 10), - ), - expectedFinalPool: mock.SpotStablePool( - /*poolId=*/ 1, - /*assets=*/ sdk.NewCoins( - sdk.NewInt64Coin(denoms.USDC, 110), - sdk.NewInt64Coin(denoms.NUSD, 90), - ), - /*shares=*/ 100, - ), - expectedError: nil, - }, - { - name: "regular swap", - userInitialFunds: sdk.NewCoins( - sdk.NewInt64Coin("unibi", 100), - ), - initialPool: mock.SpotPool( - /*poolId=*/ 1, - /*assets=*/ sdk.NewCoins( - sdk.NewInt64Coin("unibi", 100), - sdk.NewInt64Coin(denoms.NUSD, 100), - ), - /*shares=*/ 100, - ), - tokenIn: sdk.NewInt64Coin("unibi", 100), - tokenOutDenom: denoms.NUSD, - expectedTokenOut: sdk.NewInt64Coin(denoms.NUSD, 50), - expectedUserFinalFunds: sdk.NewCoins( - sdk.NewInt64Coin(denoms.NUSD, 50), - ), - expectedFinalPool: mock.SpotPool( - /*poolId=*/ 1, - /*assets=*/ sdk.NewCoins( - sdk.NewInt64Coin("unibi", 200), - sdk.NewInt64Coin(denoms.NUSD, 50), - ), - /*shares=*/ 100, - ), - expectedError: nil, - }, - { - name: "not enough user funds", - userInitialFunds: sdk.NewCoins( - sdk.NewInt64Coin("unibi", 1), - ), - initialPool: mock.SpotPool( - /*poolId=*/ 1, - /*assets=*/ sdk.NewCoins( - sdk.NewInt64Coin("unibi", 100), - sdk.NewInt64Coin(denoms.NUSD, 100), - ), - /*shares=*/ 100, - ), - tokenIn: sdk.NewInt64Coin("unibi", 100), - tokenOutDenom: denoms.NUSD, - expectedUserFinalFunds: sdk.NewCoins( - sdk.NewInt64Coin("unibi", 1), - ), - expectedFinalPool: mock.SpotPool( - /*poolId=*/ 1, - /*assets=*/ sdk.NewCoins( - sdk.NewInt64Coin("unibi", 100), - sdk.NewInt64Coin(denoms.NUSD, 100), - ), - /*shares=*/ 100, - ), - expectedError: sdkerrors.ErrInsufficientFunds, - }, - { - name: "invalid token in denom", - userInitialFunds: sdk.NewCoins( - sdk.NewInt64Coin("foo", 100), - ), - initialPool: mock.SpotPool( - /*poolId=*/ 1, - /*assets=*/ sdk.NewCoins( - sdk.NewInt64Coin("unibi", 100), - sdk.NewInt64Coin(denoms.NUSD, 100), - ), - /*shares=*/ 100, - ), - tokenIn: sdk.NewInt64Coin("foo", 100), - tokenOutDenom: denoms.NUSD, - expectedUserFinalFunds: sdk.NewCoins( - sdk.NewInt64Coin("foo", 100), - ), - expectedFinalPool: mock.SpotPool( - /*poolId=*/ 1, - /*assets=*/ sdk.NewCoins( - sdk.NewInt64Coin("unibi", 100), - sdk.NewInt64Coin(denoms.NUSD, 100), - ), - /*shares=*/ 100, - ), - expectedError: types.ErrTokenDenomNotFound, - }, - { - name: "invalid token out denom", - userInitialFunds: sdk.NewCoins( - sdk.NewInt64Coin("unibi", 100), - ), - initialPool: mock.SpotPool( - /*poolId=*/ 1, - /*assets=*/ sdk.NewCoins( - sdk.NewInt64Coin("unibi", 100), - sdk.NewInt64Coin(denoms.NUSD, 100), - ), - /*shares=*/ 100, - ), - tokenIn: sdk.NewInt64Coin("unibi", 100), - tokenOutDenom: "foo", - expectedUserFinalFunds: sdk.NewCoins( - sdk.NewInt64Coin("unibi", 100), - ), - expectedFinalPool: mock.SpotPool( - /*poolId=*/ 1, - /*assets=*/ sdk.NewCoins( - sdk.NewInt64Coin("unibi", 100), - sdk.NewInt64Coin(denoms.NUSD, 100), - ), - /*shares=*/ 100, - ), - expectedError: types.ErrTokenDenomNotFound, - }, - { - name: "same token in and token out denom", - userInitialFunds: sdk.NewCoins( - sdk.NewInt64Coin("unibi", 100), - ), - initialPool: mock.SpotPool( - /*poolId=*/ 1, - /*assets=*/ sdk.NewCoins( - sdk.NewInt64Coin("unibi", 100), - sdk.NewInt64Coin(denoms.NUSD, 100), - ), - /*shares=*/ 100, - ), - tokenIn: sdk.NewInt64Coin("unibi", 100), - tokenOutDenom: "unibi", - expectedUserFinalFunds: sdk.NewCoins( - sdk.NewInt64Coin("unibi", 100), - ), - expectedFinalPool: mock.SpotPool( - /*poolId=*/ 1, - /*assets=*/ sdk.NewCoins( - sdk.NewInt64Coin("unibi", 100), - sdk.NewInt64Coin(denoms.NUSD, 100), - ), - /*shares=*/ 100, - ), - expectedError: types.ErrSameTokenDenom, - }, - } - - for _, tc := range tests { - tc := tc - t.Run(tc.name, func(t *testing.T) { - app, ctx := testapp.NewTestNibiruAppAndContext(true) - - // fund pool account - poolAddr := testutil.AccAddress() - tc.initialPool.Address = poolAddr.String() - tc.expectedFinalPool.Address = poolAddr.String() - require.NoError(t, - simapp.FundAccount( - app.BankKeeper, - ctx, - poolAddr, - tc.initialPool.PoolBalances(), - ), - ) - app.SpotKeeper.SetPool(ctx, tc.initialPool) - - // fund user account - sender := testutil.AccAddress() - require.NoError(t, simapp.FundAccount(app.BankKeeper, ctx, sender, tc.userInitialFunds)) - - // swap assets - tokenOut, err := app.SpotKeeper.SwapExactAmountIn(ctx, sender, tc.initialPool.Id, tc.tokenIn, tc.tokenOutDenom) - - if tc.expectedError != nil { - require.ErrorIs(t, err, tc.expectedError) - } else { - require.NoError(t, err) - require.Equal(t, tc.expectedTokenOut, tokenOut) - } - - // check user's final funds - require.Equal(t, - tc.expectedUserFinalFunds, - app.BankKeeper.GetAllBalances(ctx, sender), - ) - - // check final pool state - finalPool, err := app.SpotKeeper.FetchPool(ctx, tc.initialPool.Id) - require.NoError(t, err) - require.Equal(t, tc.expectedFinalPool, finalPool) - }) - } -} - -func TestDoubleSwapExactAmountIn(t *testing.T) { - tests := []struct { - name string - - // test setup - userInitialFunds sdk.Coins - initialPool types.Pool - tokenIns []sdk.Coin - tokenOutDenoms []string - - // expected results - expectedTokenOuts []sdk.Coin - expectedUserFinalFunds sdk.Coins - expectedFinalPool types.Pool - }{ - { - name: "double stableswap", - userInitialFunds: sdk.NewCoins( - sdk.NewInt64Coin(denoms.USDC, 10_000), - ), - initialPool: mock.SpotStablePool( - /*poolId=*/ 1, - /*assets=*/ sdk.NewCoins( - sdk.NewInt64Coin(denoms.USDC, 100_000_000), - sdk.NewInt64Coin(denoms.NUSD, 100_000_000), - ), - /*shares=*/ 100, - ), - tokenIns: []sdk.Coin{sdk.NewInt64Coin(denoms.USDC, 10_000), sdk.NewInt64Coin("unusd", 10_000)}, - tokenOutDenoms: []string{denoms.NUSD, denoms.USDC}, - expectedTokenOuts: []sdk.Coin{sdk.NewInt64Coin(denoms.NUSD, 10_000), sdk.NewInt64Coin(denoms.USDC, 10_001)}, - expectedUserFinalFunds: sdk.NewCoins( - sdk.NewInt64Coin(denoms.USDC, 10_001), // TODO: fix https://github.com/NibiruChain/nibiru/issues/1152 - ), - expectedFinalPool: mock.SpotStablePool( - /*poolId=*/ 1, - /*assets=*/ sdk.NewCoins( - sdk.NewInt64Coin(denoms.USDC, 99_999_999), - sdk.NewInt64Coin(denoms.NUSD, 100_000_000), - ), - /*shares=*/ 100, - ), - }, - } - - for _, tc := range tests { - tc := tc - t.Run(tc.name, func(t *testing.T) { - app, ctx := testapp.NewTestNibiruAppAndContext(true) - - // fund pool account - poolAddr := testutil.AccAddress() - tc.initialPool.Address = poolAddr.String() - tc.expectedFinalPool.Address = poolAddr.String() - require.NoError(t, - simapp.FundAccount( - app.BankKeeper, - ctx, - poolAddr, - tc.initialPool.PoolBalances(), - ), - ) - app.SpotKeeper.SetPool(ctx, tc.initialPool) - - // fund user account - sender := testutil.AccAddress() - require.NoError(t, simapp.FundAccount(app.BankKeeper, ctx, sender, tc.userInitialFunds)) - - // swap assets - for i, tokenIn := range tc.tokenIns { - tokenOut, err := app.SpotKeeper.SwapExactAmountIn(ctx, sender, tc.initialPool.Id, tokenIn, tc.tokenOutDenoms[i]) - require.NoError(t, err) - - fmt.Println("-------------", i) - finalPool, err := app.SpotKeeper.FetchPool(ctx, tc.initialPool.Id) - require.NoError(t, err) - fmt.Println(finalPool.PoolAssets) - - require.NoError(t, err) - require.Equal(t, tc.expectedTokenOuts[i], tokenOut) - } - - // check user's final funds - require.Equal(t, - tc.expectedUserFinalFunds, - app.BankKeeper.GetAllBalances(ctx, sender), - ) - - // check final pool state - finalPool, err := app.SpotKeeper.FetchPool(ctx, tc.initialPool.Id) - require.NoError(t, err) - require.Equal(t, tc.expectedFinalPool, finalPool) - }) - } -} diff --git a/x/spot/keeper/liquidity_test.go b/x/spot/keeper/liquidity_test.go index 461966bf1..db2cbb8d1 100644 --- a/x/spot/keeper/liquidity_test.go +++ b/x/spot/keeper/liquidity_test.go @@ -3,12 +3,12 @@ package keeper_test import ( "testing" - "github.com/NibiruChain/nibiru/x/common/testutil/testapp" - "github.com/NibiruChain/nibiru/x/spot/keeper" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/NibiruChain/nibiru/x/common/testutil/testapp" + "github.com/NibiruChain/nibiru/x/spot/keeper" ) func TestGetSetDenomLiquidity(t *testing.T) { From 8c820db5095caebe634381a23ff771a6997a7572 Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Sat, 4 Feb 2023 10:53:19 -0500 Subject: [PATCH 6/6] chore: update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8aaa2317..bc1709c5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#1171](https://github.com/NibiruChain/nibiru/pull/1171) - refactor(asset)!: Replace `common.AssetPair` with `asset.Pair`. * [#1164](https://github.com/NibiruChain/nibiru/pull/1164) - refactor: remove client interface for liquidate msg * [#1173](https://github.com/NibiruChain/nibiru/pull/1173) - refactor(spot)!: replace `x/dex` module with `x/spot`. +* [#1176](https://github.com/NibiruChain/nibiru/pull/1176) - refactor(spot)!: replace `x/dex` module with `x/spot`. ### State Machine Breaking