Hello,

Sign up to join our community!

Welcome Back,

Please login to your account!

Forgot Password,

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

and076307876 activity

and076307876 commented on I did miss the bignumber.js in may package.json, but i still get the same error. I will experiment more and see if I can solve it. Was the json-bigint package introduced recently, or has it been there for a longer time?

It existed in the past, as well (in erdjs prior v10). There should be a way to configure the global variables in webpack, so that we do not apply globals-related logic in the erdjs libraries. I will let you know if I find a workaround in the meantime. However, hacking the libraries for webpack's sake should only be a last resort ?

and076307876 commented on Thank you for your answer?I experiment with the Governance Module where the arguments can be number and string in JS. It is this Part of the Action struct: "pub arguments: ManagedVec>" I would like to avoid the Explicit way. Is that possible? Could the ErdJs detect that it is a ... Read more

It is (somehow) possible to convert a number to a buffer (big-endian or little-endian) - using standard Buffer functionality (no erdjs involved). After that, you should be able to use the buffer as an argument to your function (without the explicit format). For example: https://nodejs.org/api/buffer.html#bufreadint32leoffset erdjs is not able to convert from number to bytes, at this point: https://github.com/ElrondNetwork/elrond-sdk-erdjs/blob/main/src/smartcontracts/nativeSerializer.ts#L209