Skip to content

Commit

Permalink
refactor(app)!: Remove x/stablecoin module (#1609)
Browse files Browse the repository at this point in the history
* refactor: rm x/stablecoin

* changelog

* change log number
  • Loading branch information
Unique-Divine authored Sep 29, 2023
1 parent 6e534c9 commit 99a7a0f
Show file tree
Hide file tree
Showing 52 changed files with 11 additions and 13,755 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Features

* [#xxx](https://github.com/NibiruChain/nibiru/pull/xxx) - epic(tokenfactory):
State transitions, collections, genesis import and export, and app wiring

### State Breaking

* [#1609](https://github.com/NibiruChain/nibiru/pull/1609) - refactor(app)!: Remove x/stablecoin module.

## [v0.21.10]

### Features
Expand Down
18 changes: 5 additions & 13 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ import (
"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"
"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 @@ -168,7 +165,6 @@ var (
spot.AppModuleBasic{},
oracle.AppModuleBasic{},
epochs.AppModuleBasic{},
stablecoin.AppModuleBasic{},
perpv2.AppModuleBasic{},
inflation.AppModuleBasic{},
sudo.AppModuleBasic{},
Expand All @@ -191,19 +187,17 @@ var (
oracletypes.ModuleName: {},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
ibcfeetypes.ModuleName: {},
stablecointypes.ModuleName: {authtypes.Minter, authtypes.Burner},

perptypesv2.ModuleName: {},
perptypesv2.VaultModuleAccount: {},
perptypesv2.PerpEFModuleAccount: {},
perptypesv2.FeePoolModuleAccount: {},

epochstypes.ModuleName: {},
stablecointypes.StableEFModuleAccount: {authtypes.Burner},
sudotypes.ModuleName: {},
common.TreasuryPoolModuleAccount: {},
wasm.ModuleName: {authtypes.Burner},
tokenfactorytypes.ModuleName: {authtypes.Minter, authtypes.Burner},
epochstypes.ModuleName: {},
sudotypes.ModuleName: {},
common.TreasuryPoolModuleAccount: {},
wasm.ModuleName: {authtypes.Burner},
tokenfactorytypes.ModuleName: {authtypes.Minter, authtypes.Burner},
}
)

Expand Down Expand Up @@ -278,7 +272,6 @@ type NibiruApp struct {
PerpKeeperV2 perpkeeperv2.Keeper
SpotKeeper spotkeeper.Keeper
OracleKeeper oraclekeeper.Keeper
StablecoinKeeper stablecoinkeeper.Keeper
InflationKeeper inflationkeeper.Keeper
SudoKeeper keeper.Keeper
DevGasKeeper devgaskeeper.Keeper
Expand Down Expand Up @@ -628,7 +621,6 @@ func initParamsKeeper(
// Nibiru core params keepers | x/
paramsKeeper.Subspace(spottypes.ModuleName)
paramsKeeper.Subspace(epochstypes.ModuleName)
paramsKeeper.Subspace(stablecointypes.ModuleName)
paramsKeeper.Subspace(inflationtypes.ModuleName)
// ibc params keepers
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
Expand Down
15 changes: 1 addition & 14 deletions app/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ import (
"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"
"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 @@ -135,7 +132,6 @@ func initStoreKeys() (

// nibiru x/ keys
spottypes.StoreKey,
stablecointypes.StoreKey,
oracletypes.StoreKey,
epochstypes.StoreKey,
perpv2types.StoreKey,
Expand All @@ -146,7 +142,7 @@ func initStoreKeys() (
tokenfactorytypes.StoreKey,
)
tkeys = sdk.NewTransientStoreKeys(paramstypes.TStoreKey)
memKeys = sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey, stablecointypes.MemStoreKey)
memKeys = sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey)
return keys, tkeys, memKeys
}

Expand Down Expand Up @@ -283,12 +279,6 @@ func (app *NibiruApp) InitKeepers(
app.AccountKeeper, app.BankKeeper, app.DistrKeeper, app.stakingKeeper, distrtypes.ModuleName,
)

app.StablecoinKeeper = stablecoinkeeper.NewKeeper(
appCodec, keys[stablecointypes.StoreKey], memKeys[stablecointypes.MemStoreKey],
app.GetSubspace(stablecointypes.ModuleName),
app.AccountKeeper, app.BankKeeper, app.OracleKeeper, app.SpotKeeper,
)

app.EpochsKeeper = epochskeeper.NewKeeper(
appCodec, keys[epochstypes.StoreKey],
)
Expand All @@ -309,7 +299,6 @@ func (app *NibiruApp) InitKeepers(

app.EpochsKeeper.SetHooks(
epochstypes.NewMultiEpochHooks(
app.StablecoinKeeper.Hooks(),
app.PerpKeeperV2.Hooks(),
app.InflationKeeper.Hooks(),
app.OracleKeeper.Hooks(),
Expand Down Expand Up @@ -520,7 +509,6 @@ func (app *NibiruApp) initAppModules(

// Nibiru modules
spot.NewAppModule(appCodec, app.SpotKeeper, app.AccountKeeper, app.BankKeeper),
stablecoin.NewAppModule(appCodec, app.StablecoinKeeper, app.AccountKeeper, app.BankKeeper, app.OracleKeeper),
oracle.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper),
epochs.NewAppModule(appCodec, app.EpochsKeeper),
perpv2.NewAppModule(appCodec, app.PerpKeeperV2, app.AccountKeeper, app.BankKeeper, app.OracleKeeper),
Expand Down Expand Up @@ -590,7 +578,6 @@ func orderedModuleNames() []string {
// --------------------------------------------------------------------
// Native x/ Modules
epochstypes.ModuleName,
stablecointypes.ModuleName,
spottypes.ModuleName,
oracletypes.ModuleName,
perpv2types.ModuleName,
Expand Down
108 changes: 0 additions & 108 deletions x/stablecoin/README.md

This file was deleted.

30 changes: 0 additions & 30 deletions x/stablecoin/abci.go

This file was deleted.

Loading

0 comments on commit 99a7a0f

Please sign in to comment.