Status Error when calling function

The code below makes a “Error: Unknown field “status” on type “Message”” Error. How ever .get() does work. await contract.functions.max_supply().get();

const v = await
    .txParams({ gasPrice: 1 })

Error: Unknown field "status" on type "Message".: {"response":{"data":null,"errors":[{"message":"Unknown field \"status\" on type \"Message\".","locations":[{"line":28,"column":3}]}],"status":200,"headers":{"map":{"content-type":"application/json"}}},"request":{"query":"query getResourcesToSpend($owner: Address!, $queryPerAsset: [SpendQueryElementInput!]!, $excludedIds: ExcludeInput) {\n  resourcesToSpend(\n    owner: $owner\n    queryPerAsset: $queryPerAsset\n    excludedIds: $excludedIds\n  ) {\n    ...coinFragment\n    ...messageFragment\n  }\n}\n\nfragment coinFragment on Coin {\n  utxoId\n  owner\n  amount\n  assetId\n  maturity\n  coinStatus: status\n  blockCreated\n}\n\nfragment messageFragment on Message {\n  amount\n  sender\n  recipient\n  data\n  nonce\n  messageStatus: status\n  daHeight\n}","variables":{"owner":"0xf37e242bb530789a5714c01c2cd266ea5d9c7c5d802c5a64c00e77b60e79dcca","queryPerAsset":[{"assetId":"0x0000000000000000000000000000000000000000000000000000000000000000","amount":"100"}],"excludedIds":{"messages":[],"utxos":[]}}}}
    at index.ts:498:1
    at step (graphql-ws.ts:280:1)
    at (graphql-ws.ts:280:1)
    at fulfilled (graphql-ws.ts:280:1)

This looks like a version mismatch. What forc, fuel-core, and fuels versions are you using?


This is my result of fuelup show!

Default host: aarch64-apple-darwin
fuelup home: /Users/aaaaaa/.fuelup

installed toolchains
latest-aarch64-apple-darwin (default)

active toolchain
latest-aarch64-apple-darwin (default)
  forc : 0.35.3
    - forc-client
      - forc-deploy : 0.35.3
      - forc-run : 0.35.3
    - forc-doc : 0.35.3
    - forc-explore : 0.28.1
    - forc-fmt : 0.35.3
    - forc-index : 0.3.0
    - forc-lsp : 0.35.3
    - forc-tx : 0.35.3
    - forc-wallet : 0.2.0
  fuel-core : 0.17.3
  fuel-indexer : 0.3.0

Did you deploy the contract locally or to a testnet? Also what is your fuels version? This is the ts sdk version should be in your package.json.

I deployed in testnet(beta2) and fuel version looks like 0.30.
I found the version in Cargo.toml.
fuels = { version = "0.30", features = ["fuel-core-lib"] }

ok yeah this is a version mismatch. What you should do is type the command fuelup default beta-2 this should give you the correct toolchain to use with the beta-2 testnet. This error occurs bc the beta-2 testnet is on fuel-core version 0.15.1 which compatible with forc v 0.31.1 and fuels v0.30.0 (iirc).

1 Like

if fuelup default beta-2 doesn’t work try fuelup toolchain install beta-2 then the previous command

1 Like

Thank you very much! I’ll try that method, and if I succeed, I’ll leave a result here.

1 Like