Skip to content

Commit

Permalink
fix: unwire spot module for main branch (#1831)
Browse files Browse the repository at this point in the history
* feat: rest in peace

* fix: fix e2e wasm test

* fix: fix justfile and deplyo-wasm

* fix: update localnet

* feat: rest in peace

* fix(localnet.sh): change order of operations in genesis config

* fix(localnet.sh): change order of operations in genesis config

* rm unused file

---------

Co-authored-by: Unique-Divine <[email protected]>
Co-authored-by: Unique Divine <[email protected]>
  • Loading branch information
3 people authored Apr 21, 2024
1 parent da22964 commit 3036618
Show file tree
Hide file tree
Showing 72 changed files with 3 additions and 28,194 deletions.
15 changes: 0 additions & 15 deletions app/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ import (
oraclekeeper "github.com/NibiruChain/nibiru/x/oracle/keeper"
oracletypes "github.com/NibiruChain/nibiru/x/oracle/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/sudo"
"github.com/NibiruChain/nibiru/x/sudo/keeper"
sudotypes "github.com/NibiruChain/nibiru/x/sudo/types"
Expand Down Expand Up @@ -169,7 +165,6 @@ type AppKeepers struct {
// Nibiru keepers
// ---------------
EpochsKeeper epochskeeper.Keeper
SpotKeeper spotkeeper.Keeper
OracleKeeper oraclekeeper.Keeper
InflationKeeper inflationkeeper.Keeper
SudoKeeper keeper.Keeper
Expand Down Expand Up @@ -208,7 +203,6 @@ func initStoreKeys() (
ibcexported.StoreKey,

// nibiru x/ keys
spottypes.StoreKey,
oracletypes.StoreKey,
epochstypes.StoreKey,
inflationtypes.StoreKey,
Expand Down Expand Up @@ -348,10 +342,6 @@ func (app *NibiruApp) InitKeepers(

// ---------------------------------- Nibiru Chain x/ keepers

app.SpotKeeper = spotkeeper.NewKeeper(
appCodec, keys[spottypes.StoreKey], app.GetSubspace(spottypes.ModuleName),
app.AccountKeeper, app.BankKeeper, app.DistrKeeper)

app.SudoKeeper = keeper.NewKeeper(
appCodec, keys[sudotypes.StoreKey],
)
Expand Down Expand Up @@ -578,7 +568,6 @@ func (app *NibiruApp) initAppModules(
authzmodule.NewAppModule(appCodec, app.authzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),

// Nibiru modules
spot.NewAppModule(appCodec, app.SpotKeeper, app.AccountKeeper, app.BankKeeper),
oracle.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper),
epochs.NewAppModule(appCodec, app.EpochsKeeper),
inflation.NewAppModule(app.InflationKeeper, app.AccountKeeper, *app.stakingKeeper),
Expand Down Expand Up @@ -649,7 +638,6 @@ func orderedModuleNames() []string {
// --------------------------------------------------------------------
// Native x/ Modules
epochstypes.ModuleName,
spottypes.ModuleName,
oracletypes.ModuleName,
inflationtypes.ModuleName,
sudotypes.ModuleName,
Expand Down Expand Up @@ -762,7 +750,6 @@ func ModuleBasicManager() module.BasicManager {
ibctransfer.AppModuleBasic{},
ibctm.AppModuleBasic{},
// native x/
spot.AppModuleBasic{},
oracle.AppModuleBasic{},
epochs.AppModuleBasic{},
inflation.AppModuleBasic{},
Expand All @@ -783,7 +770,6 @@ func ModuleAccPerms() map[string][]string {
stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking},
stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking},
govtypes.ModuleName: {authtypes.Burner},
spottypes.ModuleName: {authtypes.Minter, authtypes.Burner},
oracletypes.ModuleName: {},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibcfeetypes.ModuleName: {},
Expand All @@ -810,7 +796,6 @@ func initParamsKeeper(
paramsKeeper.Subspace(govtypes.ModuleName)
paramsKeeper.Subspace(crisistypes.ModuleName)
// Nibiru core params keepers | x/
paramsKeeper.Subspace(spottypes.ModuleName)
paramsKeeper.Subspace(epochstypes.ModuleName)
paramsKeeper.Subspace(inflationtypes.ModuleName)
// ibc params keepers
Expand Down
12 changes: 2 additions & 10 deletions contrib/scripts/localnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ console_log_text_color() {
}

if [ console_log_text_color ]; then
echo "successfully toggled console coloring"
echo "succesfully toggled console coloring"
else
# For Ubuntu and Debian. MacOS has tput by default.
apt-get install libncurses5-dbg -y
Expand Down Expand Up @@ -58,8 +58,6 @@ echo_info "Parsing flags for the script..."
# behavior of the script is to run make install if the flag --no-build is not present.
FLAG_NO_BUILD=false

# $FLAG_SPOT: Feature flag for x/spot. Enabled with `--features spot`.
FLAG_SPOT=false

build_from_source() {
echo_info "Building from source..."
Expand Down Expand Up @@ -97,14 +95,14 @@ while [[ $# -gt 0 ]]; do
esac
done


# Check if FLAG_NO_BUILD was set to true
if ! $FLAG_NO_BUILD; then
build_from_source
fi

echo_info "Features flags:"
echo "FLAG_NO_BUILD: $FLAG_NO_BUILD"
echo "FLAG_SPOT: $FLAG_SPOT"

SEDOPTION=""
if [[ "$OSTYPE" == "darwin"* ]]; then
Expand Down Expand Up @@ -188,10 +186,6 @@ add_genesis_param() {

echo_info "Configuring genesis params"

# if $FLAG_SPOT; then
# # Perform any actions specific to the x/spot feature
# fi

# set validator as sudoer
add_genesis_param '.app_state.sudo.sudoers.root = "'"$val_address"'"'

Expand All @@ -203,8 +197,6 @@ add_genesis_param '.app_state.oracle.exchange_rates[0].exchange_rate = "'"$price
add_genesis_param '.app_state.oracle.exchange_rates[1].pair = "ueth:uuusd"'
add_genesis_param '.app_state.oracle.exchange_rates[1].exchange_rate = "'"$price_eth"'"'

add_genesis_param '.app_state.inflation.params.inflation_enabled = false'

# ------------------------------------------------------------------------
# Gentx
# ------------------------------------------------------------------------
Expand Down
238 changes: 0 additions & 238 deletions contrib/scripts/testing/stableswap_model.py

This file was deleted.

2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ lint:
golangci-lint run --allow-parallel-runners --fix

# Runs a Nibiru local network. Ex: "just localnet --features spot"
# Runs a Nibiru local network. Ex: "just localnet", "just localnet --features featureA"
localnet *PASS_FLAGS:
make localnet FLAGS="{{PASS_FLAGS}}"

Expand Down
Loading

0 comments on commit 3036618

Please sign in to comment.