Skip to content

Commit

Permalink
Update dependencies to use Polkadot v1.0.0 (#19)
Browse files Browse the repository at this point in the history
* πŸš€ chore(afloat): update dependencies to use Polkadot v1.0.0 branch for frame-support, frame-system, frame-benchmarking, sp-core, sp-io, sp-runtime, and sp-std

πŸš€ chore(bitcoin-vaults): update dependencies to use Polkadot v1.0.0 branch for frame-support, frame-system, frame-benchmarking, sp-core, sp-io, sp-runtime, and sp-std

πŸš€ chore(confidential-docs): update dependencies to use Polkadot v1.0.0 branch for frame-support, frame-system, and frame-benchmarking

πŸ”€ chore(Cargo.toml): update substrate dependencies to use polkadot-v1.0.0 branch for fruniques, fund-admin-records, and fund-admin pallets

πŸ”€ chore(Cargo.toml): update dependencies to use polkadot-v1.0.0 branch for frame-support, frame-system, frame-benchmarking, sp-runtime, pallet-uniques, pallet-balances, pallet-timestamp, sp-core, sp-io, and pallet-balances in gated-marketplace, mapped-assets, and rbac pallets

πŸ”€ chore(Cargo.toml): update substrate dependencies to use polkadot-v1.0.0 branch for frame-support, frame-system, frame-benchmarking, sp-std, sp-core, sp-io, and sp-runtime to align with the latest version of Substrate framework

* πŸ”§ chore(migration.rs): fix indentation and formatting in log messages for better readability
πŸ”§ chore(rust-toolchain.toml): update Rust toolchain channel to nightly-2023-10-01 for compatibility with dependencies and add rustfmt component

* update format
  • Loading branch information
tlacloc authored Oct 17, 2023
1 parent fcaab50 commit e3832c5
Show file tree
Hide file tree
Showing 29 changed files with 278 additions and 275 deletions.
72 changes: 36 additions & 36 deletions Cargo.lock

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

22 changes: 11 additions & 11 deletions pallets/afloat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ serde = { version = "1.0.140", default-features = false, features = ["derive"] }
scale-info = { version = "2.1.1", default-features = false, features = [
"derive"
] }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false, optional = true }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
pallet-fruniques = { path = "../fruniques", default-features = false, version = "0.1.0-dev" }
pallet-rbac = { path = "../rbac/", default-features = false, version = "4.0.0-dev" }
pallet-gated-marketplace = { path = "../gated-marketplace/", default-features = false, version = "4.0.0-dev" }
pallet-mapped-assets = { path = "../mapped-assets/", default-features = false, version = "4.0.0-dev" }

[dev-dependencies]
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }

[features]
default = ["std"]
Expand Down
10 changes: 5 additions & 5 deletions pallets/afloat/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl<T: Config> Pallet<T> {
AfloatCollectionId::<T>::put(collection_id);
Ok(())
} else {
return Err(Error::<T>::FailedToCreateFruniquesCollection.into())
return Err(Error::<T>::FailedToCreateFruniquesCollection.into());
}
}

Expand Down Expand Up @@ -461,8 +461,8 @@ impl<T: Config> Pallet<T> {
);
//ensure user has enough afloat balance
ensure!(
Self::do_get_afloat_balance(who.clone()) >=
offer.price_per_credit * tax_credit_amount.into(),
Self::do_get_afloat_balance(who.clone())
>= offer.price_per_credit * tax_credit_amount.into(),
Error::<T>::NotEnoughAfloatBalanceAvailable
);
let zero_balance: T::Balance = Zero::zero();
Expand Down Expand Up @@ -609,7 +609,7 @@ impl<T: Config> Pallet<T> {
let tax_credit_amount_u32 = if let Ok(amount) = transaction.tax_credit_amount.try_into() {
amount
} else {
return Err(Error::<T>::TaxCreditAmountOverflow.into())
return Err(Error::<T>::TaxCreditAmountOverflow.into());
};

let child_offer_id = pallet_gated_marketplace::Pallet::<T>::do_enlist_sell_offer(
Expand Down Expand Up @@ -713,7 +713,7 @@ impl<T: Config> Pallet<T> {
<AfloatOffers<T>>::try_mutate(offer_id, |offer| -> DispatchResult {
let offer = offer.as_mut().ok_or(Error::<T>::OfferNotFound)?;
if transaction.tax_credit_amount > offer.tax_credit_amount_remaining {
return Err(Error::<T>::Underflow.into())
return Err(Error::<T>::Underflow.into());
}
offer.tax_credit_amount_remaining =
offer.tax_credit_amount_remaining - transaction.tax_credit_amount;
Expand Down
Loading

0 comments on commit e3832c5

Please sign in to comment.