mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
BREAKING: Rename Origin (#12258)
* BREAKING: Rename Origin * more renaming * a bit more renaming * fix * more fixing * fix in frame_support * even more fixes * fix * small fix * ... * update .stderr * docs * update docs * update docs * docs
This commit is contained in:
@@ -233,11 +233,14 @@ impl ExtrinsicT for Extrinsic {
|
||||
}
|
||||
|
||||
impl sp_runtime::traits::Dispatchable for Extrinsic {
|
||||
type Origin = Origin;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type Config = ();
|
||||
type Info = ();
|
||||
type PostInfo = ();
|
||||
fn dispatch(self, _origin: Self::Origin) -> sp_runtime::DispatchResultWithInfo<Self::PostInfo> {
|
||||
fn dispatch(
|
||||
self,
|
||||
_origin: Self::RuntimeOrigin,
|
||||
) -> sp_runtime::DispatchResultWithInfo<Self::PostInfo> {
|
||||
panic!("This implementation should not be used for actual dispatch.");
|
||||
}
|
||||
}
|
||||
@@ -441,22 +444,22 @@ impl GetRuntimeBlockType for Runtime {
|
||||
}
|
||||
|
||||
#[derive(Clone, RuntimeDebug, Encode, Decode, PartialEq, Eq, TypeInfo, MaxEncodedLen)]
|
||||
pub struct Origin;
|
||||
pub struct RuntimeOrigin;
|
||||
|
||||
impl From<frame_system::Origin<Runtime>> for Origin {
|
||||
impl From<frame_system::Origin<Runtime>> for RuntimeOrigin {
|
||||
fn from(_o: frame_system::Origin<Runtime>) -> Self {
|
||||
unimplemented!("Not required in tests!")
|
||||
}
|
||||
}
|
||||
impl From<Origin> for Result<frame_system::Origin<Runtime>, Origin> {
|
||||
fn from(_origin: Origin) -> Result<frame_system::Origin<Runtime>, Origin> {
|
||||
impl From<RuntimeOrigin> for Result<frame_system::Origin<Runtime>, RuntimeOrigin> {
|
||||
fn from(_origin: RuntimeOrigin) -> Result<frame_system::Origin<Runtime>, RuntimeOrigin> {
|
||||
unimplemented!("Not required in tests!")
|
||||
}
|
||||
}
|
||||
|
||||
impl frame_support::traits::OriginTrait for Origin {
|
||||
impl frame_support::traits::OriginTrait for RuntimeOrigin {
|
||||
type Call = <Runtime as frame_system::Config>::RuntimeCall;
|
||||
type PalletsOrigin = Origin;
|
||||
type PalletsOrigin = RuntimeOrigin;
|
||||
type AccountId = <Runtime as frame_system::Config>::AccountId;
|
||||
|
||||
fn add_filter(&mut self, _filter: impl Fn(&Self::Call) -> bool + 'static) {
|
||||
@@ -584,7 +587,7 @@ impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type BlockWeights = RuntimeBlockWeights;
|
||||
type BlockLength = RuntimeBlockLength;
|
||||
type Origin = Origin;
|
||||
type RuntimeOrigin = RuntimeOrigin;
|
||||
type RuntimeCall = Extrinsic;
|
||||
type Index = u64;
|
||||
type BlockNumber = u64;
|
||||
|
||||
@@ -40,7 +40,7 @@ const NONCE_OF: &[u8] = b"nonce:";
|
||||
const BALANCE_OF: &[u8] = b"balance:";
|
||||
|
||||
decl_module! {
|
||||
pub struct Module<T: Config> for enum Call where origin: T::Origin {}
|
||||
pub struct Module<T: Config> for enum Call where origin: T::RuntimeOrigin {}
|
||||
}
|
||||
|
||||
decl_storage! {
|
||||
|
||||
Reference in New Issue
Block a user