Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rm without storage info #717

Merged
merged 3 commits into from
Mar 24, 2022
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
13 changes: 10 additions & 3 deletions auction/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#![allow(clippy::string_lit_as_bytes)]
#![allow(clippy::unused_unit)]

use codec::MaxEncodedLen;
use frame_support::pallet_prelude::*;
use frame_system::{ensure_signed, pallet_prelude::*};
use orml_traits::{Auction, AuctionHandler, AuctionInfo, Change};
Expand All @@ -37,7 +38,13 @@ pub mod module {
type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>;

/// The balance type for bidding.
type Balance: Parameter + Member + AtLeast32BitUnsigned + Default + Copy + MaybeSerializeDeserialize;
type Balance: Parameter
+ Member
+ AtLeast32BitUnsigned
+ Default
+ Copy
+ MaybeSerializeDeserialize
+ MaxEncodedLen;

/// The auction ID type.
type AuctionId: Parameter
Expand All @@ -47,7 +54,8 @@ pub mod module {
+ Copy
+ MaybeSerializeDeserialize
+ Bounded
+ codec::FullCodec;
+ codec::FullCodec
+ codec::MaxEncodedLen;

/// The `AuctionHandler` that allow custom bidding logic and handles
/// auction result.
Expand Down Expand Up @@ -96,7 +104,6 @@ pub mod module {

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

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

#[pallet::pallet]
#[pallet::generate_store(pub(super) trait Store)]
#[pallet::without_storage_info]
pub struct Pallet<T>(PhantomData<T>);

#[pallet::storage]
Expand Down
4 changes: 2 additions & 2 deletions nft/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ pub mod module {
#[pallet::config]
pub trait Config: frame_system::Config {
/// The class ID type
type ClassId: Parameter + Member + AtLeast32BitUnsigned + Default + Copy;
type ClassId: Parameter + Member + AtLeast32BitUnsigned + Default + Copy + MaxEncodedLen;
/// The token ID type
type TokenId: Parameter + Member + AtLeast32BitUnsigned + Default + Copy;
type TokenId: Parameter + Member + AtLeast32BitUnsigned + Default + Copy + MaxEncodedLen;
/// The class properties type
type ClassData: Parameter + Member + MaybeSerializeDeserialize;
/// The token properties type
Expand Down
8 changes: 4 additions & 4 deletions oracle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#![allow(clippy::string_lit_as_bytes)]
#![allow(clippy::unused_unit)]

use codec::{Decode, Encode};
use codec::{Decode, Encode, MaxEncodedLen};

#[cfg(feature = "std")]
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -55,7 +55,7 @@ pub mod module {
pub(crate) type MomentOf<T, I = ()> = <<T as Config<I>>::Time as Time>::Moment;
pub(crate) type TimestampedValueOf<T, I = ()> = TimestampedValue<<T as Config<I>>::OracleValue, MomentOf<T, I>>;

#[derive(Encode, Decode, RuntimeDebug, Eq, PartialEq, Clone, Copy, Ord, PartialOrd, TypeInfo)]
#[derive(Encode, Decode, RuntimeDebug, Eq, PartialEq, Clone, Copy, Ord, PartialOrd, TypeInfo, MaxEncodedLen)]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
pub struct TimestampedValue<Value, Moment> {
pub value: Value,
Expand All @@ -77,10 +77,10 @@ pub mod module {
type Time: Time;

/// The data key type
type OracleKey: Parameter + Member;
type OracleKey: Parameter + Member + MaxEncodedLen;

/// The data value type
type OracleValue: Parameter + Member + Ord;
type OracleValue: Parameter + Member + Ord + MaxEncodedLen;

/// The root operator account id, record all sudo feeds on this account.
type RootOperatorAccountId: Get<Self::AccountId>;
Expand Down
1 change: 0 additions & 1 deletion tokens/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,6 @@ pub mod module {

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

#[pallet::hooks]
Expand Down
4 changes: 2 additions & 2 deletions traits/src/auction.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::Change;
use codec::FullCodec;
use codec::{Decode, Encode};
use codec::{Decode, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
use sp_runtime::{
traits::{AtLeast32Bit, Bounded, MaybeSerializeDeserialize},
Expand All @@ -14,7 +14,7 @@ use sp_std::{

/// Auction info.
#[cfg_attr(feature = "std", derive(PartialEq, Eq))]
#[derive(Encode, Decode, RuntimeDebug, TypeInfo)]
#[derive(Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)]
pub struct AuctionInfo<AccountId, Balance, BlockNumber> {
/// Current bidder and bid price.
pub bid: Option<(AccountId, Balance)>,
Expand Down
4 changes: 2 additions & 2 deletions utilities/src/ordered_set.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use codec::{Decode, Encode};
use codec::{Decode, Encode, MaxEncodedLen};
use frame_support::{traits::Get, BoundedVec, DefaultNoBound};
use scale_info::TypeInfo;
#[cfg(feature = "std")]
use sp_std::{fmt, prelude::*};

/// An ordered set backed by `BoundedVec`
#[derive(PartialEq, Eq, Encode, Decode, DefaultNoBound, Clone, TypeInfo)]
#[derive(PartialEq, Eq, Encode, Decode, DefaultNoBound, Clone, TypeInfo, MaxEncodedLen)]
#[scale_info(skip_type_params(S))]
pub struct OrderedSet<T, S: Get<u32>>(pub BoundedVec<T, S>);

Expand Down
1 change: 0 additions & 1 deletion weight-meter/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ pub mod test_module {

#[pallet::pallet]
#[pallet::generate_store(pub(super) trait Store)]
#[pallet::without_storage_info]
pub struct Pallet<T>(PhantomData<T>);

#[pallet::hooks]
Expand Down