This commit is contained in:
Demi M. Obenour
2020-05-28 12:34:08 -04:00
parent 193104c5e9
commit 36b124d1d5
2 changed files with 38 additions and 9 deletions
+17 -4
View File
@@ -16,11 +16,21 @@
//! Implements support for the pallet_balances module.
use crate::frame::system::{System, SystemEventsDecoder};
use codec::{Decode, Encode};
use crate::frame::system::{
System,
SystemEventsDecoder,
};
use codec::{
Decode,
Encode,
};
use core::marker::PhantomData;
use frame_support::Parameter;
use sp_runtime::traits::{AtLeast32Bit, MaybeSerialize, Member};
use sp_runtime::traits::{
AtLeast32Bit,
MaybeSerialize,
Member,
};
use std::fmt::Debug;
/// The subset of the `pallet_balances::Trait` that a client must implement.
@@ -100,7 +110,10 @@ pub struct TransferEvent<T: Balances> {
mod tests {
use super::*;
use crate::{
system::{AccountStore, AccountStoreExt},
system::{
AccountStore,
AccountStoreExt,
},
tests::test_client,
};
use sp_keyring::AccountKeyring;
+21 -5
View File
@@ -17,18 +17,34 @@
//! A library to **sub**mit e**xt**rinsics to a
//! [substrate](https://github.com/paritytech/substrate) node via RPC.
use crate::{extra::SignedExtra, frame::system::System, Encoded};
use crate::{
extra::SignedExtra,
frame::system::System,
Encoded,
};
use codec::Encode;
use sp_core::Pair;
use sp_runtime::{
generic::{SignedPayload, UncheckedExtrinsic},
traits::{IdentifyAccount, Verify, SignedExtension},
generic::{
SignedPayload,
UncheckedExtrinsic,
},
traits::{
IdentifyAccount,
SignedExtension,
Verify,
},
};
use std::{
future::Future,
marker::PhantomData,
pin::Pin,
};
use std::{future::Future, marker::PhantomData, pin::Pin};
/// Extrinsic signer.
pub trait Signer<T: System, S: Encode, E: SignedExtra<T>>
where <<E as SignedExtra<T>>::Extra as SignedExtension>::AdditionalSigned: Send + Sync
where
<<E as SignedExtra<T>>::Extra as SignedExtension>::AdditionalSigned: Send + Sync,
{
/// Returns the account id.
fn account_id(&self) -> &T::AccountId;