mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 22:11:06 +00:00
Unify rpc api and implementation name (#11469)
* Unify rpc api and implementation name Signed-off-by: koushiro <koushiro.cqx@gmail.com> * MauanlSeal ==> ManualSealRpc Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Remove extra Rpc naming in the structs Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Update doc Signed-off-by: koushiro <koushiro.cqx@gmail.com> * fix merge Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -173,12 +173,12 @@ where
|
||||
}
|
||||
|
||||
/// Contracts RPC methods.
|
||||
pub struct ContractsRpc<Client, Block> {
|
||||
pub struct Contracts<Client, Block> {
|
||||
client: Arc<Client>,
|
||||
_marker: PhantomData<Block>,
|
||||
}
|
||||
|
||||
impl<Client, Block> ContractsRpc<Client, Block> {
|
||||
impl<Client, Block> Contracts<Client, Block> {
|
||||
/// Create new `Contracts` with the given reference to the client.
|
||||
pub fn new(client: Arc<Client>) -> Self {
|
||||
Self { client, _marker: Default::default() }
|
||||
@@ -193,7 +193,7 @@ impl<Client, Block, AccountId, Balance, Hash>
|
||||
AccountId,
|
||||
Balance,
|
||||
Hash,
|
||||
> for ContractsRpc<Client, Block>
|
||||
> for Contracts<Client, Block>
|
||||
where
|
||||
Block: BlockT,
|
||||
Client: Send + Sync + 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>,
|
||||
|
||||
@@ -131,12 +131,12 @@ pub trait MmrApi<BlockHash> {
|
||||
}
|
||||
|
||||
/// MMR RPC methods.
|
||||
pub struct MmrRpc<Client, Block> {
|
||||
pub struct Mmr<Client, Block> {
|
||||
client: Arc<Client>,
|
||||
_marker: PhantomData<Block>,
|
||||
}
|
||||
|
||||
impl<C, B> MmrRpc<C, B> {
|
||||
impl<C, B> Mmr<C, B> {
|
||||
/// Create new `Mmr` with the given reference to the client.
|
||||
pub fn new(client: Arc<C>) -> Self {
|
||||
Self { client, _marker: Default::default() }
|
||||
@@ -144,8 +144,7 @@ impl<C, B> MmrRpc<C, B> {
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl<Client, Block, MmrHash> MmrApiServer<<Block as BlockT>::Hash>
|
||||
for MmrRpc<Client, (Block, MmrHash)>
|
||||
impl<Client, Block, MmrHash> MmrApiServer<<Block as BlockT>::Hash> for Mmr<Client, (Block, MmrHash)>
|
||||
where
|
||||
Block: BlockT,
|
||||
Client: Send + Sync + 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>,
|
||||
|
||||
@@ -51,14 +51,14 @@ pub trait TransactionPaymentApi<BlockHash, ResponseType> {
|
||||
}
|
||||
|
||||
/// Provides RPC methods to query a dispatchable's class, weight and fee.
|
||||
pub struct TransactionPaymentRpc<C, P> {
|
||||
pub struct TransactionPayment<C, P> {
|
||||
/// Shared reference to the client.
|
||||
client: Arc<C>,
|
||||
_marker: std::marker::PhantomData<P>,
|
||||
}
|
||||
|
||||
impl<C, P> TransactionPaymentRpc<C, P> {
|
||||
/// Creates a new instance of the TransactionPaymentRpc helper.
|
||||
impl<C, P> TransactionPayment<C, P> {
|
||||
/// Creates a new instance of the TransactionPayment Rpc helper.
|
||||
pub fn new(client: Arc<C>) -> Self {
|
||||
Self { client, _marker: Default::default() }
|
||||
}
|
||||
@@ -84,7 +84,7 @@ impl From<Error> for i32 {
|
||||
#[async_trait]
|
||||
impl<C, Block, Balance>
|
||||
TransactionPaymentApiServer<<Block as BlockT>::Hash, RuntimeDispatchInfo<Balance>>
|
||||
for TransactionPaymentRpc<C, Block>
|
||||
for TransactionPayment<C, Block>
|
||||
where
|
||||
Block: BlockT,
|
||||
C: ProvideRuntimeApi<Block> + HeaderBackend<Block> + Send + Sync + 'static,
|
||||
|
||||
Reference in New Issue
Block a user