Skip to content
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
32 changes: 32 additions & 0 deletions .changeset/fresh-fuel-owned-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
"@fuel-ts/account": patch
"@fuel-ts/contract": patch
"@fuel-ts/program": patch
"@fuel-ts/transactions": patch
"@fuel-ts/versions": patch
"@fuel-ts/utils": minor
"fuels": patch
"create-fuels": patch
---

Update Fuel-owned dependencies to VM ASM 0.66.4, Fuel Core 0.48.3, Forc 0.72.1, and React/connectors 0.45.0 in examples and templates. The assembler update reuses WASM initialization instead of allocating a module on each initialization request. Refresh the Core schema, panic reasons and local-node gas table, preserve panic error decoding for ABI 1.1 and 1.2, and migrate compiler fixtures to the newer standard library.
Comment thread
pixelcircuits marked this conversation as resolved.
Resolved

Wait for a successful GraphQL health query before returning a launched local test node, avoiding connection resets while Fuel Core services are still starting.

Cancel readiness polling and clean up the child process and temporary snapshot when launching a local node fails. Include the exit code and signal when the node exits before becoming ready. Decode packed panic indices for ABI versions 1.2 and later while retaining legacy decoding for earlier ABIs and ABIs without version metadata.

Preserve startup errors even when process cleanup fails, and let CLI failure hooks finish before reporting failure. Only unexpected exits of a successfully launched node propagate to the CLI; intentional cleanup does not terminate the parent, and signal termination reports a nonzero status.

Keep parent-process signal handling separate from caller-initiated node cleanup: Ctrl+C and restart signals terminate CLI commands on the first signal, and uncaught exceptions exit unsuccessfully.

When a local-node launcher exits, stop any remaining processes in its group once, tolerating secondary signal errors, then record the exit. Repeated cleanup after a crash neither retries the signal nor throws a secondary teardown error.

Raise the SDK's Node.js 20 minimum to 20.18, consistently across published packages, create-fuels and both generated templates, matching the wallet connector dependencies used by the templates. Node.js 22 and 24 remain supported.

Package the matching WASM executor when building Fuel Core from a Git branch and invalidate generated executor caches when its bytes change, even if the configured branch name remains the same.

Scope panic error decoding to the reverting program using its receipt's contract ID, preserving the primary contract's identity across call results. Contracts with the same panic index now report their own message and source location. If the program's ABI is unavailable, retain the generic revert reason instead of using another program's panic entry.

The default local-node snapshot now uses the V7 gas-cost table shipped in the Core 0.48.3 binary. Snapshot gas costs accept either V4 or V7; code that reads `gas_costs.V4` directly must first narrow the variant. Explicit V4 snapshots remain supported; partial V4 overrides retain the SDK’s previous V4 defaults, including nested operations. Empty overrides retain the new V7 defaults. Recompiling Sway with Forc 0.72.1 can change bytecode, gas usage and dynamic-bytes hashes, and older source may need standard-library migrations.

chore(deps)!: update Fuel-owned dependencies and toolchains
2 changes: 1 addition & 1 deletion .github/actions/test-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "Test Setup"
inputs:
node-version:
description: "Node version"
default: 20.14.0
default: 20.20.0
pnpm-version:
description: "PNPM version"
default: 9.4.0
Expand Down
101 changes: 87 additions & 14 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: "Test"

on:
workflow_dispatch:
pull_request:
push:
branches:
Expand Down Expand Up @@ -150,11 +151,74 @@ jobs:
# uncomment the below line to test against devnet
# DEVNET_WALLET_PVT_KEY: ${{ secrets.DEVNET_WALLET_PVT_KEY }}

coverage_baseline:
name: Coverage baseline
if: github.event_name == 'pull_request' && github.base_ref == 'master'
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: read
steps:
- name: Restore Coverage for the Exact Base Commit
id: baseline-cache
uses: actions/cache@v4
with:
path: coverage-master
key: ${{ runner.os }}-coverage-master-${{ github.event.pull_request.base.sha }}

- name: Checkout Base Commit
if: steps.baseline-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.sha }}

- name: CI Setup
if: steps.baseline-cache.outputs.cache-hit != 'true'
uses: ./.github/actions/test-setup

- name: Pretest
if: steps.baseline-cache.outputs.cache-hit != 'true'
run: pnpm pretest

- name: Install Playwright Dependencies
if: steps.baseline-cache.outputs.cache-hit != 'true'
run: pnpm exec playwright install --with-deps --only-shell chromium

- name: Generate Base Coverage
if: steps.baseline-cache.outputs.cache-hit != 'true'
run: |
pnpm test:node
pnpm test:browser
pnpm test:coverage-merge
mkdir -p coverage-master
cp coverage/report/coverage-summary.json coverage-master/coverage-summary.json

- name: Upload Base Coverage for This Run
uses: actions/upload-artifact@v4
with:
name: coverage-master
path: coverage-master/coverage-summary.json
if-no-files-found: error
overwrite: true

test:
if: github.base_ref == 'master' || github.ref_name == 'master'
if: ${{ !cancelled() && (github.base_ref == 'master' || github.ref_name == 'master') }}
runs-on: ubuntu-latest
needs: [environments, e2e]
needs: [environments, e2e, coverage_baseline]
steps:
- name: Verify Required Test Jobs
env:
ENVIRONMENTS_RESULT: ${{ needs.environments.result }}
E2E_RESULT: ${{ needs.e2e.result }}
BASELINE_RESULT: ${{ needs.coverage_baseline.result }}
IS_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
run: |
test "$ENVIRONMENTS_RESULT" = success
test "$E2E_RESULT" = success
if [ "$IS_PULL_REQUEST" = true ]; then
test "$BASELINE_RESULT" = success
fi

- name: Checkout
uses: actions/checkout@v4

Expand All @@ -179,36 +243,45 @@ jobs:
- name: Generate Coverage
run: pnpm test:coverage-merge

- name: Find PR Number
uses: jwalton/gh-find-current-pr@v1
id: findPr
- name: Prepare Master Coverage Cache
if: github.event_name != 'pull_request'
run: |
mkdir -p coverage-master
cp coverage/report/coverage-summary.json coverage-master/coverage-summary.json

- name: Cache Master Coverage for Future PRs
if: github.event_name != 'pull_request'
uses: actions/cache/save@v4
with:
path: coverage-master
key: ${{ runner.os }}-coverage-master-${{ github.sha }}

- name: Upload Master Coverage Artifact
uses: actions/upload-artifact@v4
if: ${{ !steps.findPr.outputs.number }}
if: github.event_name != 'pull_request'
with:
name: coverage-master
path: coverage/report
path: coverage-master/coverage-summary.json
if-no-files-found: error
overwrite: true

- name: Download Master Coverage Artifact
uses: dawidd6/action-download-artifact@v10
if: ${{ steps.findPr.outputs.number }}
uses: actions/download-artifact@v6
if: github.event_name == 'pull_request'
with:
workflow: test.yaml
branch: master
name: coverage-master
path: coverage-master

- name: Generate Coverage Diff
if: ${{ (steps.findPr.outputs.number) }}
if: github.event_name == 'pull_request'
run: pnpm test:coverage-diff

- name: Report Coverage
uses: thollander/actions-comment-pull-request@v3
if: ${{ steps.findPr.outputs.number }}
if: github.event_name == 'pull_request'
with:
file-path: coverage/report/coverage-diff.txt
pr-number: ${{ (steps.findPr.outputs.number) }}
pr-number: ${{ github.event.pull_request.number }}
comment-tag: diff
mode: recreate
create-if-not-exists: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ Forc.lock

# Ignore typegen test files
**/test/typegen
packages/fuel-gauge/test/fixtures/chain-config/state_transition_bytecode.generated.ts

# Ignore [local] history directory (VsCode extension)
.history
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.14.0
20.20.0
4 changes: 2 additions & 2 deletions apps/create-fuels-counter-guide/fuel-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
channel = "testnet"

[components]
forc = "0.68.7"
fuel-core = "0.47.1"
forc = "0.72.1"
fuel-core = "0.48.3"
4 changes: 2 additions & 2 deletions apps/create-fuels-counter-guide/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"postbuild": "run-s fuels:build original:build"
},
"dependencies": {
"@fuels/connectors": "0.39.2",
"@fuels/react": "0.39.2",
"@fuels/connectors": "0.45.0",
"@fuels/react": "0.45.0",
"@tanstack/react-query": "5.66.9",
"clsx": "2.1.1",
"dotenv": "16.4.7",
Expand Down
2 changes: 1 addition & 1 deletion apps/demo-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"pretest": "pnpm original:build"
},
"dependencies": {
"@fuels/vm-asm": "0.62.0",
"@fuels/vm-asm": "0.66.4",
"@types/node": "22.13.5",
"@types/react-dom": "19.0.4",
"@types/react": "19.0.10",
Expand Down
2 changes: 1 addition & 1 deletion apps/demo-react-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"pretest": "pnpm original:build"
},
"dependencies": {
"@fuels/vm-asm": "0.62.0",
"@fuels/vm-asm": "0.66.4",
"fuels": "workspace:*",
"react-dom": "19.0.0",
"react": "19.0.0"
Expand Down
4 changes: 2 additions & 2 deletions apps/demo-wallet-sdk-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"lint": "next lint"
},
"dependencies": {
"@fuels/connectors": "0.39.2",
"@fuels/react": "0.39.2",
"@fuels/connectors": "0.45.0",
"@fuels/react": "0.45.0",
"@tanstack/react-query": "5.66.9",
"fuels": "workspace:*",
"next": "15.2.4",
Expand Down
56 changes: 50 additions & 6 deletions apps/docs/fuel-asm-example/Cargo.lock

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

4 changes: 2 additions & 2 deletions apps/docs/fuel-asm-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "original-example"
version = "0.1.0"
edition = "2024"
rust-version = "1.85.0"
rust-version = "1.93.0"

[dependencies]
fuel-asm = "0.60.2"
fuel-asm = "0.66.4"
6 changes: 3 additions & 3 deletions apps/docs/src/guide/creating-a-fuel-dapp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

![End result of this guide](../../public/creating-a-fuel-dapp-create-fuels-end-result.png)

You can also check it live, deployed to the Testnet:

- [https://create-fuels-template.vercel.app/](https://create-fuels-template.vercel.app/)
You can also explore the [Vite template source](https://github.com/FuelLabs/fuels-ts/tree/master/templates/vite).

## Initializing the project

Use Node.js 20.18 or later in the Node 20, 22 or 24 release lines. The CLI and generated templates declare this requirement because their wallet connector dependencies require it.

The first step is to run the command:

::: code-group
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ This guide builds on the [Creating a Fuel dApp](./index.md) guide. Once you've g

![End result of this guide](../../public/working-with-predicates-end-result.png)

You can also check it live, deployed to the Testnet:

- [https://create-fuels-template.vercel.app/](https://create-fuels-template.vercel.app/)
You can also explore the [Vite template source](https://github.com/FuelLabs/fuels-ts/tree/master/templates/vite).

## Adding a Configurable pin

Expand Down
1 change: 0 additions & 1 deletion apps/docs/src/guide/fuel-asm/snippets/fuel-asm.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// #region main
import { FuelAsm } from 'fuels';

// @ts-expect-error method reference missing in DTS
await FuelAsm.initWasm();

const programBytes = Uint8Array.from([
Expand Down
Loading
Loading