mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 04:37:57 +00:00
The crate rename (#4223)
* Adding script for rename, could be applicable for nodes on top of it, too * add stderr and gitlab ci features * apply script * fix now minor details in expected stderr * Update the Cargo.lock * fix name: sc-transaction -> sc-tracing * fix rename in script, too
This commit is contained in:
committed by
GitHub
parent
40f6d05a4c
commit
927e13c13a
@@ -27,7 +27,7 @@ pub use crate::weights::{
|
||||
SimpleDispatchInfo, GetDispatchInfo, DispatchInfo, WeighData, ClassifyDispatch,
|
||||
TransactionPriority, Weight, WeighBlock, PaysFee,
|
||||
};
|
||||
pub use sr_primitives::{
|
||||
pub use sp_runtime::{
|
||||
traits::{Dispatchable, DispatchResult, ModuleDispatchError},
|
||||
DispatchError,
|
||||
};
|
||||
@@ -202,12 +202,12 @@ impl<T> Parameter for T where T: Codec + EncodeLike + Clone + Eq + fmt::Debug {}
|
||||
/// The following reserved functions also take the block number (with type `T::BlockNumber`) as an optional input:
|
||||
///
|
||||
/// * `on_initialize`: Executes at the beginning of a block. Using this function will
|
||||
/// implement the [`OnInitialize`](../sr_primitives/traits/trait.OnInitialize.html) trait.
|
||||
/// implement the [`OnInitialize`](../sp_runtime/traits/trait.OnInitialize.html) trait.
|
||||
/// * `on_finalize`: Executes at the end of a block. Using this function will
|
||||
/// implement the [`OnFinalize`](../sr_primitives/traits/trait.OnFinalize.html) trait.
|
||||
/// implement the [`OnFinalize`](../sp_runtime/traits/trait.OnFinalize.html) trait.
|
||||
/// * `offchain_worker`: Executes at the beginning of a block and produces extrinsics for a future block
|
||||
/// upon completion. Using this function will implement the
|
||||
/// [`OffchainWorker`](../sr_primitives/traits/trait.OffchainWorker.html) trait.
|
||||
/// [`OffchainWorker`](../sp_runtime/traits/trait.OffchainWorker.html) trait.
|
||||
#[macro_export]
|
||||
macro_rules! decl_module {
|
||||
// Entry point #1.
|
||||
@@ -861,7 +861,7 @@ macro_rules! decl_module {
|
||||
fn on_initialize() { $( $impl:tt )* }
|
||||
) => {
|
||||
impl<$trait_instance: $trait_name$(<I>, $instance: $instantiable)?>
|
||||
$crate::sr_primitives::traits::OnInitialize<$trait_instance::BlockNumber>
|
||||
$crate::sp_runtime::traits::OnInitialize<$trait_instance::BlockNumber>
|
||||
for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )*
|
||||
{
|
||||
fn on_initialize(_block_number_not_used: $trait_instance::BlockNumber) {
|
||||
@@ -883,7 +883,7 @@ macro_rules! decl_module {
|
||||
fn on_initialize($param:ident : $param_ty:ty) { $( $impl:tt )* }
|
||||
) => {
|
||||
impl<$trait_instance: $trait_name$(<I>, $instance: $instantiable)?>
|
||||
$crate::sr_primitives::traits::OnInitialize<$trait_instance::BlockNumber>
|
||||
$crate::sp_runtime::traits::OnInitialize<$trait_instance::BlockNumber>
|
||||
for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )*
|
||||
{
|
||||
fn on_initialize($param: $param_ty) {
|
||||
@@ -903,7 +903,7 @@ macro_rules! decl_module {
|
||||
{ $( $other_where_bounds:tt )* }
|
||||
) => {
|
||||
impl<$trait_instance: $trait_name$(<I>, $instance: $instantiable)?>
|
||||
$crate::sr_primitives::traits::OnInitialize<$trait_instance::BlockNumber>
|
||||
$crate::sp_runtime::traits::OnInitialize<$trait_instance::BlockNumber>
|
||||
for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )*
|
||||
{}
|
||||
};
|
||||
@@ -915,7 +915,7 @@ macro_rules! decl_module {
|
||||
fn on_finalize() { $( $impl:tt )* }
|
||||
) => {
|
||||
impl<$trait_instance: $trait_name$(<I>, $instance: $instantiable)?>
|
||||
$crate::sr_primitives::traits::OnFinalize<$trait_instance::BlockNumber>
|
||||
$crate::sp_runtime::traits::OnFinalize<$trait_instance::BlockNumber>
|
||||
for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )*
|
||||
{
|
||||
fn on_finalize(_block_number_not_used: $trait_instance::BlockNumber) {
|
||||
@@ -937,7 +937,7 @@ macro_rules! decl_module {
|
||||
fn on_finalize($param:ident : $param_ty:ty) { $( $impl:tt )* }
|
||||
) => {
|
||||
impl<$trait_instance: $trait_name$(<I>, $instance: $instantiable)?>
|
||||
$crate::sr_primitives::traits::OnFinalize<$trait_instance::BlockNumber>
|
||||
$crate::sp_runtime::traits::OnFinalize<$trait_instance::BlockNumber>
|
||||
for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )*
|
||||
{
|
||||
fn on_finalize($param: $param_ty) {
|
||||
@@ -957,7 +957,7 @@ macro_rules! decl_module {
|
||||
{ $( $other_where_bounds:tt )* }
|
||||
) => {
|
||||
impl<$trait_instance: $trait_name$(<I>, $instance: $instantiable)?>
|
||||
$crate::sr_primitives::traits::OnFinalize<$trait_instance::BlockNumber>
|
||||
$crate::sp_runtime::traits::OnFinalize<$trait_instance::BlockNumber>
|
||||
for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )*
|
||||
{
|
||||
}
|
||||
@@ -998,7 +998,7 @@ macro_rules! decl_module {
|
||||
fn offchain_worker() { $( $impl:tt )* }
|
||||
) => {
|
||||
impl<$trait_instance: $trait_name$(<I>, $instance: $instantiable)?>
|
||||
$crate::sr_primitives::traits::OffchainWorker<$trait_instance::BlockNumber>
|
||||
$crate::sp_runtime::traits::OffchainWorker<$trait_instance::BlockNumber>
|
||||
for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )*
|
||||
{
|
||||
fn generate_extrinsics(_block_number_not_used: $trait_instance::BlockNumber) { $( $impl )* }
|
||||
@@ -1011,7 +1011,7 @@ macro_rules! decl_module {
|
||||
fn offchain_worker($param:ident : $param_ty:ty) { $( $impl:tt )* }
|
||||
) => {
|
||||
impl<$trait_instance: $trait_name$(<I>, $instance: $instantiable)?>
|
||||
$crate::sr_primitives::traits::OffchainWorker<$trait_instance::BlockNumber>
|
||||
$crate::sp_runtime::traits::OffchainWorker<$trait_instance::BlockNumber>
|
||||
for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )*
|
||||
{
|
||||
fn generate_extrinsics($param: $param_ty) { $( $impl )* }
|
||||
@@ -1023,7 +1023,7 @@ macro_rules! decl_module {
|
||||
{ $( $other_where_bounds:tt )* }
|
||||
) => {
|
||||
impl<$trait_instance: $trait_name$(<I>, $instance: $instantiable)?>
|
||||
$crate::sr_primitives::traits::OffchainWorker<$trait_instance::BlockNumber>
|
||||
$crate::sp_runtime::traits::OffchainWorker<$trait_instance::BlockNumber>
|
||||
for $module<$trait_instance$(, $instance)?> where $( $other_where_bounds )*
|
||||
{}
|
||||
};
|
||||
@@ -1885,7 +1885,7 @@ macro_rules! __check_reserved_fn_name {
|
||||
#[allow(dead_code)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::sr_primitives::traits::{OnInitialize, OnFinalize};
|
||||
use crate::sp_runtime::traits::{OnInitialize, OnFinalize};
|
||||
use crate::weights::{DispatchInfo, DispatchClass};
|
||||
|
||||
pub trait Trait: system::Trait + Sized where Self::AccountId: From<u32> {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! Macro for declaring a module error.
|
||||
|
||||
#[doc(hidden)]
|
||||
pub use sr_primitives::traits::LookupError;
|
||||
pub use sp_runtime::traits::LookupError;
|
||||
pub use frame_metadata::{ModuleErrorMetadata, ErrorMetadata, DecodeDifferent};
|
||||
|
||||
/// Declare an error type for a runtime module.
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#[doc(hidden)]
|
||||
pub use crate::rstd::vec::Vec;
|
||||
#[doc(hidden)]
|
||||
pub use crate::sr_primitives::traits::{Block as BlockT, Extrinsic};
|
||||
pub use crate::sp_runtime::traits::{Block as BlockT, Extrinsic};
|
||||
#[doc(hidden)]
|
||||
pub use inherents::{InherentData, ProvideInherent, CheckInherentsResult, IsFatalError};
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ pub use state_machine::BasicExternalities;
|
||||
#[doc(hidden)]
|
||||
pub use runtime_io::storage::root as storage_root;
|
||||
#[doc(hidden)]
|
||||
pub use sr_primitives::RuntimeDebug;
|
||||
pub use sp_runtime::RuntimeDebug;
|
||||
|
||||
#[macro_use]
|
||||
pub mod debug;
|
||||
@@ -69,7 +69,7 @@ pub mod weights;
|
||||
pub use self::hash::{Twox256, Twox128, Blake2_256, Blake2_128, Twox64Concat, Hashable};
|
||||
pub use self::storage::{StorageValue, StorageMap, StorageLinkedMap, StorageDoubleMap};
|
||||
pub use self::dispatch::{Parameter, Callable, IsSubType};
|
||||
pub use sr_primitives::{self, ConsensusEngineId, print, traits::Printable};
|
||||
pub use sp_runtime::{self, ConsensusEngineId, print, traits::Printable};
|
||||
|
||||
/// Macro for easily creating a new implementation of the `Get` trait. Use similarly to
|
||||
/// how you would declare a `const`:
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
use rstd::{prelude::*, result, marker::PhantomData, ops::Div, fmt::Debug};
|
||||
use codec::{FullCodec, Codec, Encode, Decode};
|
||||
use primitives::u32_trait::Value as U32;
|
||||
use sr_primitives::{
|
||||
use sp_runtime::{
|
||||
ConsensusEngineId,
|
||||
traits::{MaybeSerializeDeserialize, SimpleArithmetic, Saturating},
|
||||
};
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
#[doc(hidden)]
|
||||
#[allow(deprecated)]
|
||||
pub use crate::sr_primitives::traits::ValidateUnsigned;
|
||||
pub use crate::sp_runtime::traits::ValidateUnsigned;
|
||||
#[doc(hidden)]
|
||||
pub use crate::sr_primitives::transaction_validity::{
|
||||
pub use crate::sp_runtime::transaction_validity::{
|
||||
TransactionValidity, UnknownTransaction, TransactionValidityError,
|
||||
};
|
||||
|
||||
|
||||
@@ -39,15 +39,15 @@
|
||||
use serde::{Serialize, Deserialize};
|
||||
use impl_trait_for_tuples::impl_for_tuples;
|
||||
use codec::{Encode, Decode};
|
||||
use sr_arithmetic::traits::{Bounded, Zero};
|
||||
use sr_primitives::{
|
||||
use sp_arithmetic::traits::{Bounded, Zero};
|
||||
use sp_runtime::{
|
||||
RuntimeDebug,
|
||||
traits::SignedExtension,
|
||||
generic::{CheckedExtrinsic, UncheckedExtrinsic},
|
||||
};
|
||||
|
||||
/// Re-export priority as type
|
||||
pub use sr_primitives::transaction_validity::TransactionPriority;
|
||||
pub use sp_runtime::transaction_validity::TransactionPriority;
|
||||
|
||||
/// Numeric range of a transaction weight.
|
||||
pub type Weight = u32;
|
||||
@@ -261,7 +261,7 @@ where
|
||||
|
||||
/// Implementation for test extrinsic.
|
||||
#[cfg(feature = "std")]
|
||||
impl<Call: Encode, Extra: Encode> GetDispatchInfo for sr_primitives::testing::TestXt<Call, Extra> {
|
||||
impl<Call: Encode, Extra: Encode> GetDispatchInfo for sp_runtime::testing::TestXt<Call, Extra> {
|
||||
fn get_dispatch_info(&self) -> DispatchInfo {
|
||||
// for testing: weight == size.
|
||||
DispatchInfo {
|
||||
|
||||
Reference in New Issue
Block a user