Skip to content

Bump rococo v1 dependencies #418

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

Merged
merged 2 commits into from
Mar 24, 2021
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
2 changes: 1 addition & 1 deletion auction/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ pub mod module {
Auctions::<T>::try_mutate_exists(id, |auction| -> DispatchResult {
let mut auction = auction.as_mut().ok_or(Error::<T>::AuctionNotExist)?;

let block_number = <frame_system::Module<T>>::block_number();
let block_number = <frame_system::Pallet<T>>::block_number();

// make sure auction is started
ensure!(block_number >= auction.start, Error::<T>::AuctionNotStarted);
Expand Down
4 changes: 2 additions & 2 deletions auction/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ construct_runtime!(
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system::{Module, Call, Storage, Config, Event<T>},
AuctionModule: auction::{Module, Storage, Call, Event<T>},
System: frame_system::{Pallet, Call, Storage, Config, Event<T>},
AuctionModule: auction::{Pallet, Storage, Call, Event<T>},
}
);

Expand Down
6 changes: 3 additions & 3 deletions authority/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ pub mod module {
*id = id.checked_add(1).ok_or(Error::<T>::Overflow)?;
Ok(current_id)
})?;
let now = frame_system::Module::<T>::block_number();
let now = frame_system::Pallet::<T>::block_number();
let delay = match when {
DispatchTime::At(x) => x.checked_sub(&now).ok_or(Error::<T>::Overflow)?,
DispatchTime::After(x) => x,
Expand Down Expand Up @@ -283,7 +283,7 @@ pub mod module {
task_id: ScheduleTaskIndex,
when: DispatchTime<T::BlockNumber>,
) -> DispatchResultWithPostInfo {
let now = frame_system::Module::<T>::block_number();
let now = frame_system::Pallet::<T>::block_number();
let new_delay = match when {
DispatchTime::At(x) => x.checked_sub(&now).ok_or(Error::<T>::Overflow)?,
DispatchTime::After(x) => x,
Expand Down Expand Up @@ -317,7 +317,7 @@ pub mod module {
)
.map_err(|_| Error::<T>::FailedToDelay)?;

let now = frame_system::Module::<T>::block_number();
let now = frame_system::Pallet::<T>::block_number();
let dispatch_at = now.saturating_add(additional_delay);

Self::deposit_event(Event::Delayed(initial_origin, task_id, dispatch_at));
Expand Down
6 changes: 3 additions & 3 deletions authority/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ frame_support::construct_runtime!(
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic
{
System: frame_system::{Module, Call, Config, Event<T>},
Authority: authority::{Module, Call, Origin<T>, Event<T>},
Scheduler: pallet_scheduler::{Module, Call, Storage, Event<T>},
System: frame_system::{Pallet, Call, Config, Event<T>},
Authority: authority::{Pallet, Call, Origin<T>, Event<T>},
Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event<T>},
}
);

Expand Down
8 changes: 4 additions & 4 deletions benchmarking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -844,8 +844,8 @@ macro_rules! impl_benchmark {
>::instance(&selected_benchmark, c, verify)?;

// Set the block number to at least 1 so events are deposited.
if $crate::Zero::is_zero(&frame_system::Module::<$runtime>::block_number()) {
frame_system::Module::<$runtime>::set_block_number(1u32.into());
if $crate::Zero::is_zero(&frame_system::Pallet::<$runtime>::block_number()) {
frame_system::Pallet::<$runtime>::set_block_number(1u32.into());
}

// Commit the externalities to the database, flushing the DB cache.
Expand Down Expand Up @@ -990,8 +990,8 @@ macro_rules! impl_benchmark_test {
>::instance(&selected_benchmark, &c, true)?;

// Set the block number to at least 1 so events are deposited.
if $crate::Zero::is_zero(&frame_system::Module::<$runtime>::block_number()) {
frame_system::Module::<$runtime>::set_block_number(1u32.into());
if $crate::Zero::is_zero(&frame_system::Pallet::<$runtime>::block_number()) {
frame_system::Pallet::<$runtime>::set_block_number(1u32.into());
}

// Run execution + verification
Expand Down
4 changes: 2 additions & 2 deletions benchmarking/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ construct_runtime!(
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system::{Module, Call, Storage, Config, Event<T>},
Pallet: test::{Module, Call, Storage, Config},
System: frame_system::{Pallet, Call, Storage, Config, Event<T>},
Pallet: test::{Pallet, Call, Storage, Config},

}
);
Expand Down
10 changes: 5 additions & 5 deletions currencies/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl pallet_balances::Config for Runtime {
type DustRemoval = ();
type Event = Event;
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = frame_system::Module<Runtime>;
type AccountStore = frame_system::Pallet<Runtime>;
type MaxLocks = ();
type WeightInfo = ();
}
Expand Down Expand Up @@ -107,10 +107,10 @@ construct_runtime!(
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system::{Module, Call, Storage, Config, Event<T>},
Currencies: currencies::{Module, Call, Event<T>},
Tokens: orml_tokens::{Module, Storage, Event<T>, Config<T>},
PalletBalances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
System: frame_system::{Pallet, Call, Storage, Config, Event<T>},
Currencies: currencies::{Pallet, Call, Event<T>},
Tokens: orml_tokens::{Pallet, Storage, Event<T>, Config<T>},
PalletBalances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
}
);

Expand Down
5 changes: 2 additions & 3 deletions gradually-update/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ construct_runtime!(
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system::{Module, Call, Storage, Config, Event<T>},
GraduallyUpdateModule: gradually_update::{Module, Storage, Call, Event<T>},

System: frame_system::{Pallet, Call, Storage, Config, Event<T>},
GraduallyUpdateModule: gradually_update::{Pallet, Storage, Call, Event<T>},
}
);

Expand Down
4 changes: 2 additions & 2 deletions nft/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ construct_runtime!(
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system::{Module, Call, Storage, Config, Event<T>},
NonFungibleTokenModule: nft::{Module, Storage, Config<T>},
System: frame_system::{Pallet, Call, Storage, Config, Event<T>},
NonFungibleTokenModule: nft::{Pallet, Storage, Config<T>},
}
);

Expand Down
4 changes: 2 additions & 2 deletions oracle/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ construct_runtime!(
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system::{Module, Call, Storage, Config, Event<T>},
ModuleOracle: oracle::{Module, Storage, Call, Config<T>, Event<T>},
System: frame_system::{Pallet, Call, Storage, Config, Event<T>},
ModuleOracle: oracle::{Pallet, Storage, Call, Config<T>, Event<T>},
}
);

Expand Down
4 changes: 2 additions & 2 deletions rewards/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ construct_runtime!(
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system::{Module, Call, Storage, Config, Event<T>},
RewardsModule: rewards::{Module, Storage, Call},
System: frame_system::{Pallet, Call, Storage, Config, Event<T>},
RewardsModule: rewards::{Pallet, Storage, Call},
}
);

Expand Down
8 changes: 4 additions & 4 deletions tokens/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,10 @@ impl<T: Config> Pallet<T> {
// If existed before, decrease account provider.
// Ignore the result, because if it failed means that these’s remain consumers,
// and the account storage in frame_system shouldn't be repeaded.
let _ = frame_system::Module::<T>::dec_providers(who);
let _ = frame_system::Pallet::<T>::dec_providers(who);
} else if !existed && exists {
// if new, increase account provider
frame_system::Module::<T>::inc_providers(who);
frame_system::Pallet::<T>::inc_providers(who);
}

if let Some(dust_amount) = handle_dust {
Expand Down Expand Up @@ -446,13 +446,13 @@ impl<T: Config> Pallet<T> {
<Locks<T>>::remove(who, currency_id);
if existed {
// decrease account ref count when destruct lock
frame_system::Module::<T>::dec_consumers(who);
frame_system::Pallet::<T>::dec_consumers(who);
}
} else {
<Locks<T>>::insert(who, currency_id, locks);
if !existed {
// increase account ref count when initialize lock
if frame_system::Module::<T>::inc_consumers(who).is_err() {
if frame_system::Pallet::<T>::inc_consumers(who).is_err() {
// No providers for the locks. This is impossible under normal circumstances
// since the funds that are under the lock will themselves be stored in the
// account and therefore will need a reference.
Expand Down
8 changes: 4 additions & 4 deletions tokens/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,10 @@ construct_runtime!(
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system::{Module, Call, Storage, Config, Event<T>},
Tokens: tokens::{Module, Storage, Event<T>, Config<T>},
Treasury: pallet_treasury::{Module, Call, Storage, Config, Event<T>},
ElectionsPhragmen: pallet_elections_phragmen::{Module, Call, Storage, Event<T>},
System: frame_system::{Pallet, Call, Storage, Config, Event<T>},
Tokens: tokens::{Pallet, Storage, Event<T>, Config<T>},
Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event<T>},
ElectionsPhragmen: pallet_elections_phragmen::{Pallet, Call, Storage, Event<T>},
}
);

Expand Down
4 changes: 2 additions & 2 deletions unknown-tokens/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ construct_runtime!(
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system::{Module, Call, Storage, Config, Event<T>},
UnknownTokens: unknown_tokens::{Module, Storage, Event},
System: frame_system::{Pallet, Call, Storage, Config, Event<T>},
UnknownTokens: unknown_tokens::{Pallet, Storage, Event},
}
);

Expand Down
2 changes: 1 addition & 1 deletion vesting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ impl<T: Config> Pallet<T> {

/// Returns locked balance based on current block number.
fn locked_balance(who: &T::AccountId) -> BalanceOf<T> {
let now = <frame_system::Module<T>>::block_number();
let now = <frame_system::Pallet<T>>::block_number();
<VestingSchedules<T>>::mutate_exists(who, |maybe_schedules| {
let total = if let Some(schedules) = maybe_schedules.as_mut() {
let mut total: BalanceOf<T> = Zero::zero();
Expand Down
8 changes: 4 additions & 4 deletions vesting/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl pallet_balances::Config for Runtime {
type DustRemoval = ();
type Event = Event;
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = frame_system::Module<Runtime>;
type AccountStore = frame_system::Pallet<Runtime>;
type MaxLocks = ();
type WeightInfo = ();
}
Expand Down Expand Up @@ -92,9 +92,9 @@ construct_runtime!(
NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic,
{
System: frame_system::{Module, Call, Storage, Config, Event<T>},
Vesting: vesting::{Module, Storage, Call, Event<T>, Config<T>},
PalletBalances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
System: frame_system::{Pallet, Call, Storage, Config, Event<T>},
Vesting: vesting::{Pallet, Storage, Call, Event<T>, Config<T>},
PalletBalances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
}
);

Expand Down