Allow 0 for decimals
That way, toBn("100e6", 0) will return "100000000" which is the real mathematical value.
I couldn't find any way to do that without this PR, but let me know otherwise.
this PR aimed to add scientific notation in remix but using from-exponential will just do the job.
I will get back to you soonish
Oh, shoot. I was the one who suggested using evm-bn for Remix 😅
In any case, I've become more open to adding support for zero decimals. This would be useful for ERC-20 token management because some tokens have zero decimals.
Thanks for re-opening this, @yann300. Before we can merge it, however, the tests must be updated to show that the function works properly with 0 decimals.
Also, shouldn't zero decimals be supported in fromBn, too?