diff --git a/.changeset/chilly-grapes-love.md b/.changeset/chilly-grapes-love.md new file mode 100644 index 00000000000..a9ac6afd8f5 --- /dev/null +++ b/.changeset/chilly-grapes-love.md @@ -0,0 +1,9 @@ +--- +"@fuel-ts/abi-coder": patch +"@fuel-ts/script": patch +"@fuel-ts/utils": patch +--- + +- Standardizing all forc projects across all packages +- Fixing turbo caching configs for `pretest` pipeline +- Reducing verbosity of `pretest` pipeline diff --git a/apps/demo-typegen/turbo.json b/apps/demo-typegen/turbo.json new file mode 100644 index 00000000000..eb0926893af --- /dev/null +++ b/apps/demo-typegen/turbo.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://turborepo.org/schema.json", + "extends": ["//"], + "pipeline": { + "pretest": { + "outputMode": "errors-only", + "inputs": ["contract/src/*.sw", "contract/Forc.toml"], + "outputs": ["contract/out/debug/**"] + } + } +} diff --git a/apps/docs-snippets/package.json b/apps/docs-snippets/package.json index 73fdce12bcb..8a55b6bee9c 100644 --- a/apps/docs-snippets/package.json +++ b/apps/docs-snippets/package.json @@ -5,7 +5,7 @@ "private": true, "scripts": { "pretest": "pnpm build:forc", - "build:forc": "pnpm fuels-forc build -p projects" + "build:forc": "pnpm fuels-forc build -p test/fixtures/forc-projects" }, "devDependencies": { "fuels": "workspace:*", diff --git a/apps/docs-snippets/src/guide/contracts/call-parameters.test.ts b/apps/docs-snippets/src/guide/contracts/call-parameters.test.ts index 14ee23394ae..d6dd699716e 100644 --- a/apps/docs-snippets/src/guide/contracts/call-parameters.test.ts +++ b/apps/docs-snippets/src/guide/contracts/call-parameters.test.ts @@ -1,7 +1,7 @@ import type { Contract, Provider } from 'fuels'; import { BN, BaseAssetId } from 'fuels'; -import { DocSnippetProjectsEnum } from '../../../projects'; +import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects'; import { createAndDeployContractFromProject } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/contracts/calls-with-different-wallets.test.ts b/apps/docs-snippets/src/guide/contracts/calls-with-different-wallets.test.ts index 932c747e889..c0f4d3c7ead 100644 --- a/apps/docs-snippets/src/guide/contracts/calls-with-different-wallets.test.ts +++ b/apps/docs-snippets/src/guide/contracts/calls-with-different-wallets.test.ts @@ -1,7 +1,7 @@ import type { Contract } from 'fuels'; import { FUEL_NETWORK_URL, Provider, WalletUnlocked } from 'fuels'; -import { DocSnippetProjectsEnum } from '../../../projects'; +import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects'; import { createAndDeployContractFromProject } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/contracts/configurable-constants.test.ts b/apps/docs-snippets/src/guide/contracts/configurable-constants.test.ts index dafd9edc585..affdda5a5ef 100644 --- a/apps/docs-snippets/src/guide/contracts/configurable-constants.test.ts +++ b/apps/docs-snippets/src/guide/contracts/configurable-constants.test.ts @@ -1,7 +1,7 @@ import type { Provider, WalletUnlocked } from 'fuels'; import { ContractFactory } from 'fuels'; -import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../projects'; +import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../test/fixtures/forc-projects'; import { getTestWallet } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/contracts/contract-balance.test.ts b/apps/docs-snippets/src/guide/contracts/contract-balance.test.ts index ce86c28e0ec..51ae2f7d95e 100644 --- a/apps/docs-snippets/src/guide/contracts/contract-balance.test.ts +++ b/apps/docs-snippets/src/guide/contracts/contract-balance.test.ts @@ -1,7 +1,7 @@ import type { Contract } from 'fuels'; import { Wallet, BN, BaseAssetId, Provider, FUEL_NETWORK_URL } from 'fuels'; -import { DocSnippetProjectsEnum } from '../../../projects'; +import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects'; import { createAndDeployContractFromProject } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/contracts/cost-estimation.test.ts b/apps/docs-snippets/src/guide/contracts/cost-estimation.test.ts index 055143b89e0..76070e0237c 100644 --- a/apps/docs-snippets/src/guide/contracts/cost-estimation.test.ts +++ b/apps/docs-snippets/src/guide/contracts/cost-estimation.test.ts @@ -1,6 +1,6 @@ import { BaseAssetId, type Contract, type Provider } from 'fuels'; -import { DocSnippetProjectsEnum } from '../../../projects'; +import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects'; import { createAndDeployContractFromProject } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/contracts/deploying-contracts.test.ts b/apps/docs-snippets/src/guide/contracts/deploying-contracts.test.ts index 1a7bdd101b2..c0fd0f31c20 100644 --- a/apps/docs-snippets/src/guide/contracts/deploying-contracts.test.ts +++ b/apps/docs-snippets/src/guide/contracts/deploying-contracts.test.ts @@ -2,7 +2,7 @@ import { readFileSync } from 'fs'; import { Provider, FUEL_NETWORK_URL, Wallet, ContractFactory } from 'fuels'; import { join } from 'path'; -import { DocSnippetProjectsEnum } from '../../../projects'; +import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects'; import { getTestWallet } from '../../utils'; describe(__filename, () => { @@ -13,7 +13,7 @@ describe(__filename, () => { beforeAll(async () => { const wallet = await getTestWallet(); PRIVATE_KEY = wallet.privateKey; - projectsPath = join(__dirname, '../../../projects'); + projectsPath = join(__dirname, '../../../test/fixtures/forc-projects'); contractName = DocSnippetProjectsEnum.ECHO_VALUES; }); diff --git a/apps/docs-snippets/src/guide/contracts/index.test.ts b/apps/docs-snippets/src/guide/contracts/index.test.ts index 3b098eb9a91..20654d96ce4 100644 --- a/apps/docs-snippets/src/guide/contracts/index.test.ts +++ b/apps/docs-snippets/src/guide/contracts/index.test.ts @@ -1,6 +1,6 @@ import type { Contract } from 'fuels'; -import { DocSnippetProjectsEnum } from '../../../projects'; +import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects'; import { createAndDeployContractFromProject } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/contracts/inter-contract-calls.test.ts b/apps/docs-snippets/src/guide/contracts/inter-contract-calls.test.ts index fb0b9b3b3b4..45d86f70c83 100644 --- a/apps/docs-snippets/src/guide/contracts/inter-contract-calls.test.ts +++ b/apps/docs-snippets/src/guide/contracts/inter-contract-calls.test.ts @@ -1,7 +1,7 @@ import type { Contract, Provider, WalletUnlocked } from 'fuels'; import { BN, ContractFactory } from 'fuels'; -import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../projects'; +import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../test/fixtures/forc-projects'; import { getTestWallet } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/contracts/logs.test.ts b/apps/docs-snippets/src/guide/contracts/logs.test.ts index 9af367488f8..68c2293551b 100644 --- a/apps/docs-snippets/src/guide/contracts/logs.test.ts +++ b/apps/docs-snippets/src/guide/contracts/logs.test.ts @@ -1,7 +1,7 @@ import type { Contract, Provider } from 'fuels'; import { BN } from 'fuels'; -import { DocSnippetProjectsEnum } from '../../../projects'; +import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects'; import { createAndDeployContractFromProject } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/contracts/managing-deployed-contracts.test.ts b/apps/docs-snippets/src/guide/contracts/managing-deployed-contracts.test.ts index 2de7f2c877d..df1be8a3a10 100644 --- a/apps/docs-snippets/src/guide/contracts/managing-deployed-contracts.test.ts +++ b/apps/docs-snippets/src/guide/contracts/managing-deployed-contracts.test.ts @@ -1,7 +1,7 @@ import type { AbstractAddress, WalletUnlocked } from 'fuels'; import { ContractFactory, Contract } from 'fuels'; -import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../projects'; +import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../test/fixtures/forc-projects'; import { getTestWallet } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/contracts/multicalls.test.ts b/apps/docs-snippets/src/guide/contracts/multicalls.test.ts index e0fd4b7bc37..6fa9bbbd527 100644 --- a/apps/docs-snippets/src/guide/contracts/multicalls.test.ts +++ b/apps/docs-snippets/src/guide/contracts/multicalls.test.ts @@ -1,7 +1,7 @@ import type { Contract, Provider } from 'fuels'; import { BaseAssetId, BN, ContractFactory } from 'fuels'; -import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../projects'; +import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../test/fixtures/forc-projects'; import { getTestWallet } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/contracts/simulate-transactions.test.ts b/apps/docs-snippets/src/guide/contracts/simulate-transactions.test.ts index 15777a16a0c..e2eb059357d 100644 --- a/apps/docs-snippets/src/guide/contracts/simulate-transactions.test.ts +++ b/apps/docs-snippets/src/guide/contracts/simulate-transactions.test.ts @@ -1,7 +1,7 @@ import { safeExec } from '@fuel-ts/errors/test-utils'; import { BaseAssetId, Wallet, BN, Contract } from 'fuels'; -import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../projects'; +import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../test/fixtures/forc-projects'; import { createAndDeployContractFromProject } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/contracts/transaction-parameters.test.ts b/apps/docs-snippets/src/guide/contracts/transaction-parameters.test.ts index 83bf29e44dd..e7dd1f9d0aa 100644 --- a/apps/docs-snippets/src/guide/contracts/transaction-parameters.test.ts +++ b/apps/docs-snippets/src/guide/contracts/transaction-parameters.test.ts @@ -1,7 +1,7 @@ import type { Contract, Provider } from 'fuels'; import { BN } from 'fuels'; -import { DocSnippetProjectsEnum } from '../../../projects'; +import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects'; import { createAndDeployContractFromProject } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/predicates/index.test.ts b/apps/docs-snippets/src/guide/predicates/index.test.ts index f95d86197d0..57ea16c3171 100644 --- a/apps/docs-snippets/src/guide/predicates/index.test.ts +++ b/apps/docs-snippets/src/guide/predicates/index.test.ts @@ -1,6 +1,6 @@ import { FUEL_NETWORK_URL, Provider, Predicate } from 'fuels'; -import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../projects'; +import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../test/fixtures/forc-projects'; describe(__filename, () => { const { abiContents: jsonAbi, binHexlified: binary } = getDocsSnippetsForcProject( diff --git a/apps/docs-snippets/src/guide/predicates/predicate-with-configurable.test.ts b/apps/docs-snippets/src/guide/predicates/predicate-with-configurable.test.ts index 648226f04d6..a0ba7a61e9c 100644 --- a/apps/docs-snippets/src/guide/predicates/predicate-with-configurable.test.ts +++ b/apps/docs-snippets/src/guide/predicates/predicate-with-configurable.test.ts @@ -1,6 +1,6 @@ import { WalletUnlocked, Predicate, BaseAssetId, BN, getRandomB256 } from 'fuels'; -import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../projects'; +import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../test/fixtures/forc-projects'; import { getTestWallet } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/predicates/send-and-spend-funds-from-predicates.test.ts b/apps/docs-snippets/src/guide/predicates/send-and-spend-funds-from-predicates.test.ts index 1cfd466e183..0f7ce1ae338 100644 --- a/apps/docs-snippets/src/guide/predicates/send-and-spend-funds-from-predicates.test.ts +++ b/apps/docs-snippets/src/guide/predicates/send-and-spend-funds-from-predicates.test.ts @@ -9,7 +9,7 @@ import { BaseAssetId, } from 'fuels'; -import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../projects'; +import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../test/fixtures/forc-projects'; import { getTestWallet } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/scripts/script-custom-transaction.test.ts b/apps/docs-snippets/src/guide/scripts/script-custom-transaction.test.ts index 13f71d33d46..9b1af6c0ca4 100644 --- a/apps/docs-snippets/src/guide/scripts/script-custom-transaction.test.ts +++ b/apps/docs-snippets/src/guide/scripts/script-custom-transaction.test.ts @@ -1,7 +1,7 @@ import { BN, ContractFactory, BaseAssetId, ScriptTransactionRequest } from 'fuels'; import type { CoinQuantityLike, Contract, WalletUnlocked } from 'fuels'; -import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../projects'; +import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../test/fixtures/forc-projects'; import { defaultTxParams, getTestWallet } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/scripts/script-with-configurable.test.ts b/apps/docs-snippets/src/guide/scripts/script-with-configurable.test.ts index e0c19e2118d..63806679a67 100644 --- a/apps/docs-snippets/src/guide/scripts/script-with-configurable.test.ts +++ b/apps/docs-snippets/src/guide/scripts/script-with-configurable.test.ts @@ -1,7 +1,7 @@ import type { WalletUnlocked } from 'fuels'; import { Script, BN } from 'fuels'; -import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../projects'; +import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../test/fixtures/forc-projects'; import { getTestWallet } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/types/arrays.test.ts b/apps/docs-snippets/src/guide/types/arrays.test.ts index fa997332233..21c3decb5b6 100644 --- a/apps/docs-snippets/src/guide/types/arrays.test.ts +++ b/apps/docs-snippets/src/guide/types/arrays.test.ts @@ -1,7 +1,7 @@ import type { Contract } from 'fuels'; import { BN } from 'fuels'; -import { DocSnippetProjectsEnum } from '../../../projects'; +import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects'; import { createAndDeployContractFromProject } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/types/bits512.test.ts b/apps/docs-snippets/src/guide/types/bits512.test.ts index 28532157a45..45ed22aadf4 100644 --- a/apps/docs-snippets/src/guide/types/bits512.test.ts +++ b/apps/docs-snippets/src/guide/types/bits512.test.ts @@ -1,7 +1,7 @@ import type { Contract } from 'fuels'; import { Wallet } from 'fuels'; -import { DocSnippetProjectsEnum } from '../../../projects'; +import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects'; import { createAndDeployContractFromProject } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/types/bytes.test.ts b/apps/docs-snippets/src/guide/types/bytes.test.ts index 6c2257de50c..c21a411c202 100644 --- a/apps/docs-snippets/src/guide/types/bytes.test.ts +++ b/apps/docs-snippets/src/guide/types/bytes.test.ts @@ -1,6 +1,6 @@ import type { Contract, Bytes } from 'fuels'; -import { DocSnippetProjectsEnum } from '../../../projects'; +import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects'; import { createAndDeployContractFromProject } from '../../utils'; describe('Bytes', () => { diff --git a/apps/docs-snippets/src/guide/types/conversion.test.ts b/apps/docs-snippets/src/guide/types/conversion.test.ts index b7171273669..86dbee4c3df 100644 --- a/apps/docs-snippets/src/guide/types/conversion.test.ts +++ b/apps/docs-snippets/src/guide/types/conversion.test.ts @@ -11,7 +11,7 @@ import { randomBytes, } from 'fuels'; -import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../projects'; +import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../test/fixtures/forc-projects'; describe(__filename, () => { const { abiContents: abi } = getDocsSnippetsForcProject(DocSnippetProjectsEnum.ECHO_VALUES); diff --git a/apps/docs-snippets/src/guide/types/enums.test.ts b/apps/docs-snippets/src/guide/types/enums.test.ts index aea468994d2..7793c1a0764 100644 --- a/apps/docs-snippets/src/guide/types/enums.test.ts +++ b/apps/docs-snippets/src/guide/types/enums.test.ts @@ -1,6 +1,6 @@ import type { Contract } from 'fuels'; -import { DocSnippetProjectsEnum } from '../../../projects'; +import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects'; import { createAndDeployContractFromProject } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/types/evm-address.test.ts b/apps/docs-snippets/src/guide/types/evm-address.test.ts index edbb6b0ac4f..142eac059a0 100644 --- a/apps/docs-snippets/src/guide/types/evm-address.test.ts +++ b/apps/docs-snippets/src/guide/types/evm-address.test.ts @@ -1,7 +1,7 @@ import type { B256AddressEvm, Contract, EvmAddress } from 'fuels'; import { Address } from 'fuels'; -import { DocSnippetProjectsEnum } from '../../../projects'; +import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects'; import { createAndDeployContractFromProject } from '../../utils'; describe('EvMAddress', () => { diff --git a/apps/docs-snippets/src/guide/types/options.test.ts b/apps/docs-snippets/src/guide/types/options.test.ts index 9ff5316a2bc..31b3ee2f6e3 100644 --- a/apps/docs-snippets/src/guide/types/options.test.ts +++ b/apps/docs-snippets/src/guide/types/options.test.ts @@ -1,6 +1,6 @@ import type { Contract } from 'fuels'; -import { DocSnippetProjectsEnum } from '../../../projects'; +import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects'; import { createAndDeployContractFromProject } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/types/raw-slice.test.ts b/apps/docs-snippets/src/guide/types/raw-slice.test.ts index cd907f94125..1fa6dabb26c 100644 --- a/apps/docs-snippets/src/guide/types/raw-slice.test.ts +++ b/apps/docs-snippets/src/guide/types/raw-slice.test.ts @@ -1,6 +1,6 @@ import type { Contract, BN, RawSlice } from 'fuels'; -import { DocSnippetProjectsEnum } from '../../../projects'; +import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects'; import { createAndDeployContractFromProject } from '../../utils'; describe('RawSlice', () => { diff --git a/apps/docs-snippets/src/guide/types/std-string.test.ts b/apps/docs-snippets/src/guide/types/std-string.test.ts index a31a1c19267..cc3c6963a6c 100644 --- a/apps/docs-snippets/src/guide/types/std-string.test.ts +++ b/apps/docs-snippets/src/guide/types/std-string.test.ts @@ -1,6 +1,6 @@ import type { Contract, StdString } from 'fuels'; -import { DocSnippetProjectsEnum } from '../../../projects'; +import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects'; import { createAndDeployContractFromProject } from '../../utils'; describe('StdString', () => { diff --git a/apps/docs-snippets/src/guide/types/string.test.ts b/apps/docs-snippets/src/guide/types/string.test.ts index 9a3224f40f7..b95cdeee742 100644 --- a/apps/docs-snippets/src/guide/types/string.test.ts +++ b/apps/docs-snippets/src/guide/types/string.test.ts @@ -1,6 +1,6 @@ import type { BN, Contract } from 'fuels'; -import { DocSnippetProjectsEnum } from '../../../projects'; +import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects'; import { createAndDeployContractFromProject } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/types/tuples.test.ts b/apps/docs-snippets/src/guide/types/tuples.test.ts index f6e24c01485..a267f3cee53 100644 --- a/apps/docs-snippets/src/guide/types/tuples.test.ts +++ b/apps/docs-snippets/src/guide/types/tuples.test.ts @@ -1,7 +1,7 @@ import type { Contract } from 'fuels'; import { BN } from 'fuels'; -import { DocSnippetProjectsEnum } from '../../../projects'; +import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects'; import { createAndDeployContractFromProject } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/types/vector.test.ts b/apps/docs-snippets/src/guide/types/vector.test.ts index 5df35ed7ff4..1b962d28ccb 100644 --- a/apps/docs-snippets/src/guide/types/vector.test.ts +++ b/apps/docs-snippets/src/guide/types/vector.test.ts @@ -1,7 +1,7 @@ import type { Contract } from 'fuels'; import { BN, getRandomB256 } from 'fuels'; -import { DocSnippetProjectsEnum } from '../../../projects'; +import { DocSnippetProjectsEnum } from '../../../test/fixtures/forc-projects'; import { createAndDeployContractFromProject } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/guide/wallets/transferring-assets.test.ts b/apps/docs-snippets/src/guide/wallets/transferring-assets.test.ts index 21627100969..476b4e9f58b 100644 --- a/apps/docs-snippets/src/guide/wallets/transferring-assets.test.ts +++ b/apps/docs-snippets/src/guide/wallets/transferring-assets.test.ts @@ -1,7 +1,7 @@ import type { Contract, Provider, TxParams, WalletUnlocked } from 'fuels'; import { Address, BN, ContractFactory, BaseAssetId, Wallet } from 'fuels'; -import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../projects'; +import { DocSnippetProjectsEnum, getDocsSnippetsForcProject } from '../../../test/fixtures/forc-projects'; import { getTestWallet } from '../../utils'; describe(__filename, () => { diff --git a/apps/docs-snippets/src/utils.ts b/apps/docs-snippets/src/utils.ts index 83619697e4c..b641c04f06c 100644 --- a/apps/docs-snippets/src/utils.ts +++ b/apps/docs-snippets/src/utils.ts @@ -10,8 +10,8 @@ import { ContractFactory, } from 'fuels'; -import type { DocSnippetProjectsEnum } from '../projects'; -import { getDocsSnippetsForcProject } from '../projects'; +import type { DocSnippetProjectsEnum } from '../test/fixtures/forc-projects'; +import { getDocsSnippetsForcProject } from '../test/fixtures/forc-projects'; export const getTestWallet = async (seedQuantities?: CoinQuantityLike[]) => { // create a provider using the Fuel network URL diff --git a/apps/docs-snippets/projects/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/Forc.toml diff --git a/apps/docs-snippets/projects/counter/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/counter/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/counter/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/counter/Forc.toml diff --git a/apps/docs-snippets/projects/counter/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/counter/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/counter/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/counter/src/main.sw diff --git a/apps/docs-snippets/projects/echo-bytes/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/echo-bytes/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/echo-bytes/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/echo-bytes/Forc.toml diff --git a/apps/docs-snippets/projects/echo-bytes/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/echo-bytes/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/echo-bytes/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/echo-bytes/src/main.sw diff --git a/apps/docs-snippets/projects/echo-configurables/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/echo-configurables/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/echo-configurables/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/echo-configurables/Forc.toml diff --git a/apps/docs-snippets/projects/echo-configurables/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/echo-configurables/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/echo-configurables/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/echo-configurables/src/main.sw diff --git a/apps/docs-snippets/projects/echo-employee-data-vector/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/echo-employee-data-vector/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/echo-employee-data-vector/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/echo-employee-data-vector/Forc.toml diff --git a/apps/docs-snippets/projects/echo-employee-data-vector/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/echo-employee-data-vector/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/echo-employee-data-vector/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/echo-employee-data-vector/src/main.sw diff --git a/apps/docs-snippets/projects/echo-enum/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/echo-enum/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/echo-enum/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/echo-enum/Forc.toml diff --git a/apps/docs-snippets/projects/echo-enum/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/echo-enum/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/echo-enum/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/echo-enum/src/main.sw diff --git a/apps/docs-snippets/projects/echo-evm-address/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/echo-evm-address/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/echo-evm-address/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/echo-evm-address/Forc.toml diff --git a/apps/docs-snippets/projects/echo-evm-address/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/echo-evm-address/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/echo-evm-address/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/echo-evm-address/src/main.sw diff --git a/apps/docs-snippets/projects/echo-raw-slice/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/echo-raw-slice/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/echo-raw-slice/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/echo-raw-slice/Forc.toml diff --git a/apps/docs-snippets/projects/echo-raw-slice/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/echo-raw-slice/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/echo-raw-slice/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/echo-raw-slice/src/main.sw diff --git a/apps/docs-snippets/projects/echo-std-string/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/echo-std-string/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/echo-std-string/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/echo-std-string/Forc.toml diff --git a/apps/docs-snippets/projects/echo-std-string/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/echo-std-string/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/echo-std-string/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/echo-std-string/src/main.sw diff --git a/apps/docs-snippets/projects/echo-u64-array/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/echo-u64-array/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/echo-u64-array/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/echo-u64-array/Forc.toml diff --git a/apps/docs-snippets/projects/echo-u64-array/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/echo-u64-array/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/echo-u64-array/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/echo-u64-array/src/main.sw diff --git a/apps/docs-snippets/projects/echo-values/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/echo-values/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/echo-values/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/echo-values/Forc.toml diff --git a/apps/docs-snippets/projects/echo-values/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/echo-values/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/echo-values/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/echo-values/src/main.sw diff --git a/apps/docs-snippets/projects/employee-data/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/employee-data/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/employee-data/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/employee-data/Forc.toml diff --git a/apps/docs-snippets/projects/employee-data/src/lib.sw b/apps/docs-snippets/test/fixtures/forc-projects/employee-data/src/lib.sw similarity index 100% rename from apps/docs-snippets/projects/employee-data/src/lib.sw rename to apps/docs-snippets/test/fixtures/forc-projects/employee-data/src/lib.sw diff --git a/apps/docs-snippets/projects/index.ts b/apps/docs-snippets/test/fixtures/forc-projects/index.ts similarity index 100% rename from apps/docs-snippets/projects/index.ts rename to apps/docs-snippets/test/fixtures/forc-projects/index.ts diff --git a/apps/docs-snippets/projects/log-values/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/log-values/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/log-values/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/log-values/Forc.toml diff --git a/apps/docs-snippets/projects/log-values/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/log-values/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/log-values/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/log-values/src/main.sw diff --git a/apps/docs-snippets/projects/return-context/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/return-context/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/return-context/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/return-context/Forc.toml diff --git a/apps/docs-snippets/projects/return-context/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/return-context/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/return-context/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/return-context/src/main.sw diff --git a/apps/docs-snippets/projects/return-true-predicate/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/return-true-predicate/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/return-true-predicate/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/return-true-predicate/Forc.toml diff --git a/apps/docs-snippets/projects/return-true-predicate/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/return-true-predicate/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/return-true-predicate/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/return-true-predicate/src/main.sw diff --git a/apps/docs-snippets/projects/script-transfer-to-contract/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/script-transfer-to-contract/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/script-transfer-to-contract/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/script-transfer-to-contract/Forc.toml diff --git a/apps/docs-snippets/projects/script-transfer-to-contract/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/script-transfer-to-contract/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/script-transfer-to-contract/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/script-transfer-to-contract/src/main.sw diff --git a/apps/docs-snippets/projects/simple-predicate/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/simple-predicate/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/simple-predicate/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/simple-predicate/Forc.toml diff --git a/apps/docs-snippets/projects/simple-predicate/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/simple-predicate/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/simple-predicate/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/simple-predicate/src/main.sw diff --git a/apps/docs-snippets/projects/simple-token-abi/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/simple-token-abi/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/simple-token-abi/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/simple-token-abi/Forc.toml diff --git a/apps/docs-snippets/projects/simple-token-abi/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/simple-token-abi/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/simple-token-abi/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/simple-token-abi/src/main.sw diff --git a/apps/docs-snippets/projects/simple-token/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/simple-token/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/simple-token/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/simple-token/Forc.toml diff --git a/apps/docs-snippets/projects/simple-token/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/simple-token/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/simple-token/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/simple-token/src/main.sw diff --git a/apps/docs-snippets/projects/sum-option-u8/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/sum-option-u8/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/sum-option-u8/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/sum-option-u8/Forc.toml diff --git a/apps/docs-snippets/projects/sum-option-u8/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/sum-option-u8/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/sum-option-u8/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/sum-option-u8/src/main.sw diff --git a/apps/docs-snippets/projects/sum-script/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/sum-script/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/sum-script/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/sum-script/Forc.toml diff --git a/apps/docs-snippets/projects/sum-script/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/sum-script/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/sum-script/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/sum-script/src/main.sw diff --git a/apps/docs-snippets/projects/token-depositor/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/token-depositor/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/token-depositor/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/token-depositor/Forc.toml diff --git a/apps/docs-snippets/projects/token-depositor/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/token-depositor/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/token-depositor/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/token-depositor/src/main.sw diff --git a/apps/docs-snippets/projects/transfer-to-address/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/transfer-to-address/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/transfer-to-address/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/transfer-to-address/Forc.toml diff --git a/apps/docs-snippets/projects/transfer-to-address/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/transfer-to-address/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/transfer-to-address/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/transfer-to-address/src/main.sw diff --git a/apps/docs-snippets/projects/whitelisted-address-predicate/Forc.toml b/apps/docs-snippets/test/fixtures/forc-projects/whitelisted-address-predicate/Forc.toml similarity index 100% rename from apps/docs-snippets/projects/whitelisted-address-predicate/Forc.toml rename to apps/docs-snippets/test/fixtures/forc-projects/whitelisted-address-predicate/Forc.toml diff --git a/apps/docs-snippets/projects/whitelisted-address-predicate/src/main.sw b/apps/docs-snippets/test/fixtures/forc-projects/whitelisted-address-predicate/src/main.sw similarity index 100% rename from apps/docs-snippets/projects/whitelisted-address-predicate/src/main.sw rename to apps/docs-snippets/test/fixtures/forc-projects/whitelisted-address-predicate/src/main.sw diff --git a/apps/docs/src/guide/abi-typegen/using-generated-types.md b/apps/docs/src/guide/abi-typegen/using-generated-types.md index e201d20f881..98991109a43 100644 --- a/apps/docs/src/guide/abi-typegen/using-generated-types.md +++ b/apps/docs/src/guide/abi-typegen/using-generated-types.md @@ -82,7 +82,7 @@ console.log({ value, logs }); Consider the following predicate: -<<< @/../../../packages/fuel-gauge/fixtures/forc-projects/predicate-main-args-struct/src/main.sw#Predicate-main-args{ts:line-numbers} +<<< @/../../../packages/fuel-gauge/test/fixtures/forc-projects/predicate-main-args-struct/src/main.sw#Predicate-main-args{ts:line-numbers} Now, after generating types via: diff --git a/apps/docs/src/guide/contracts/configurable-constants.md b/apps/docs/src/guide/contracts/configurable-constants.md index 2a729e32a7d..90f3974e7b5 100644 --- a/apps/docs/src/guide/contracts/configurable-constants.md +++ b/apps/docs/src/guide/contracts/configurable-constants.md @@ -10,7 +10,7 @@ This feature provides flexibility for dynamic contract environments. It allows a Below is an example of a contract in which we declare four configurable constants: -<<< @/../../docs-snippets/projects/echo-configurables/src/main.sw#configurable-constants-1{rust:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/echo-configurables/src/main.sw#configurable-constants-1{rust:line-numbers} In this contract, we have a function `echo_configurables` that returns the values of the configurable constants. diff --git a/apps/docs/src/guide/contracts/contract-balance.md b/apps/docs/src/guide/contracts/contract-balance.md index 681e8f20cca..35de00e85a9 100644 --- a/apps/docs/src/guide/contracts/contract-balance.md +++ b/apps/docs/src/guide/contracts/contract-balance.md @@ -12,7 +12,7 @@ The `Contract` class includes a method called `getBalance` that retrieves the av Consider a simple contract that transfers a specified amount of a given asset to an address: -<<< @/../../docs-snippets/projects/transfer-to-address/src/main.sw#contract-balance-2{rust:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/transfer-to-address/src/main.sw#contract-balance-2{rust:line-numbers} The `transfer` function has three parameters: diff --git a/apps/docs/src/guide/contracts/inter-contract-calls.md b/apps/docs/src/guide/contracts/inter-contract-calls.md index 4d65107b1be..5306a2b0488 100644 --- a/apps/docs/src/guide/contracts/inter-contract-calls.md +++ b/apps/docs/src/guide/contracts/inter-contract-calls.md @@ -10,13 +10,13 @@ In this example, we have a `SimpleToken` contract representing a basic token con Here's a simple token contract that allows holding balances: -<<< @/../../docs-snippets/projects/simple-token/src/main.sw#inter-contract-calls-1{ts:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/simple-token/src/main.sw#inter-contract-calls-1{ts:line-numbers} ### Contract: `TokenDepositor` The `TokenDepositor` contract imports the `SimpleToken` contract and calls its `deposit` function to deposit tokens: -<<< @/../../docs-snippets/projects/token-depositor/src/main.sw#inter-contract-calls-2{ts:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/token-depositor/src/main.sw#inter-contract-calls-2{ts:line-numbers} ## Inter-contract calls using the SDK diff --git a/apps/docs/src/guide/contracts/logs.md b/apps/docs/src/guide/contracts/logs.md index 1d49482d0af..8b6204cbfc3 100644 --- a/apps/docs/src/guide/contracts/logs.md +++ b/apps/docs/src/guide/contracts/logs.md @@ -4,7 +4,7 @@ When you log a value within a contract method, it generates a log entry that is Consider the following example contract: -<<< @/../../docs-snippets/projects/log-values/src/main.sw#log-1{rust:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/log-values/src/main.sw#log-1{rust:line-numbers} To access the logged values in TypeScript, use the `logs` property in the `FunctionInvocationResult` of a contract call result. The logs data will be stored in an `Array`: diff --git a/apps/docs/src/guide/contracts/the-fuelvm-binary-file.md b/apps/docs/src/guide/contracts/the-fuelvm-binary-file.md index 8aca3c6464d..3ddda4c13ad 100644 --- a/apps/docs/src/guide/contracts/the-fuelvm-binary-file.md +++ b/apps/docs/src/guide/contracts/the-fuelvm-binary-file.md @@ -4,7 +4,7 @@ When you compile your Sway code using the `forc build` command, it generates a b For example, consider the following smart contract: -<<< @/../../docs-snippets/projects/echo-values/src/main.sw#understanding-fuel-binary-file{ts:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/echo-values/src/main.sw#understanding-fuel-binary-file{ts:line-numbers} After running `forc build`, a binary file will be generated with the following content: diff --git a/apps/docs/src/guide/cookbook/custom-transactions.md b/apps/docs/src/guide/cookbook/custom-transactions.md index 83c399b197b..a684c2c5323 100644 --- a/apps/docs/src/guide/cookbook/custom-transactions.md +++ b/apps/docs/src/guide/cookbook/custom-transactions.md @@ -4,8 +4,8 @@ There may be scenarios where you need to build out transactions that involve mul Consider the following script that transfers multiple assets to a contract: -<<< @/../../docs-snippets/projects/script-transfer-to-contract/src/main.sw#custom-transactions-1{ts:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/script-transfer-to-contract/src/main.sw#custom-transactions-1{ts:line-numbers} This script can be executed by creating a `ScriptTransactionRequest`, appending the resource and contract inputs/outputs and then sending the transaction, as follows: -<<< @/../../docs-snippets/src/guide/scripts/script-custom-transaction.test.ts#custom-transactions-2{ts:line-numbers} \ No newline at end of file +<<< @/../../docs-snippets/src/guide/scripts/script-custom-transaction.test.ts#custom-transactions-2{ts:line-numbers} diff --git a/apps/docs/src/guide/cookbook/deposit-and-withdraw.md b/apps/docs/src/guide/cookbook/deposit-and-withdraw.md index b88605a4d9f..fa70f045325 100644 --- a/apps/docs/src/guide/cookbook/deposit-and-withdraw.md +++ b/apps/docs/src/guide/cookbook/deposit-and-withdraw.md @@ -2,9 +2,9 @@ Consider the following contracts: -<<< @/../../../packages/fuel-gauge/fixtures/forc-projects/token_contract/src/main.sw#token-contract{rust:line-numbers} +<<< @/../../../packages/fuel-gauge/test/fixtures/forc-projects/token_contract/src/main.sw#token-contract{rust:line-numbers} -<<< @/../../../packages/fuel-gauge/fixtures/forc-projects/liquidity-pool/src/main.sw#liquidity-pool-contract{rust:line-numbers} +<<< @/../../../packages/fuel-gauge/test/fixtures/forc-projects/liquidity-pool/src/main.sw#liquidity-pool-contract{rust:line-numbers} The first contract is a contract that represents a simple token. diff --git a/apps/docs/src/guide/predicates/index.md b/apps/docs/src/guide/predicates/index.md index f2bcce62055..a85fb835dc2 100644 --- a/apps/docs/src/guide/predicates/index.md +++ b/apps/docs/src/guide/predicates/index.md @@ -21,7 +21,7 @@ This method is not only more efficient but also helps to prevent traffic jams on A predicate in Sway can be as simple as the following: -<<< @/../../docs-snippets/projects/return-true-predicate/src/main.sw#predicate-index-1{rust:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/return-true-predicate/src/main.sw#predicate-index-1{rust:line-numbers} In this minimal example, the `main` function does not accept any parameters and simply returns true. diff --git a/apps/docs/src/guide/predicates/predicate-with-configurable-constants.md b/apps/docs/src/guide/predicates/predicate-with-configurable-constants.md index 475daf6b45a..7bc9ee228d1 100644 --- a/apps/docs/src/guide/predicates/predicate-with-configurable-constants.md +++ b/apps/docs/src/guide/predicates/predicate-with-configurable-constants.md @@ -8,7 +8,7 @@ Let's consider an example where a predicate is used to validate an asset transfe The following snippet illustrates how this could be implemented: -<<< @/../../docs-snippets/projects/whitelisted-address-predicate/src/main.sw#predicate-with-configurable-constants-1{rust:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/whitelisted-address-predicate/src/main.sw#predicate-with-configurable-constants-1{rust:line-numbers} In this example, you'll notice the use of a configurable constant named `WHITELISTED`. This constant has a default value that represents the default approved address. diff --git a/apps/docs/src/guide/predicates/predicate-with-more-complex-args.md b/apps/docs/src/guide/predicates/predicate-with-more-complex-args.md index 2305a5e5ac0..a6a78d0f30e 100644 --- a/apps/docs/src/guide/predicates/predicate-with-more-complex-args.md +++ b/apps/docs/src/guide/predicates/predicate-with-more-complex-args.md @@ -4,7 +4,7 @@ You can pass more than one argument to a predicate. For example, this is a predicate that evaluates to `true` if the two arguments are not equal: -<<< @/../../../packages/fuel-gauge/fixtures/forc-projects/predicate-multi-args/src/main.sw#predicate-multi-args-sw{rust:line-numbers} +<<< @/../../../packages/fuel-gauge/test/fixtures/forc-projects/predicate-multi-args/src/main.sw#predicate-multi-args-sw{rust:line-numbers} You can pass the two arguments to this predicate like this: @@ -14,7 +14,7 @@ You can pass the two arguments to this predicate like this: You can also pass a struct as an argument to a predicate. This is one such predicate that expects a struct as an argument: -<<< @/../../../packages/fuel-gauge/fixtures/forc-projects/predicate-main-args-struct/src/main.sw#Predicate-main-args{rust:line-numbers} +<<< @/../../../packages/fuel-gauge/test/fixtures/forc-projects/predicate-main-args-struct/src/main.sw#Predicate-main-args{rust:line-numbers} You can pass a struct as an argument to this predicate like this: diff --git a/apps/docs/src/guide/predicates/send-and-spend-funds-from-predicates.md b/apps/docs/src/guide/predicates/send-and-spend-funds-from-predicates.md index e845d97aa35..337b0d79d8c 100644 --- a/apps/docs/src/guide/predicates/send-and-spend-funds-from-predicates.md +++ b/apps/docs/src/guide/predicates/send-and-spend-funds-from-predicates.md @@ -8,7 +8,7 @@ This guide will demonstrate how to send and spend funds using a predicate. Consider the following predicate: -<<< @/../../docs-snippets/projects/simple-predicate/src/main.sw#send-and-spend-funds-from-predicates-1{rust:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/simple-predicate/src/main.sw#send-and-spend-funds-from-predicates-1{rust:line-numbers} This predicate accepts an address of type `b256` and compares it with a hardcoded address of the same type. If both addresses are equal, the predicate returns true, otherwise it will return false. diff --git a/apps/docs/src/guide/scripts/calling-a-script.md b/apps/docs/src/guide/scripts/calling-a-script.md index 6377cb54d82..493e7e7b78b 100644 --- a/apps/docs/src/guide/scripts/calling-a-script.md +++ b/apps/docs/src/guide/scripts/calling-a-script.md @@ -2,7 +2,7 @@ Suppose your Sway script `main` function is written using the arguments passed to the `main` function like so: -<<< @/../../../packages/fuel-gauge/fixtures/forc-projects/script-main-args/src/main.sw#script-with-main-args{rust:line-numbers} +<<< @/../../../packages/fuel-gauge/test/fixtures/forc-projects/script-main-args/src/main.sw#script-with-main-args{rust:line-numbers} You can still hand code out a solution wrapper using `callScript` utility to call your script with data. However, if you prefer to use the ABI generated from your script, you can use the `ScriptFactory` helper: diff --git a/apps/docs/src/guide/scripts/script-with-configurable-constants.md b/apps/docs/src/guide/scripts/script-with-configurable-constants.md index b65877e1a2c..0c02d5d4fa5 100644 --- a/apps/docs/src/guide/scripts/script-with-configurable-constants.md +++ b/apps/docs/src/guide/scripts/script-with-configurable-constants.md @@ -6,7 +6,7 @@ Configurable constants are fairly straightforward to add and set in your scripts Let's consider the following script: -<<< @/../../docs-snippets/projects/sum-script/src/main.sw#script-with-configurable-contants-1{rust:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/sum-script/src/main.sw#script-with-configurable-contants-1{rust:line-numbers} In this script, `AMOUNT` is a configurable constant with a default value of `10`. The main function returns the sum of the `inputted_amount` and the configurable constant `AMOUNT`. diff --git a/apps/docs/src/guide/types/arrays.md b/apps/docs/src/guide/types/arrays.md index 8d66334bc9a..3ebe5fd7970 100644 --- a/apps/docs/src/guide/types/arrays.md +++ b/apps/docs/src/guide/types/arrays.md @@ -16,7 +16,7 @@ In Sway, `Arrays` are fixed in size, so the storage size is determined at the ti Let's say you have a contract that takes an `Array` of type `u64` with a size length of 2 as a parameter and returns it: -<<< @/../../docs-snippets/projects/echo-u64-array/src/main.sw#arrays-2{rust:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/echo-u64-array/src/main.sw#arrays-2{rust:line-numbers} To execute the contract call using the SDK, you would do something like this: diff --git a/apps/docs/src/guide/types/bits512.md b/apps/docs/src/guide/types/bits512.md index 0100d1617dc..b67bd18103f 100644 --- a/apps/docs/src/guide/types/bits512.md +++ b/apps/docs/src/guide/types/bits512.md @@ -16,7 +16,7 @@ In the SDK, you can visualize a `b512` value by examining a wallet's public key: Let's consider a contract function that accepts a `b512` parameter and returns the same value: -<<< @/../../docs-snippets/projects/echo-values/src/main.sw#bits512-3{rust:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/echo-values/src/main.sw#bits512-3{rust:line-numbers} To call this function and validate the returned value, follow these steps: diff --git a/apps/docs/src/guide/types/bytes.md b/apps/docs/src/guide/types/bytes.md index 78d5429b749..d397b7ff59b 100644 --- a/apps/docs/src/guide/types/bytes.md +++ b/apps/docs/src/guide/types/bytes.md @@ -8,7 +8,7 @@ A dynamic array of byte values can be represented using the `Bytes` type, which The `Bytes` type can be integrated with your contract calls. Consider the following contract that can compare and return a `Bytes`: -<<< @/../../docs-snippets/projects/echo-bytes/src/main.sw#bytes-1{ts:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/echo-bytes/src/main.sw#bytes-1{ts:line-numbers} A `Bytes` array can be created using a native JavaScript array of numbers or Big Numbers, and sent to a Sway contract: diff --git a/apps/docs/src/guide/types/enums.md b/apps/docs/src/guide/types/enums.md index c1a75286548..2691b4272a9 100644 --- a/apps/docs/src/guide/types/enums.md +++ b/apps/docs/src/guide/types/enums.md @@ -6,7 +6,7 @@ Sway Enums are a little distinct from TypeScript Enums. In this document, we wil Consider the following basic Sway Enum called StateError: -<<< @/../../docs-snippets/projects/echo-enum/src/main.sw#enum-1{rust:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/echo-enum/src/main.sw#enum-1{rust:line-numbers} The type `()` indicates that there is no additional data associated with each Enum variant. Sway allows you to create Enums of Enums or associate types with Enum variants. @@ -14,7 +14,7 @@ The type `()` indicates that there is no additional data associated with each En Let's define a Sway contract function that takes a `StateError` Enum variant as an argument and returns it: -<<< @/../../docs-snippets/projects/echo-enum/src/main.sw#enum-2{rust:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/echo-enum/src/main.sw#enum-2{rust:line-numbers} To execute the contract function and validate the response, we can use the following code: @@ -26,13 +26,13 @@ In this example, we simply pass the Enum variant as a value to execute the contr In this example, the `Error` Enum is an Enum of two other Enums: `StateError` and `UserError`. -<<< @/../../docs-snippets/projects/echo-enum/src/main.sw#enum-4{rust:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/echo-enum/src/main.sw#enum-4{rust:line-numbers} ## Using Enums of Enums with Contract Functions Now, let's create a Sway contract function that accepts any variant of the `Error` Enum as a parameter and returns it immediately. This variant could be from either the `StateError` or `UserError` Enums. -<<< @/../../docs-snippets/projects/echo-enum/src/main.sw#enum-5{rust:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/echo-enum/src/main.sw#enum-5{rust:line-numbers} Since the `Error` Enum is an Enum of Enums, we need to pass the function parameter differently. The parameter will be a TypeScript object: diff --git a/apps/docs/src/guide/types/evm-address.md b/apps/docs/src/guide/types/evm-address.md index c4a5eb20026..98148122bb6 100644 --- a/apps/docs/src/guide/types/evm-address.md +++ b/apps/docs/src/guide/types/evm-address.md @@ -14,7 +14,7 @@ An EVM Address only has 20 bytes therefore the first 12 bytes of the `Bits256` v The `EvmAddress` type can be integrated with your contract calls. Consider the following contract that can compare and return an EVM Address: -<<< @/../../docs-snippets/projects/echo-evm-address/src/main.sw#evm-address-1{ts:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/echo-evm-address/src/main.sw#evm-address-1{ts:line-numbers} The `EvmAddress` type can be used with the SDK and passed to the contract function as follows: @@ -22,4 +22,4 @@ The `EvmAddress` type can be used with the SDK and passed to the contract functi And to validate the returned value: -<<< @/../../docs-snippets/src/guide/types/evm-address.test.ts#evm-address-4{ts:line-numbers} \ No newline at end of file +<<< @/../../docs-snippets/src/guide/types/evm-address.test.ts#evm-address-4{ts:line-numbers} diff --git a/apps/docs/src/guide/types/options.md b/apps/docs/src/guide/types/options.md index 491efec4575..e5fb87c2fbc 100644 --- a/apps/docs/src/guide/types/options.md +++ b/apps/docs/src/guide/types/options.md @@ -18,7 +18,7 @@ Let's say we have a contract function that accepts two `Option` parameters. Here's the contract function written in Sway: -<<< @/../../docs-snippets/projects/sum-option-u8/src/main.sw#options-2{rust:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/sum-option-u8/src/main.sw#options-2{rust:line-numbers} You can interact with the contract function using the SDK as follows: diff --git a/apps/docs/src/guide/types/raw-slice.md b/apps/docs/src/guide/types/raw-slice.md index 651ccda42ac..190f8775325 100644 --- a/apps/docs/src/guide/types/raw-slice.md +++ b/apps/docs/src/guide/types/raw-slice.md @@ -8,7 +8,7 @@ A dynamic array of values can be represented using the `RawSlice` type. A raw sl The `RawSlice` type can be integrated with your contract calls. Consider the following contract that can compare and return a `RawSlice`: -<<< @/../../docs-snippets/projects/echo-raw-slice/src/main.sw#raw-slice-1{ts:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/echo-raw-slice/src/main.sw#raw-slice-1{ts:line-numbers} A `RawSlice` can be created using a native JavaScript array of numbers or Big Numbers, and sent to a Sway contract: diff --git a/apps/docs/src/guide/types/std-string.md b/apps/docs/src/guide/types/std-string.md index f5d0b2a2a91..5e865bb96fb 100644 --- a/apps/docs/src/guide/types/std-string.md +++ b/apps/docs/src/guide/types/std-string.md @@ -8,7 +8,7 @@ A dynamic string of variable length can be represented using the `StdString` typ The `StdString` type can be integrated with your contract calls. Consider the following contract that can compare and return a String: -<<< @/../../docs-snippets/projects/echo-std-string/src/main.sw#std-string-1{ts:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/echo-std-string/src/main.sw#std-string-1{ts:line-numbers} A string can be created using a native JavaScript string, and sent to a Sway contract: diff --git a/apps/docs/src/guide/types/structs.md b/apps/docs/src/guide/types/structs.md index 0ff9c21626a..58f08346ef8 100644 --- a/apps/docs/src/guide/types/structs.md +++ b/apps/docs/src/guide/types/structs.md @@ -6,7 +6,7 @@ In Sway, a `struct` serves a similar purpose as an `Object` in TypeScript. It de Here is an example of a `struct` in Sway: -<<< @/../../docs-snippets/projects/employee-data/src/lib.sw#struct-1{rust:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/employee-data/src/lib.sw#struct-1{rust:line-numbers} And here is the equivalent structure represented in TypeScript: diff --git a/apps/docs/src/guide/types/tuples.md b/apps/docs/src/guide/types/tuples.md index 62bf78767db..e5f00765ba1 100644 --- a/apps/docs/src/guide/types/tuples.md +++ b/apps/docs/src/guide/types/tuples.md @@ -12,7 +12,7 @@ In this example, the Typescript `tuple` variable contains three elements of diff Let's consider a contract function that accepts a tuple as a parameter and returns the same Tuple: -<<< @/../../docs-snippets/projects/echo-values/src/main.sw#tuples-2{rust:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/echo-values/src/main.sw#tuples-2{rust:line-numbers} To execute and validate the contract function using the SDK, follow these steps: diff --git a/apps/docs/src/guide/types/vectors.md b/apps/docs/src/guide/types/vectors.md index bbbe07a83a7..cf67d28daec 100644 --- a/apps/docs/src/guide/types/vectors.md +++ b/apps/docs/src/guide/types/vectors.md @@ -10,11 +10,11 @@ A basic Vector in Sway is similar to a TypeScript Array: Consider the following example of a `EmployeeData` struct in Sway: -<<< @/../../docs-snippets/projects/employee-data/src/lib.sw#struct-1{rust:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/employee-data/src/lib.sw#struct-1{rust:line-numbers} Now, let's look at the following contract method. It receives a Vector of the `Transaction` struct type as a parameter and returns the last `Transaction` entry from the Vector: -<<< @/../../docs-snippets/projects/echo-employee-data-vector/src/main.sw#vector-3{ts:line-numbers} +<<< @/../../docs-snippets/test/fixtures/forc-projects/echo-employee-data-vector/src/main.sw#vector-3{ts:line-numbers} The code snippet below demonstrates how to call this Sway contract method, which accepts a `Vec`: diff --git a/apps/docs/turbo.json b/apps/docs/turbo.json index 805f7ce0e07..4f83d791dc8 100644 --- a/apps/docs/turbo.json +++ b/apps/docs/turbo.json @@ -1,4 +1,5 @@ { + "$schema": "https://turborepo.org/schema.json", "extends": ["//"], "pipeline": { "build": { diff --git a/packages/abi-coder/package.json b/packages/abi-coder/package.json index 1692f80e08e..170889480e5 100644 --- a/packages/abi-coder/package.json +++ b/packages/abi-coder/package.json @@ -21,7 +21,7 @@ ], "scripts": { "pretest": "pnpm build:forc", - "build:forc": "pnpm fuels-forc build -p ./test/sway-projects/exhaustive-examples", + "build:forc": "pnpm fuels-forc build -p test/fixtures/forc-projects", "build": "tsup", "postbuild": "tsx ../../scripts/postbuild.ts" }, diff --git a/packages/abi-coder/test/fixtures/forc-projects/Forc.toml b/packages/abi-coder/test/fixtures/forc-projects/Forc.toml new file mode 100644 index 00000000000..f1798e05503 --- /dev/null +++ b/packages/abi-coder/test/fixtures/forc-projects/Forc.toml @@ -0,0 +1,2 @@ +[workspace] +members = ["exhaustive-examples"] diff --git a/packages/abi-coder/test/sway-projects/exhaustive-examples/.gitignore b/packages/abi-coder/test/fixtures/forc-projects/exhaustive-examples/.gitignore similarity index 100% rename from packages/abi-coder/test/sway-projects/exhaustive-examples/.gitignore rename to packages/abi-coder/test/fixtures/forc-projects/exhaustive-examples/.gitignore diff --git a/packages/abi-coder/test/sway-projects/exhaustive-examples/Forc.toml b/packages/abi-coder/test/fixtures/forc-projects/exhaustive-examples/Forc.toml similarity index 100% rename from packages/abi-coder/test/sway-projects/exhaustive-examples/Forc.toml rename to packages/abi-coder/test/fixtures/forc-projects/exhaustive-examples/Forc.toml diff --git a/packages/abi-coder/test/sway-projects/exhaustive-examples/src/main.sw b/packages/abi-coder/test/fixtures/forc-projects/exhaustive-examples/src/main.sw similarity index 100% rename from packages/abi-coder/test/sway-projects/exhaustive-examples/src/main.sw rename to packages/abi-coder/test/fixtures/forc-projects/exhaustive-examples/src/main.sw diff --git a/packages/abi-coder/test/interface.test.ts b/packages/abi-coder/test/interface.test.ts index e2f420d7d1e..7ae1149bfa2 100644 --- a/packages/abi-coder/test/interface.test.ts +++ b/packages/abi-coder/test/interface.test.ts @@ -5,7 +5,7 @@ import { concat } from '@fuel-ts/utils'; import { NumberCoder, WORD_SIZE, Interface } from '../src'; import type { JsonAbiConfigurable } from '../src/json-abi'; -import exhaustiveExamplesAbi from './sway-projects/exhaustive-examples/out/debug/exhaustive-examples-abi.json'; +import exhaustiveExamplesAbi from './fixtures/forc-projects/exhaustive-examples/out/debug/exhaustive-examples-abi.json'; import { B256_DECODED, B256_ENCODED, diff --git a/packages/fuel-gauge/.gitignore b/packages/fuel-gauge/.gitignore index 7a7adce350e..75f531863c4 100644 --- a/packages/fuel-gauge/.gitignore +++ b/packages/fuel-gauge/.gitignore @@ -1 +1 @@ -fixtures/forc-projects/**/index.ts \ No newline at end of file +test/fixtures/forc-projects/**/index.ts diff --git a/packages/fuel-gauge/package.json b/packages/fuel-gauge/package.json index b295c62c8f2..c377de85bb4 100644 --- a/packages/fuel-gauge/package.json +++ b/packages/fuel-gauge/package.json @@ -6,7 +6,7 @@ "author": "Fuel Labs (https://fuel.network/)", "scripts": { "pretest": "run-s build:forc build:process-predicates", - "build:forc": "pnpm fuels-forc build -p fixtures/forc-projects", + "build:forc": "pnpm fuels-forc build -p test/fixtures/forc-projects", "build:process-predicates": "tsx ./scripts/process-predicates.ts" }, "license": "Apache-2.0", diff --git a/packages/fuel-gauge/scripts/process-predicates.ts b/packages/fuel-gauge/scripts/process-predicates.ts index 1c42e6e3352..7a1483d51f4 100644 --- a/packages/fuel-gauge/scripts/process-predicates.ts +++ b/packages/fuel-gauge/scripts/process-predicates.ts @@ -2,7 +2,7 @@ import { readFileSync, readdirSync, writeFileSync } from 'fs'; import { hexlify } from 'fuels'; import { join } from 'path'; -const projectsDir = join(__dirname, '../fixtures/forc-projects'); +const projectsDir = join(__dirname, '../test/fixtures/forc-projects'); const files = readdirSync(projectsDir).filter((file) => file.includes('predicate-')); diff --git a/packages/fuel-gauge/src/auth-testing.test.ts b/packages/fuel-gauge/src/auth-testing.test.ts index 2dbaa3fdb82..2628fdbb076 100644 --- a/packages/fuel-gauge/src/auth-testing.test.ts +++ b/packages/fuel-gauge/src/auth-testing.test.ts @@ -9,7 +9,7 @@ import { FUEL_NETWORK_URL, } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; let contractInstance: Contract; let wallet: WalletUnlocked; diff --git a/packages/fuel-gauge/src/bytes.test.ts b/packages/fuel-gauge/src/bytes.test.ts index fd72567b466..4b65b152b77 100644 --- a/packages/fuel-gauge/src/bytes.test.ts +++ b/packages/fuel-gauge/src/bytes.test.ts @@ -2,7 +2,7 @@ import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; import { bn, Predicate, Wallet, Address, BaseAssetId, Provider, FUEL_NETWORK_URL } from 'fuels'; import type { BN, Contract } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; import { getScript, getSetupContract } from './utils'; diff --git a/packages/fuel-gauge/src/call-test-contract.test.ts b/packages/fuel-gauge/src/call-test-contract.test.ts index f835f10e936..60356ef4dd2 100644 --- a/packages/fuel-gauge/src/call-test-contract.test.ts +++ b/packages/fuel-gauge/src/call-test-contract.test.ts @@ -1,6 +1,6 @@ import { BN, bn, toHex, BaseAssetId, Provider, FUEL_NETWORK_URL } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; import { createSetupConfig } from './utils'; @@ -15,6 +15,7 @@ const setupContract = createSetupConfig({ }); const U64_MAX = bn(2).pow(64).sub(1); + describe('CallTestContract', () => { let gasPrice: BN; beforeAll(async () => { diff --git a/packages/fuel-gauge/src/configurable-contract.test.ts b/packages/fuel-gauge/src/configurable-contract.test.ts index 337213c0f51..6e06484cb9e 100644 --- a/packages/fuel-gauge/src/configurable-contract.test.ts +++ b/packages/fuel-gauge/src/configurable-contract.test.ts @@ -2,7 +2,7 @@ import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; import type { CoinQuantityLike, WalletUnlocked } from 'fuels'; import { BN, ContractFactory, BaseAssetId, Provider, getRandomB256, FUEL_NETWORK_URL } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; const defaultValues = { U8: 10, diff --git a/packages/fuel-gauge/src/contract-factory.test.ts b/packages/fuel-gauge/src/contract-factory.test.ts index 42ef95d87a7..fb7ca6b21cc 100644 --- a/packages/fuel-gauge/src/contract-factory.test.ts +++ b/packages/fuel-gauge/src/contract-factory.test.ts @@ -12,7 +12,7 @@ import { FUEL_NETWORK_URL, } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; describe('Contract Factory', () => { let gasPrice: BN; diff --git a/packages/fuel-gauge/src/contract.test.ts b/packages/fuel-gauge/src/contract.test.ts index fd73ca808d4..cbec548e97f 100644 --- a/packages/fuel-gauge/src/contract.test.ts +++ b/packages/fuel-gauge/src/contract.test.ts @@ -21,7 +21,7 @@ import { Predicate, } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; import { createSetupConfig } from './utils'; diff --git a/packages/fuel-gauge/src/doc-examples.test.ts b/packages/fuel-gauge/src/doc-examples.test.ts index 68592ac74bc..f7549527b44 100644 --- a/packages/fuel-gauge/src/doc-examples.test.ts +++ b/packages/fuel-gauge/src/doc-examples.test.ts @@ -29,7 +29,7 @@ import { FUEL_NETWORK_URL, } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; const { abiContents: callTestAbi } = getFuelGaugeForcProject( FuelGaugeProjectsEnum.CALL_TEST_CONTRACT @@ -51,9 +51,12 @@ const { binHexlified: tokenContractBytecode, abiContents: tokenContractABI } = const PUBLIC_KEY = '0x2f34bc0df4db0ec391792cedb05768832b49b1aa3a2dd8c30054d1af00f67d00b74b7acbbf3087c8e0b1a4c343db50aa471d21f278ff5ce09f07795d541fb47e'; + const ADDRESS_B256 = '0xf1e92c42b90934aa6372e30bc568a326f6e66a1a0288595e6e3fbd392a4f3e6e'; + const ADDRESS_BECH32: Bech32Address = 'fuel1785jcs4epy625cmjuv9u269rymmwv6s6q2y9jhnw877nj2j08ehqce3rxf'; + const ADDRESS_BYTES = new Uint8Array([ 241, 233, 44, 66, 185, 9, 52, 170, 99, 114, 227, 11, 197, 104, 163, 38, 246, 230, 106, 26, 2, 136, 89, 94, 110, 63, 189, 57, 42, 79, 62, 110, diff --git a/packages/fuel-gauge/src/fee.test.ts b/packages/fuel-gauge/src/fee.test.ts index 5cf5f109d9e..4fae3cf73ed 100644 --- a/packages/fuel-gauge/src/fee.test.ts +++ b/packages/fuel-gauge/src/fee.test.ts @@ -11,7 +11,7 @@ import { bn, } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; describe('Fee', () => { const assetA: string = '0x0101010101010101010101010101010101010101010101010101010101010101'; diff --git a/packages/fuel-gauge/src/generic-types-contract.test.ts b/packages/fuel-gauge/src/generic-types-contract.test.ts index 45408ed8285..676a7ebfc06 100644 --- a/packages/fuel-gauge/src/generic-types-contract.test.ts +++ b/packages/fuel-gauge/src/generic-types-contract.test.ts @@ -1,6 +1,6 @@ import { toHex } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; import { setup } from './utils'; diff --git a/packages/fuel-gauge/src/multi-token-contract.test.ts b/packages/fuel-gauge/src/multi-token-contract.test.ts index 183a168f757..f35f5339f21 100644 --- a/packages/fuel-gauge/src/multi-token-contract.test.ts +++ b/packages/fuel-gauge/src/multi-token-contract.test.ts @@ -2,7 +2,7 @@ import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; import type { BN } from 'fuels'; import { Provider, Wallet, ContractFactory, bn, BaseAssetId, FUEL_NETWORK_URL } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; const setup = async () => { const provider = await Provider.create(FUEL_NETWORK_URL); diff --git a/packages/fuel-gauge/src/payable-annotation.test.ts b/packages/fuel-gauge/src/payable-annotation.test.ts index ba7df1afe15..05d90acf635 100644 --- a/packages/fuel-gauge/src/payable-annotation.test.ts +++ b/packages/fuel-gauge/src/payable-annotation.test.ts @@ -1,7 +1,7 @@ import type { BN, Contract } from 'fuels'; import { bn, BaseAssetId } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; import { createSetupConfig } from './utils'; diff --git a/packages/fuel-gauge/src/predicate-conditional-inputs.test.ts b/packages/fuel-gauge/src/predicate-conditional-inputs.test.ts index 20d5944b189..6ceb48afd3f 100644 --- a/packages/fuel-gauge/src/predicate-conditional-inputs.test.ts +++ b/packages/fuel-gauge/src/predicate-conditional-inputs.test.ts @@ -10,7 +10,7 @@ import { bn, } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; describe('PredicateConditionalInputs', () => { const assetIdA = '0x0101010101010101010101010101010101010101010101010101010101010101'; diff --git a/packages/fuel-gauge/src/predicate/predicate-arguments.test.ts b/packages/fuel-gauge/src/predicate/predicate-arguments.test.ts index 223bac99d6d..9c385a1dd2c 100644 --- a/packages/fuel-gauge/src/predicate/predicate-arguments.test.ts +++ b/packages/fuel-gauge/src/predicate/predicate-arguments.test.ts @@ -1,7 +1,7 @@ import type { WalletLocked, WalletUnlocked, JsonAbi, BigNumberish, BN } from 'fuels'; import { Provider, FUEL_NETWORK_URL, toHex, toNumber, Predicate, BaseAssetId } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../../test/fixtures'; import type { Validation } from '../types/predicate'; import { setupWallets, assertBalances, fundPredicate } from './utils/predicate'; diff --git a/packages/fuel-gauge/src/predicate/predicate-configurables.test.ts b/packages/fuel-gauge/src/predicate/predicate-configurables.test.ts index a36f65fdfe3..5197221c0d4 100644 --- a/packages/fuel-gauge/src/predicate/predicate-configurables.test.ts +++ b/packages/fuel-gauge/src/predicate/predicate-configurables.test.ts @@ -9,7 +9,7 @@ import { FUEL_NETWORK_URL, } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../../test/fixtures'; import { fundPredicate, assertBalance } from './utils/predicate'; diff --git a/packages/fuel-gauge/src/predicate/predicate-estimations.test.ts b/packages/fuel-gauge/src/predicate/predicate-estimations.test.ts index a3ec703ec2f..a2e6381e3df 100644 --- a/packages/fuel-gauge/src/predicate/predicate-estimations.test.ts +++ b/packages/fuel-gauge/src/predicate/predicate-estimations.test.ts @@ -10,7 +10,7 @@ import { FUEL_NETWORK_URL, } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../../test/fixtures'; import type { Validation } from '../types/predicate'; describe('Predicate', () => { diff --git a/packages/fuel-gauge/src/predicate/predicate-evaluations.test.ts b/packages/fuel-gauge/src/predicate/predicate-evaluations.test.ts index 50ebd7cc783..40d54be1148 100644 --- a/packages/fuel-gauge/src/predicate/predicate-evaluations.test.ts +++ b/packages/fuel-gauge/src/predicate/predicate-evaluations.test.ts @@ -1,7 +1,7 @@ import type { BN, InputValue, Provider, WalletLocked, WalletUnlocked } from 'fuels'; import { BaseAssetId, Predicate } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../../test/fixtures'; import { setupWallets, assertBalances, fundPredicate } from './utils/predicate'; diff --git a/packages/fuel-gauge/src/predicate/predicate-invalidations.test.ts b/packages/fuel-gauge/src/predicate/predicate-invalidations.test.ts index 07f4fb29d9a..c3e9271349d 100644 --- a/packages/fuel-gauge/src/predicate/predicate-invalidations.test.ts +++ b/packages/fuel-gauge/src/predicate/predicate-invalidations.test.ts @@ -1,7 +1,7 @@ import type { BN, Provider, WalletLocked, WalletUnlocked } from 'fuels'; import { BaseAssetId, Predicate } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../../test/fixtures'; import type { Validation } from '../types/predicate'; import { fundPredicate, setupWallets } from './utils/predicate'; diff --git a/packages/fuel-gauge/src/predicate/predicate-with-contract.test.ts b/packages/fuel-gauge/src/predicate/predicate-with-contract.test.ts index 038f30cc05f..892590ce940 100644 --- a/packages/fuel-gauge/src/predicate/predicate-with-contract.test.ts +++ b/packages/fuel-gauge/src/predicate/predicate-with-contract.test.ts @@ -11,7 +11,7 @@ import { FUEL_NETWORK_URL, } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../../test/fixtures'; import type { Validation } from '../types/predicate'; import { fundPredicate, setupContractWithConfig } from './utils/predicate'; diff --git a/packages/fuel-gauge/src/predicate/predicate-with-script.test.ts b/packages/fuel-gauge/src/predicate/predicate-with-script.test.ts index e1b7b524140..5b723596551 100644 --- a/packages/fuel-gauge/src/predicate/predicate-with-script.test.ts +++ b/packages/fuel-gauge/src/predicate/predicate-with-script.test.ts @@ -3,7 +3,7 @@ import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; import type { BN, BigNumberish, WalletUnlocked } from 'fuels'; import { toNumber, BaseAssetId, Script, Provider, Predicate, FUEL_NETWORK_URL } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../../test/fixtures'; import type { Validation } from '../types/predicate'; import { fundPredicate } from './utils/predicate'; @@ -12,12 +12,15 @@ describe('Predicate', () => { const { binHexlified: scriptBytes, abiContents: scriptAbi } = getFuelGaugeForcProject( FuelGaugeProjectsEnum.SCRIPT_MAIN_ARGS ); + const { binHexlified: predicateBytesStruct } = getFuelGaugeForcProject( FuelGaugeProjectsEnum.PREDICATE_STRUCT ); + const { abiContents: predicateAbiMainArgsStruct } = getFuelGaugeForcProject( FuelGaugeProjectsEnum.PREDICATE_MAIN_ARGS_STRUCT ); + describe('With script', () => { let wallet: WalletUnlocked; let receiver: WalletUnlocked; diff --git a/packages/fuel-gauge/src/raw-slice.test.ts b/packages/fuel-gauge/src/raw-slice.test.ts index dd4629036ae..a6a603b4057 100644 --- a/packages/fuel-gauge/src/raw-slice.test.ts +++ b/packages/fuel-gauge/src/raw-slice.test.ts @@ -2,7 +2,7 @@ import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; import { bn, Predicate, Wallet, Address, BaseAssetId, Provider, FUEL_NETWORK_URL } from 'fuels'; import type { BN, Contract } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; import { getScript, getSetupContract } from './utils'; diff --git a/packages/fuel-gauge/src/revert-error.test.ts b/packages/fuel-gauge/src/revert-error.test.ts index d66e88776c9..c2719303501 100644 --- a/packages/fuel-gauge/src/revert-error.test.ts +++ b/packages/fuel-gauge/src/revert-error.test.ts @@ -13,13 +13,14 @@ import { FUEL_NETWORK_URL, } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; let contractInstance: Contract; let wallet: WalletUnlocked; describe('Revert Error Testing', () => { let gasPrice: BN; + beforeAll(async () => { const provider = await Provider.create(FUEL_NETWORK_URL); wallet = await generateTestWallet(provider, [[1_000_000, BaseAssetId]]); diff --git a/packages/fuel-gauge/src/script-main-args.test.ts b/packages/fuel-gauge/src/script-main-args.test.ts index 44637ec6b4c..9e086fecfc3 100644 --- a/packages/fuel-gauge/src/script-main-args.test.ts +++ b/packages/fuel-gauge/src/script-main-args.test.ts @@ -2,7 +2,7 @@ import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; import type { BN, BigNumberish } from 'fuels'; import { Provider, bn, Script, BaseAssetId, FUEL_NETWORK_URL } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; import { getScript } from './utils'; diff --git a/packages/fuel-gauge/src/script-with-configurable.test.ts b/packages/fuel-gauge/src/script-with-configurable.test.ts index c23800bca7a..789c3523fe8 100644 --- a/packages/fuel-gauge/src/script-with-configurable.test.ts +++ b/packages/fuel-gauge/src/script-with-configurable.test.ts @@ -2,7 +2,7 @@ import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; import type { CoinQuantityLike, WalletUnlocked } from 'fuels'; import { BN, Script, BaseAssetId, Provider, FUEL_NETWORK_URL } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; const defaultValues = { FEE: 5, diff --git a/packages/fuel-gauge/src/std-lib-string.test.ts b/packages/fuel-gauge/src/std-lib-string.test.ts index 0e7859d6d8c..1426f1de0ef 100644 --- a/packages/fuel-gauge/src/std-lib-string.test.ts +++ b/packages/fuel-gauge/src/std-lib-string.test.ts @@ -2,13 +2,14 @@ import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; import { bn, Predicate, Wallet, Address, BaseAssetId, Provider, FUEL_NETWORK_URL } from 'fuels'; import type { BN, Contract } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; import { getScript, getSetupContract } from './utils'; const setupContract = getSetupContract('std-lib-string'); let contractInstance: Contract; let gasPrice: BN; + beforeAll(async () => { contractInstance = await setupContract(); ({ minGasPrice: gasPrice } = contractInstance.provider.getGasConfig()); diff --git a/packages/fuel-gauge/src/storage-test-contract.test.ts b/packages/fuel-gauge/src/storage-test-contract.test.ts index 3560ac70197..420de42ab70 100644 --- a/packages/fuel-gauge/src/storage-test-contract.test.ts +++ b/packages/fuel-gauge/src/storage-test-contract.test.ts @@ -2,7 +2,7 @@ import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; import type { BN } from 'fuels'; import { toHex, Provider, ContractFactory, BaseAssetId, FUEL_NETWORK_URL } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; const { binHexlified: bytecode, diff --git a/packages/fuel-gauge/src/token-test-contract.test.ts b/packages/fuel-gauge/src/token-test-contract.test.ts index 10e721eb65f..ea98fe42ac8 100644 --- a/packages/fuel-gauge/src/token-test-contract.test.ts +++ b/packages/fuel-gauge/src/token-test-contract.test.ts @@ -4,7 +4,7 @@ import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; import type { BN } from 'fuels'; import { toHex, Provider, Wallet, ContractFactory, bn, BaseAssetId, FUEL_NETWORK_URL } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; const { binHexlified: bytecode, abiContents: abi } = getFuelGaugeForcProject( FuelGaugeProjectsEnum.TOKEN_CONTRACT @@ -25,6 +25,7 @@ const setup = async () => { }; let gasPrice: BN; + beforeAll(async () => { provider = await Provider.create(FUEL_NETWORK_URL); gasPrice = provider.getGasConfig().minGasPrice; diff --git a/packages/fuel-gauge/src/utils.ts b/packages/fuel-gauge/src/utils.ts index 5293dd9be4e..67aa7856038 100644 --- a/packages/fuel-gauge/src/utils.ts +++ b/packages/fuel-gauge/src/utils.ts @@ -54,7 +54,7 @@ export const createSetupConfig = }); const getFullPath = (contractName: string, next: (fullPath: string) => T) => - next(join(__dirname, `../fixtures/forc-projects/${contractName}/out/debug/${contractName}`)); + next(join(__dirname, `../test/fixtures/forc-projects/${contractName}/out/debug/${contractName}`)); export const getSetupContract = ( contractName: string diff --git a/packages/fuel-gauge/src/vector-types.test.ts b/packages/fuel-gauge/src/vector-types.test.ts index e4d163cf0a4..22360abc1f4 100644 --- a/packages/fuel-gauge/src/vector-types.test.ts +++ b/packages/fuel-gauge/src/vector-types.test.ts @@ -2,7 +2,7 @@ import { generateTestWallet } from '@fuel-ts/wallet/test-utils'; import type { BN, BigNumberish } from 'fuels'; import { bn, Predicate, Wallet, Address, BaseAssetId, Provider, FUEL_NETWORK_URL } from 'fuels'; -import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../fixtures'; +import { FuelGaugeProjectsEnum, getFuelGaugeForcProject } from '../test/fixtures'; import { getScript, getSetupContract } from './utils'; diff --git a/packages/fuel-gauge/fixtures/abi/predicate.ts b/packages/fuel-gauge/test/fixtures/abi/predicate.ts similarity index 100% rename from packages/fuel-gauge/fixtures/abi/predicate.ts rename to packages/fuel-gauge/test/fixtures/abi/predicate.ts diff --git a/packages/fuel-gauge/fixtures/bytecode/predicate.ts b/packages/fuel-gauge/test/fixtures/bytecode/predicate.ts similarity index 100% rename from packages/fuel-gauge/fixtures/bytecode/predicate.ts rename to packages/fuel-gauge/test/fixtures/bytecode/predicate.ts diff --git a/packages/fuel-gauge/fixtures/forc-projects/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/advanced-logging-other-contract-abi/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/advanced-logging-other-contract-abi/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/advanced-logging-other-contract-abi/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/advanced-logging-other-contract-abi/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/advanced-logging-other-contract-abi/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/advanced-logging-other-contract-abi/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/advanced-logging-other-contract-abi/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/advanced-logging-other-contract-abi/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/advanced-logging-other-contract/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/advanced-logging-other-contract/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/advanced-logging-other-contract/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/advanced-logging-other-contract/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/advanced-logging-other-contract/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/advanced-logging-other-contract/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/advanced-logging-other-contract/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/advanced-logging-other-contract/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/advanced-logging/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/advanced-logging/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/advanced-logging/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/advanced-logging/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/advanced-logging/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/advanced-logging/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/advanced-logging/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/advanced-logging/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/auth_testing_abi/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/auth_testing_abi/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/auth_testing_abi/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/auth_testing_abi/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/auth_testing_abi/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/auth_testing_abi/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/auth_testing_abi/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/auth_testing_abi/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/auth_testing_contract/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/auth_testing_contract/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/auth_testing_contract/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/auth_testing_contract/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/auth_testing_contract/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/auth_testing_contract/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/auth_testing_contract/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/auth_testing_contract/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/bytes/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/bytes/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/bytes/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/bytes/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/bytes/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/bytes/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/bytes/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/bytes/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/call-test-contract/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/call-test-contract/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/call-test-contract/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/call-test-contract/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/call-test-contract/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/call-test-contract/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/call-test-contract/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/call-test-contract/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/collision_in_fn_names/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/collision_in_fn_names/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/collision_in_fn_names/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/collision_in_fn_names/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/collision_in_fn_names/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/collision_in_fn_names/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/collision_in_fn_names/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/collision_in_fn_names/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/configurable-contract/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/configurable-contract/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/configurable-contract/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/configurable-contract/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/configurable-contract/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/configurable-contract/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/configurable-contract/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/configurable-contract/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/coverage-contract/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/coverage-contract/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/coverage-contract/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/coverage-contract/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/coverage-contract/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/coverage-contract/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/coverage-contract/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/coverage-contract/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/custom_errors/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/custom_errors/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/custom_errors/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/custom_errors/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/custom_errors/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/custom_errors/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/custom_errors/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/custom_errors/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/generic-types-contract/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/generic-types-contract/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/generic-types-contract/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/generic-types-contract/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/generic-types-contract/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/generic-types-contract/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/generic-types-contract/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/generic-types-contract/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/liquidity-pool/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/liquidity-pool/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/liquidity-pool/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/liquidity-pool/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/liquidity-pool/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/liquidity-pool/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/liquidity-pool/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/liquidity-pool/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/multi-token-contract/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/multi-token-contract/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/multi-token-contract/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/multi-token-contract/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/multi-token-contract/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/multi-token-contract/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/multi-token-contract/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/multi-token-contract/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/payable-annotation/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/payable-annotation/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/payable-annotation/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/payable-annotation/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/payable-annotation/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/payable-annotation/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/payable-annotation/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/payable-annotation/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-address/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-address/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-address/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-address/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-address/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-address/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-address/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-address/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-bytes/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-bytes/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-bytes/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-bytes/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-bytes/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-bytes/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-bytes/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-bytes/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-conditional-inputs/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-conditional-inputs/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-conditional-inputs/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-conditional-inputs/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-conditional-inputs/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-conditional-inputs/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-conditional-inputs/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-conditional-inputs/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-false/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-false/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-false/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-false/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-false/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-false/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-false/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-false/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-main-args-struct/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-main-args-struct/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-main-args-struct/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-main-args-struct/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-main-args-struct/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-main-args-struct/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-main-args-struct/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-main-args-struct/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-main-args-vector/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-main-args-vector/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-main-args-vector/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-main-args-vector/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-main-args-vector/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-main-args-vector/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-main-args-vector/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-main-args-vector/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-multi-args/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-multi-args/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-multi-args/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-multi-args/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-multi-args/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-multi-args/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-multi-args/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-multi-args/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-raw-slice/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-raw-slice/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-raw-slice/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-raw-slice/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-raw-slice/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-raw-slice/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-raw-slice/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-raw-slice/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-std-lib-string/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-std-lib-string/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-std-lib-string/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-std-lib-string/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-std-lib-string/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-std-lib-string/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-std-lib-string/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-std-lib-string/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-struct/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-struct/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-struct/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-struct/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-struct/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-struct/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-struct/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-struct/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-triple-sig/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-triple-sig/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-triple-sig/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-triple-sig/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-triple-sig/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-triple-sig/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-triple-sig/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-triple-sig/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-true/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-true/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-true/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-true/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-true/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-true/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-true/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-true/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-u32/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-u32/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-u32/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-u32/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-u32/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-u32/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-u32/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-u32/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-vector-types/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-vector-types/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-vector-types/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-vector-types/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-vector-types/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-vector-types/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-vector-types/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-vector-types/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-with-configurable/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-with-configurable/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-with-configurable/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-with-configurable/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/predicate-with-configurable/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/predicate-with-configurable/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/predicate-with-configurable/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/predicate-with-configurable/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/raw-slice/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/raw-slice/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/raw-slice/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/raw-slice/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/raw-slice/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/raw-slice/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/raw-slice/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/raw-slice/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/revert-error/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/revert-error/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/revert-error/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/revert-error/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/revert-error/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/revert-error/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/revert-error/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/revert-error/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-bytes/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/script-bytes/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-bytes/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/script-bytes/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-bytes/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/script-bytes/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-bytes/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/script-bytes/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-main-args/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/script-main-args/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-main-args/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/script-main-args/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-main-args/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/script-main-args/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-main-args/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/script-main-args/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-main-return-struct/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/script-main-return-struct/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-main-return-struct/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/script-main-return-struct/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-main-return-struct/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/script-main-return-struct/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-main-return-struct/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/script-main-return-struct/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-main-two-args/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/script-main-two-args/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-main-two-args/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/script-main-two-args/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-main-two-args/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/script-main-two-args/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-main-two-args/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/script-main-two-args/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-raw-slice/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/script-raw-slice/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-raw-slice/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/script-raw-slice/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-raw-slice/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/script-raw-slice/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-raw-slice/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/script-raw-slice/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-std-lib-string/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/script-std-lib-string/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-std-lib-string/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/script-std-lib-string/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-std-lib-string/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/script-std-lib-string/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-std-lib-string/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/script-std-lib-string/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-with-array/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/script-with-array/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-with-array/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/script-with-array/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-with-array/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/script-with-array/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-with-array/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/script-with-array/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-with-configurable/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/script-with-configurable/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-with-configurable/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/script-with-configurable/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-with-configurable/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/script-with-configurable/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-with-configurable/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/script-with-configurable/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-with-vector-advanced/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/script-with-vector-advanced/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-with-vector-advanced/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/script-with-vector-advanced/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-with-vector-advanced/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/script-with-vector-advanced/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-with-vector-advanced/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/script-with-vector-advanced/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-with-vector-mixed/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/script-with-vector-mixed/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-with-vector-mixed/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/script-with-vector-mixed/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-with-vector-mixed/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/script-with-vector-mixed/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-with-vector-mixed/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/script-with-vector-mixed/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-with-vector/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/script-with-vector/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-with-vector/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/script-with-vector/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/script-with-vector/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/script-with-vector/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/script-with-vector/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/script-with-vector/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/std-lib-string/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/std-lib-string/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/std-lib-string/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/std-lib-string/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/std-lib-string/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/std-lib-string/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/std-lib-string/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/std-lib-string/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/storage-test-contract/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/storage-test-contract/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/storage-test-contract/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/storage-test-contract/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/storage-test-contract/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/storage-test-contract/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/storage-test-contract/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/storage-test-contract/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/token_abi/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/token_abi/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/token_abi/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/token_abi/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/token_abi/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/token_abi/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/token_abi/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/token_abi/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/token_contract/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/token_contract/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/token_contract/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/token_contract/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/token_contract/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/token_contract/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/token_contract/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/token_contract/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/vector-types-contract/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/vector-types-contract/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/vector-types-contract/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/vector-types-contract/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/vector-types-contract/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/vector-types-contract/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/vector-types-contract/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/vector-types-contract/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/vector-types-script/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/vector-types-script/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/vector-types-script/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/vector-types-script/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/vector-types-script/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/vector-types-script/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/vector-types-script/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/vector-types-script/src/main.sw diff --git a/packages/fuel-gauge/fixtures/forc-projects/vectors/Forc.toml b/packages/fuel-gauge/test/fixtures/forc-projects/vectors/Forc.toml similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/vectors/Forc.toml rename to packages/fuel-gauge/test/fixtures/forc-projects/vectors/Forc.toml diff --git a/packages/fuel-gauge/fixtures/forc-projects/vectors/src/main.sw b/packages/fuel-gauge/test/fixtures/forc-projects/vectors/src/main.sw similarity index 100% rename from packages/fuel-gauge/fixtures/forc-projects/vectors/src/main.sw rename to packages/fuel-gauge/test/fixtures/forc-projects/vectors/src/main.sw diff --git a/packages/fuel-gauge/fixtures/index.ts b/packages/fuel-gauge/test/fixtures/index.ts similarity index 100% rename from packages/fuel-gauge/fixtures/index.ts rename to packages/fuel-gauge/test/fixtures/index.ts diff --git a/packages/fuel-gauge/turbo.json b/packages/fuel-gauge/turbo.json deleted file mode 100644 index d9f064966f1..00000000000 --- a/packages/fuel-gauge/turbo.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": ["//"], - "pipeline": { - "build": { - "dependsOn": ["^build", "prebuild"], - "outputs": ["dist/**", "fixtures/forc-projects/**/out/**"], - "inputs": [ - "src/**", - "fixtures/forc-projects/**/src/*.sw", - "fixtures/forc-projects/**/Forc.toml" - ] - } - } -} diff --git a/packages/script/package.json b/packages/script/package.json index 0e00da062a0..01857177b4d 100644 --- a/packages/script/package.json +++ b/packages/script/package.json @@ -22,7 +22,7 @@ "scripts": { "pretest": "pnpm build:forc", "build": "tsup", - "build:forc": "pnpm fuels-forc build -p ./test/call-test-script", + "build:forc": "pnpm fuels-forc build -p test/fixtures/forc-projects", "postbuild": "tsx ../../scripts/postbuild.ts" }, "license": "Apache-2.0", diff --git a/packages/script/src/script.test.ts b/packages/script/src/script.test.ts index 965c932a689..c5fa50854a9 100644 --- a/packages/script/src/script.test.ts +++ b/packages/script/src/script.test.ts @@ -16,12 +16,12 @@ import { getBytesCopy } from 'ethers'; import { readFileSync } from 'fs'; import { join } from 'path'; -import { jsonAbiMock, jsonAbiFragmentMock } from '../test/fixtures/mocks'; +import { jsonAbiMock, jsonAbiFragmentMock } from '../test/mocks'; import { Script } from './index'; const scriptBin = readFileSync( - join(__dirname, '../test/call-test-script/out/debug/call-test-script.bin') + join(__dirname, '../test/fixtures/forc-projects/call-test-script/out/debug/call-test-script.bin') ); const setup = async () => { diff --git a/packages/script/test/fixtures/forc-projects/Forc.toml b/packages/script/test/fixtures/forc-projects/Forc.toml new file mode 100644 index 00000000000..f4a5f492384 --- /dev/null +++ b/packages/script/test/fixtures/forc-projects/Forc.toml @@ -0,0 +1,2 @@ +[workspace] +members = ["./call-test-script"] diff --git a/packages/script/test/call-test-script/Forc.toml b/packages/script/test/fixtures/forc-projects/call-test-script/Forc.toml similarity index 100% rename from packages/script/test/call-test-script/Forc.toml rename to packages/script/test/fixtures/forc-projects/call-test-script/Forc.toml diff --git a/packages/script/test/call-test-script/src/main.sw b/packages/script/test/fixtures/forc-projects/call-test-script/src/main.sw similarity index 100% rename from packages/script/test/call-test-script/src/main.sw rename to packages/script/test/fixtures/forc-projects/call-test-script/src/main.sw diff --git a/packages/script/test/fixtures/mocks.ts b/packages/script/test/mocks.ts similarity index 100% rename from packages/script/test/fixtures/mocks.ts rename to packages/script/test/mocks.ts diff --git a/packages/utils/package.json b/packages/utils/package.json index 78878717163..094d27aed59 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -34,7 +34,7 @@ "scripts": { "pretest": "pnpm build:forc", "build": "tsup", - "build:forc": "pnpm fuels-forc build -p test/forc-projects/simple", + "build:forc": "pnpm fuels-forc build -p test/fixtures/forc-projects", "postbuild": "tsx ../../scripts/postbuild.ts" }, "license": "Apache-2.0", diff --git a/packages/utils/test/fixtures/forc-projects/Forc.toml b/packages/utils/test/fixtures/forc-projects/Forc.toml new file mode 100644 index 00000000000..b2a6b908de3 --- /dev/null +++ b/packages/utils/test/fixtures/forc-projects/Forc.toml @@ -0,0 +1,2 @@ +[workspace] +members = ["simple"] diff --git a/packages/utils/test/forc-projects/simple/.gitignore b/packages/utils/test/fixtures/forc-projects/simple/.gitignore similarity index 100% rename from packages/utils/test/forc-projects/simple/.gitignore rename to packages/utils/test/fixtures/forc-projects/simple/.gitignore diff --git a/packages/utils/test/forc-projects/simple/Forc.toml b/packages/utils/test/fixtures/forc-projects/simple/Forc.toml similarity index 100% rename from packages/utils/test/forc-projects/simple/Forc.toml rename to packages/utils/test/fixtures/forc-projects/simple/Forc.toml diff --git a/packages/utils/test/forc-projects/simple/src/main.sw b/packages/utils/test/fixtures/forc-projects/simple/src/main.sw similarity index 100% rename from packages/utils/test/forc-projects/simple/src/main.sw rename to packages/utils/test/fixtures/forc-projects/simple/src/main.sw diff --git a/turbo.json b/turbo.json index 89d14423e7f..bff3acb28d4 100644 --- a/turbo.json +++ b/turbo.json @@ -18,7 +18,13 @@ "outputMode": "new-only" }, "pretest": { - "outputMode": "new-only" + "outputMode": "errors-only", + "inputs": [ + "**/test/fixtures/forc-projects/Forc.toml", + "**/test/fixtures/forc-projects/**/src/*.sw", + "**/test/fixtures/forc-projects/**/Forc.toml" + ], + "outputs": ["**/test/fixtures/forc-projects/**/out/debug/**"] }, "test": { "dependsOn": ["^test", "pretest"],