1

I made a button to send 1BNB to another account by using Ether.js.

As I know, 1BNB has 8 decimals.

However, when I have to send 1 BNB to another, I need to put 1*10**18 which is 18 decimals

So, the code is

    const tx = await signer.sendTransaction({
        from: userAddr, 
        to:privateSale.address, 
        value: ethers.utils.parseEther('1')
        });

It can be clearly seen that I am sending 1 * 10^18, not 1 * 10^8 BNB. However, 1*10^18 indicates 1BNB.

if 1*10^18 is really 1BNB, then 1 Jager(= 0.00000001 BNB) is 1 * 10^10?

Would someone please explain this to me?

1 Answer 1

4

BNB has 18 decimals on Binance Smart Chain (like other EVM native token) and 8 decimals on Binance Chain.

Based on your use of ethers, I’m guessing your interacting with BNB on BSC (and therefore use 18 decimals).

https://docs.binance.org/smart-chain/developer/cross-chain-transfer.html

1
  • 1
    And to add to the confusion, "Binance Chain" is merging with the "Binance Smart Chain" to be called the "BNB Chain" in 2022. May 26, 2022 at 5:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.