Skip to content

Commit

Permalink
Remove dex module. (#898)
Browse files Browse the repository at this point in the history
* Remove dex module.

* Add release-v4 to GitHub workflows
  • Loading branch information
dzmitryhil authored Jun 27, 2024
1 parent f349a68 commit ebf9d5c
Show file tree
Hide file tree
Showing 33 changed files with 10 additions and 5,503 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: ci
on:
push:
branches: [ master ]
branches: [ master, release-v4 ]
pull_request:
branches: [ master ]
branches: [ master, release-v4 ]
workflow_dispatch:

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/markdown-link.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: check markdown links
on:
push:
branches: [master]
branches: [master, release-v4]
pull_request:
branches: [master]
branches: [master, release-v4]
jobs:
markdown-link-check:
runs-on: ubuntu-latest
Expand Down
16 changes: 1 addition & 15 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,6 @@ import (
delaytypes "github.com/CoreumFoundation/coreum/v4/x/delay/types"
"github.com/CoreumFoundation/coreum/v4/x/deterministicgas"
deterministicgastypes "github.com/CoreumFoundation/coreum/v4/x/deterministicgas/types"
"github.com/CoreumFoundation/coreum/v4/x/dex"
dexkeeper "github.com/CoreumFoundation/coreum/v4/x/dex/keeper"
dextypes "github.com/CoreumFoundation/coreum/v4/x/dex/types"
"github.com/CoreumFoundation/coreum/v4/x/feemodel"
feemodelkeeper "github.com/CoreumFoundation/coreum/v4/x/feemodel/keeper"
feemodeltypes "github.com/CoreumFoundation/coreum/v4/x/feemodel/types"
Expand Down Expand Up @@ -225,7 +222,6 @@ var (
assetnft.AppModuleBasic{},
customparams.AppModuleBasic{},
delay.AppModuleBasic{},
dex.AppModuleBasic{},
)

// module account permissions.
Expand Down Expand Up @@ -309,7 +305,6 @@ type App struct {
NFTKeeper wnftkeeper.Wrapper
CustomParamsKeeper customparamskeeper.Keeper
DelayKeeper delaykeeper.Keeper
DEXKeeper dexkeeper.Keeper

// make scoped keepers public for test purposes
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
Expand Down Expand Up @@ -369,7 +364,7 @@ func New(
assetnfttypes.StoreKey, nftkeeper.StoreKey, ibcexported.StoreKey,
ibctransfertypes.StoreKey, ibchookstypes.StoreKey, packetforwardtypes.StoreKey,
icahosttypes.StoreKey, icacontrollertypes.StoreKey, delaytypes.StoreKey,
customparamstypes.StoreKey, group.StoreKey, dextypes.StoreKey,
customparamstypes.StoreKey, group.StoreKey,
)
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey, feemodeltypes.TransientStoreKey)
memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey)
Expand Down Expand Up @@ -798,11 +793,6 @@ func New(
AddRoute(wasmtypes.ModuleName, ibcWasmStack)
app.IBCKeeper.SetRouter(ibcRouter)

app.DEXKeeper = dexkeeper.NewKeeper(
appCodec,
keys[dextypes.StoreKey],
)

/**** Module Options ****/

// NOTE: we may consider parsing `appOpts` inside module constructors. For the moment
Expand Down Expand Up @@ -891,7 +881,6 @@ func New(
wnftModule,
customParamsModule,
delayModule,
dex.NewAppModule(appCodec, app.DEXKeeper),
// always be last to make sure that it checks for all invariants and not only part of them
crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)),
)
Expand Down Expand Up @@ -931,7 +920,6 @@ func New(
assetnfttypes.ModuleName,
nft.ModuleName,
delaytypes.ModuleName,
dextypes.ModuleName,
)

app.ModuleManager.SetOrderEndBlockers(
Expand Down Expand Up @@ -965,7 +953,6 @@ func New(
assetnfttypes.ModuleName,
nft.ModuleName,
delaytypes.ModuleName,
dextypes.ModuleName,
)

// NOTE: The genutils module must occur after staking so that pools are
Expand Down Expand Up @@ -1005,7 +992,6 @@ func New(
assetfttypes.ModuleName,
assetnfttypes.ModuleName,
delaytypes.ModuleName,
dextypes.ModuleName,
}

app.ModuleManager.SetOrderInitGenesis(genesisModuleOrder...)
Expand Down
5 changes: 2 additions & 3 deletions app/upgrade/v4/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import (
icahosttypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/host/types"

"github.com/CoreumFoundation/coreum/v4/app/upgrade"
dextypes "github.com/CoreumFoundation/coreum/v4/x/dex/types"
)

// Name defines the upgrade name.
const Name = "v4"

// New makes an upgrade handler for v4 upgrade.
func New(mm *module.Manager, configurator module.Configurator,
consensusParamKeeper consensusparamkeeper.Keeper) upgrade.Upgrade {
consensusParamKeeper consensusparamkeeper.Keeper,
) upgrade.Upgrade {
return upgrade.Upgrade{
Name: Name,
StoreUpgrades: store.StoreUpgrades{
Expand All @@ -29,7 +29,6 @@ func New(mm *module.Manager, configurator module.Configurator,
packetforwardtypes.StoreKey,
icacontrollertypes.StoreKey,
icahosttypes.StoreKey,
dextypes.StoreKey,
},
},
Upgrade: func(ctx sdk.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
Expand Down
201 changes: 0 additions & 201 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,24 +185,6 @@
- [coreum/deterministicgas/v1/event.proto](#coreum/deterministicgas/v1/event.proto)
- [EventGas](#coreum.deterministicgas.v1.EventGas)

- [coreum/dex/v1/genesis.proto](#coreum/dex/v1/genesis.proto)
- [GenesisState](#coreum.dex.v1.GenesisState)

- [coreum/dex/v1/order.proto](#coreum/dex/v1/order.proto)
- [Order](#coreum.dex.v1.Order)

- [coreum/dex/v1/query.proto](#coreum/dex/v1/query.proto)
- [QueryOrdersRequest](#coreum.dex.v1.QueryOrdersRequest)
- [QueryOrdersResponse](#coreum.dex.v1.QueryOrdersResponse)

- [Query](#coreum.dex.v1.Query)

- [coreum/dex/v1/tx.proto](#coreum/dex/v1/tx.proto)
- [EmptyResponse](#coreum.dex.v1.EmptyResponse)
- [MsgPlaceOrder](#coreum.dex.v1.MsgPlaceOrder)

- [Msg](#coreum.dex.v1.Msg)

- [coreum/feemodel/v1/genesis.proto](#coreum/feemodel/v1/genesis.proto)
- [GenesisState](#coreum.feemodel.v1.GenesisState)

Expand Down Expand Up @@ -4232,189 +4214,6 @@ EventGas is emitted by deterministic gas module to report gas information.



<a name="coreum/dex/v1/genesis.proto"></a>
<p align="right"><a href="#top">Top</a></p>

## coreum/dex/v1/genesis.proto



<a name="coreum.dex.v1.GenesisState"></a>

### GenesisState

```
GenesisState defines the module genesis state.
```






<!-- end messages -->

<!-- end enums -->

<!-- end HasExtensions -->

<!-- end services -->



<a name="coreum/dex/v1/order.proto"></a>
<p align="right"><a href="#top">Top</a></p>

## coreum/dex/v1/order.proto



<a name="coreum.dex.v1.Order"></a>

### Order

```
Order is a single order of an orderbook.
```



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `id` | [string](#string) | | `id is unique order ID.` |





<!-- end messages -->

<!-- end enums -->

<!-- end HasExtensions -->

<!-- end services -->



<a name="coreum/dex/v1/query.proto"></a>
<p align="right"><a href="#top">Top</a></p>

## coreum/dex/v1/query.proto



<a name="coreum.dex.v1.QueryOrdersRequest"></a>

### QueryOrdersRequest

```
QueryOrdersRequest defines the request type for the `Orders` query.
```







<a name="coreum.dex.v1.QueryOrdersResponse"></a>

### QueryOrdersResponse

```
QueryOrdersRequestResponse defines the response type for the `Orders` query.
```






<!-- end messages -->

<!-- end enums -->

<!-- end HasExtensions -->


<a name="coreum.dex.v1.Query"></a>

### Query

```
Query defines the gRPC query service.
```


| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint |
| ----------- | ------------ | ------------- | ------------| ------- | -------- |
| `Orders` | [QueryOrdersRequest](#coreum.dex.v1.QueryOrdersRequest) | [QueryOrdersResponse](#coreum.dex.v1.QueryOrdersResponse) | `Orders queries all orders.` | GET|/coreum/dex/v1/orders |

<!-- end services -->



<a name="coreum/dex/v1/tx.proto"></a>
<p align="right"><a href="#top">Top</a></p>

## coreum/dex/v1/tx.proto



<a name="coreum.dex.v1.EmptyResponse"></a>

### EmptyResponse







<a name="coreum.dex.v1.MsgPlaceOrder"></a>

### MsgPlaceOrder

```
MsgPlaceOrder defines message to place an order on orderbook.
```



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `sender` | [string](#string) | | `sender is message sender/signer.` |
| `order` | [Order](#coreum.dex.v1.Order) | | `order is an order to place on orderbook.` |





<!-- end messages -->

<!-- end enums -->

<!-- end HasExtensions -->


<a name="coreum.dex.v1.Msg"></a>

### Msg

```
Msg defines the Msg service.
```


| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint |
| ----------- | ------------ | ------------- | ------------| ------- | -------- |
| `PlaceOrder` | [MsgPlaceOrder](#coreum.dex.v1.MsgPlaceOrder) | [EmptyResponse](#coreum.dex.v1.EmptyResponse) | `PlaceOrder is a method to place an order on orderbook.` | |

<!-- end services -->



<a name="coreum/feemodel/v1/genesis.proto"></a>
<p align="right"><a href="#top">Top</a></p>

Expand Down
7 changes: 0 additions & 7 deletions proto/coreum/dex/v1/genesis.proto

This file was deleted.

13 changes: 0 additions & 13 deletions proto/coreum/dex/v1/order.proto

This file was deleted.

20 changes: 0 additions & 20 deletions proto/coreum/dex/v1/query.proto

This file was deleted.

Loading

0 comments on commit ebf9d5c

Please sign in to comment.