Skip to content
Merged
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
4 changes: 2 additions & 2 deletions modules/auction-manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#![allow(clippy::upper_case_acronyms)]
#![allow(clippy::unnecessary_unwrap)]

use codec::MaxEncodedLen;
use frame_support::{log, pallet_prelude::*, transactional};
use frame_system::{
offchain::{SendTransactionTypes, SubmitTransaction},
Expand Down Expand Up @@ -69,7 +70,7 @@ pub const DEFAULT_MAX_ITERATIONS: u32 = 1000;

/// Information of an collateral auction
#[cfg_attr(feature = "std", derive(PartialEq, Eq))]
#[derive(Encode, Decode, Clone, RuntimeDebug, TypeInfo)]
#[derive(Encode, Decode, Clone, RuntimeDebug, TypeInfo, MaxEncodedLen)]
pub struct CollateralAuctionItem<AccountId, BlockNumber> {
/// Refund recipient for may receive refund
refund_recipient: AccountId,
Expand Down Expand Up @@ -254,7 +255,6 @@ pub mod module {
pub type TotalTargetInAuction<T: Config> = StorageValue<_, Balance, ValueQuery>;

#[pallet::pallet]
#[pallet::without_storage_info]
pub struct Pallet<T>(_);

#[pallet::hooks]
Expand Down
4 changes: 2 additions & 2 deletions modules/cdp-engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#![allow(clippy::unused_unit)]
#![allow(clippy::upper_case_acronyms)]

use codec::MaxEncodedLen;
use frame_support::{log, pallet_prelude::*, traits::UnixTime, transactional};
use frame_system::{
offchain::{SendTransactionTypes, SubmitTransaction},
Expand Down Expand Up @@ -76,7 +77,7 @@ pub const DEFAULT_MAX_ITERATIONS: u32 = 1000;
pub type LoansOf<T> = loans::Pallet<T>;

/// Risk management params
#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, Default, TypeInfo)]
#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, Default, TypeInfo, MaxEncodedLen)]
pub struct RiskManagementParams {
/// Maximum total debit value generated from it, when reach the hard
/// cap, CDP's owner cannot issue more stablecoin under the collateral
Expand Down Expand Up @@ -354,7 +355,6 @@ pub mod module {
}

#[pallet::pallet]
#[pallet::without_storage_info]
pub struct Pallet<T>(_);

#[pallet::hooks]
Expand Down
1 change: 0 additions & 1 deletion modules/cdp-treasury/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ pub mod module {
}

#[pallet::pallet]
#[pallet::without_storage_info]
pub struct Pallet<T>(_);

#[pallet::hooks]
Expand Down
1 change: 0 additions & 1 deletion modules/dex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ pub mod module {
}

#[pallet::pallet]
#[pallet::without_storage_info]
pub struct Pallet<T>(_);

#[pallet::hooks]
Expand Down
10 changes: 8 additions & 2 deletions modules/example/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![allow(clippy::unused_unit)]

use codec::MaxEncodedLen;
use frame_support::pallet_prelude::*;
use frame_system::pallet_prelude::*;

Expand All @@ -38,7 +39,13 @@ pub mod module {

#[pallet::config]
pub trait Config: frame_system::Config {
type Balance: Parameter + codec::HasCompact + From<u32> + Into<Weight> + Default + MaybeSerializeDeserialize;
type Balance: Parameter
+ codec::HasCompact
+ From<u32>
+ Into<Weight>
+ Default
+ MaybeSerializeDeserialize
+ MaxEncodedLen;
#[pallet::constant]
type SomeConst: Get<Self::Balance>;
type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>;
Expand Down Expand Up @@ -108,7 +115,6 @@ pub mod module {
}

#[pallet::pallet]
#[pallet::without_storage_info]
pub struct Pallet<T>(_);

#[pallet::hooks]
Expand Down
10 changes: 8 additions & 2 deletions modules/homa-validator-list/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,14 @@ pub mod module {
/// The overarching event type.
type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>;
/// The AccountId of a relay chain account.
type RelaychainAccountId: Parameter + Member + MaybeSerializeDeserialize + Debug + MaybeDisplay + Ord + Default;
type RelaychainAccountId: Parameter
+ Member
+ MaybeSerializeDeserialize
+ Debug
+ MaybeDisplay
+ Ord
+ Default
+ MaxEncodedLen;
/// The liquid representation of the staking token on the relay chain.
type LiquidTokenCurrency: BasicLockableCurrency<Self::AccountId, Balance = Balance>;
#[pallet::constant]
Expand Down Expand Up @@ -268,7 +275,6 @@ pub mod module {
StorageMap<_, Blake2_128Concat, T::RelaychainAccountId, ValidatorBacking, OptionQuery>;

#[pallet::pallet]
#[pallet::without_storage_info]
pub struct Pallet<T>(_);

#[pallet::hooks]
Expand Down
1 change: 0 additions & 1 deletion modules/honzon-bridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ pub mod module {
}

#[pallet::pallet]
#[pallet::without_storage_info]
pub struct Pallet<T>(_);

#[pallet::hooks]
Expand Down
1 change: 0 additions & 1 deletion modules/honzon/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ pub mod module {
>;

#[pallet::pallet]
#[pallet::without_storage_info]
pub struct Pallet<T>(_);

#[pallet::hooks]
Expand Down
1 change: 0 additions & 1 deletion modules/loans/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ pub mod module {
pub type TotalPositions<T: Config> = StorageMap<_, Twox64Concat, CurrencyId, Position, ValueQuery>;

#[pallet::pallet]
#[pallet::without_storage_info]
pub struct Pallet<T>(_);

#[pallet::hooks]
Expand Down
1 change: 0 additions & 1 deletion modules/prices/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ pub mod module {
pub type LockedPrice<T: Config> = StorageMap<_, Twox64Concat, CurrencyId, Price, OptionQuery>;

#[pallet::pallet]
#[pallet::without_storage_info]
pub struct Pallet<T>(_);

#[pallet::hooks]
Expand Down
1 change: 0 additions & 1 deletion modules/transaction-payment/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ pub mod module {
pub type SwapBalanceThreshold<T: Config> = StorageMap<_, Twox64Concat, CurrencyId, Balance, ValueQuery>;

#[pallet::pallet]
#[pallet::without_storage_info]
pub struct Pallet<T>(_);

#[pallet::hooks]
Expand Down
2 changes: 1 addition & 1 deletion primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ pub enum DataProviderId {
Acala = 1,
}

#[derive(Encode, Eq, PartialEq, Copy, Clone, RuntimeDebug, PartialOrd, Ord, TypeInfo)]
#[derive(Encode, Eq, PartialEq, Copy, Clone, RuntimeDebug, PartialOrd, Ord, TypeInfo, MaxEncodedLen)]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
pub struct TradingPair(CurrencyId, CurrencyId);

Expand Down