Connecting to the Fuel wallet via Fuels on the frontend, creating a contract with const contract = new Contract(contractId, abi, wallet)
, and calling the contract with:
javascript
await contract.functions
.increment()
.callParams({
forward: [amount, assetId]
})
.txParams({
gasPrice: 1,
gasLimit: 1000_000
})
.call()
results in the following error:
perl
Cannot read properties of undefined (reading 'name')
TypeError: Cannot read properties of undefined (reading 'name')
at eval (webpack-internal:///./node_modules/@fuel-ts/account/dist/index.mjs:1834:37)
at Array.forEach (<anonymous>)
at normalize (webpack-internal:///./node_modules/@fuel-ts/account/dist/index.mjs:1833:23)
at eval (webpack-internal:///./node_modules/@fuel-ts/account/dist/index.mjs:1848:23)
at Array.forEach (<anonymous>)
at normalize (webpack-internal:///./node_modules/@fuel-ts/account/dist/index.mjs:1833:23)
at normalizeJSON (webpack-internal:///./node_modules/@fuel-ts/account/dist/index.mjs:1857:10)
at ScriptTransactionRequest.toJSON (webpack-internal:///./node_modules/@fuel-ts/account/dist/index.mjs:2483:12)
at JSON.stringify (<anonymous>)
at R.sendTransaction (webpack-internal:///./node_modules/@fuels/connectors/dist/index.mjs:15:25825)
Calling the contract with .call()
causes this error to appear.