Migrate all doc to new pallet macro (#10187)

* Migrate all doc to new pallet macro

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Fix indent

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Fix format

Signed-off-by: koushiro <koushiro.cqx@gmail.com>
This commit is contained in:
Qinxuan Chen
2021-11-19 06:08:17 +08:00
committed by GitHub
parent 78e60cbc4f
commit 69478639b3
23 changed files with 265 additions and 191 deletions
+10 -11
View File
@@ -140,6 +140,15 @@ mod types;
pub use types::*;
use codec::HasCompact;
use scale_info::TypeInfo;
use sp_runtime::{
traits::{
AtLeast32BitUnsigned, Bounded, CheckedAdd, CheckedSub, Saturating, StaticLookup, Zero,
},
ArithmeticError, TokenError,
};
use sp_std::{borrow::Borrow, convert::TryInto, prelude::*};
use frame_support::{
dispatch::{DispatchError, DispatchResult},
ensure,
@@ -151,16 +160,6 @@ use frame_support::{
},
};
use frame_system::Config as SystemConfig;
use sp_runtime::{
traits::{
AtLeast32BitUnsigned, Bounded, CheckedAdd, CheckedSub, Saturating, StaticLookup, Zero,
},
ArithmeticError, TokenError,
};
use sp_std::{borrow::Borrow, prelude::*};
#[cfg(feature = "std")]
use frame_support::traits::GenesisBuild;
pub use pallet::*;
pub use weights::WeightInfo;
@@ -168,7 +167,7 @@ pub use weights::WeightInfo;
#[frame_support::pallet]
pub mod pallet {
use super::*;
use frame_support::{dispatch::DispatchResult, pallet_prelude::*};
use frame_support::pallet_prelude::*;
use frame_system::pallet_prelude::*;
#[pallet::pallet]
+1 -1
View File
@@ -20,7 +20,7 @@
use super::*;
use crate as pallet_assets;
use frame_support::{construct_runtime, parameter_types};
use frame_support::{construct_runtime, parameter_types, traits::GenesisBuild};
use sp_core::H256;
use sp_runtime::{
testing::Header,