You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I was experimenting with some contracts that require constructor arguments and some which don't. So I was trying to declare and deploy one which does, but forgot to provide them. I ended up getting this error:
TypeError: Cannot convert undefined to a BigInt
at BigInt (<anonymous>)
at toBigInt (/home/fabijanc/shardlabs/starknet-js-example/node_modules/starknet/src/utils/num.ts:15:10)
at /home/fabijanc/shardlabs/starknet-js-example/node_modules/starknet/src/utils/transaction.ts:18:11
at Array.forEach (<anonymous>)
at transformCallsToMulticallArrays (/home/fabijanc/shardlabs/starknet-js-example/node_modules/starknet/src/utils/transaction.ts:15:9)
at fromCallsToExecuteCalldata (/home/fabijanc/shardlabs/starknet-js-example/node_modules/starknet/src/utils/transaction.ts:38:35)
at getExecuteCalldata (/home/fabijanc/shardlabs/starknet-js-example/node_modules/starknet/src/utils/transaction.ts:89:10)
at Account.buildInvocation (/home/fabijanc/shardlabs/starknet-js-example/node_modules/starknet/src/account/default.ts:249:22)
at Account.estimateInvokeFee (/home/fabijanc/shardlabs/starknet-js-example/node_modules/starknet/src/account/default.ts:124:35)
To Reproduce
After spawning starknet-devnet-rs with prefunded accounts, I tried running this script (omitted imports and constant definitions):
constprovider=newProvider({rpc: {nodeUrl: "http://localhost:5050"}});constaccount=newAccount(provider,accountAddress,accountPrivateKey);console.log(`Loaded account with address ${account.address}`);constcompiledContract=awaitjson.parse(fs.readFileSync(sierraPath).toString("ascii"));constcompiledSierraCasm=awaitjson.parse(fs.readFileSync(casmPath).toString("ascii"));console.log("Loaded artifacts");constdeclareDeployResponse=awaitaccount.declareAndDeploy({contract: compiledContract,casm: compiledSierraCasm,// here one would specify the constructorCalldata - I forgot to},{maxFee: BigInt(1e18)});
Expected behavior
A more informative error
Screenshots
N/A
Desktop (please complete the following information):
Node version: 16.14.0
Starknet.js version: 5.19.5
Network: starknet-devnet-rs
The text was updated successfully, but these errors were encountered:
Describe the bug
I was experimenting with some contracts that require constructor arguments and some which don't. So I was trying to declare and deploy one which does, but forgot to provide them. I ended up getting this error:
To Reproduce
After spawning starknet-devnet-rs with prefunded accounts, I tried running this script (omitted imports and constant definitions):
Expected behavior
Screenshots
N/A
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: