>" I would like to avoid the Explicit way. Is that possible? Could the ErdJs detect that it is a Number and convert it to Bytes correctly? - ElrondDevelopers"/> >" I would like to avoid the Explicit way. Is that possible? Could the ErdJs detect that it is a Number and convert it to Bytes correctly? - ElrondDevelopers"/> >" I would like to avoid the Explicit way. Is that possible? Could the ErdJs detect that it is a Number and convert it to Bytes correctly? - ElrondDevelopers"/> >" I would like to avoid the Explicit way. Is that possible? Could the ErdJs detect that it is a Number and convert it to Bytes correctly? - ElrondDevelopers"/>
Sign up to join our community!
Please login to your account!
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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