Error: Unknown field "contractMaxSize" on type "ConsensusParameters"

Getting this error while calling mint function(from NFT contract)

    console.log("mint start");
    const contract = await getContract();
    const res = await contract.functions
      .mint({ Address: { value: admin } }, BaseAssetId, 1)
      .txParams({ gasPrice: 100 })
      .call();
    console.log(res);
  };```

Hi @chappie1998!
Support for the contractMaxSize field was added as part of our upcoming beta-5 support endeavor. Which version of the SDK are you using? If you are targeting our beta-4 network you should be using fuels version 0.69.1 as that is the last one that supports beta-4. All newer versions of the SDK only support beta-5.

3 Likes

Hello @chappie1998.

Just like @nedsalk said, this problem is likely related to a mismatch of versions within the Fuel ecosystem.

Can you answer some questions for us to better understand your problem?

1 - Which version of fuels are you using?

2 - Are you having this error while connected to one of the testnets? Beta-4 or Beta-5?

3 - What is the output when you run fuelup show on your terminal

3 Likes

solved by updating the fuel-ts. thanks

3 Likes