0
uint256 amount = msg.value;

this means if use my code

var tx = await tronweb.transactionBuilder.sendTrx('TKKtaGBH2E2nGSK7F6zKUxvrvtr6iRbp1S', 10 * 1e6, window.tronWeb.defaultAddress.base58)

that means I will get 10 value from msg.value?

1 Answer 1

0

msg.value is the transaction value in Wei, not the equivalent amount in Ether. If you send 1 Ether (= 10^18 Wei), msg.value will be 10^18.

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.