Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • nodes/rust/duniter-v2s
  • llaq/lc-core-substrate
  • pini-gh/duniter-v2s
  • vincentux/duniter-v2s
  • mildred/duniter-v2s
  • d0p1/duniter-v2s
  • bgallois/duniter-v2s
  • Nicolas80/duniter-v2s
8 results
Show changes
Showing
with 876 additions and 858 deletions
......@@ -84,10 +84,10 @@ pub mod pallet {
type IdtyValidationOrigin: EnsureOrigin<Self::Origin>;
///
type IsMember: sp_runtime::traits::IsMember<Self::IdtyIndex>;
/// On identity confirmed by it's owner
/// On identity confirmed by its owner
type OnIdtyChange: OnIdtyChange<Self>;
/// Handle the logic that remove all identity consumers.
/// "identity consumers" mean all things that rely on the existence of the identity.
/// Handle the logic that removes all identity consumers.
/// "identity consumers" meaning all things that rely on the existence of the identity.
type RemoveIdentityConsumers: RemoveIdentityConsumers<Self::IdtyIndex>;
/// Signing key of revocation payload
type RevocationSigner: IdentifyAccount<AccountId = Self::AccountId>;
......@@ -207,7 +207,7 @@ pub mod pallet {
idty_index: T::IdtyIndex,
owner_key: T::AccountId,
},
/// An identity has been confirmed by it's owner
/// An identity has been confirmed by its owner
/// [idty_index, owner_key, name]
IdtyConfirmed {
idty_index: T::IdtyIndex,
......@@ -229,6 +229,11 @@ pub mod pallet {
// Dispatchable functions must be annotated with a weight and must return a DispatchResult.
#[pallet::call]
impl<T: Config> Pallet<T> {
/// Create an identity for an existing account
///
/// - `owner_key`: the public key corresponding to the identity to be created
///
/// The origin must be allowed to create an identity.
#[pallet::weight(1_000_000_000)]
pub fn create_identity(
origin: OriginFor<T>,
......@@ -291,6 +296,11 @@ pub mod pallet {
T::OnIdtyChange::on_idty_change(idty_index, IdtyEvent::Created { creator });
Ok(().into())
}
/// Confirm the creation of an identity and give it a name
///
/// - `idty_name`: the name uniquely associated to this identity. Must match the validation rules defined by the runtime.
///
/// The identity must have been created using `create_identity` before it can be confirmed.
#[pallet::weight(1_000_000_000)]
pub fn confirm_identity(
origin: OriginFor<T>,
......@@ -362,6 +372,14 @@ pub mod pallet {
Ok(().into())
}
/// Revoke an identity using a signed revocation payload
///
/// - `payload`: the revocation payload
/// - `owner_key`: the public key corresponding to the identity to be revoked
/// - `genesis_hash`: the genesis block hash
/// - `payload_sig`: the signature of the encoded form of `payload`. Must be signed by `owner_key`.
///
/// Any origin can emit this extrinsic, not only `owner_key`.
#[pallet::weight(1_000_000_000)]
pub fn revoke_identity(
origin: OriginFor<T>,
......@@ -458,15 +476,15 @@ pub mod pallet {
IdtyCreationNotAllowed,
/// Identity index not found
IdtyIndexNotFound,
/// Identity name already exist
/// Identity name already exists
IdtyNameAlreadyExist,
/// Idty name invalid
/// Invalid identity name
IdtyNameInvalid,
/// Identity not confirmed by owner
/// Identity not confirmed by its owner
IdtyNotConfirmedByOwner,
/// Identity not found
IdtyNotFound,
/// Idty not member
/// Identity not member
IdtyNotMember,
/// Identity not validated
IdtyNotValidated,
......@@ -476,15 +494,15 @@ pub mod pallet {
NotAllowedToConfirmIdty,
/// Not allowed to validate identity
NotAllowedToValidateIdty,
/// Not same identity name
/// Not the same identity name
NotSameIdtyName,
/// Right already added
RightAlreadyAdded,
/// Right not exist
/// Right does not exist
RightNotExist,
/// Not respect IdtyCreationPeriod
/// Identity creation period is not respected
NotRespectIdtyCreationPeriod,
/// Owner account not exist
/// Owner account does not exist
OwnerAccountNotExist,
}
......
......@@ -56,7 +56,7 @@ fn test_create_identity_ok() {
// We need to initialize at least one block before any call
run_to_block(1);
// Alice should be able te create an identity
// Alice should be able to create an identity
assert_ok!(Identity::create_identity(Origin::signed(1), 2));
let events = System::events();
assert_eq!(events.len(), 1);
......@@ -83,7 +83,7 @@ fn test_create_identity_but_not_confirm_it() {
// We need to initialize at least one block before any call
run_to_block(1);
// Alice should be able te create an identity
// Alice should be able to create an identity
assert_ok!(Identity::create_identity(Origin::signed(1), 2));
// The identity shoud expire in blocs #3
......@@ -127,7 +127,7 @@ fn test_idty_creation_period() {
// We need to initialize at least one block before any call
run_to_block(1);
// Alice should be able te create an identity
// Alice should be able to create an identity
assert_ok!(Identity::create_identity(Origin::signed(1), 2));
let events = System::events();
assert_eq!(events.len(), 1);
......@@ -151,7 +151,7 @@ fn test_idty_creation_period() {
Err(Error::<Test>::NotRespectIdtyCreationPeriod.into())
);
// Alice should be able te create a second identity after block #4
// Alice should be able to create a second identity after block #4
run_to_block(4);
assert_ok!(Identity::create_identity(Origin::signed(1), 3));
let events = System::events();
......
......@@ -21,7 +21,7 @@ std = [
'sp-core/std',
'sp-membership/std',
'sp-runtime/std',
'sp-std/std',
'sp-std/std',
]
try-runtime = ['frame-support/try-runtime']
......
......@@ -18,7 +18,7 @@ std = [
'frame-benchmarking/std',
"sp-core/std",
"sp-io/std",
"sp-std/std",
"sp-std/std",
]
try-runtime = ['frame-support/try-runtime']
......
......@@ -17,7 +17,7 @@ std = [
'frame-support/std',
'frame-system/std',
'frame-benchmarking/std',
"sp-std/std",
"sp-std/std",
]
try-runtime = ['frame-support/try-runtime']
......
......@@ -18,7 +18,7 @@ std = [
'frame-benchmarking/std',
"sp-arithmetic/std",
"sp-io/std",
"sp-std/std",
"sp-std/std",
]
try-runtime = ['frame-support/try-runtime']
......
......@@ -255,7 +255,7 @@ pub mod pallet {
mut members_count: BalanceOf<T>,
count_uds_beetween_two_reevals: BalanceOf<T>, // =(dt/udFrequency)
) -> BalanceOf<T> {
// Ensure that we not divide by zero
// Ensure that we do not divide by zero
if members_count.is_zero() {
members_count = One::one();
}
......
......@@ -17,7 +17,7 @@ std = [
'frame-system/std',
'frame-benchmarking/std',
"sp-io/std",
"sp-std/std",
"sp-std/std",
]
try-runtime = ['frame-support/try-runtime']
......
......@@ -14,8 +14,8 @@ default = ['std']
std = [
'codec/std',
'frame-support/std',
'sp-runtime/std',
'sp-std/std',
'sp-runtime/std',
'sp-std/std',
]
try-runtime = ['frame-support/try-runtime']
......
......@@ -15,8 +15,8 @@ std = [
'codec/std',
'frame-support/std',
'serde',
'sp-runtime/std',
'sp-std/std',
'sp-runtime/std',
'sp-std/std',
]
try-runtime = ['frame-support/try-runtime']
......
......@@ -23,7 +23,7 @@ std = [
'duniter-primitives/std',
'frame-support/std',
'frame-system/std',
'log/std',
'log/std',
'pallet-authority-members/std',
'pallet-babe/std',
'pallet-certification/std',
......
......@@ -16,135 +16,135 @@
#[macro_export]
macro_rules! runtime_apis {
{$($custom:tt)*} => {
impl_runtime_apis! {
$($custom)*
impl sp_authority_discovery::AuthorityDiscoveryApi<Block> for Runtime {
fn authorities() -> Vec<sp_authority_discovery::AuthorityId> {
AuthorityDiscovery::authorities()
}
}
impl sp_consensus_babe::BabeApi<Block> for Runtime {
fn configuration() -> sp_consensus_babe::BabeGenesisConfiguration {
// The choice of `c` parameter (where `1 - c` represents the
// probability of a slot being empty), is done in accordance to the
// slot duration and expected target block time, for safely
// resisting network delays of maximum two seconds.
// <https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results>
use frame_support::traits::Get as _;
sp_consensus_babe::BabeGenesisConfiguration {
slot_duration: Babe::slot_duration(),
epoch_length: EpochDuration::get(),
c: BABE_GENESIS_EPOCH_CONFIG.c,
genesis_authorities: Babe::authorities().to_vec(),
randomness: Babe::randomness(),
allowed_slots: BABE_GENESIS_EPOCH_CONFIG.allowed_slots,
}
}
fn current_epoch_start() -> sp_consensus_babe::Slot {
Babe::current_epoch_start()
}
fn current_epoch() -> sp_consensus_babe::Epoch {
Babe::current_epoch()
}
fn next_epoch() -> sp_consensus_babe::Epoch {
Babe::next_epoch()
}
fn generate_key_ownership_proof(
_slot: sp_consensus_babe::Slot,
authority_id: sp_consensus_babe::AuthorityId,
) -> Option<sp_consensus_babe::OpaqueKeyOwnershipProof> {
use codec::Encode;
Historical::prove((sp_consensus_babe::KEY_TYPE, authority_id))
.map(|p| p.encode())
.map(sp_consensus_babe::OpaqueKeyOwnershipProof::new)
}
fn submit_report_equivocation_unsigned_extrinsic(
equivocation_proof: sp_consensus_babe::EquivocationProof<<Block as BlockT>::Header>,
key_owner_proof: sp_consensus_babe::OpaqueKeyOwnershipProof,
) -> Option<()> {
let key_owner_proof = key_owner_proof.decode()?;
Babe::submit_unsigned_equivocation_report(
equivocation_proof,
key_owner_proof,
)
}
}
impl sp_api::Core<Block> for Runtime {
fn version() -> RuntimeVersion {
VERSION
}
fn execute_block(block: Block) {
Executive::execute_block(block)
}
fn initialize_block(header: &<Block as BlockT>::Header) {
Executive::initialize_block(header)
}
}
impl sp_api::Metadata<Block> for Runtime {
fn metadata() -> OpaqueMetadata {
OpaqueMetadata::new(Runtime::metadata().into())
}
}
impl sp_block_builder::BlockBuilder<Block> for Runtime {
fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {
Executive::apply_extrinsic(extrinsic)
}
fn finalize_block() -> <Block as BlockT>::Header {
Executive::finalize_block()
}
fn inherent_extrinsics(
data: sp_inherents::InherentData,
) -> Vec<<Block as BlockT>::Extrinsic> {
data.create_extrinsics()
}
fn check_inherents(
block: Block,
data: sp_inherents::InherentData,
) -> sp_inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}
}
impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
fn validate_transaction(
source: TransactionSource,
tx: <Block as BlockT>::Extrinsic,
block_hash: <Block as BlockT>::Hash,
) -> TransactionValidity {
// Filtered calls should not enter the tx pool.
if !<Runtime as frame_system::Config>::BaseCallFilter::contains(&tx.function)
{
return sp_runtime::transaction_validity::InvalidTransaction::Call.into();
}
Executive::validate_transaction(source, tx, block_hash)
}
}
impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
fn offchain_worker(header: &<Block as BlockT>::Header) {
Executive::offchain_worker(header)
}
}
impl sp_session::SessionKeys<Block> for Runtime {
{$($custom:tt)*} => {
impl_runtime_apis! {
$($custom)*
impl sp_authority_discovery::AuthorityDiscoveryApi<Block> for Runtime {
fn authorities() -> Vec<sp_authority_discovery::AuthorityId> {
AuthorityDiscovery::authorities()
}
}
impl sp_consensus_babe::BabeApi<Block> for Runtime {
fn configuration() -> sp_consensus_babe::BabeGenesisConfiguration {
// The choice of `c` parameter (where `1 - c` represents the
// probability of a slot being empty), is done in accordance to the
// slot duration and expected target block time, for safely
// resisting network delays of maximum two seconds.
// <https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results>
use frame_support::traits::Get as _;
sp_consensus_babe::BabeGenesisConfiguration {
slot_duration: Babe::slot_duration(),
epoch_length: EpochDuration::get(),
c: BABE_GENESIS_EPOCH_CONFIG.c,
genesis_authorities: Babe::authorities().to_vec(),
randomness: Babe::randomness(),
allowed_slots: BABE_GENESIS_EPOCH_CONFIG.allowed_slots,
}
}
fn current_epoch_start() -> sp_consensus_babe::Slot {
Babe::current_epoch_start()
}
fn current_epoch() -> sp_consensus_babe::Epoch {
Babe::current_epoch()
}
fn next_epoch() -> sp_consensus_babe::Epoch {
Babe::next_epoch()
}
fn generate_key_ownership_proof(
_slot: sp_consensus_babe::Slot,
authority_id: sp_consensus_babe::AuthorityId,
) -> Option<sp_consensus_babe::OpaqueKeyOwnershipProof> {
use codec::Encode;
Historical::prove((sp_consensus_babe::KEY_TYPE, authority_id))
.map(|p| p.encode())
.map(sp_consensus_babe::OpaqueKeyOwnershipProof::new)
}
fn submit_report_equivocation_unsigned_extrinsic(
equivocation_proof: sp_consensus_babe::EquivocationProof<<Block as BlockT>::Header>,
key_owner_proof: sp_consensus_babe::OpaqueKeyOwnershipProof,
) -> Option<()> {
let key_owner_proof = key_owner_proof.decode()?;
Babe::submit_unsigned_equivocation_report(
equivocation_proof,
key_owner_proof,
)
}
}
impl sp_api::Core<Block> for Runtime {
fn version() -> RuntimeVersion {
VERSION
}
fn execute_block(block: Block) {
Executive::execute_block(block)
}
fn initialize_block(header: &<Block as BlockT>::Header) {
Executive::initialize_block(header)
}
}
impl sp_api::Metadata<Block> for Runtime {
fn metadata() -> OpaqueMetadata {
OpaqueMetadata::new(Runtime::metadata().into())
}
}
impl sp_block_builder::BlockBuilder<Block> for Runtime {
fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {
Executive::apply_extrinsic(extrinsic)
}
fn finalize_block() -> <Block as BlockT>::Header {
Executive::finalize_block()
}
fn inherent_extrinsics(
data: sp_inherents::InherentData,
) -> Vec<<Block as BlockT>::Extrinsic> {
data.create_extrinsics()
}
fn check_inherents(
block: Block,
data: sp_inherents::InherentData,
) -> sp_inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}
}
impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
fn validate_transaction(
source: TransactionSource,
tx: <Block as BlockT>::Extrinsic,
block_hash: <Block as BlockT>::Hash,
) -> TransactionValidity {
// Filtered calls should not enter the tx pool.
if !<Runtime as frame_system::Config>::BaseCallFilter::contains(&tx.function)
{
return sp_runtime::transaction_validity::InvalidTransaction::Call.into();
}
Executive::validate_transaction(source, tx, block_hash)
}
}
impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
fn offchain_worker(header: &<Block as BlockT>::Header) {
Executive::offchain_worker(header)
}
}
impl sp_session::SessionKeys<Block> for Runtime {
fn decode_session_keys(
encoded: Vec<u8>,
) -> Option<Vec<(Vec<u8>, KeyTypeId)>> {
......@@ -161,9 +161,9 @@ macro_rules! runtime_apis {
Grandpa::grandpa_authorities()
}
fn current_set_id() -> fg_primitives::SetId {
Grandpa::current_set_id()
}
fn current_set_id() -> fg_primitives::SetId {
Grandpa::current_set_id()
}
fn submit_report_equivocation_unsigned_extrinsic(
_equivocation_proof: fg_primitives::EquivocationProof<
......@@ -186,88 +186,88 @@ macro_rules! runtime_apis {
}
}
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
fn account_nonce(account: AccountId) -> Index {
System::account_nonce(account)
}
}
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
for Runtime {
fn query_info(
uxt: <Block as BlockT>::Extrinsic,
len: u32,
) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo<Balance> {
TransactionPayment::query_info(uxt, len)
}
fn query_fee_details(
uxt: <Block as BlockT>::Extrinsic,
len: u32,
) -> pallet_transaction_payment::FeeDetails<Balance> {
TransactionPayment::query_fee_details(uxt, len)
}
}
#[cfg(feature = "try-runtime")]
impl frame_try_runtime::TryRuntime<Block> for Runtime {
fn on_runtime_upgrade() -> (Weight, Weight) {
log::info!("try-runtime::on_runtime_upgrade.");
let weight = Executive::try_runtime_upgrade().unwrap();
(weight, BlockWeights::get().max_block)
}
fn execute_block_no_check(block: Block) -> Weight {
Executive::execute_block_no_check(block)
}
}
#[cfg(feature = "runtime-benchmarks")]
impl frame_benchmarking::Benchmark<Block> for Runtime {
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig,
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
use frame_benchmarking::{
add_benchmark, BenchmarkBatch, Benchmarking, TrackedStorageKey,
};
use frame_system_benchmarking::Pallet as SystemBench;
impl frame_system_benchmarking::Config for Runtime {}
use pallet_crowdloan_rewards::Pallet as PalletCrowdloanRewardsBench;
use parachain_staking::Pallet as ParachainStakingBench;
use pallet_author_mapping::Pallet as PalletAuthorMappingBench;
let whitelist: Vec<TrackedStorageKey> = vec![];
let mut batches = Vec::<BenchmarkBatch>::new();
let params = (&config, &whitelist);
add_benchmark!(
params,
batches,
parachain_staking,
ParachainStakingBench::<Runtime>
);
// add_benchmark!(
// params,
// batches,
// pallet_crowdloan_rewards,
// PalletCrowdloanRewardsBench::<Runtime>
// );
add_benchmark!(
params,
batches,
pallet_author_mapping,
PalletAuthorMappingBench::<Runtime>
);
add_benchmark!(params, batches, frame_system, SystemBench::<Runtime>);
if batches.is_empty() {
return Err("Benchmark not found for this pallet.".into());
}
Ok(batches)
}
}
}
};
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Index> for Runtime {
fn account_nonce(account: AccountId) -> Index {
System::account_nonce(account)
}
}
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
for Runtime {
fn query_info(
uxt: <Block as BlockT>::Extrinsic,
len: u32,
) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo<Balance> {
TransactionPayment::query_info(uxt, len)
}
fn query_fee_details(
uxt: <Block as BlockT>::Extrinsic,
len: u32,
) -> pallet_transaction_payment::FeeDetails<Balance> {
TransactionPayment::query_fee_details(uxt, len)
}
}
#[cfg(feature = "try-runtime")]
impl frame_try_runtime::TryRuntime<Block> for Runtime {
fn on_runtime_upgrade() -> (Weight, Weight) {
log::info!("try-runtime::on_runtime_upgrade.");
let weight = Executive::try_runtime_upgrade().unwrap();
(weight, BlockWeights::get().max_block)
}
fn execute_block_no_check(block: Block) -> Weight {
Executive::execute_block_no_check(block)
}
}
#[cfg(feature = "runtime-benchmarks")]
impl frame_benchmarking::Benchmark<Block> for Runtime {
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig,
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, sp_runtime::RuntimeString> {
use frame_benchmarking::{
add_benchmark, BenchmarkBatch, Benchmarking, TrackedStorageKey,
};
use frame_system_benchmarking::Pallet as SystemBench;
impl frame_system_benchmarking::Config for Runtime {}
use pallet_crowdloan_rewards::Pallet as PalletCrowdloanRewardsBench;
use parachain_staking::Pallet as ParachainStakingBench;
use pallet_author_mapping::Pallet as PalletAuthorMappingBench;
let whitelist: Vec<TrackedStorageKey> = vec![];
let mut batches = Vec::<BenchmarkBatch>::new();
let params = (&config, &whitelist);
add_benchmark!(
params,
batches,
parachain_staking,
ParachainStakingBench::<Runtime>
);
// add_benchmark!(
// params,
// batches,
// pallet_crowdloan_rewards,
// PalletCrowdloanRewardsBench::<Runtime>
// );
add_benchmark!(
params,
batches,
pallet_author_mapping,
PalletAuthorMappingBench::<Runtime>
);
add_benchmark!(params, batches, frame_system, SystemBench::<Runtime>);
if batches.is_empty() {
return Err("Benchmark not found for this pallet.".into());
}
Ok(batches)
}
}
}
};
}
......@@ -22,37 +22,37 @@ use serde::{Deserialize, Serialize};
#[macro_export]
macro_rules! declare_session_keys {
{} => {
pub mod opaque {
use super::*;
{} => {
pub mod opaque {
use super::*;
impl_opaque_keys! {
pub struct SessionKeys {
pub grandpa: Grandpa,
pub babe: Babe,
pub im_online: ImOnline,
pub authority_discovery: AuthorityDiscovery,
}
}
impl_opaque_keys! {
pub struct SessionKeys {
pub grandpa: Grandpa,
pub babe: Babe,
pub im_online: ImOnline,
pub authority_discovery: AuthorityDiscovery,
}
}
#[derive(Clone, codec::Decode, Debug, codec::Encode, Eq, PartialEq)]
pub struct SessionKeysWrapper(pub SessionKeys);
#[derive(Clone, codec::Decode, Debug, codec::Encode, Eq, PartialEq)]
pub struct SessionKeysWrapper(pub SessionKeys);
impl From<SessionKeysWrapper> for SessionKeys {
fn from(keys_wrapper: SessionKeysWrapper) -> SessionKeys {
keys_wrapper.0
}
}
impl From<SessionKeysWrapper> for SessionKeys {
fn from(keys_wrapper: SessionKeysWrapper) -> SessionKeys {
keys_wrapper.0
}
}
impl scale_info::TypeInfo for SessionKeysWrapper {
type Identity = [u8; 128];
impl scale_info::TypeInfo for SessionKeysWrapper {
type Identity = [u8; 128];
fn type_info() -> scale_info::Type {
Self::Identity::type_info()
}
}
}
}
fn type_info() -> scale_info::Type {
Self::Identity::type_info()
}
}
}
}
}
#[cfg_attr(feature = "std", derive(Deserialize, Serialize))]
......
......@@ -39,7 +39,7 @@ pub type Address = sp_runtime::MultiAddress<AccountId, ()>;
/// Balance of an account.
pub type Balance = u64;
/// Bock type.
/// Block type.
pub type Block = sp_runtime::generic::Block<Header, UncheckedExtrinsic>;
/// Block identifier type.
......
This diff is collapsed.
......@@ -34,11 +34,11 @@ std = [
'frame-support/std',
'frame-system-rpc-runtime-api/std',
'frame-system/std',
"frame-try-runtime/std",
'pallet-atomic-swap/std',
'log/std',
'pallet-authority-discovery/std',
'pallet-authority-members/std',
"frame-try-runtime/std",
'pallet-atomic-swap/std',
'log/std',
'pallet-authority-discovery/std',
'pallet-authority-members/std',
'pallet-babe/std',
'pallet-balances/std',
'pallet-certification/std',
......@@ -49,7 +49,7 @@ std = [
'pallet-grandpa/std',
'pallet-identity/std',
'pallet-membership/std',
'pallet-provide-randomness/std',
'pallet-provide-randomness/std',
'pallet-im-online/std',
'pallet-multisig/std',
'pallet-preimage/std',
......@@ -66,7 +66,7 @@ std = [
'serde',
'sp-api/std',
'sp-arithmetic/std',
'sp-authority-discovery/std',
'sp-authority-discovery/std',
'sp-block-builder/std',
'sp-consensus-babe/std',
'sp-core/std',
......@@ -80,25 +80,25 @@ std = [
'sp-version/std',
]
try-runtime = [
"frame-executive/try-runtime",
"frame-try-runtime",
"frame-system/try-runtime",
"pallet-authority-discovery/try-runtime",
"pallet-authorship/try-runtime",
"pallet-balances/try-runtime",
"pallet-transaction-payment/try-runtime",
"pallet-collective/try-runtime",
"pallet-grandpa/try-runtime",
"pallet-im-online/try-runtime",
"pallet-multisig/try-runtime",
"pallet-offences/try-runtime",
"pallet-proxy/try-runtime",
"pallet-scheduler/try-runtime",
"pallet-session/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-treasury/try-runtime",
"pallet-babe/try-runtime",
"pallet-utility/try-runtime",
"frame-executive/try-runtime",
"frame-try-runtime",
"frame-system/try-runtime",
"pallet-authority-discovery/try-runtime",
"pallet-authorship/try-runtime",
"pallet-balances/try-runtime",
"pallet-transaction-payment/try-runtime",
"pallet-collective/try-runtime",
"pallet-grandpa/try-runtime",
"pallet-im-online/try-runtime",
"pallet-multisig/try-runtime",
"pallet-offences/try-runtime",
"pallet-proxy/try-runtime",
"pallet-scheduler/try-runtime",
"pallet-session/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-treasury/try-runtime",
"pallet-babe/try-runtime",
"pallet-utility/try-runtime",
]
[dev-dependencies]
......
......@@ -34,11 +34,11 @@ std = [
'frame-support/std',
'frame-system-rpc-runtime-api/std',
'frame-system/std',
"frame-try-runtime/std",
'pallet-atomic-swap/std',
'log/std',
'pallet-authority-discovery/std',
'pallet-authority-members/std',
"frame-try-runtime/std",
'pallet-atomic-swap/std',
'log/std',
'pallet-authority-discovery/std',
'pallet-authority-members/std',
'pallet-babe/std',
'pallet-balances/std',
'pallet-certification/std',
......@@ -49,7 +49,7 @@ std = [
'pallet-grandpa/std',
'pallet-identity/std',
'pallet-membership/std',
'pallet-provide-randomness/std',
'pallet-provide-randomness/std',
'pallet-im-online/std',
'pallet-multisig/std',
'pallet-preimage/std',
......@@ -66,7 +66,7 @@ std = [
'serde',
'sp-api/std',
'sp-arithmetic/std',
'sp-authority-discovery/std',
'sp-authority-discovery/std',
'sp-block-builder/std',
'sp-consensus-babe/std',
'sp-core/std',
......@@ -80,25 +80,25 @@ std = [
'sp-version/std',
]
try-runtime = [
"frame-executive/try-runtime",
"frame-try-runtime",
"frame-system/try-runtime",
"pallet-authority-discovery/try-runtime",
"pallet-authorship/try-runtime",
"pallet-balances/try-runtime",
"pallet-transaction-payment/try-runtime",
"pallet-collective/try-runtime",
"pallet-grandpa/try-runtime",
"pallet-im-online/try-runtime",
"pallet-multisig/try-runtime",
"pallet-offences/try-runtime",
"pallet-proxy/try-runtime",
"pallet-scheduler/try-runtime",
"pallet-session/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-treasury/try-runtime",
"pallet-babe/try-runtime",
"pallet-utility/try-runtime",
"frame-executive/try-runtime",
"frame-try-runtime",
"frame-system/try-runtime",
"pallet-authority-discovery/try-runtime",
"pallet-authorship/try-runtime",
"pallet-balances/try-runtime",
"pallet-transaction-payment/try-runtime",
"pallet-collective/try-runtime",
"pallet-grandpa/try-runtime",
"pallet-im-online/try-runtime",
"pallet-multisig/try-runtime",
"pallet-offences/try-runtime",
"pallet-proxy/try-runtime",
"pallet-scheduler/try-runtime",
"pallet-session/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-treasury/try-runtime",
"pallet-babe/try-runtime",
"pallet-utility/try-runtime",
]
[dev-dependencies]
......
......@@ -186,7 +186,7 @@ fn test_create_new_account_with_insufficient_balance() {
})
);
// At next bloc, the new account must be reaped because it's balance is not sufficient
// At next block, the new account must be reaped because its balance is not sufficient
// to pay the "new account tax"
run_to_block(3);
let events = System::events();
......@@ -251,8 +251,8 @@ fn test_create_new_account() {
})
);
// At next bloc, the new account must be created,
// and new account tax should be collected and deposited in the terasury
// At next block, the new account must be created,
// and new account tax should be collected and deposited in the treasury
run_to_block(3);
let events = System::events();
println!("{:#?}", events);
......@@ -338,7 +338,7 @@ fn test_create_new_idty() {
AccountKeyring::Eve.to_account_id(),
));
// At next bloc, nothing should be preleved
// At next block, nothing should be preleved
run_to_block(3);
let events = System::events();
assert_eq!(events.len(), 0);
......
......@@ -34,11 +34,11 @@ std = [
'frame-support/std',
'frame-system-rpc-runtime-api/std',
'frame-system/std',
"frame-try-runtime/std",
'pallet-atomic-swap/std',
'log/std',
'pallet-authority-discovery/std',
'pallet-authority-members/std',
"frame-try-runtime/std",
'pallet-atomic-swap/std',
'log/std',
'pallet-authority-discovery/std',
'pallet-authority-members/std',
'pallet-babe/std',
'pallet-balances/std',
'pallet-certification/std',
......@@ -49,7 +49,7 @@ std = [
'pallet-grandpa/std',
'pallet-identity/std',
'pallet-membership/std',
'pallet-provide-randomness/std',
'pallet-provide-randomness/std',
'pallet-im-online/std',
'pallet-multisig/std',
'pallet-preimage/std',
......@@ -66,7 +66,7 @@ std = [
'serde',
'sp-api/std',
'sp-arithmetic/std',
'sp-authority-discovery/std',
'sp-authority-discovery/std',
'sp-block-builder/std',
'sp-consensus-babe/std',
'sp-core/std',
......@@ -80,25 +80,25 @@ std = [
'sp-version/std',
]
try-runtime = [
"frame-executive/try-runtime",
"frame-try-runtime",
"frame-system/try-runtime",
"pallet-authority-discovery/try-runtime",
"pallet-authorship/try-runtime",
"pallet-balances/try-runtime",
"pallet-transaction-payment/try-runtime",
"pallet-collective/try-runtime",
"pallet-grandpa/try-runtime",
"pallet-im-online/try-runtime",
"pallet-multisig/try-runtime",
"pallet-offences/try-runtime",
"pallet-proxy/try-runtime",
"pallet-scheduler/try-runtime",
"pallet-session/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-treasury/try-runtime",
"pallet-babe/try-runtime",
"pallet-utility/try-runtime",
"frame-executive/try-runtime",
"frame-try-runtime",
"frame-system/try-runtime",
"pallet-authority-discovery/try-runtime",
"pallet-authorship/try-runtime",
"pallet-balances/try-runtime",
"pallet-transaction-payment/try-runtime",
"pallet-collective/try-runtime",
"pallet-grandpa/try-runtime",
"pallet-im-online/try-runtime",
"pallet-multisig/try-runtime",
"pallet-offences/try-runtime",
"pallet-proxy/try-runtime",
"pallet-scheduler/try-runtime",
"pallet-session/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-treasury/try-runtime",
"pallet-babe/try-runtime",
"pallet-utility/try-runtime",
]
[dev-dependencies]
......