mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 04:41:02 +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
@@ -9,16 +9,16 @@ log = "0.4"
|
||||
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.6", default-features = false, features = ["derive"] }
|
||||
frame-metadata = { path = "../metadata", default-features = false }
|
||||
rstd = { package = "sr-std", path = "../../primitives/sr-std", default-features = false }
|
||||
runtime-io ={ package = "sr-io", path = "../../primitives/sr-io", default-features = false }
|
||||
sr-primitives = { path = "../../primitives/sr-primitives", default-features = false }
|
||||
primitives = { package = "substrate-primitives", path = "../../primitives/core", default-features = false }
|
||||
sr-arithmetic = { path = "../../primitives/sr-arithmetic", default-features = false }
|
||||
inherents = { package = "substrate-inherents", path = "../../primitives/inherents", default-features = false }
|
||||
rstd = { package = "sp-std", path = "../../primitives/sr-std", default-features = false }
|
||||
runtime-io ={ package = "sp-io", path = "../../primitives/sr-io", default-features = false }
|
||||
sp-runtime = { path = "../../primitives/sr-primitives", default-features = false }
|
||||
primitives = { package = "sp-core", path = "../../primitives/core", default-features = false }
|
||||
sp-arithmetic = { path = "../../primitives/sr-arithmetic", default-features = false }
|
||||
inherents = { package = "sp-inherents", path = "../../primitives/inherents", default-features = false }
|
||||
frame-support-procedural = { package = "frame-support-procedural", path = "./procedural" }
|
||||
paste = "0.1.6"
|
||||
once_cell = { version = "0.2.4", default-features = false, optional = true }
|
||||
state-machine = { package = "substrate-state-machine", path = "../../primitives/state-machine", optional = true }
|
||||
state-machine = { package = "sp-state-machine", path = "../../primitives/state-machine", optional = true }
|
||||
bitmask = { version = "0.5.0", default-features = false }
|
||||
impl-trait-for-tuples = "0.1.3"
|
||||
tracing = { version = "0.1.10", optional = true }
|
||||
@@ -37,8 +37,8 @@ std = [
|
||||
"runtime-io/std",
|
||||
"codec/std",
|
||||
"rstd/std",
|
||||
"sr-primitives/std",
|
||||
"sr-arithmetic/std",
|
||||
"sp-runtime/std",
|
||||
"sp-arithmetic/std",
|
||||
"frame-metadata/std",
|
||||
"inherents/std",
|
||||
"state-machine",
|
||||
|
||||
@@ -93,10 +93,10 @@ fn construct_runtime_parsed(definition: RuntimeDefinition) -> Result<TokenStream
|
||||
#[derive(Clone, Copy, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "std", derive(Debug))]
|
||||
pub struct #name;
|
||||
impl #scrate::sr_primitives::traits::GetNodeBlockType for #name {
|
||||
impl #scrate::sp_runtime::traits::GetNodeBlockType for #name {
|
||||
type NodeBlock = #node_block;
|
||||
}
|
||||
impl #scrate::sr_primitives::traits::GetRuntimeBlockType for #name {
|
||||
impl #scrate::sp_runtime::traits::GetRuntimeBlockType for #name {
|
||||
type RuntimeBlock = #block;
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ fn decl_outer_config<'a>(
|
||||
)
|
||||
});
|
||||
quote!(
|
||||
#scrate::sr_primitives::impl_outer_config! {
|
||||
#scrate::sp_runtime::impl_outer_config! {
|
||||
pub struct GenesisConfig for #runtime {
|
||||
#(#modules_tokens)*
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ fn impl_build_storage(
|
||||
let builder_blocks = &builders.blocks;
|
||||
|
||||
let build_storage_impl_trait = quote!(
|
||||
#scrate::sr_primitives::BuildModuleGenesisStorage<#runtime_generic, #inherent_instance>
|
||||
#scrate::sp_runtime::BuildModuleGenesisStorage<#runtime_generic, #inherent_instance>
|
||||
);
|
||||
|
||||
quote!{
|
||||
@@ -140,8 +140,8 @@ fn impl_build_storage(
|
||||
impl#genesis_impl GenesisConfig#genesis_struct #genesis_where_clause {
|
||||
pub fn build_storage #fn_generic (&self) -> std::result::Result<
|
||||
(
|
||||
#scrate::sr_primitives::StorageOverlay,
|
||||
#scrate::sr_primitives::ChildrenStorageOverlay,
|
||||
#scrate::sp_runtime::StorageOverlay,
|
||||
#scrate::sp_runtime::ChildrenStorageOverlay,
|
||||
),
|
||||
String
|
||||
> #fn_where_clause {
|
||||
@@ -154,8 +154,8 @@ fn impl_build_storage(
|
||||
pub fn assimilate_storage #fn_generic (
|
||||
&self,
|
||||
tuple_storage: &mut (
|
||||
#scrate::sr_primitives::StorageOverlay,
|
||||
#scrate::sr_primitives::ChildrenStorageOverlay,
|
||||
#scrate::sp_runtime::StorageOverlay,
|
||||
#scrate::sp_runtime::ChildrenStorageOverlay,
|
||||
),
|
||||
) -> std::result::Result<(), String> #fn_where_clause {
|
||||
#scrate::BasicExternalities::execute_with_storage(tuple_storage, || {
|
||||
@@ -172,8 +172,8 @@ fn impl_build_storage(
|
||||
fn build_module_genesis_storage(
|
||||
&self,
|
||||
storage: &mut (
|
||||
#scrate::sr_primitives::StorageOverlay,
|
||||
#scrate::sr_primitives::ChildrenStorageOverlay,
|
||||
#scrate::sp_runtime::StorageOverlay,
|
||||
#scrate::sp_runtime::ChildrenStorageOverlay,
|
||||
),
|
||||
) -> std::result::Result<(), String> {
|
||||
self.assimilate_storage::<#fn_traitinstance> (storage)
|
||||
|
||||
@@ -27,12 +27,12 @@ use quote::quote;
|
||||
|
||||
pub mod syn_ext;
|
||||
|
||||
// FIXME #1569, remove the following functions, which are copied from sr-api-macros
|
||||
// FIXME #1569, remove the following functions, which are copied from sp-api-macros
|
||||
use proc_macro2::{TokenStream, Span};
|
||||
use syn::Ident;
|
||||
|
||||
fn generate_hidden_includes_mod_name(unique_id: &str) -> Ident {
|
||||
Ident::new(&format!("sr_api_hidden_includes_{}", unique_id), Span::call_site())
|
||||
Ident::new(&format!("sp_api_hidden_includes_{}", unique_id), Span::call_site())
|
||||
}
|
||||
|
||||
/// Generates the access to the `frame-support` crate.
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -7,12 +7,12 @@ edition = "2018"
|
||||
[dependencies]
|
||||
serde = { version = "1.0.101", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] }
|
||||
runtime-io ={ package = "sr-io", path = "../../../primitives/sr-io", default-features = false }
|
||||
state-machine ={ package = "substrate-state-machine", path = "../../../primitives/state-machine", optional = true }
|
||||
runtime-io ={ package = "sp-io", path = "../../../primitives/sr-io", default-features = false }
|
||||
state-machine ={ package = "sp-state-machine", path = "../../../primitives/state-machine", optional = true }
|
||||
support = { package = "frame-support", version = "2", path = "../", default-features = false }
|
||||
inherents = { package = "substrate-inherents", path = "../../../primitives/inherents", default-features = false }
|
||||
sr-primitives = { package = "sr-primitives", path = "../../../primitives/sr-primitives", default-features = false }
|
||||
primitives = { package = "substrate-primitives", path = "../../../primitives/core", default-features = false }
|
||||
inherents = { package = "sp-inherents", path = "../../../primitives/inherents", default-features = false }
|
||||
sp-runtime = { package = "sp-runtime", path = "../../../primitives/sr-primitives", default-features = false }
|
||||
primitives = { package = "sp-core", path = "../../../primitives/core", default-features = false }
|
||||
trybuild = "1.0.17"
|
||||
pretty_assertions = "0.6.1"
|
||||
|
||||
@@ -25,6 +25,6 @@ std = [
|
||||
"support/std",
|
||||
"inherents/std",
|
||||
"primitives/std",
|
||||
"sr-primitives/std",
|
||||
"sp-runtime/std",
|
||||
"state-machine",
|
||||
]
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#![recursion_limit="128"]
|
||||
|
||||
use sr_primitives::{generic, BuildStorage, traits::{BlakeTwo256, Block as _, Verify}};
|
||||
use sp_runtime::{generic, BuildStorage, traits::{BlakeTwo256, Block as _, Verify}};
|
||||
use support::{
|
||||
Parameter, traits::Get, parameter_types,
|
||||
metadata::{
|
||||
@@ -86,7 +86,7 @@ mod module1 {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Clone, sr_primitives::RuntimeDebug)]
|
||||
#[derive(PartialEq, Eq, Clone, sp_runtime::RuntimeDebug)]
|
||||
pub enum Origin<T: Trait<I>, I> where T::BlockNumber: From<u32> {
|
||||
Members(u32),
|
||||
_Phantom(std::marker::PhantomData<(T, I)>),
|
||||
@@ -148,7 +148,7 @@ mod module2 {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Clone, sr_primitives::RuntimeDebug)]
|
||||
#[derive(PartialEq, Eq, Clone, sp_runtime::RuntimeDebug)]
|
||||
pub enum Origin<T: Trait<I>, I=DefaultInstance> {
|
||||
Members(u32),
|
||||
_Phantom(std::marker::PhantomData<(T, I)>),
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use support::sr_primitives::generic;
|
||||
use support::sr_primitives::traits::{BlakeTwo256, Block as _, Verify};
|
||||
use support::sp_runtime::generic;
|
||||
use support::sp_runtime::traits::{BlakeTwo256, Block as _, Verify};
|
||||
use support::codec::{Encode, Decode};
|
||||
use primitives::{H256, sr25519};
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
@@ -38,7 +38,7 @@ support::decl_error! {
|
||||
}
|
||||
|
||||
/// Origin for the system module.
|
||||
#[derive(PartialEq, Eq, Clone, sr_primitives::RuntimeDebug)]
|
||||
#[derive(PartialEq, Eq, Clone, sp_runtime::RuntimeDebug)]
|
||||
pub enum RawOrigin<AccountId> {
|
||||
Root,
|
||||
Signed(AccountId),
|
||||
|
||||
Reference in New Issue
Block a user