Skip to content

Commit

Permalink
Merge pull request #771 from gregdhill/refactor/rm-module-prefix
Browse files Browse the repository at this point in the history
refactor: remove module prefix from rpc pallets
  • Loading branch information
sander2 committed Nov 16, 2022
2 parents fe4b6dc + bb1b69c commit bc017bc
Show file tree
Hide file tree
Showing 43 changed files with 482 additions and 483 deletions.
495 changes: 249 additions & 246 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions crates/btc-relay/rpc/Cargo.toml
@@ -1,5 +1,5 @@
[package]
name = "module-btc-relay-rpc"
name = "btc-relay-rpc"
version = "1.2.0"
authors = ["Interlay Ltd"]
edition = "2021"
Expand All @@ -10,4 +10,4 @@ jsonrpsee = { version = "0.15.1", features = ["server", "macros"] }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
module-btc-relay-rpc-runtime-api = { path = "runtime-api" }
btc-relay-rpc-runtime-api = { path = "runtime-api" }
2 changes: 1 addition & 1 deletion crates/btc-relay/rpc/runtime-api/Cargo.toml
@@ -1,5 +1,5 @@
[package]
name = "module-btc-relay-rpc-runtime-api"
name = "btc-relay-rpc-runtime-api"
version = "1.2.0"
authors = ["Interlay Ltd"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion crates/btc-relay/rpc/src/lib.rs
Expand Up @@ -11,7 +11,7 @@ use sp_blockchain::HeaderBackend;
use sp_runtime::{generic::BlockId, traits::Block as BlockT, DispatchError};
use std::sync::Arc;

pub use module_btc_relay_rpc_runtime_api::BtcRelayApi as BtcRelayRuntimeApi;
pub use btc_relay_rpc_runtime_api::BtcRelayApi as BtcRelayRuntimeApi;

#[rpc(client, server)]
pub trait BtcRelayApi<BlockHash, H256Le> {
Expand Down
6 changes: 3 additions & 3 deletions crates/escrow/rpc/Cargo.toml
@@ -1,7 +1,7 @@
[package]
authors = ["Interlay Ltd"]
edition = "2021"
name = "module-escrow-rpc"
name = "escrow-rpc"
version = '0.3.0'

[dependencies]
Expand All @@ -10,7 +10,7 @@ jsonrpsee = { version = "0.15.1", features = ["server", "macros"] }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
module-escrow-rpc-runtime-api = { path = "runtime-api" }
escrow-rpc-runtime-api = { path = "runtime-api" }

[dependencies.module-oracle-rpc-runtime-api]
[dependencies.oracle-rpc-runtime-api]
path = '../../oracle/rpc/runtime-api'
6 changes: 3 additions & 3 deletions crates/escrow/rpc/runtime-api/Cargo.toml
@@ -1,14 +1,14 @@
[package]
authors = ["Interlay Ltd"]
edition = "2021"
name = "module-escrow-rpc-runtime-api"
name = "escrow-rpc-runtime-api"
version = '0.3.0'

[dependencies]
codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", default-features = false }

[dependencies.module-oracle-rpc-runtime-api]
[dependencies.oracle-rpc-runtime-api]
default-features = false
path = '../../../oracle/rpc/runtime-api'

Expand All @@ -17,5 +17,5 @@ default = ["std"]
std = [
"codec/std",
"sp-api/std",
"module-oracle-rpc-runtime-api/std",
"oracle-rpc-runtime-api/std",
]
2 changes: 1 addition & 1 deletion crates/escrow/rpc/runtime-api/src/lib.rs
Expand Up @@ -3,7 +3,7 @@
#![cfg_attr(not(feature = "std"), no_std)]

use codec::Codec;
use module_oracle_rpc_runtime_api::BalanceWrapper;
use oracle_rpc_runtime_api::BalanceWrapper;

sp_api::decl_runtime_apis! {
pub trait EscrowApi<AccountId, BlockNumber, Balance> where
Expand Down
4 changes: 2 additions & 2 deletions crates/escrow/rpc/src/lib.rs
Expand Up @@ -6,7 +6,7 @@ use jsonrpsee::{
proc_macros::rpc,
types::error::{CallError, ErrorCode, ErrorObject},
};
use module_oracle_rpc_runtime_api::BalanceWrapper;
use oracle_rpc_runtime_api::BalanceWrapper;
use sp_api::{ApiError, ProvideRuntimeApi};
use sp_blockchain::HeaderBackend;
use sp_runtime::{
Expand All @@ -15,7 +15,7 @@ use sp_runtime::{
};
use std::sync::Arc;

pub use module_escrow_rpc_runtime_api::EscrowApi as EscrowRuntimeApi;
pub use escrow_rpc_runtime_api::EscrowApi as EscrowRuntimeApi;

#[rpc(client, server)]
pub trait EscrowApi<BlockHash, AccountId, BlockNumber, Balance>
Expand Down
4 changes: 2 additions & 2 deletions crates/issue/rpc/Cargo.toml
@@ -1,5 +1,5 @@
[package]
name = "module-issue-rpc"
name = "issue-rpc"
version = "1.2.0"
authors = ["Interlay Ltd"]
edition = "2021"
Expand All @@ -10,4 +10,4 @@ jsonrpsee = { version = "0.15.1", features = ["server", "macros"] }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
module-issue-rpc-runtime-api = { path = "runtime-api" }
issue-rpc-runtime-api = { path = "runtime-api" }
2 changes: 1 addition & 1 deletion crates/issue/rpc/runtime-api/Cargo.toml
@@ -1,5 +1,5 @@
[package]
name = "module-issue-rpc-runtime-api"
name = "issue-rpc-runtime-api"
version = "1.2.0"
authors = ["Interlay Ltd"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion crates/issue/rpc/src/lib.rs
Expand Up @@ -11,7 +11,7 @@ use sp_blockchain::HeaderBackend;
use sp_runtime::{generic::BlockId, traits::Block as BlockT};
use std::sync::Arc;

pub use module_issue_rpc_runtime_api::IssueApi as IssueRuntimeApi;
pub use issue_rpc_runtime_api::IssueApi as IssueRuntimeApi;

#[rpc(client, server)]
pub trait IssueApi<BlockHash, AccountId, H256, IssueRequest> {
Expand Down
4 changes: 2 additions & 2 deletions crates/oracle/rpc/Cargo.toml
@@ -1,5 +1,5 @@
[package]
name = "module-oracle-rpc"
name = "oracle-rpc"
version = "1.2.0"
authors = ["Interlay Ltd"]
edition = "2021"
Expand All @@ -10,4 +10,4 @@ jsonrpsee = { version = "0.15.1", features = ["server", "macros"] }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
module-oracle-rpc-runtime-api = { path = "runtime-api" }
oracle-rpc-runtime-api = { path = "runtime-api" }
2 changes: 1 addition & 1 deletion crates/oracle/rpc/runtime-api/Cargo.toml
@@ -1,5 +1,5 @@
[package]
name = "module-oracle-rpc-runtime-api"
name = "oracle-rpc-runtime-api"
version = "1.2.0"
authors = ["Interlay Ltd"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion crates/oracle/rpc/src/lib.rs
Expand Up @@ -15,7 +15,7 @@ use sp_runtime::{
};
use std::sync::Arc;

pub use module_oracle_rpc_runtime_api::{BalanceWrapper, OracleApi as OracleRuntimeApi};
pub use oracle_rpc_runtime_api::{BalanceWrapper, OracleApi as OracleRuntimeApi};

#[rpc(client, server)]
pub trait OracleApi<BlockHash, Balance, CurrencyId>
Expand Down
4 changes: 2 additions & 2 deletions crates/redeem/rpc/Cargo.toml
@@ -1,5 +1,5 @@
[package]
name = "module-redeem-rpc"
name = "redeem-rpc"
version = "1.2.0"
authors = ["Interlay Ltd"]
edition = "2021"
Expand All @@ -10,4 +10,4 @@ jsonrpsee = { version = "0.15.1", features = ["server", "macros"] }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
module-redeem-rpc-runtime-api = { path = "runtime-api" }
redeem-rpc-runtime-api = { path = "runtime-api" }
2 changes: 1 addition & 1 deletion crates/redeem/rpc/runtime-api/Cargo.toml
@@ -1,5 +1,5 @@
[package]
name = "module-redeem-rpc-runtime-api"
name = "redeem-rpc-runtime-api"
version = "1.2.0"
authors = ["Interlay Ltd"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion crates/redeem/rpc/src/lib.rs
Expand Up @@ -11,7 +11,7 @@ use sp_blockchain::HeaderBackend;
use sp_runtime::{generic::BlockId, traits::Block as BlockT};
use std::sync::Arc;

pub use module_redeem_rpc_runtime_api::RedeemApi as RedeemRuntimeApi;
pub use redeem_rpc_runtime_api::RedeemApi as RedeemRuntimeApi;

#[rpc(client, server)]
pub trait RedeemApi<BlockHash, AccountId, H256, RedeemRequest> {
Expand Down
4 changes: 2 additions & 2 deletions crates/replace/rpc/Cargo.toml
@@ -1,5 +1,5 @@
[package]
name = "module-replace-rpc"
name = "replace-rpc"
version = "1.2.0"
authors = ["Interlay Ltd"]
edition = "2021"
Expand All @@ -10,4 +10,4 @@ jsonrpsee = { version = "0.15.1", features = ["server", "macros"] }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
module-replace-rpc-runtime-api = { path = "runtime-api" }
replace-rpc-runtime-api = { path = "runtime-api" }
2 changes: 1 addition & 1 deletion crates/replace/rpc/runtime-api/Cargo.toml
@@ -1,5 +1,5 @@
[package]
name = "module-replace-rpc-runtime-api"
name = "replace-rpc-runtime-api"
version = "1.2.0"
authors = ["Interlay Ltd"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion crates/replace/rpc/src/lib.rs
Expand Up @@ -11,7 +11,7 @@ use sp_blockchain::HeaderBackend;
use sp_runtime::{generic::BlockId, traits::Block as BlockT};
use std::sync::Arc;

pub use module_replace_rpc_runtime_api::ReplaceApi as ReplaceRuntimeApi;
pub use replace_rpc_runtime_api::ReplaceApi as ReplaceRuntimeApi;

#[rpc(client, server)]
pub trait ReplaceApi<BlockHash, AccountId, H256, ReplaceRequest> {
Expand Down
6 changes: 3 additions & 3 deletions crates/reward/rpc/Cargo.toml
@@ -1,7 +1,7 @@
[package]
authors = ["Interlay Ltd"]
edition = "2021"
name = "module-reward-rpc"
name = "reward-rpc"
version = '0.3.0'

[dependencies]
Expand All @@ -10,7 +10,7 @@ jsonrpsee = { version = "0.15.1", features = ["server", "macros"] }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
module-reward-rpc-runtime-api = { path = "runtime-api" }
reward-rpc-runtime-api = { path = "runtime-api" }

[dependencies.module-oracle-rpc-runtime-api]
[dependencies.oracle-rpc-runtime-api]
path = '../../oracle/rpc/runtime-api'
6 changes: 3 additions & 3 deletions crates/reward/rpc/runtime-api/Cargo.toml
@@ -1,15 +1,15 @@
[package]
authors = ["Interlay Ltd"]
edition = "2021"
name = "module-reward-rpc-runtime-api"
name = "reward-rpc-runtime-api"
version = '0.3.0'

[dependencies]
codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive", "max-encoded-len"] }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", default-features = false }

[dependencies.module-oracle-rpc-runtime-api]
[dependencies.oracle-rpc-runtime-api]
default-features = false
path = '../../../oracle/rpc/runtime-api'

Expand All @@ -19,5 +19,5 @@ std = [
"codec/std",
"frame-support/std",
"sp-api/std",
"module-oracle-rpc-runtime-api/std",
"oracle-rpc-runtime-api/std",
]
2 changes: 1 addition & 1 deletion crates/reward/rpc/runtime-api/src/lib.rs
Expand Up @@ -4,7 +4,7 @@

use codec::Codec;
use frame_support::dispatch::DispatchError;
use module_oracle_rpc_runtime_api::BalanceWrapper;
use oracle_rpc_runtime_api::BalanceWrapper;

sp_api::decl_runtime_apis! {
pub trait RewardApi<AccountId, VaultId, CurrencyId, Balance> where
Expand Down
4 changes: 2 additions & 2 deletions crates/reward/rpc/src/lib.rs
Expand Up @@ -6,7 +6,7 @@ use jsonrpsee::{
proc_macros::rpc,
types::error::{CallError, ErrorCode, ErrorObject},
};
use module_oracle_rpc_runtime_api::BalanceWrapper;
use oracle_rpc_runtime_api::BalanceWrapper;
use sp_api::ProvideRuntimeApi;
use sp_blockchain::HeaderBackend;
use sp_runtime::{
Expand All @@ -16,7 +16,7 @@ use sp_runtime::{
};
use std::sync::Arc;

pub use module_reward_rpc_runtime_api::RewardApi as RewardRuntimeApi;
pub use reward_rpc_runtime_api::RewardApi as RewardRuntimeApi;

#[rpc(client, server)]
pub trait RewardApi<BlockHash, AccountId, VaultId, CurrencyId, Balance>
Expand Down
6 changes: 3 additions & 3 deletions crates/vault-registry/rpc/Cargo.toml
@@ -1,7 +1,7 @@
[package]
authors = ["Interlay Ltd"]
edition = "2021"
name = "module-vault-registry-rpc"
name = "vault-registry-rpc"
version = '0.3.0'

[dependencies]
Expand All @@ -10,7 +10,7 @@ jsonrpsee = { version = "0.15.1", features = ["server", "macros"] }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31" }
module-vault-registry-rpc-runtime-api = { path = "runtime-api" }
vault-registry-rpc-runtime-api = { path = "runtime-api" }

[dependencies.module-oracle-rpc-runtime-api]
[dependencies.oracle-rpc-runtime-api]
path = '../../oracle/rpc/runtime-api'
6 changes: 3 additions & 3 deletions crates/vault-registry/rpc/runtime-api/Cargo.toml
@@ -1,7 +1,7 @@
[package]
authors = ["Interlay Ltd"]
edition = "2021"
name = "module-vault-registry-rpc-runtime-api"
name = "vault-registry-rpc-runtime-api"
version = '0.3.0'

[dependencies]
Expand All @@ -10,7 +10,7 @@ frame-support = { git = "https://github.com/paritytech/substrate", branch = "pol
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.31", default-features = false }

[dependencies.module-oracle-rpc-runtime-api]
[dependencies.oracle-rpc-runtime-api]
default-features = false
path = '../../../oracle/rpc/runtime-api'

Expand All @@ -21,5 +21,5 @@ std = [
"frame-support/std",
"sp-api/std",
"sp-std/std",
"module-oracle-rpc-runtime-api/std",
"oracle-rpc-runtime-api/std",
]
2 changes: 1 addition & 1 deletion crates/vault-registry/rpc/runtime-api/src/lib.rs
Expand Up @@ -4,7 +4,7 @@

use codec::Codec;
use frame_support::dispatch::DispatchError;
use module_oracle_rpc_runtime_api::BalanceWrapper;
use oracle_rpc_runtime_api::BalanceWrapper;
use sp_std::vec::Vec;

sp_api::decl_runtime_apis! {
Expand Down
4 changes: 2 additions & 2 deletions crates/vault-registry/rpc/src/lib.rs
Expand Up @@ -6,7 +6,7 @@ use jsonrpsee::{
proc_macros::rpc,
types::error::{CallError, ErrorCode, ErrorObject},
};
use module_oracle_rpc_runtime_api::BalanceWrapper;
use oracle_rpc_runtime_api::BalanceWrapper;
use sp_api::ProvideRuntimeApi;
use sp_blockchain::HeaderBackend;
use sp_runtime::{
Expand All @@ -16,7 +16,7 @@ use sp_runtime::{
};
use std::sync::Arc;

pub use module_vault_registry_rpc_runtime_api::VaultRegistryApi as VaultRegistryRuntimeApi;
pub use vault_registry_rpc_runtime_api::VaultRegistryApi as VaultRegistryRuntimeApi;

#[rpc(client, server)]
pub trait VaultRegistryApi<BlockHash, VaultId, Balance, UnsignedFixedPoint, CurrencyId, AccountId>
Expand Down
16 changes: 8 additions & 8 deletions parachain/Cargo.toml
Expand Up @@ -34,14 +34,14 @@ interbtc-rpc = { path = "../rpc" }
bitcoin = { path = "../crates/bitcoin" }
primitives = { package = "interbtc-primitives", path = "../primitives" }

module-btc-relay-rpc-runtime-api = { path = "../crates/btc-relay/rpc/runtime-api" }
module-oracle-rpc-runtime-api = { path = "../crates/oracle/rpc/runtime-api" }
module-vault-registry-rpc-runtime-api = { path = "../crates/vault-registry/rpc/runtime-api" }
module-escrow-rpc-runtime-api = { path = "../crates/escrow/rpc/runtime-api" }
module-reward-rpc-runtime-api = { path = "../crates/reward/rpc/runtime-api" }
module-issue-rpc-runtime-api = { path = "../crates/issue/rpc/runtime-api" }
module-redeem-rpc-runtime-api = { path = "../crates/redeem/rpc/runtime-api" }
module-replace-rpc-runtime-api = { path = "../crates/replace/rpc/runtime-api" }
btc-relay-rpc-runtime-api = { path = "../crates/btc-relay/rpc/runtime-api" }
oracle-rpc-runtime-api = { path = "../crates/oracle/rpc/runtime-api" }
vault-registry-rpc-runtime-api = { path = "../crates/vault-registry/rpc/runtime-api" }
escrow-rpc-runtime-api = { path = "../crates/escrow/rpc/runtime-api" }
reward-rpc-runtime-api = { path = "../crates/reward/rpc/runtime-api" }
issue-rpc-runtime-api = { path = "../crates/issue/rpc/runtime-api" }
redeem-rpc-runtime-api = { path = "../crates/redeem/rpc/runtime-api" }
replace-rpc-runtime-api = { path = "../crates/replace/rpc/runtime-api" }
loans-rpc-runtime-api = { path = "../crates/loans/rpc/runtime-api" }

# Substrate dependencies
Expand Down

0 comments on commit bc017bc

Please sign in to comment.