Fuels Typescript SDK Error

import { Provider, FUEL_BETA_5_NETWORK_URL } from "fuels";
async function deployAndTestContract() {
  // Setup the provider and wallet
    const provider = await Provider.create(FUEL_BETA_5_NETWORK_URL);
}

I’m getting this error when running this code, any idea why?

(node:85730) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
_FuelError: Unknown field "version" on type "PredicateParameters".

Unknown field "height" on type "Block".

Unknown field "version" on type "ScriptParameters".

Unknown field "version" on type "ConsensusParameters".

Unknown field "version" on type "FeeParameters".

Unknown field "version" on type "GasCosts".

Field "croo" must not have a selection since type "U64" has no subfields

Fragment "DependentCostFragment" cannot be spread here as objects of type "U64" can never be of type "DependentCost"

Unknown field "version" on type "TxParameters".

Unknown field "maxBytecodeSubsections" on type "TxParameters".

Unknown field "version" on type "ContractParameters".
    at responseMiddleware (/Users/danielchew/Code/test-pyth-fuel-contract/node_modules/@fuel-ts/account/src/providers/provider.ts:504:19)
    at /Users/danielchew/Code/test-pyth-fuel-contract/node_modules/graphql-request/src/index.ts:345:11
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async _Provider.fetchChain (/Users/danielchew/Code/test-pyth-fuel-contract/node_modules/@fuel-ts/account/src/providers/provider.ts:583:23)
    at async _Provider.fetchChainAndNodeInfo (/Users/danielchew/Code/test-pyth-fuel-contract/node_modules/@fuel-ts/account/src/providers/provider.ts:468:19)
    at async Function.create (/Users/danielchew/Code/test-pyth-fuel-contract/node_modules/@fuel-ts/account/src/providers/provider.ts:401:5) {
  VERSIONS: { FORC: '0.56.0', FUEL_CORE: '0.26.0', FUELS: '0.84.0' },
  metadata: {},
  code: 'invalid-request'
}

Seems like it was a version mismatch, worked when I downgraded my fuels version to 0.82.0

2 Likes

yeah, version greater than 0.82.0 isn’t compatible with the beta-5 network. you will have to downgrade it from the latest version.

1 Like