Repository: scs/substrate-api-client (language: rust)

Issue:
Remove deprecated functions
There are some functions that have been marked as deprecated for quite some time. We should be able to remove them now.


Discussion / hints:

Fix patch:
diff --git a/node-api/src/metadata/metadata_types.rs b/node-api/src/metadata/metadata_types.rs
index e1457a636..79bc9bd59 100644
--- a/node-api/src/metadata/metadata_types.rs
+++ b/node-api/src/metadata/metadata_types.rs
@@ -49,13 +49,6 @@ pub struct Metadata {
 }
 
 impl Metadata {
-	/// Access a pallet given its name.
-	#[deprecated(note = "please use `pallet_by_name` or `pallet_by_name_err` instead")]
-	pub fn pallet(&self, pallet_name: &str) -> Result<PalletMetadata<'_>, MetadataError> {
-		self.pallet_by_name(pallet_name)
-			.ok_or_else(|| MetadataError::PalletNameNotFound(pallet_name.to_string()))
-	}
-
 	/// An iterator over all of the available pallets.
 	pub fn pallets(&self) -> impl Iterator<Item = PalletMetadata<'_>> {
 		self.pallets.values().map(|inner| PalletMetadata { inner, types: self.types() })
diff --git a/primitives/src/config/asset_runtime_config.rs b/primitives/src/config/asset_runtime_config.rs
index 56dec0256..04f7e2337 100644
--- a/primitives/src/config/asset_runtime_config.rs
+++ b/primitives/src/config/asset_runtime_config.rs
@@ -41,9 +41,3 @@ impl Config for AssetRuntimeConfig {
 /// A struct representing the signed extra and additional parameters required
 /// to construct a transaction and pay in asset fees.
 pub type AssetTipExtrinsicParams<T> = GenericExtrinsicParams<T, AssetTip<<T as Config>::Balance>>;
-
-#[deprecated(
-	since = "0.14.0",
-	note = "Please use `AssetRuntimeConfig` instead, this will be removed in the next release."
-)]
-pub type SubstrateKitchensinkConfig = AssetRuntimeConfig;
diff --git a/primitives/src/config/default_runtime_config.rs b/primitives/src/config/default_runtime_config.rs
index 8a3468a52..c310df5eb 100644
--- a/primitives/src/config/default_runtime_config.rs
+++ b/primitives/src/config/default_runtime_config.rs
@@ -18,9 +18,3 @@ pub type DefaultRuntimeConfig =
 /// A struct representing the signed extra and additional parameters required
 /// to construct a transaction and pay in token fees.
 pub type PlainTipExtrinsicParams<T> = GenericExtrinsicParams<T, PlainTip<<T as Config>::Balance>>;
-
-#[deprecated(
-	since = "0.14.0",
-	note = "Please use `DefaultRuntimeConfig` instead, this will be removed in the next release."
-)]
-pub type PolkadotConfig = DefaultRuntimeConfig;
diff --git a/src/api/rpc_api/author.rs b/src/api/rpc_api/author.rs
index 2d0dc46df..011b4a02f 100644
--- a/src/api/rpc_api/author.rs
+++ b/src/api/rpc_api/author.rs
@@ -210,57 +210,6 @@ pub trait SubmitAndWatch {
 	) -> Result<ExtrinsicReport<Self::Hash>>;
 }
 
-#[maybe_async::maybe_async(?Send)]
-pub trait SubmitAndWatchUntilSuccess {
-	type Client: Subscribe;
-	type Hash: Decode;
-
-	/// Submit an extrinsic and watch it until
-	/// - wait_for_finalized = false => InBlock
-	/// - wait_for_finalized = true => Finalized
-	/// Returns and error if the extrinsic was not successfully executed.
-	/// If it was successful, a report containing the following is returned:
-	/// - extrinsic hash
-	/// - hash of the block the extrinsic was included in
-	/// - last known extrinsic (transaction) status
-	/// - associated events of the extrinsic
-	/// This method is blocking.
-	#[deprecated(
-		since = "0.14.0",
-		note = "please use `SubmitAndWatch::submit_and_watch_extrinsic_until` instead, this will be removed in the next release."
-	)]
-	async fn submit_and_watch_extrinsic_until_success<Address, Call, Signature, SignedExtra>(
-		&self,
-		extrinsic: UncheckedExtrinsicV4<Address, Call, Signature, SignedExtra>,
-		wait_for_finalized: bool,
-	) -> Result<ExtrinsicReport<Self::Hash>>
-	where
-		Address: Encode,
-		Call: Encode,
-		Signature: Encode,
-		SignedExtra: Encode;
-
-	/// Submit an encoded, opaque extrinsic and watch it until
-	/// - wait_for_finalized = false => InBlock
-	/// - wait_for_finalized = true => Finalized
-	/// Returns and error if the extrinsic was not successfully executed.
-	/// If it was successful, a report containing the following is returned:
-	/// - extrinsic hash
-	/// - hash of the block the extrinsic was included in
-	/// - last known extrinsic (transaction) status
-	/// - associated events of the extrinsic
-	/// This method is blocking.
-	#[deprecated(
-		since = "0.14.0",
-		note = "please use `SubmitAndWatch::submit_and_watch_opaque_extrinsic_until` instead, this will be removed in the next release."
-	)]
-	async fn submit_and_watch_opaque_extrinsic_until_success(
-		&self,
-		encoded_extrinsic: &Bytes,
-		wait_for_finalized: bool,
-	) -> Result<ExtrinsicReport<Self::Hash>>;
-}
-
 #[maybe_async::maybe_async(?Send)]
 impl<T, Client> SubmitAndWatch for Api<T, Client>
 where
@@ -391,46 +340,3 @@ where
 		Err(Error::NoStream)
 	}
 }
-
-#[maybe_async::maybe_async(?Send)]
-impl<T, Client> SubmitAndWatchUntilSuccess for Api<T, Client>
-where
-	T: Config,
-	Client: Subscribe + Request,
-{
-	type Client = Client;
-	type Hash = T::Hash;
-
-	async fn submit_and_watch_extrinsic_until_success<Address, Call, Signature, SignedExtra>(
-		&self,
-		extrinsic: UncheckedExtrinsicV4<Address, Call, Signature, SignedExtra>,
-		wait_for_finalized: bool,
-	) -> Result<ExtrinsicReport<Self::Hash>>
-	where
-		Address: Encode,
-		Call: Encode,
-		Signature: Encode,
-		SignedExtra: Encode,
-	{
-		let xt_status = match wait_for_finalized {
-			true => XtStatus::Finalized,
-			false => XtStatus::InBlock,
-		};
-
-		self.submit_and_watch_opaque_extrinsic_until(&extrinsic.encode().into(), xt_status)
-			.await
-	}
-
-	async fn submit_and_watch_opaque_extrinsic_until_success(
-		&self,
-		encoded_extrinsic: &Bytes,
-		wait_for_finalized: bool,
-	) -> Result<ExtrinsicReport<Self::Hash>> {
-		let xt_status = match wait_for_finalized {
-			true => XtStatus::Finalized,
-			false => XtStatus::InBlock,
-		};
-
-		self.submit_and_watch_opaque_extrinsic_until(encoded_extrinsic, xt_status).await
-	}
-}


Test patch: