BigInt of nodejs is not recognized in the Conflux sdk, how should I write here?
This is an internal contract. I uploaded a string, the error was still there. The depositNumber is 10^19.
I defined the const string, the same error… My sdk is v1.1.2. Yesterday I tried java, it was OK, but now it is not available with nodejs. Is it possible that it is a bug of the sdk?
The code is:
await contract.deposit(10000000000000000000n).sendTransaction({from: account, }).confirmed();
The error notification is:
Error: {“msg”:“Cannot convert undefined to a BigInt”,“path”:".gasLimit",“origin”:{“gasUsed”:“0x7c28”,“storageCollateralized”:“0x0”}}
sdk不认nodejs的bigint,这里应该怎么写?
这是2号内置合约,我传了string也报同样的错误,js确实也有bigint方法,方法应该是没错的,depositNumber是10^19,
我直接传了const string,也报同样的错误,用的是1.1.2的sdk,昨天用java是可以的,今天用nodejs怎么都不行,有没有可能是sdk的bug?
代码就是这一句:
await contract.deposit(10000000000000000000n).sendTransaction({ from: account, }).confirmed();
报错信息:
Error: {“msg”:“Cannot convert undefined to a BigInt”,“path”:".gasLimit",“origin”:{“gasUsed”:“0x7c28”,“storageCollateralized”:“0x0”}}