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?
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.