diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eddf39340..1d2d43f4e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,10 +14,10 @@ concurrency: env: CARGO_TERM_COLOR: always - DASEL_VERSION: https://github.com/TomWright/dasel/releases/download/v1.24.3/dasel_linux_amd64 + DASEL_VERSION: https://github.com/TomWright/dasel/releases/download/v2.3.6/dasel_linux_amd64 RUSTFLAGS: "-D warnings" - FUEL_CORE_VERSION: 0.20.4 - RUST_VERSION: 1.72.0 + FUEL_CORE_VERSION: 0.20.6 + RUST_VERSION: 1.72.1 FORC_VERSION: 0.46.0 FORC_PATCH_BRANCH: "" FORC_PATCH_REVISION: "" @@ -119,7 +119,7 @@ jobs: - run: | curl -sSLf "$DASEL_VERSION" -L -o dasel && chmod +x dasel mv ./dasel /usr/local/bin/dasel - MIN_VERSION=$(cat Cargo.toml | dasel -r toml 'workspace.package.rust-version') + MIN_VERSION=$(cat Cargo.toml | dasel -r toml 'workspace.package.rust-version' -w plain) RUST_VERSION="${{ env.RUST_VERSION }}" echo "Comparing minimum supported toolchain ($MIN_VERSION) with ci toolchain (RUST_VERSION)" test "$MIN_VERSION" == "$RUST_VERSION" diff --git a/Cargo.toml b/Cargo.toml index 09049a33b..46789798f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,16 +35,16 @@ homepage = "https://fuel.network/" readme = "README.md" license = "Apache-2.0" repository = "https://github.com/FuelLabs/fuels-rs" -rust-version = "1.72.0" +rust-version = "1.72.1" version = "0.49.0" [workspace.dependencies] Inflector = "0.11.4" async-trait = { version = "0.1.73", default-features = false } bech32 = "0.9.1" -bytes = { version = "1.4.0", default-features = false } -chrono = "0.4.27" -elliptic-curve = { version = "0.13.5", default-features = false } +bytes = { version = "1.5.0", default-features = false } +chrono = "0.4.31" +elliptic-curve = { version = "0.13.6", default-features = false } eth-keystore = "0.5.0" fuel-abi-types = "0.3.0" futures = "0.3.28" @@ -52,39 +52,37 @@ hex = { version = "0.4.3", default-features = false } itertools = "0.11.0" portpicker = "0.1.1" proc-macro2 = "1.0.66" -quote = "1.0.32" -rand = { version = "0.8.5", default-features = false, features = [ - "std_rng", - "getrandom", -] } -regex = "1.9.3" -serde = { version = "1.0.183", default-features = false } -serde_json = "1.0.104" -serde_with = { version = "3.2.0", default-features = false } -sha2 = { version = "0.10.7", default-features = false } -syn = "2.0.28" +quote = "1.0.33" +rand = { version = "0.8.5", default-features = false, features = ["std_rng", "getrandom"] } +regex = "1.10.0" +serde = { version = "1.0.188", default-features = false } +serde_json = "1.0.107" +serde_with = { version = "3.3.0", default-features = false } +sha2 = { version = "0.10.8", default-features = false } +syn = "2.0.38" tai64 = { version = "4.0.0", default-features = false } -tempfile = { version = "3.7.1", default-features = false } -thiserror = { version = "1.0.47", default-features = false } -tokio = { version = "1.31.0", default-features = false } -trybuild = "1.0.82" -which = { version = "4.4.0", default-features = false } +tempfile = { version = "3.8.0", default-features = false } +thiserror = { version = "1.0.49", default-features = false } +tokio = { version = "1.33.0", default-features = false } +trybuild = "1.0.85" +uint = { version = "0.9.5", default-features = false } +which = { version = "4.4.2", default-features = false } zeroize = "1.6.0" # Dependencies from the `fuel-core` repository: -fuel-core = { version = "0.20.4", default-features = false } -fuel-core-chain-config = { version = "0.20.4", default-features = false } -fuel-core-client = { version = "0.20.4", default-features = false } -fuel-core-types = { version = "0.20.4", default-features = false } +fuel-core = { version = "0.20.6", default-features = false } +fuel-core-chain-config = { version = "0.20.6", default-features = false } +fuel-core-client = { version = "0.20.6", default-features = false } +fuel-core-types = { version = "0.20.6", default-features = false } # Dependencies from the `fuel-vm` repository: -fuel-asm = "0.35.3" -fuel-crypto = "0.35.3" -fuel-merkle = "0.35.3" -fuel-storage = "0.35.3" -fuel-tx = "0.35.3" -fuel-types = { version = "0.35.3", default-features = false } -fuel-vm = "0.35.3" +fuel-asm = "0.35.4" +fuel-crypto = "0.35.4" +fuel-merkle = "0.35.4" +fuel-storage = "0.35.4" +fuel-tx = "0.35.4" +fuel-types = { version = "0.35.4", default-features = false } +fuel-vm = "0.35.4" # Workspace projects fuels = { version = "0.49.0", path = "./packages/fuels" } diff --git a/packages/fuels-code-gen/src/program_bindings/utils.rs b/packages/fuels-code-gen/src/program_bindings/utils.rs index 3e26af71b..b78b7317d 100644 --- a/packages/fuels-code-gen/src/program_bindings/utils.rs +++ b/packages/fuels-code-gen/src/program_bindings/utils.rs @@ -139,6 +139,58 @@ pub(crate) fn tokenize_generics(generics: &[Ident]) -> (TokenStream, TokenStream ) } +pub(crate) fn sdk_provided_custom_types_lookup() -> HashMap { + [ + ("std::address::Address", "::fuels::types::Address"), + ("std::contract_id::AssetId", "::fuels::types::AssetId"), + ("std::b512::B512", "::fuels::types::B512"), + ("std::bytes::Bytes", "::fuels::types::Bytes"), + ("std::contract_id::ContractId", "::fuels::types::ContractId"), + ("std::identity::Identity", "::fuels::types::Identity"), + ("std::option::Option", "::core::option::Option"), + ("std::result::Result", "::core::result::Result"), + ("std::string::String", "::std::string::String"), + ("std::u256::U256", "::fuels::types::U256"), + ("std::vec::Vec", "::std::vec::Vec"), + ( + "std::vm::evm::evm_address::EvmAddress", + "::fuels::types::EvmAddress", + ), + ] + .into_iter() + .map(|(original_type_path, provided_type_path)| { + let msg = "known at compile time to be correctly formed"; + ( + TypePath::new(original_type_path).expect(msg), + TypePath::new(provided_type_path).expect(msg), + ) + }) + .flat_map(|(original_type_path, provided_type_path)| { + // TODO: To be removed once https://github.com/FuelLabs/fuels-rs/issues/881 is unblocked. + let backward_compat_mapping = original_type_path + .ident() + .expect("The original type path must have at least one part") + .into(); + [ + (backward_compat_mapping, provided_type_path.clone()), + (original_type_path, provided_type_path), + ] + }) + .collect() +} + +pub(crate) fn get_equivalent_bech32_type(ttype: &ResolvedType) -> Option { + let ResolvedType::StructOrEnum { path, .. } = ttype else { + return None; + }; + + match path.to_string().as_str() { + "::fuels::types::Address" => Some(quote! {::fuels::types::bech32::Bech32Address}), + "::fuels::types::ContractId" => Some(quote! {::fuels::types::bech32::Bech32ContractId}), + _ => None, + } +} + #[cfg(test)] mod tests { use fuel_abi_types::abi::full_program::FullTypeDeclaration; @@ -192,55 +244,3 @@ mod tests { } } } - -pub(crate) fn sdk_provided_custom_types_lookup() -> HashMap { - [ - ("std::address::Address", "::fuels::types::Address"), - ("std::contract_id::AssetId", "::fuels::types::AssetId"), - ("std::b512::B512", "::fuels::types::B512"), - ("std::bytes::Bytes", "::fuels::types::Bytes"), - ("std::contract_id::ContractId", "::fuels::types::ContractId"), - ("std::identity::Identity", "::fuels::types::Identity"), - ("std::option::Option", "::core::option::Option"), - ("std::result::Result", "::core::result::Result"), - ("std::string::String", "::std::string::String"), - ("std::u256::U256", "::fuels::types::U256"), - ("std::vec::Vec", "::std::vec::Vec"), - ( - "std::vm::evm::evm_address::EvmAddress", - "::fuels::types::EvmAddress", - ), - ] - .into_iter() - .map(|(original_type_path, provided_type_path)| { - let msg = "known at compile time to be correctly formed"; - ( - TypePath::new(original_type_path).expect(msg), - TypePath::new(provided_type_path).expect(msg), - ) - }) - .flat_map(|(original_type_path, provided_type_path)| { - // TODO: To be removed once https://github.com/FuelLabs/fuels-rs/issues/881 is unblocked. - let backward_compat_mapping = original_type_path - .ident() - .expect("The original type path must have at least one part") - .into(); - [ - (backward_compat_mapping, provided_type_path.clone()), - (original_type_path, provided_type_path), - ] - }) - .collect() -} - -pub(crate) fn get_equivalent_bech32_type(ttype: &ResolvedType) -> Option { - let ResolvedType::StructOrEnum { path, .. } = ttype else { - return None; - }; - - match path.to_string().as_str() { - "::fuels::types::Address" => Some(quote! {::fuels::types::bech32::Bech32Address}), - "::fuels::types::ContractId" => Some(quote! {::fuels::types::bech32::Bech32ContractId}), - _ => None, - } -} diff --git a/packages/fuels-core/Cargo.toml b/packages/fuels-core/Cargo.toml index 615d9f3d8..43054ea31 100644 --- a/packages/fuels-core/Cargo.toml +++ b/packages/fuels-core/Cargo.toml @@ -27,7 +27,7 @@ serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true, default-features = true } sha2 = { workspace = true } thiserror = { workspace = true, default-features = false } -uint = { version = "0.9.5", default-features = false } +uint = { workspace = true, default-features = false } zeroize = { workspace = true, features = ["derive"] } [dev-dependencies] diff --git a/packages/wasm-tests/Cargo.toml b/packages/wasm-tests/Cargo.toml index e748006ec..c10a550ec 100644 --- a/packages/wasm-tests/Cargo.toml +++ b/packages/wasm-tests/Cargo.toml @@ -18,5 +18,5 @@ crate-type = ['cdylib'] # that our examples don't inherit `fuels` with disabled features). # Cargo wouldn't respect any attempts here to disable them again. fuels = { path = "../fuels", default-features = false } -getrandom = { version = "0.2", features = ["js"] } -wasm-bindgen-test = "0.3.34" +getrandom = { version = "0.2.10", features = ["js"] } +wasm-bindgen-test = "0.3.37" diff --git a/scripts/check-docs/Cargo.toml b/scripts/check-docs/Cargo.toml index 338991fac..8988d42bf 100644 --- a/scripts/check-docs/Cargo.toml +++ b/scripts/check-docs/Cargo.toml @@ -5,6 +5,6 @@ edition = { workspace = true } publish = false [dependencies] -anyhow = "1.0.62" -itertools = "0.10.3" -regex = "1.6.0" +anyhow = "1.0.75" +itertools = { workspace = true } +regex = { workspace = true } diff --git a/scripts/versions-replacer/Cargo.toml b/scripts/versions-replacer/Cargo.toml index 8dda12577..f97f24aec 100644 --- a/scripts/versions-replacer/Cargo.toml +++ b/scripts/versions-replacer/Cargo.toml @@ -12,9 +12,9 @@ version.workspace = true [dependencies] argh = "0.1.12" -cargo_metadata = "0.17.0" +cargo_metadata = "0.18.0" color-eyre = "0.6.2" once_cell = "1.18.0" regex = { workspace = true } serde = { workspace = true, features = ["derive"] } -walkdir = "2.3.3" +walkdir = "2.4.0"