Skip to content

Commit

Permalink
Merge branch 'master' into fix/move-type-check-to-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
maschad authored Nov 20, 2024
2 parents 214151a + 7f92490 commit 01020a5
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,85 @@ See also:

- [Developing](#developing)

# Working with Unreleased Forc and Fuel-Core Functionality

When you need to work with unreleased versions of `forc` or `fuel-core`, you can specify a git branch instead of a version number in the respective `VERSION` file.

## Using Unreleased Forc

To use an unreleased version of `forc`:

1. **Edit the `VERSION` File**
Open the `internal/forc/VERSION` file and replace the version number (e.g., `0.59.0`) with the desired git branch:

```text
git:some/branch-name
```

1. **Install and Build**
To download and build `forc` from the specified branch after updating `VERSION` file, run:

```sh
pnpm install
pnpm build
```

The following directory will be updated or created: `internal/forc/sway-repo`

## Using Unreleased Fuel-Core

Similarly, to use an unreleased version of `fuel-core`:

1. **Edit the `VERSION` file:**
Open the `internal/fuel-core/VERSION` file and replace the version number with the desired git branch:

```text
git:some/branch-name
```

1. **Install and Build**
To download and build `fuel-core` from the specified branch after updating `VERSION` file, run:

```sh
pnpm install
pnpm build
```

> [!Note]
> The `internal/forc/sway-repo` and `internal/fuel-core/fuel-core-repo` directory will contain a local clone of the Sway and Fuel Core repository respectively, at the specific version or git branch you have specified in the `internal/forc/VERSION` and `internal/fuel-core/VERSION` file.
## Unreleased Files and Directories Created After Installation

After running `pnpm install` and `pnpm build`, the following files and directories are created:

- Forc Repository:

- Located at `internal/forc/sway-repo`.
- Contains the source code for the version of `forc` you are using.

- Fuel-Core Repository:
- Located at `internal/fuel-core/fuel-core-repo`.
- Contains the source code for the version of `fuel-core` you are using.

## Switching Back to Standard Binaries

If you switch back to using standard binaries you might encounter issues where the SDK still uses the previously downloaded unreleased binaries.

To resolve the issue and ensure the SDK uses the correct binaries:

1. **Delete the downloaded repositories**

```sh
rm -rf internal/forc/sway-repo
rm -rf internal/fuel-core/fuel-core-repo
```

1. **Reinstall and build**
```sh
pnpm install
pnpm build
```

# Testing

In order to run tests locally, you can run the following commands:
Expand Down Expand Up @@ -182,6 +261,12 @@ DEVNET_WALLET_PVT_KEY=0x...
TESTNET_WALLET_PVT_KEY=0x...
```

This will enable you to run the e2e test locally against the live network:

```sh
pnpm test:filter e2e-script
```

<!-- TODO: add/fix block explorer URL after testnet support- Checking Wallet Balance: https://fuellabs.github.io/block-explorer-v2/beta-5/?#/address/fuel1x33ajpj0jy5p2wcqqu45e32r75zrwfeh6hwqfv5un670rv4p0mns58enjg -->

# Commit Convention
Expand Down

0 comments on commit 01020a5

Please sign in to comment.