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

Update rust 1.81.0 #1009

Merged
merged 5 commits into from
Oct 2, 2024
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: 2 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
wget https://github.com/xd009642/tarpaulin/releases/download/${{ env.TARPAULIN_VERSION }}/cargo-tarpaulin-x86_64-unknown-linux-musl.tar.gz
tar -zxvf cargo-tarpaulin-x86_64-unknown-linux-musl.tar.gz -C $HOME/.cargo/bin
make Cargo.toml
cargo update
cargo update -p frame-support-procedural --precise 30.0.2
cargo tarpaulin --verbose --no-fail-fast --workspace --timeout 300 --out Xml
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ jobs:
- name: Install clippy
run: rustup component add clippy
- name: Update
run: cargo update
run: |
cargo update
cargo update -p frame-support-procedural --precise 30.0.2
- name: Run clippy
run: cargo clippy -- -D warnings
- name: Check for Wasm
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/zepter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
- name: Install Zepter
run: cargo install zepter --version 0.15.0 --locked -q -f --no-default-features && zepter --version
- run: make Cargo.toml
- run: cargo update
- run: |
cargo update
cargo update -p frame-support-procedural --precise 30.0.2
- name: Check Rust features
run: make dev-features-check
6 changes: 2 additions & 4 deletions currencies/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
//!
//! - `MultiCurrency` - Abstraction over a fungible multi-currency system.
//! - `MultiCurrencyExtended` - Extended `MultiCurrency` with additional helper
//! types and methods, like updating balance
//! by a given signed integer amount.
//! types and methods, like updating balance by a given signed integer amount.
//!
//! ## Interface
//!
Expand All @@ -31,8 +30,7 @@
//! - `transfer` - Transfer some balance to another account, in a given
//! currency.
//! - `transfer_native_currency` - Transfer some balance to another account, in
//! native currency set in
//! `Config::NativeCurrency`.
//! native currency set in `Config::NativeCurrency`.
//! - `update_balance` - Update balance by signed integer amount, in a given
//! currency, root origin required.

Expand Down
4 changes: 2 additions & 2 deletions payments/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ readme = "README.md"
parity-scale-codec = { workspace = true }
log = { workspace = true }
scale-info = { workspace = true }
serde = { workspace = true, optional = true }

frame-support = { workspace = true }
frame-system = { workspace = true }
Expand All @@ -22,8 +23,6 @@ sp-std = { workspace = true }
orml-traits = {path = "../traits", version = "1.0.0", default-features = false }

[dev-dependencies]
serde = "1.0.136"

sp-core = { workspace = true }
sp-io = { workspace = true }

Expand All @@ -38,6 +37,7 @@ std = [
'orml-traits/std',
'parity-scale-codec/std',
'scale-info/std',
'serde',
'sp-runtime/std',
'sp-std/std',
]
Expand Down
2 changes: 2 additions & 0 deletions payments/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
//! - CancelBufferBlockLength: This is the time window where the recipient can
//! dispute a cancellation request from the payment creator.

//!
//! Extrinsics
//!
//! - `pay` - Create an payment for the given currencyid/amount
Expand All @@ -42,6 +43,7 @@
//! - `accept_and_pay` - Allows the sender to fulfill a payment request created
//! by a recipient

//!
//! Types
//!
//! The `PaymentDetail` struct stores information about the payment/escrow. A
Expand Down
7 changes: 5 additions & 2 deletions payments/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ use parity_scale_codec::{Decode, Encode, HasCompact, MaxEncodedLen};
use scale_info::TypeInfo;
use sp_runtime::{DispatchResult, Percent};

#[cfg(feature = "std")]
use serde::{Deserialize, Serialize};

/// The PaymentDetail struct stores information about the payment/escrow
/// A "payment" in virto network is similar to an escrow, it is used to
/// guarantee proof of funds and can be released once an agreed upon condition
Expand All @@ -13,7 +16,7 @@ use sp_runtime::{DispatchResult, Percent};
#[derive(Encode, Decode, Debug, Clone, PartialEq, Eq, MaxEncodedLen, TypeInfo)]
#[scale_info(skip_type_params(T))]
#[codec(mel_bound(T: pallet::Config))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
pub struct PaymentDetail<T: pallet::Config> {
/// type of asset used for payment
pub asset: AssetIdOf<T>,
Expand All @@ -38,7 +41,7 @@ pub struct PaymentDetail<T: pallet::Config> {
#[derive(Encode, Decode, Debug, Clone, PartialEq, Eq, MaxEncodedLen, TypeInfo)]
#[scale_info(skip_type_params(T))]
#[codec(mel_bound(T: pallet::Config))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
pub enum PaymentState<T: pallet::Config> {
/// Amounts have been reserved and waiting for release/cancel
Created,
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.77.0"
channel = "1.81.0"
components = ["rustfmt", "clippy"]
targets = ["wasm32-unknown-unknown"]
3 changes: 1 addition & 2 deletions tokens/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
//!
//! - `MultiCurrency` - Abstraction over a fungible multi-currency system.
//! - `MultiCurrencyExtended` - Extended `MultiCurrency` with additional helper
//! types and methods, like updating balance
//! by a given signed integer amount.
//! types and methods, like updating balance by a given signed integer amount.
//!
//! ## Interface
//!
Expand Down
6 changes: 2 additions & 4 deletions traits/src/currency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,7 @@ pub trait NamedMultiReservableCurrency<AccountId>: MultiReservableCurrency<Accou
///
/// - This is different from `reserve`.
/// - If the remaining reserved balance is less than `ExistentialDeposit`,
/// it will
/// invoke `on_reserved_too_low` and could reap the account.
/// it will invoke `on_reserved_too_low` and could reap the account.
fn unreserve_named(
id: &Self::ReserveIdentifier,
currency_id: Self::CurrencyId,
Expand Down Expand Up @@ -551,8 +550,7 @@ pub trait NamedBasicReservableCurrency<AccountId, ReserveIdentifier>: BasicReser
///
/// - This is different from `reserve`.
/// - If the remaining reserved balance is less than `ExistentialDeposit`,
/// it will
/// invoke `on_reserved_too_low` and could reap the account.
/// it will invoke `on_reserved_too_low` and could reap the account.
fn unreserve_named(id: &ReserveIdentifier, who: &AccountId, value: Self::Balance) -> Self::Balance;

/// Moves up to `value` from reserved balance of account `slashed` to
Expand Down
5 changes: 5 additions & 0 deletions xcm-mock-message-queue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,8 @@ std = [
"sp-std/std",
"xcm/std",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"sp-runtime/try-runtime",
]
Loading