How do I compute the JSON-RPC quantity value? #4609
Replies: 2 comments 2 replies
-
The ASCII bytes for the string "5" is Here is the chart: https://en.m.wikipedia.org/wiki/ASCII I’m no t quite sure what type of conversion you are trying to do, in terms of padding, but if you can give an example of what you are trying to do, I can tell you which function(s) you want to use. But I don’t think UTF8 is your desired encoding based on your question. :) |
Beta Was this translation helpful? Give feedback.
-
Hi Richard,
Here i am converting ETH to Wei and then converting that Wei value to bytes and having a hex value of it. But as you said i was getting ASCII bytes for the value i provided. This is how i did a workaround for now:
Do you have any suggestions? Thank you. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I just found that it gives an incorrect value, I am using ethers 6.11.1
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions