Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit e8c2c4f

Browse files
authored
remove dex PR's custom RPC (#13050)
* As we have state_call we don't need a custom RPC * fix docs
1 parent 97a0992 commit e8c2c4f

File tree

14 files changed

+24
-227
lines changed

14 files changed

+24
-227
lines changed

Cargo.lock

Lines changed: 1 addition & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ members = [
9696
"frame/conviction-voting",
9797
"frame/democracy",
9898
"frame/dex",
99-
"frame/dex/rpc",
100-
"frame/dex/rpc/runtime-api",
10199
"frame/fast-unstake",
102100
"frame/try-runtime",
103101
"frame/elections-phragmen",

bin/node/rpc/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jsonrpsee = { version = "0.16.2", features = ["server"] }
1717
node-primitives = { version = "2.0.0", path = "../primitives" }
1818
pallet-transaction-payment-rpc = { version = "4.0.0-dev", path = "../../../frame/transaction-payment/rpc/" }
1919
mmr-rpc = { version = "4.0.0-dev", path = "../../../client/merkle-mountain-range/rpc/" }
20-
pallet-dex-rpc = { version = "4.0.0-dev", path = "../../../frame/dex/rpc/" }
2120
sc-chain-spec = { version = "4.0.0-dev", path = "../../../client/chain-spec" }
2221
sc-client-api = { version = "4.0.0-dev", path = "../../../client/api" }
2322
sc-consensus-babe = { version = "0.10.0-dev", path = "../../../client/consensus/babe" }

bin/node/rpc/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ where
110110
C::Api: substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index>,
111111
C::Api: mmr_rpc::MmrRuntimeApi<Block, <Block as sp_runtime::traits::Block>::Hash, BlockNumber>,
112112
C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,
113-
C::Api: pallet_dex_rpc::DexRuntimeApi<Block, Balance>,
114113
C::Api: BabeApi<Block>,
115114
C::Api: BlockBuilder<Block>,
116115
P: TransactionPool + 'static,
@@ -119,7 +118,6 @@ where
119118
B::State: sc_client_api::backend::StateBackend<sp_runtime::traits::HashFor<Block>>,
120119
{
121120
use mmr_rpc::{Mmr, MmrApiServer};
122-
use pallet_dex_rpc::{Dex, DexApiServer};
123121
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
124122
use sc_consensus_babe_rpc::{Babe, BabeApiServer};
125123
use sc_finality_grandpa_rpc::{Grandpa, GrandpaApiServer};
@@ -152,7 +150,6 @@ where
152150
// These RPCs should use an asynchronous caller instead.
153151
io.merge(Mmr::new(client.clone()).into_rpc())?;
154152
io.merge(TransactionPayment::new(client.clone()).into_rpc())?;
155-
io.merge(Dex::new(client.clone()).into_rpc())?;
156153
io.merge(
157154
Babe::new(
158155
client.clone(),

bin/node/runtime/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ pallet-uniques = { version = "4.0.0-dev", default-features = false, path = "../.
111111
pallet-vesting = { version = "4.0.0-dev", default-features = false, path = "../../../frame/vesting" }
112112
pallet-whitelist = { version = "4.0.0-dev", default-features = false, path = "../../../frame/whitelist" }
113113
pallet-dex = { version = "4.0.0-dev", default-features = false, path = "../../../frame/dex" }
114-
pallet-dex-rpc-runtime-api = { version = "4.0.0-dev", default-features = false, path = "../../../frame/dex/rpc/runtime-api/" }
115114

116115
[build-dependencies]
117116
substrate-wasm-builder = { version = "5.0.0-dev", path = "../../../utils/wasm-builder" }
@@ -205,7 +204,6 @@ std = [
205204
"sp-io/std",
206205
"pallet-child-bounties/std",
207206
"pallet-alliance/std",
208-
"pallet-dex-rpc-runtime-api/std",
209207
"pallet-dex/std",
210208
]
211209
runtime-benchmarks = [
@@ -224,6 +222,7 @@ runtime-benchmarks = [
224222
"pallet-contracts/runtime-benchmarks",
225223
"pallet-conviction-voting/runtime-benchmarks",
226224
"pallet-democracy/runtime-benchmarks",
225+
"pallet-dex/runtime-benchmarks",
227226
"pallet-election-provider-multi-phase/runtime-benchmarks",
228227
"pallet-election-provider-support-benchmarking/runtime-benchmarks",
229228
"pallet-elections-phragmen/runtime-benchmarks",

bin/node/runtime/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2133,7 +2133,7 @@ impl_runtime_apis! {
21332133
}
21342134
}
21352135

2136-
impl pallet_dex_rpc_runtime_api::DexApi<
2136+
impl pallet_dex::DexApi<
21372137
Block,
21382138
Balance,
21392139
> for Runtime

frame/dex/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"]
1515
[dependencies]
1616
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
1717
scale-info = { version = "2.0.0", default-features = false, features = ["derive"] }
18+
sp-api = { version = "4.0.0-dev", default-features = false, path = "../../primitives/api" }
1819
sp-std = { version = "5.0.0", default-features = false, path = "../../primitives/std" }
1920
sp-runtime = { version = "7.0.0", default-features = false, path = "../../primitives/runtime" }
2021
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" }

frame/dex/rpc/Cargo.toml

Lines changed: 0 additions & 23 deletions
This file was deleted.

frame/dex/rpc/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

frame/dex/rpc/runtime-api/Cargo.toml

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)