node:buffer:319
throw new ERR_INVALID_ARG_TYPE(
^
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
at Function.from (node:buffer:319:9)
at Web3Account.compactBytesForOperation (/home/seb/node_modules/@massalabs/massa-web3/dist/cmd/web3/BaseClient.js:261:78)
at Web3Account.executeOperation (/home/seb/node_modules/@massalabs/massa-web3/dist/cmd/web3/accounts/Web3Account.js:51:35)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SmartContractsClient.callSmartContract (/home/seb/node_modules/@massalabs/massa-web3/dist/cmd/web3/SmartContractsClient.js:113:16)
I have node 22 and massa-web3 4.0.1, and I call the code in a js file with node file.js.
The sc address and functionName are examples, I get the same error whatever these values.
It's probably a noob problem but I can't call a smart contract with this code (replace the secret key by any of yours):
I get this error:
I have node 22 and massa-web3 4.0.1, and I call the code in a js file with
node file.js
. The sc address and functionName are examples, I get the same error whatever these values.Do you have any idea ? Thank you!