From 9e2aae4c19d7860dd7de387a37d3f239bec5fa9a Mon Sep 17 00:00:00 2001 From: zees-dev <63374656+zees-dev@users.noreply.github.com> Date: Tue, 10 Dec 2024 23:26:33 +1300 Subject: [PATCH 1/2] feat: `extract_contract_call_data` function pub modifier (#1553) # Summary Made the `extract_contract_call_data` function public in the `ReceiptParser` struct to allow external access to the function. This is required to construct low-level calls if you dont want to use `CallHandler` and instead want to manually deal with the low-level bytes (`Vec`) data. # Checklist - [ ] All **changes** are **covered** by **tests** (or not applicable) - [x] All **changes** are **documented** (or not applicable) - [x] I **reviewed** the **entire PR** myself (preferably, on GH UI) - [x] I **described** all **Breaking Changes** (or there's none) Co-authored-by: zees-dev --- packages/fuels-programs/src/calls/receipt_parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fuels-programs/src/calls/receipt_parser.rs b/packages/fuels-programs/src/calls/receipt_parser.rs index fb98fd890b..7027ea9d30 100644 --- a/packages/fuels-programs/src/calls/receipt_parser.rs +++ b/packages/fuels-programs/src/calls/receipt_parser.rs @@ -59,7 +59,7 @@ impl ReceiptParser { ) } - fn extract_contract_call_data(&mut self, target_contract: ContractId) -> Option> { + pub fn extract_contract_call_data(&mut self, target_contract: ContractId) -> Option> { // If the script contains nested calls, we need to extract the data of the top-level call let mut nested_calls_stack = vec![]; From 567bf4aac5c62db77725135c9a81f3bc61f3d260 Mon Sep 17 00:00:00 2001 From: Ahmed Sagdati <37515857+segfault-magnet@users.noreply.github.com> Date: Wed, 11 Dec 2024 12:58:34 +0100 Subject: [PATCH 2/2] freeze gql version to 7.0.11 due to MSRV incompatibility of 7.0.12>= (#1557) --- Cargo.toml | 2 ++ packages/fuels-test-helpers/Cargo.toml | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 795c872698..3487aefa18 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -85,6 +85,8 @@ zeroize = "1.7.0" octocrab = { version = "0.39", default-features = false } dotenv = { version = "0.15", default-features = false } toml = { version = "0.8", default-features = false } +async-graphql = { version = "=7.0.11", default-features = false } +async-graphql-derive = { version = "=7.0.11", default-features = false } # Dependencies from the `fuel-core` repository: fuel-core = { version = "0.40.1", default-features = false, features = [ diff --git a/packages/fuels-test-helpers/Cargo.toml b/packages/fuels-test-helpers/Cargo.toml index 7a41ceab25..ef5b44c657 100644 --- a/packages/fuels-test-helpers/Cargo.toml +++ b/packages/fuels-test-helpers/Cargo.toml @@ -9,6 +9,9 @@ repository = { workspace = true } rust-version = { workspace = true } description = "Fuel Rust SDK test helpers." +[package.metadata.cargo-machete] +ignored = ["async-graphql", "async-graphql-derive"] + [dependencies] fuel-core = { workspace = true, default-features = false, features = [ "test-helpers", @@ -30,9 +33,20 @@ rand = { workspace = true, default-features = false } tempfile = { workspace = true, default-features = false } tokio = { workspace = true, default-features = false } which = { workspace = true, default-features = false } +# fuel-core uses these deps. We need to list them here so that we can pin them +# to =7.0.11 even though fuel-core can accepts 7.0.11 onwards. 7.0.12 bumped the +# MSRV and broke the sdk build for users using anything less than Rust 1.81. +# +# Until the SDK MSRV reaches 1.81 we need to freeze these packages to 7.0.11 +async-graphql = { workspace = true, optional = true } +async-graphql-derive = { workspace = true, optional = true } [features] default = ["fuels-accounts", "std"] std = ["fuels-accounts?/std", "fuels-core/std", "fuel-core-chain-config/std"] -fuel-core-lib = ["dep:fuel-core"] +fuel-core-lib = [ + "dep:fuel-core", + "dep:async-graphql", + "dep:async-graphql-derive", +] rocksdb = ["fuel-core?/rocksdb"]