Skip to content

Commit 2e4eae7

Browse files
Feature/bump v1.3.0 (#25)
* update format to match the one for polkadot * 📦 chore(rust-toolchain.toml): add rust-toolchain.toml file to specify the Rust toolchain configuration * 🔧 chore(Cargo.toml): update sp-runtime dependency to remove version constraint for better compatibility * 🔄 chore(rust-toolchain.toml): update Rust toolchain to nightly-2023-05-22 channel 🔧 fix(rust-toolchain.toml): specify the exact nightly channel version to ensure consistent build environment * 🔧 chore(lib.rs): update Scale trait implementation to use BlockNumberFor<Self> instead of Self::BlockNumber for better compatibility and flexibility * 📦 chore(pallets): update dependency versions in Cargo.toml files 🔺 chore(pallets/afloat): update codec version to 3.6.1 🔺 chore(pallets/bitcoin-vaults): update codec version to 3.6.1 🔺 chore(pallets/confidential-docs): update codec version to 3.6.1 🔺 chore(pallets/fruniques): update codec version to 3.6.1 🔺 chore(pallets/fund-admin-records): update codec version to 3.6.1 🔺 chore(pallets/fund-admin): update codec version to 3.6.1 🔺 chore(pallets/gated-marketplace): update codec version to 3.6.1 🔺 chore(pallets/mapped-assets): update codec version to 3.6.1 and log version to 0.4.17 🔺 chore(pallets/rbac): update codec version to 3.6.1 🔺 chore(pallets/afloat): update scale-info version to 2.5.0 🔺 chore(pallets/bitcoin-vaults): update scale-info version to 2.5.0 🔺 chore(pallets/confidential-docs): update scale-info version to 2.5.0 🔺 chore(pallets/fruniques): update scale-info version to 2.5.0 🔺 chore(pallets/fund-admin-records): update scale-info version to 2.5.0 🔺 chore(pallets/fund-admin): update scale-info version to 2.5.0 🔺 chore(pallets/gated-marketplace): update scale-info version to 2.5.0 🔺 chore(pallets/mapped-assets): update scale-info version to 2.5.0 🔺 chore(pallets/rbac): update scale-info version to 2.5.0 📦 chore(Cargo.toml): update dependencies versions 🔺 deps(Cargo.toml): update codec to version 3.6.1 🔺 deps(Cargo.toml): update log to version 0.4.14 🔺 deps(Cargo.toml): update scale-info to version 2.5.0 🔺 deps(Cargo.toml): update frame-support to use polkadot-v1.0.0 branch * wip update mapped assets * 🚀 chore(mapped-assets): update dependencies in Cargo.toml to latest versions 🐛 fix(mapped-assets): import missing sp_io::hashing::blake2_256 in functions.rs ✨ feat(mapped-assets): add AfloatRole enum and related functions in types.rs * update deps * 🚀 chore(Cargo.toml): update dependencies versions to improve compatibility and performance 🐛 fix(functions.rs): fix cloning of class_id variable to prevent ownership issues ✨ feat(functions.rs): add support for creating frunique collections with configurable owner and admin roles 🐛 fix(functions.rs): fix cloning of collection variable to prevent ownership issues * 🚀 chore(Cargo.toml): update dependencies versions for lite-json, frame-support, frame-system, sp-core, sp-io, sp-runtime, sp-std to improve compatibility and stability 🔧 fix(functions.rs): import BlockNumberFor from frame_system::pallet_prelude to fix compilation error 🔧 fix(lib.rs): update weight for ocw_insert_descriptors, ocw_insert_psbts, ocw_finalize_psbts to improve performance and resource usage * 🔍 chore(.gitignore): add log files to be ignored by git 🔍 chore(.gitignore): add /pallets/fund-admin/scripts directory to be ignored by git * 🔧 chore(lib.rs): add #[derive(Default)] to the GenesisConfig struct in order to enable default values for its fields * Fix build issues polkadotv1 (#22) * Mapped assets pallet DebitFlags struct is private to the crate, so the debitFlags parameter from the afloat_do_burn method was removed and the debitFlags created internally, finally updated the afloat pallet accordingly. AssetId type is no longer Copy, so called the clone method where necessary. CollectionId type is no longer Copy, so called the clone method where necessary. JSON NumberValue struct has a new negative field, so this field was added as necesary. GenesisBuild has been deprecated, so the BitcoinVaults and MappedAssets pallets to use the new BuildGenesisConfig trait. Updated the block_number parameter type to be BlockNumberFor. Added does_asset_exist method to the MappedAssets pallet. Updated the way of checking overflow in the MappedAssets pallet to use checked_add. Added back the Rbac type to the MappedAssets pallet. * The where clause of the enum when contructing a mock runtime has been deprecated, so this clause was removed for all pallet mocks.Nonce and Block types have been added to the system::Config, and the Index, BlockNumber and Header types have been removed, so all pallet implementations for the Test runtime have been updated accordingly. FreezeIdentifier, MaxFreezes, RuntimeHoldReason and MaxHolds types have been added for the balances pallet, so the test runtimes for pallets that use the balances pallet have been added accordingly. The GenesisConfig is now generic over the runtime, so the test build_storage for all pallets have been updated accordingly, also this is now behind the BuildStorage trait so it has been imported where required. The UnknownAsset error of the mapped assets pallet has been updated to be Unknown, so updated some of the tests accordingly. The tokens BalanceConversion trait has been replaced by ConversionToAssetBalance, so updated the mapped assets test pallet accordingly. * update deps * 🐛 fix(mock.rs): change Balance type from u128 to u64 to reduce memory usage 🐛 fix(mock.rs): change ExistentialDeposit type from ConstU128<100> to ConstU64<1> to set a lower minimum balance requirement 🐛 fix(mock.rs): remove MaxReserves configuration to use default value 🐛 fix(mock.rs): remove MaxFreezes configuration to use default value ✨ feat(mock.rs): add Result return type to created and destroyed functions in AssetsCallback trait implementation * 🔧 fix(tests.rs): update struct field names in sign_up_works, update_user_info_edit_works, update_other_user_info_by_not_admin_fails, update_other_user_info_by_admin_works, update_user_info_delete_works, set_afloat_balance_works, set_balance_by_other_than_owner_fails to match changes in the struct definition ✨ feat(tests.rs): add support for new struct field names in sign_up_works, update_user_info_edit_works, update_other_user_info_by_not_admin_fails, update_other_user_info_by_admin_works, update_user_info_delete_works, set_afloat_balance_works, set_balance_by_other_than_owner_fails to improve code readability and maintainability 🔨 refactor(tests.rs): update test functions to use new struct field names for SignUpArgs * update tests * 🐛 fix(functions.rs): remove unnecessary mutability of transaction variable to improve code readability * 🔧 chore(lib.rs): remove unused code and comments for improved code readability 🔧 chore(lib.rs): refactor default value for bdk_services_url in GenesisConfig to use a hardcoded value instead of cloning the input value * 🔀 chore(lib.rs): refactor BDKServicesURL initialization to use self.bdk_services_url.clone() for improved code readability and maintainability * Updated polkadot dependencies to v1.2.0. sp-io is no longer exported from frame support, so had to add it directly as a dependency on the pallets, and update all imports accordingly. sp-std is no longer exported from frame support, so had to add it directly as a dependency on the pallets, and update all imports accordingly. The balance transfer method is exposed through the token Mutate trait so had to import it, and update the call to transfer with the correct parameters. DispatchError is no longer exported from frame support so had to import it directly from sp_runtime. The https://github.com/paritytech/substrate repository has been archived, so updated all dependencies to use the new repo https://github.com/paritytech/substrate * Fixed mock afloat assets callback handler. * Updated polkadot version to 1.3 * Pallet balances added RuntimeFreezeReason type, added definition for it to mocks of all pallets. * Updated confidential docs pallet storage version. * Updated dependencies to use tag instead of branch * Updated storage version for those pallets that dont have migrations to be 0. Removed the migration from the mapped assets pallet as the pallet was created after the migration code. * Developed migration fro the fruniques pallet. Incremented fruniques pallet storage version. * 🐛 fix(afloat): update pallet-timestamp dependency version to "4.0.0-dev" to resolve compatibility issue 🐛 fix(afloat): remove unused trait import UnixTime from functions.rs 🐛 fix(afloat): remove TimeProvider associated type from pallet configuration in lib.rs 🐛 fix(afloat): remove TimeProvider associated type from pallet configuration in mock.rs ✨ feat(afloat): add error event TimestampError to handle incorrect timestamp generation ✨ feat(afloat): update created_date and last_modified_date fields in UserInfo struct to use pallet_gated_marketplace::Pallet::get_timestamp_in_milliseconds() to ensure consistent timestamp generation ✨ feat(afloat): update creation_date and last_modified_date fields in create_offer and edit_offer functions to use T::Timestamp::now().into() to ensure consistent timestamp generation ✨ feat(afloat): update cancellation_date field in cancel_offer function to use pallet_gated_marketplace::Pallet::get_timestamp_in_milliseconds() to ensure consistent timestamp generation * 🐛 fix(functions.rs): fix import statement formatting to follow conventions ✨ feat(functions.rs): add support for last_modified_date field to be set to current timestamp when creating or editing user info 🐛 fix(functions.rs): fix formatting of created_date field to follow conventions 🐛 fix(functions.rs): fix formatting of last_modified_date field to follow conventions 🐛 fix(functions.rs): fix formatting of created_date field to follow conventions 🐛 fix(functions.rs): fix formatting of last_modified_date field to follow conventions 🐛 fix(functions.rs): fix formatting of created_date field to follow conventions 🐛 fix(functions.rs): fix formatting of last_modified_date field to follow conventions 🐛 fix * 🔧 chore(lib.rs): reorder import statements for better readability and consistency * 🔒 chore(functions.rs): change visibility of get_timestamp_in_milliseconds function from private to public to allow external usage * update dep --------- Co-authored-by: sebastianmontero <sebastian.montero@gmail.com>
1 parent 36ac805 commit 2e4eae7

File tree

9 files changed

+249
-278
lines changed

9 files changed

+249
-278
lines changed

Cargo.lock

Lines changed: 145 additions & 256 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pallets/afloat/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", tag =
2525
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", tag = "v1.3.0-rc1", default-features = false }
2626
pallet-uniques = { git = "https://github.com/paritytech/polkadot-sdk", tag = "v1.3.0-rc1", default-features = false }
2727
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", tag = "v1.3.0-rc1", default-features = false }
28-
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", tag = "v1.3.0-rc1", default-features = false }
28+
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", tag = "v1.3.0-rc1", default-features = false, version = "4.0.0-dev" }
2929
pallet-fruniques = { path = "../fruniques", default-features = false, version = "0.1.0-dev" }
3030
pallet-rbac = { path = "../rbac/", default-features = false, version = "4.0.0-dev" }
3131
pallet-gated-marketplace = { path = "../gated-marketplace/", default-features = false, version = "4.0.0-dev" }

pallets/afloat/src/functions.rs

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::*;
22
use crate::types::*;
3-
use frame_support::{pallet_prelude::*, traits::UnixTime};
3+
use frame_support::pallet_prelude::*;
44
use frame_system::{pallet_prelude::*, RawOrigin};
55
use pallet_fruniques::types::{Attributes, CollectionDescription, FruniqueRole, ParentInfo};
66
use pallet_gated_marketplace::types::{Marketplace, MarketplaceRole};
@@ -104,9 +104,10 @@ impl<T: Config> Pallet<T> {
104104
cid_creator: ShortString::try_from(b"HCD:afloat".to_vec()).unwrap(),
105105
group: ShortString::try_from(b"afloat".to_vec()).unwrap(),
106106
created_by: Some(creator.clone()),
107-
created_date: Some(T::TimeProvider::now().as_secs()),
107+
created_date: pallet_gated_marketplace::Pallet::<T>::get_timestamp_in_milliseconds(),
108108
last_modified_by: Some(creator.clone()),
109-
last_modified_date: Some(T::TimeProvider::now().as_secs()),
109+
last_modified_date:
110+
pallet_gated_marketplace::Pallet::<T>::get_timestamp_in_milliseconds(),
110111
};
111112
<UserInfo<T>>::insert(creator.clone(), creator_user);
112113
Self::give_role_to_user(creator.clone(), AfloatRole::Owner)?;
@@ -117,9 +118,11 @@ impl<T: Config> Pallet<T> {
117118
cid_creator: ShortString::try_from(b"afloat".to_vec()).unwrap(),
118119
group: ShortString::try_from(b"afloat".to_vec()).unwrap(),
119120
created_by: Some(admin.clone()),
120-
created_date: Some(T::TimeProvider::now().as_secs()),
121+
created_date: pallet_gated_marketplace::Pallet::<T>::get_timestamp_in_milliseconds(
122+
),
121123
last_modified_by: Some(admin.clone()),
122-
last_modified_date: Some(T::TimeProvider::now().as_secs()),
124+
last_modified_date:
125+
pallet_gated_marketplace::Pallet::<T>::get_timestamp_in_milliseconds(),
123126
};
124127
<UserInfo<T>>::insert(admin.clone(), admin_user);
125128
Self::give_role_to_user(admin, AfloatRole::Admin)?;
@@ -161,9 +164,11 @@ impl<T: Config> Pallet<T> {
161164
cid_creator,
162165
group,
163166
created_by: Some(actor.clone()),
164-
created_date: Some(T::TimeProvider::now().as_secs()),
167+
created_date:
168+
pallet_gated_marketplace::Pallet::<T>::get_timestamp_in_milliseconds(),
165169
last_modified_by: Some(actor.clone()),
166-
last_modified_date: Some(T::TimeProvider::now().as_secs()),
170+
last_modified_date:
171+
pallet_gated_marketplace::Pallet::<T>::get_timestamp_in_milliseconds(),
167172
};
168173
<UserInfo<T>>::insert(user_address.clone(), user);
169174
Self::give_role_to_user(user_address.clone(), AfloatRole::BuyerOrSeller)?;
@@ -175,9 +180,11 @@ impl<T: Config> Pallet<T> {
175180
cid_creator,
176181
group,
177182
created_by: Some(actor.clone()),
178-
created_date: Some(T::TimeProvider::now().as_secs()),
183+
created_date:
184+
pallet_gated_marketplace::Pallet::<T>::get_timestamp_in_milliseconds(),
179185
last_modified_by: Some(actor.clone()),
180-
last_modified_date: Some(T::TimeProvider::now().as_secs()),
186+
last_modified_date:
187+
pallet_gated_marketplace::Pallet::<T>::get_timestamp_in_milliseconds(),
181188
};
182189
<UserInfo<T>>::insert(user_address.clone(), user);
183190
Self::give_role_to_user(user_address.clone(), AfloatRole::CPA)?;
@@ -225,7 +232,8 @@ impl<T: Config> Pallet<T> {
225232
<UserInfo<T>>::try_mutate::<_, _, DispatchError, _>(user_address.clone(), |user| {
226233
let user = user.as_mut().ok_or(Error::<T>::FailedToEditUserAccount)?;
227234

228-
user.last_modified_date = Some(T::TimeProvider::now().as_secs());
235+
user.last_modified_date =
236+
pallet_gated_marketplace::Pallet::<T>::get_timestamp_in_milliseconds();
229237
user.last_modified_by = Some(actor.clone());
230238
user.cid = cid;
231239
user.cid_creator = cid_creator;
@@ -246,7 +254,8 @@ impl<T: Config> Pallet<T> {
246254
<UserInfo<T>>::try_mutate::<_, _, DispatchError, _>(user_address.clone(), |user| {
247255
let user = user.as_mut().ok_or(Error::<T>::FailedToEditUserAccount)?;
248256

249-
user.last_modified_date = Some(T::TimeProvider::now().as_secs());
257+
user.last_modified_date =
258+
pallet_gated_marketplace::Pallet::<T>::get_timestamp_in_milliseconds();
250259
user.last_modified_by = Some(actor.clone());
251260
user.cid = cid;
252261
user.cid_creator = cid_creator;
@@ -339,7 +348,7 @@ impl<T: Config> Pallet<T> {
339348
tax_credit_amount,
340349
tax_credit_amount_remaining: tax_credit_amount.into(),
341350
price_per_credit: price,
342-
creation_date: T::TimeProvider::now().as_secs(),
351+
creation_date: T::Timestamp::now().into(),
343352
expiration_date,
344353
tax_credit_id: item_id,
345354
creator_id: authority.clone(),
@@ -373,7 +382,7 @@ impl<T: Config> Pallet<T> {
373382
tax_credit_amount,
374383
tax_credit_amount_remaining: tax_credit_amount.into(),
375384
price_per_credit: price,
376-
creation_date: T::TimeProvider::now().as_secs(),
385+
creation_date: T::Timestamp::now().into(),
377386
expiration_date,
378387
tax_credit_id: item_id,
379388
creator_id: authority.clone(),
@@ -447,7 +456,7 @@ impl<T: Config> Pallet<T> {
447456
//ensure offer is a sell offer
448457
ensure!(offer.offer_type == OfferType::Sell, Error::<T>::WrongOfferType);
449458
//ensure offer is not expired
450-
ensure!(offer.expiration_date > T::TimeProvider::now().as_secs(), Error::<T>::OfferExpired);
459+
ensure!(offer.expiration_date > T::Timestamp::now().into(), Error::<T>::OfferExpired);
451460
//ensure offer is not cancelled
452461
ensure!(offer.cancellation_date.is_none(), Error::<T>::OfferCancelled);
453462
//ensure offer is not taken
@@ -963,7 +972,8 @@ impl<T: Config> Pallet<T> {
963972
OfferStatus::CREATED => {
964973
<AfloatOffers<T>>::try_mutate(order_id, |offer| -> DispatchResult {
965974
let offer = offer.as_mut().ok_or(Error::<T>::OfferNotFound)?;
966-
offer.cancellation_date = Some(T::TimeProvider::now().as_secs());
975+
offer.cancellation_date =
976+
pallet_gated_marketplace::Pallet::<T>::get_timestamp_in_milliseconds();
967977
offer.status = OfferStatus::CANCELLED;
968978
Ok(())
969979
})?;
@@ -972,7 +982,8 @@ impl<T: Config> Pallet<T> {
972982
OfferStatus::TF_PENDING_SIGNATURE => {
973983
<AfloatOffers<T>>::try_mutate(order_id, |offer| -> DispatchResult {
974984
let offer = offer.as_mut().ok_or(Error::<T>::OfferNotFound)?;
975-
offer.cancellation_date = Some(T::TimeProvider::now().as_secs());
985+
offer.cancellation_date =
986+
pallet_gated_marketplace::Pallet::<T>::get_timestamp_in_milliseconds();
976987
offer.status = OfferStatus::CANCELLED;
977988
Ok(())
978989
})?;

pallets/afloat/src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ pub mod types;
1515
pub mod pallet {
1616
use frame_support::{
1717
pallet_prelude::*,
18-
traits::{Currency, UnixTime},
18+
traits::{Currency, Time},
1919
};
2020
use frame_system::{pallet_prelude::*, RawOrigin};
2121
use pallet_fruniques::types::{Attributes, CollectionDescription, FruniqueRole, ParentInfo};
2222
use pallet_gated_marketplace::types::*;
23+
use sp_runtime::traits::Scale;
2324
const STORAGE_VERSION: StorageVersion = StorageVersion::new(0);
2425

2526
use crate::types::*;
@@ -37,7 +38,7 @@ pub mod pallet {
3738
+ pallet_uniques::Config
3839
{
3940
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
40-
type TimeProvider: UnixTime;
41+
4142
type Rbac: RoleBasedAccessControl<Self::AccountId>;
4243
// type RemoveOrigin: EnsureOrigin<Self::RuntimeOrigin>;
4344
type Currency: Currency<Self::AccountId>;
@@ -54,6 +55,8 @@ pub mod pallet {
5455
#[pallet::event]
5556
#[pallet::generate_deposit(pub(super) fn deposit_event)]
5657
pub enum Event<T: Config> {
58+
/// Timestamp was not generated correctly
59+
TimestampError,
5760
// New user created
5861
NewUser(T::AccountId),
5962
// User edited

pallets/afloat/src/mock.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ impl system::Config for Test {
6868

6969
impl pallet_afloat::Config for Test {
7070
type RuntimeEvent = RuntimeEvent;
71-
type TimeProvider = pallet_timestamp::Pallet<Self>;
7271
//type RemoveOrigin = frame_system::EnsureSigned<Self::AccountId>;
7372
type Currency = pallet_balances::Pallet<Self>;
7473
type Rbac = RBAC;

pallets/fruniques/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ mod tests;
1212
// mod benchmarking;
1313

1414
mod functions;
15+
pub mod migration;
1516
pub mod types;
1617

1718
#[frame_support::pallet]

pallets/fruniques/src/migration.rs

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
use crate::{
2+
types::{CollectionId, ItemId},
3+
*,
4+
};
5+
use frame_support::{pallet_prelude::*, traits::OnRuntimeUpgrade};
6+
7+
#[cfg(feature = "try-runtime")]
8+
use sp_runtime::TryRuntimeError;
9+
10+
/// The log target.
11+
const TARGET: &'static str = "runtime::fruniques::migration";
12+
13+
pub mod v0 {
14+
use super::*;
15+
/// The actual type isn't important, as we only delete the key in the state.
16+
#[frame_support::storage_alias]
17+
pub(super) type FruniqueCnt<T: Config> = StorageValue<Pallet<T>, (), ValueQuery>;
18+
19+
/// The actual type isn't important, as we only delete the key in the state.
20+
#[frame_support::storage_alias]
21+
pub(super) type FruniqueParent<T: Config> = StorageDoubleMap<
22+
Pallet<T>,
23+
Blake2_128Concat,
24+
CollectionId,
25+
Blake2_128Concat,
26+
ItemId, // FruniqueId
27+
(), // ParentId and flag if it inherit attributes
28+
ValueQuery,
29+
>;
30+
31+
/// The actual type isn't important, as we only delete the key in the state.
32+
#[frame_support::storage_alias]
33+
pub(super) type FruniqueChild<T: Config> = StorageDoubleMap<
34+
Pallet<T>,
35+
Blake2_128Concat,
36+
CollectionId,
37+
Blake2_128Concat,
38+
ItemId,
39+
(),
40+
ValueQuery,
41+
>;
42+
43+
pub struct MigrateToV1<T>(sp_runtime::sp_std::marker::PhantomData<T>);
44+
45+
impl<T: Config> OnRuntimeUpgrade for MigrateToV1<T> {
46+
fn on_runtime_upgrade() -> Weight {
47+
let onchain_version = Pallet::<T>::on_chain_storage_version();
48+
let mut writes = 0;
49+
if onchain_version < 1 {
50+
FruniqueCnt::<T>::kill();
51+
let result = FruniqueParent::<T>::clear(1, None); //Assuming that the storage is empty
52+
if result.maybe_cursor.is_some() {
53+
log::info!(target: TARGET, "Failed to kill FruniqueParent storage item");
54+
}
55+
let result = FruniqueChild::<T>::clear(1, None); //Assuming that the storage is empty
56+
if result.maybe_cursor.is_some() {
57+
log::info!(target: TARGET, "Failed to kill FruniqueChild storage item");
58+
}
59+
StorageVersion::new(1).put::<Pallet<T>>();
60+
writes = 4;
61+
log::info!(target: TARGET, "Migrated storage to version 1");
62+
} else {
63+
log::info!(target: TARGET, "Upgrade not run as pallet version is: {:?}", onchain_version);
64+
}
65+
T::DbWeight::get().reads_writes(writes, 1)
66+
}
67+
}
68+
}

pallets/gated-marketplace/src/functions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ impl<T: Config> Pallet<T> {
11621162
Ok(())
11631163
}
11641164

1165-
fn get_timestamp_in_milliseconds() -> Option<u64> {
1165+
pub fn get_timestamp_in_milliseconds() -> Option<u64> {
11661166
let timestamp: u64 = T::Timestamp::now().into();
11671167

11681168
Some(timestamp)

pallets/mapped-assets/src/mock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ pub(crate) fn new_test_ext() -> sp_io::TestExternalities {
246246
config.assimilate_storage(&mut storage).unwrap();
247247

248248
let mut ext: sp_io::TestExternalities = storage.into();
249-
// Clear thread local vars for https://github.com/paritytech/substrate/issues/10479.
249+
// Clear thread local vars for https://github.com/paritytech/polkadot-sdk/issues/10479.
250250
ext.execute_with(|| take_hooks());
251251
ext.execute_with(|| System::set_block_number(1));
252252
ext

0 commit comments

Comments
 (0)