mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +00:00
* Companion for #11981 * more renaming * fmt * fixes * add generic type * Companion for #11831 * fix * revert changes * Delete rename-outer-enum.diff * revert * Update run_benches_for_runtime.sh * rename type Call & type Event * passing tests * fmt * small fixes * commit * fix * fmt * commit * error fixes * fix * small fix in test * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * Update lib.rs * remove RuntimeCall from pallet_grandpa * last fix * commit * rename * merge fix * update lockfile for {"substrate"} * cargo +nightly fmt * fix Co-authored-by: parity-processbot <> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -172,7 +172,7 @@ pub mod pallet {
|
||||
#[pallet::config]
|
||||
pub trait Config: frame_system::Config {
|
||||
/// The overarching event type.
|
||||
type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>;
|
||||
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
|
||||
type VestingSchedule: VestingSchedule<Self::AccountId, Moment = Self::BlockNumber>;
|
||||
#[pallet::constant]
|
||||
type Prefix: Get<&'static [u8]>;
|
||||
@@ -597,11 +597,11 @@ impl<T: Config> Pallet<T> {
|
||||
#[scale_info(skip_type_params(T))]
|
||||
pub struct PrevalidateAttests<T: Config + Send + Sync>(sp_std::marker::PhantomData<T>)
|
||||
where
|
||||
<T as frame_system::Config>::Call: IsSubType<Call<T>>;
|
||||
<T as frame_system::Config>::RuntimeCall: IsSubType<Call<T>>;
|
||||
|
||||
impl<T: Config + Send + Sync> Debug for PrevalidateAttests<T>
|
||||
where
|
||||
<T as frame_system::Config>::Call: IsSubType<Call<T>>,
|
||||
<T as frame_system::Config>::RuntimeCall: IsSubType<Call<T>>,
|
||||
{
|
||||
#[cfg(feature = "std")]
|
||||
fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
|
||||
@@ -616,7 +616,7 @@ where
|
||||
|
||||
impl<T: Config + Send + Sync> PrevalidateAttests<T>
|
||||
where
|
||||
<T as frame_system::Config>::Call: IsSubType<Call<T>>,
|
||||
<T as frame_system::Config>::RuntimeCall: IsSubType<Call<T>>,
|
||||
{
|
||||
/// Create new `SignedExtension` to check runtime version.
|
||||
pub fn new() -> Self {
|
||||
@@ -626,10 +626,10 @@ where
|
||||
|
||||
impl<T: Config + Send + Sync> SignedExtension for PrevalidateAttests<T>
|
||||
where
|
||||
<T as frame_system::Config>::Call: IsSubType<Call<T>>,
|
||||
<T as frame_system::Config>::RuntimeCall: IsSubType<Call<T>>,
|
||||
{
|
||||
type AccountId = T::AccountId;
|
||||
type Call = <T as frame_system::Config>::Call;
|
||||
type Call = <T as frame_system::Config>::RuntimeCall;
|
||||
type AdditionalSigned = ();
|
||||
type Pre = ();
|
||||
const IDENTIFIER: &'static str = "PrevalidateAttests";
|
||||
@@ -752,7 +752,7 @@ mod tests {
|
||||
type BlockLength = ();
|
||||
type DbWeight = ();
|
||||
type Origin = Origin;
|
||||
type Call = Call;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type Index = u64;
|
||||
type BlockNumber = u64;
|
||||
type Hash = H256;
|
||||
@@ -760,7 +760,7 @@ mod tests {
|
||||
type AccountId = u64;
|
||||
type Lookup = IdentityLookup<u64>;
|
||||
type Header = Header;
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type BlockHashCount = BlockHashCount;
|
||||
type Version = ();
|
||||
type PalletInfo = PalletInfo;
|
||||
@@ -779,7 +779,7 @@ mod tests {
|
||||
|
||||
impl pallet_balances::Config for Test {
|
||||
type Balance = u64;
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type DustRemoval = ();
|
||||
type ExistentialDeposit = ExistentialDeposit;
|
||||
type AccountStore = System;
|
||||
@@ -794,7 +794,7 @@ mod tests {
|
||||
}
|
||||
|
||||
impl pallet_vesting::Config for Test {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type Currency = Balances;
|
||||
type BlockNumberToBalance = Identity;
|
||||
type MinVestedTransfer = MinVestedTransfer;
|
||||
@@ -810,7 +810,7 @@ mod tests {
|
||||
}
|
||||
|
||||
impl Config for Test {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type VestingSchedule = Vesting;
|
||||
type Prefix = Prefix;
|
||||
type MoveClaimOrigin = frame_system::EnsureSignedBy<Six, u64>;
|
||||
@@ -1052,7 +1052,7 @@ mod tests {
|
||||
fn valid_attest_transactions_are_free() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let p = PrevalidateAttests::<Test>::new();
|
||||
let c = Call::Claims(ClaimsCall::attest {
|
||||
let c = RuntimeCall::Claims(ClaimsCall::attest {
|
||||
statement: StatementKind::Saft.to_text().to_vec(),
|
||||
});
|
||||
let di = c.get_dispatch_info();
|
||||
@@ -1066,13 +1066,13 @@ mod tests {
|
||||
fn invalid_attest_transactions_are_recognized() {
|
||||
new_test_ext().execute_with(|| {
|
||||
let p = PrevalidateAttests::<Test>::new();
|
||||
let c = Call::Claims(ClaimsCall::attest {
|
||||
let c = RuntimeCall::Claims(ClaimsCall::attest {
|
||||
statement: StatementKind::Regular.to_text().to_vec(),
|
||||
});
|
||||
let di = c.get_dispatch_info();
|
||||
let r = p.validate(&42, &c, &di, 20);
|
||||
assert!(r.is_err());
|
||||
let c = Call::Claims(ClaimsCall::attest {
|
||||
let c = RuntimeCall::Claims(ClaimsCall::attest {
|
||||
statement: StatementKind::Saft.to_text().to_vec(),
|
||||
});
|
||||
let di = c.get_dispatch_info();
|
||||
|
||||
Reference in New Issue
Block a user