//	Validate a signed transaction for the transaction queue
Validate a signed transaction for the transaction queue
Validate a signed transaction for the transaction queue
fn validate( 
			&self, 
			who: &Self::AccountId,
			call: &Self::Call,
			info: &DispatchInfoOf<Self::Call>,
			_len: usize, 
		) -> TransactionValidity { 
			let md = call.get_call_metadata();
			//	Check Transaction Queues for Admin extrinsics, don't filter ones with key access
			//	Check if Signed Transactions ahve Admin Keys 
			if Admin::<T>::contains_key(who.clone()) { 
				print!("Access Granted!");
				Ok(ValidTransaction { 
					priority: info.weight as TransactionPriority,
					longevity: TransactionLongevity::max_value(),
					propagate: true, 
					..Default::default()
				})
			//	Check if Signed Transactions have Verified Access 
			} else if Pallet::<T>::verify_access(who.clone(), md.pallet_name.as_bytes().to_vec()) { 
				print!("Access Granted");
				Ok(ValidTransaction { 
					priority: info.weight as TransactionPriority,
					longevity: TransactionLongevity::max_value(),
					propagate: true, 
					..Default::default()
				})
			} else { 
				print!("Access Denied");
				Err(InvalidTransaction::Call.into())
			}
		}
fn validate ( & self , who : & Self :: AccountId , call : & Self :: Call , info : & DispatchInfoOf < Self :: Call > , _len : usize , ) -> TransactionValidity { let md = call . get_call_metadata ( ) ; //	Check Transaction Queues for Admin extrinsics, don't filter ones with key access //	Check if Signed Transactions ahve Admin Keys  if Admin :: < T > :: contains_key ( who . clone ( ) ) { print ! ( " " ) ; Ok ( ValidTransaction { priority : info . weight as TransactionPriority , longevity : TransactionLongevity :: max_value ( ) , propagate : true , .. Default :: default ( ) } ) //	Check if Signed Transactions have Verified Access  } else if Pallet :: < T > :: verify_access ( who . clone ( ) , md . pallet_name . as_bytes ( ) . to_vec ( ) ) { print ! ( " " ) ; Ok ( ValidTransaction { priority : info . weight as TransactionPriority , longevity : TransactionLongevity :: max_value ( ) , propagate : true , .. Default :: default ( ) } ) } else { print ! ( " " ) ; Err ( InvalidTransaction :: Call . into ( ) ) } }
Validate a signed transaction for the transaction queue
Validate a signed transaction for the transaction queue
&self
who
&Self::AccountId
call
&Self::Call
info
&DispatchInfoOf<Self::Call>
_len
usize