mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 05:21:03 +00:00
Restructure dispatch macro related exports (#1162)
* restructure dispatch macro related exports * moved Dispatchable to lib.rs * fix .gitignore final newline * ".git/.scripts/commands/fmt/fmt.sh" * fix rustdocs * wip --------- Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> Co-authored-by: command-bot <> Co-authored-by: ordian <write@reusable.software>
This commit is contained in:
@@ -25,9 +25,7 @@ use crate::{
|
||||
};
|
||||
use frame_support::{
|
||||
crypto::ecdsa::ECDSAExt,
|
||||
dispatch::{
|
||||
fmt::Debug, DispatchError, DispatchResult, DispatchResultWithPostInfo, Dispatchable,
|
||||
},
|
||||
dispatch::{DispatchResult, DispatchResultWithPostInfo},
|
||||
ensure,
|
||||
storage::{with_transaction, TransactionOutcome},
|
||||
traits::{
|
||||
@@ -47,8 +45,11 @@ use sp_core::{
|
||||
Get,
|
||||
};
|
||||
use sp_io::{crypto::secp256k1_ecdsa_recover_compressed, hashing::blake2_256};
|
||||
use sp_runtime::traits::{Convert, Hash, Zero};
|
||||
use sp_std::{marker::PhantomData, mem, prelude::*, vec::Vec};
|
||||
use sp_runtime::{
|
||||
traits::{Convert, Dispatchable, Hash, Zero},
|
||||
DispatchError,
|
||||
};
|
||||
use sp_std::{fmt::Debug, marker::PhantomData, mem, prelude::*, vec::Vec};
|
||||
|
||||
pub type AccountIdOf<T> = <T as frame_system::Config>::AccountId;
|
||||
pub type MomentOf<T> = <<T as Config>::Time as Time>::Moment;
|
||||
|
||||
@@ -17,14 +17,12 @@
|
||||
|
||||
use crate::{exec::ExecError, Config, Error};
|
||||
use frame_support::{
|
||||
dispatch::{
|
||||
DispatchError, DispatchErrorWithPostInfo, DispatchResultWithPostInfo, PostDispatchInfo,
|
||||
},
|
||||
dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo, PostDispatchInfo},
|
||||
weights::Weight,
|
||||
DefaultNoBound,
|
||||
};
|
||||
use sp_core::Get;
|
||||
use sp_runtime::traits::Zero;
|
||||
use sp_runtime::{traits::Zero, DispatchError};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -111,10 +111,7 @@ use crate::{
|
||||
use codec::{Codec, Decode, Encode, HasCompact, MaxEncodedLen};
|
||||
use environmental::*;
|
||||
use frame_support::{
|
||||
dispatch::{
|
||||
DispatchError, Dispatchable, GetDispatchInfo, Pays, PostDispatchInfo, RawOrigin,
|
||||
WithPostDispatchInfo,
|
||||
},
|
||||
dispatch::{GetDispatchInfo, Pays, PostDispatchInfo, RawOrigin, WithPostDispatchInfo},
|
||||
ensure,
|
||||
error::BadOrigin,
|
||||
traits::{
|
||||
@@ -137,8 +134,8 @@ use pallet_contracts_primitives::{
|
||||
use scale_info::TypeInfo;
|
||||
use smallvec::Array;
|
||||
use sp_runtime::{
|
||||
traits::{Convert, Hash, Saturating, StaticLookup, Zero},
|
||||
RuntimeDebug,
|
||||
traits::{Convert, Dispatchable, Hash, Saturating, StaticLookup, Zero},
|
||||
DispatchError, RuntimeDebug,
|
||||
};
|
||||
use sp_std::{fmt::Debug, prelude::*};
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ use crate::{
|
||||
AccountIdOf, BalanceOf, CodeHash, Config, HoldReason, Pallet, TrieId, Weight, LOG_TARGET,
|
||||
};
|
||||
#[cfg(feature = "try-runtime")]
|
||||
use frame_support::{dispatch::Vec, traits::fungible::InspectHold};
|
||||
use frame_support::traits::fungible::InspectHold;
|
||||
use frame_support::{
|
||||
pallet_prelude::*,
|
||||
storage_alias,
|
||||
@@ -43,6 +43,8 @@ use sp_core::hexdisplay::HexDisplay;
|
||||
#[cfg(feature = "try-runtime")]
|
||||
use sp_runtime::TryRuntimeError;
|
||||
use sp_runtime::{traits::Zero, Saturating};
|
||||
#[cfg(feature = "try-runtime")]
|
||||
use sp_std::vec::Vec;
|
||||
|
||||
mod old {
|
||||
use super::*;
|
||||
|
||||
@@ -27,7 +27,6 @@ use crate::{
|
||||
};
|
||||
use codec::{Decode, Encode, MaxEncodedLen};
|
||||
use frame_support::{
|
||||
dispatch::DispatchError,
|
||||
storage::child::{self, ChildInfo},
|
||||
weights::Weight,
|
||||
CloneNoBound, DefaultNoBound,
|
||||
@@ -37,7 +36,7 @@ use sp_core::Get;
|
||||
use sp_io::KillStorageResult;
|
||||
use sp_runtime::{
|
||||
traits::{Hash, Saturating, Zero},
|
||||
BoundedBTreeMap, DispatchResult, RuntimeDebug,
|
||||
BoundedBTreeMap, DispatchError, DispatchResult, RuntimeDebug,
|
||||
};
|
||||
use sp_std::{marker::PhantomData, prelude::*};
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ use crate::{
|
||||
};
|
||||
|
||||
use frame_support::{
|
||||
dispatch::{fmt::Debug, DispatchError},
|
||||
ensure,
|
||||
traits::{
|
||||
fungible::{Mutate, MutateHold},
|
||||
@@ -37,9 +36,9 @@ use frame_support::{
|
||||
use sp_api::HashT;
|
||||
use sp_runtime::{
|
||||
traits::{Saturating, Zero},
|
||||
FixedPointNumber, FixedU128,
|
||||
DispatchError, FixedPointNumber, FixedU128,
|
||||
};
|
||||
use sp_std::{marker::PhantomData, vec, vec::Vec};
|
||||
use sp_std::{fmt::Debug, marker::PhantomData, vec, vec::Vec};
|
||||
|
||||
/// Deposit that uses the native fungible's balance type.
|
||||
pub type DepositOf<T> = Deposit<BalanceOf<T>>;
|
||||
|
||||
@@ -42,7 +42,7 @@ use assert_matches::assert_matches;
|
||||
use codec::Encode;
|
||||
use frame_support::{
|
||||
assert_err, assert_err_ignore_postinfo, assert_err_with_weight, assert_noop, assert_ok,
|
||||
dispatch::{DispatchError, DispatchErrorWithPostInfo, PostDispatchInfo},
|
||||
dispatch::{DispatchErrorWithPostInfo, PostDispatchInfo},
|
||||
parameter_types,
|
||||
storage::child,
|
||||
traits::{
|
||||
@@ -61,7 +61,7 @@ use sp_keystore::{testing::MemoryKeystore, KeystoreExt};
|
||||
use sp_runtime::{
|
||||
testing::H256,
|
||||
traits::{BlakeTwo256, Convert, Hash, IdentityLookup},
|
||||
AccountId32, BuildStorage, Perbill, TokenError,
|
||||
AccountId32, BuildStorage, DispatchError, Perbill, TokenError,
|
||||
};
|
||||
|
||||
type Block = frame_system::mocking::MockBlock<Test>;
|
||||
|
||||
@@ -42,12 +42,12 @@ use crate::{
|
||||
};
|
||||
use codec::{Decode, Encode, MaxEncodedLen};
|
||||
use frame_support::{
|
||||
dispatch::{DispatchError, DispatchResult},
|
||||
dispatch::DispatchResult,
|
||||
ensure,
|
||||
traits::{fungible::MutateHold, tokens::Precision::BestEffort},
|
||||
};
|
||||
use sp_core::Get;
|
||||
use sp_runtime::RuntimeDebug;
|
||||
use sp_runtime::{DispatchError, RuntimeDebug};
|
||||
use sp_std::prelude::*;
|
||||
use wasmi::{Instance, Linker, Memory, MemoryType, StackLimits, Store};
|
||||
|
||||
|
||||
@@ -26,13 +26,13 @@ use crate::{
|
||||
|
||||
use bitflags::bitflags;
|
||||
use codec::{Decode, DecodeLimit, Encode, MaxEncodedLen};
|
||||
use frame_support::{dispatch::DispatchError, ensure, traits::Get, weights::Weight};
|
||||
use frame_support::{ensure, traits::Get, weights::Weight};
|
||||
use pallet_contracts_primitives::{ExecReturnValue, ReturnFlags};
|
||||
use pallet_contracts_proc_macro::define_env;
|
||||
use sp_io::hashing::{blake2_128, blake2_256, keccak_256, sha2_256};
|
||||
use sp_runtime::{
|
||||
traits::{Bounded, Zero},
|
||||
RuntimeDebug,
|
||||
DispatchError, RuntimeDebug,
|
||||
};
|
||||
use sp_std::{fmt, prelude::*};
|
||||
use wasmi::{core::HostError, errors::LinkerError, Linker, Memory, Store};
|
||||
|
||||
Reference in New Issue
Block a user