Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .maintain/pallet-weight-template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#![allow(unused_parens)]
#![allow(unused_imports)]

use core::marker::PhantomData;
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use sp_std::marker::PhantomData;

/// Weights for `{{pallet}}`.
pub struct WeightInfo<T>(PhantomData<T>);
Expand Down
9 changes: 0 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ sp-offchain = { git = "https://github.com/parityt
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
sp-session = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
sp-staking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
sp-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
sp-transaction-pool = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "stable2409", default-features = false }
Expand Down
2 changes: 0 additions & 2 deletions pallet/account-migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ pallet-assets = { workspace = true }
pallet-balances = { workspace = true }
sp-core = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }
# polkadot-sdk optional
frame-benchmarking = { workspace = true, optional = true }

Expand Down Expand Up @@ -51,7 +50,6 @@ std = [
"pallet-balances/std",
"sp-core/std",
"sp-runtime/std",
"sp-std/std",
# polkadot-sdk optional
"frame-benchmarking?/std",
]
Expand Down
1 change: 0 additions & 1 deletion pallet/account-migration/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use crate::*;
// polkadot-sdk
use frame_benchmarking::v2::*;
use frame_system::RawOrigin;
use sp_std::prelude::*;

#[v2::benchmarks]
mod benchmarks {
Expand Down
5 changes: 4 additions & 1 deletion pallet/account-migration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![deny(missing_docs)]

extern crate alloc;

#[cfg(feature = "runtime-benchmarks")]
mod benchmarking;
#[cfg(all(test, feature = "runtime-benchmarks"))]
Expand All @@ -53,6 +55,8 @@ mod tests;
mod weights;
pub use weights::WeightInfo;

// alloc
use alloc::{borrow::ToOwned, vec, vec::Vec};
// crates.io
use array_bytes::Hexify;
// darwinia
Expand All @@ -75,7 +79,6 @@ use sp_runtime::{
traits::{IdentityLookup, Verify},
AccountId32,
};
use sp_std::prelude::*;

#[frame_support::pallet]
pub mod pallet {
Expand Down
2 changes: 0 additions & 2 deletions pallet/deposit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-timestamp = { workspace = true }
sp-core = { workspace = true }
sp-std = { workspace = true }
# polkadot-sdk optional
frame-benchmarking = { workspace = true, optional = true }

Expand Down Expand Up @@ -56,7 +55,6 @@ std = [
"pallet-timestamp/std",
"sp-core/std",
"sp-runtime/std",
"sp-std/std",
# polkadot-sdk optional
"frame-benchmarking?/std",
]
Expand Down
1 change: 0 additions & 1 deletion pallet/deposit/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use crate::{Deposit, *};
// polkadot-sdk
use frame_benchmarking::v2::*;
use frame_system::RawOrigin;
use sp_std::prelude::*;

#[v2::benchmarks]
mod benchmarks {
Expand Down
5 changes: 4 additions & 1 deletion pallet/deposit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![deny(missing_docs)]

extern crate alloc;

#[cfg(test)]
mod mock;
#[cfg(test)]
Expand All @@ -39,6 +41,8 @@ pub use weights::WeightInfo;

// core
use core::marker::PhantomData;
// alloc
use alloc::{borrow::ToOwned, boxed::Box, vec, vec::Vec};
// crates.io
use ethabi::{Function, Param, ParamType, StateMutability, Token};
// darwinia
Expand All @@ -52,7 +56,6 @@ use frame_support::{
};
use frame_system::pallet_prelude::*;
use sp_core::H160;
use sp_std::prelude::*;

#[frame_support::pallet]
pub mod pallet {
Expand Down
2 changes: 0 additions & 2 deletions pallet/ethtx-forwarder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ frame-support = { workspace = true }
frame-system = { workspace = true }
sp-core = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }

[dev-dependencies]
# crates.io
Expand Down Expand Up @@ -71,7 +70,6 @@ std = [
"frame-system/std",
"sp-core/std",
"sp-runtime/std",
"sp-std/std",
]

runtime-benchmarks = [
Expand Down
5 changes: 4 additions & 1 deletion pallet/ethtx-forwarder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@

#![cfg_attr(not(feature = "std"), no_std)]

extern crate alloc;

#[cfg(test)]
mod mock;
#[cfg(test)]
mod test;

// alloc
use alloc::vec::Vec;
// crates.io
use codec::{Decode, Encode, MaxEncodedLen};
use ethabi::{Function, Token};
Expand All @@ -48,7 +52,6 @@ use sp_runtime::{
traits::{BadOrigin, UniqueSaturatedInto},
DispatchError, RuntimeDebug,
};
use sp_std::vec::Vec;

pub use pallet::*;

Expand Down
1 change: 0 additions & 1 deletion pallet/ethtx-forwarder/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ use crate::*;
// polkadot-sdk
use frame_support::derive_impl;
use sp_runtime::BuildStorage;
use sp_std::prelude::*;

pub type AccountId = sp_core::H160;
pub type Balance = u64;
Expand Down
2 changes: 0 additions & 2 deletions pallet/staking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pallet-authorship = { workspace = true }
pallet-session = { workspace = true }
sp-core = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }
# polkadot-sdk optional
frame-benchmarking = { workspace = true, optional = true }

Expand Down Expand Up @@ -65,7 +64,6 @@ std = [
"pallet-session/std",
"sp-core/std",
"sp-runtime/std",
"sp-std/std",
# polkadot-sdk optional
"frame-benchmarking?/std",
]
Expand Down
1 change: 0 additions & 1 deletion pallet/staking/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use crate::*;
// polkadot-sdk
use frame_benchmarking::v2::*;
use frame_system::RawOrigin;
use sp_std::prelude::*;

#[v2::benchmarks]
mod benchmarks {
Expand Down
5 changes: 4 additions & 1 deletion pallet/staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#![deny(missing_docs)]
#![allow(clippy::needless_borrows_for_generic_args)]

extern crate alloc;

#[cfg(test)]
mod mock;
#[cfg(test)]
Expand All @@ -38,6 +40,8 @@ mod benchmarking;
mod weights;
pub use weights::WeightInfo;

// alloc
use alloc::{borrow::ToOwned, boxed::Box, collections::btree_map::BTreeMap, vec, vec::Vec};
// crates.io
use codec::FullCodec;
use ethabi::{Function, Param, ParamType, StateMutability, Token};
Expand All @@ -51,7 +55,6 @@ use sp_runtime::{
traits::{AccountIdConversion, Convert, One},
Perbill,
};
use sp_std::{collections::btree_map::BTreeMap, prelude::*};

#[frame_support::pallet]
pub mod pallet {
Expand Down
2 changes: 0 additions & 2 deletions precompile/assets/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ frame-system = { workspace = true }
pallet-assets = { workspace = true }
sp-core = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }

[dev-dependencies]
# crates.io
Expand Down Expand Up @@ -54,7 +53,6 @@ std = [
"pallet-assets/std",
"sp-core/std",
"sp-runtime/std",
"sp-std/std",
]

runtime-benchmarks = [
Expand Down
11 changes: 8 additions & 3 deletions precompile/assets/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@

#![cfg_attr(not(feature = "std"), no_std)]

#[cfg(test)]
extern crate alloc;

#[cfg(test)]
mod mock;
#[cfg(test)]
mod tests;

// std
use core::marker::PhantomData;
// core
use core::{
convert::{TryFrom, TryInto},
marker::PhantomData,
};
// polkadot-sdk
use frame_support::{
dispatch::{GetDispatchInfo, PostDispatchInfo},
Expand All @@ -38,7 +44,6 @@ use frame_support::{
};
use sp_core::{MaxEncodedLen, H160, U256};
use sp_runtime::traits::Bounded;
use sp_std::convert::{TryFrom, TryInto};
// moonbeam
use precompile_utils::prelude::*;

Expand Down
3 changes: 2 additions & 1 deletion precompile/assets/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

// core
use core::marker::PhantomData;
// alloc
use alloc::vec::Vec;
// crates.io
use codec::{Decode, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
Expand All @@ -29,7 +31,6 @@ use crate::*;
use frame_support::derive_impl;
use sp_core::H160;
use sp_runtime::BuildStorage;
use sp_std::prelude::*;

pub type Balance = u128;
pub type AssetId = u32;
Expand Down
3 changes: 2 additions & 1 deletion precompile/assets/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License
// along with Darwinia. If not, see <https://www.gnu.org/licenses/>.

// alloc
use alloc::str::from_utf8;
// crates.io
use sha3::{Digest, Keccak256};
// darwinia
Expand All @@ -31,7 +33,6 @@ use precompile_utils::{
// polkadot-sdk
use frame_support::assert_ok;
use sp_core::{H256, U256};
use sp_std::str::from_utf8;

fn precompiles() -> TestPrecompiles<Runtime> {
PrecompilesValue::get()
Expand Down
2 changes: 0 additions & 2 deletions precompile/state-storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ precompile-utils = { workspace = true }

# polkadot-sdk
frame-support = { workspace = true }
sp-std = { workspace = true }

[dev-dependencies]
# crates.io
Expand Down Expand Up @@ -46,5 +45,4 @@ std = [

# polkadot-sdk
"frame-support/std",
"sp-std/std",
]
5 changes: 4 additions & 1 deletion precompile/state-storage/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@

#![cfg_attr(not(feature = "std"), no_std)]

#[cfg(test)]
extern crate alloc;

#[cfg(test)]
mod mock;
#[cfg(test)]
mod tests;

// std
// core
use core::marker::PhantomData;
// moonbeam
use precompile_utils::prelude::*;
Expand Down
Loading
Loading