Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
remove the dex pallet
Browse files Browse the repository at this point in the history
  • Loading branch information
José Molina committed Dec 4, 2023
1 parent eaece84 commit f03ec84
Show file tree
Hide file tree
Showing 16 changed files with 21 additions and 433 deletions.
133 changes: 8 additions & 125 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ trappist-runtime = { path = "runtime/trappist" }
stout-runtime = { path = "runtime/stout" }
jsonrpsee = "0.16.2"

# External Dependencies
pallet-dex-rpc = { git = "https://github.com/paritytech/substrate-dex.git", default-features = false, branch = "polkadot-v1.3.0-crates" }
pallet-dex = { git = "https://github.com/paritytech/substrate-dex.git", default-features = false, branch = "polkadot-v1.3.0-crates" }
pallet-dex-rpc-runtime-api = { git = "https://github.com/paritytech/substrate-dex.git", default-features = false, branch = "polkadot-v1.3.0-crates" }

# Trappist Pallets
pallet-asset-registry = { default-features = false, path = "pallets/asset-registry" }
trappist-runtime-benchmarks = { default-features = false, path = "pallets/benchmarks" }
Expand Down
3 changes: 0 additions & 3 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ trappist-runtime = { workspace = true, optional = true }
stout-runtime = { workspace = true, optional = true }
jsonrpsee = { workspace = true, features = ["server"] }

# External Dependencies
pallet-dex-rpc = { workspace = true }

# Substrate
frame-benchmarking = { workspace = true, features = ["std"] }
frame-benchmarking-cli = { workspace = true }
Expand Down
1 change: 0 additions & 1 deletion node/src/chain_spec/stout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,5 @@ pub fn testnet_genesis(
members: invulnerables.into_iter().map(|x| x.0).collect::<Vec<_>>(),
phantom: Default::default(),
},
dex: Default::default(),
}
}
2 changes: 0 additions & 2 deletions node/src/chain_spec/trappist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ pub fn testnet_genesis(
treasury: Default::default(),
safe_mode: Default::default(),
tx_pause: Default::default(),
dex: Default::default(),
transaction_payment: Default::default(),
}
}
Expand Down Expand Up @@ -332,7 +331,6 @@ fn trappist_live_genesis(
treasury: Default::default(),
safe_mode: Default::default(),
tx_pause: Default::default(),
dex: Default::default(),
transaction_payment: Default::default(),
}
}
5 changes: 1 addition & 4 deletions node/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

use std::sync::Arc;

use parachains_common::{AccountId, AssetIdForTrustBackedAssets as AssetId, Balance, Block, Nonce};
use parachains_common::{AccountId, Balance, Block, Nonce};
use sc_client_api::AuxStore;
pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor};
use sc_transaction_pool_api::TransactionPool;
Expand Down Expand Up @@ -56,13 +56,11 @@ where
C::Api: frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,
C::Api: BlockBuilder<Block>,
C::Api: pallet_dex_rpc::DexRuntimeApi<Block, AssetId, Balance, Balance>,
P: TransactionPool + Sync + Send + 'static,
B: sc_client_api::Backend<Block> + Send + Sync + 'static,
B::State: sc_client_api::backend::StateBackend<sp_runtime::traits::HashingFor<Block>>,
{
use frame_rpc_system::{System, SystemApiServer};
use pallet_dex_rpc::{Dex, DexApiServer};
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
use substrate_state_trie_migration_rpc::{StateMigration, StateMigrationApiServer};

Expand All @@ -72,7 +70,6 @@ where
module.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?;
module.merge(TransactionPayment::new(client.clone()).into_rpc())?;
module.merge(StateMigration::new(client.clone(), backend, deny_unsafe).into_rpc())?;
module.merge(Dex::new(client).into_rpc())?;

Ok(module)
}
4 changes: 0 additions & 4 deletions node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ where
+ sp_session::SessionKeys<Block>
+ sp_api::ApiExt<Block>
+ sp_offchain::OffchainWorkerApi<Block>
+ pallet_dex_rpc::DexRuntimeApi<Block, AssetId, Balance, Balance>
+ sp_block_builder::BlockBuilder<Block>,
BIQ: FnOnce(
Arc<ParachainClient<RuntimeApi>>,
Expand Down Expand Up @@ -232,7 +231,6 @@ where
+ sp_block_builder::BlockBuilder<Block>
+ cumulus_primitives_core::CollectCollationInfo<Block>
+ frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>
+ pallet_dex_rpc::DexRuntimeApi<Block, AssetId, Balance, Balance>
+ pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,
RB: Fn(Arc<ParachainClient<RuntimeApi>>) -> Result<jsonrpsee::RpcModule<()>, sc_service::Error>,
BIQ: FnOnce(
Expand Down Expand Up @@ -519,7 +517,6 @@ where
+ cumulus_primitives_core::CollectCollationInfo<Block>
+ sp_consensus_aura::AuraApi<Block, <<AuraId as AppCrypto>::Pair as Pair>::Public>
+ pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>
+ pallet_dex_rpc::DexRuntimeApi<Block, AssetId, Balance, Balance>
+ frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
<<AuraId as AppCrypto>::Pair as Pair>::Signature:
TryFrom<Vec<u8>> + std::hash::Hash + sp_runtime::traits::Member + Codec,
Expand Down Expand Up @@ -610,7 +607,6 @@ where
+ sp_api::ApiExt<Block>
+ sp_offchain::OffchainWorkerApi<Block>
+ sp_block_builder::BlockBuilder<Block>
+ pallet_dex_rpc::DexRuntimeApi<Block, AssetId, Balance, Balance>
+ sp_consensus_aura::AuraApi<Block, <<AuraId as AppCrypto>::Pair as Pair>::Public>,
<<AuraId as AppCrypto>::Pair as Pair>::Signature:
TryFrom<Vec<u8>> + std::hash::Hash + sp_runtime::traits::Member + Codec,
Expand Down
4 changes: 2 additions & 2 deletions pallets/asset-registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ parity-scale-codec = { workspace = true, features = ["derive"] }
scale-info = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }
frame-benchmarking = { workspace = true }
frame-benchmarking = { workspace = true, optional = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-assets = { workspace = true }
Expand Down Expand Up @@ -55,7 +55,7 @@ std = [
"sp-std/std",
"pallet-assets/std",
"pallet-balances/std",
"frame-benchmarking/std",
"frame-benchmarking?/std",
"frame-support/std",
"frame-system/std",
"scale-info/std",
Expand Down
4 changes: 2 additions & 2 deletions pallets/benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ parity-scale-codec = { workspace = true, features = ["derive"] }
scale-info = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }
frame-benchmarking = { workspace = true }
frame-benchmarking = { workspace = true, optional = true }
frame-support = { workspace = true }
frame-system = { workspace = true }

Expand All @@ -25,7 +25,7 @@ sp-core = { workspace = true }
default = ["std"]
std = [
"parity-scale-codec/std",
"frame-benchmarking/std",
"frame-benchmarking?/std",
"frame-support/std",
"frame-system/std",
"sp-runtime/std",
Expand Down
Loading

0 comments on commit f03ec84

Please sign in to comment.