Closed arkavinod closed 5 months ago
What address did you pass? The legality verification of parameter addresses relies on the broadcast interface on the chain.
Any&All
Zachariah M Evans
On Tue, May 7, 2024 at 2:10 AM start940315 @.***> wrote:
What address did you pass? The legality verification of parameter addresses relies on the broadcast interface on the chain.
— Reply to this email directly, view it on GitHub https://github.com/tronprotocol/tronweb/issues/507#issuecomment-2097602120, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDV43C6GYZN2RISIZI644ZTZBB45ZAVCNFSM6AAAAABG53PBVSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJXGYYDEMJSGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
@arkavinod Tron node will verify the correctness of the address. There are two forms of tron addresses, if the address is not a valid address, the API will return the error message: "Invalid address provided".
@ferdinand026 I have passed this address in the above code "0x3d877bd550376f266c16d1b8da648a39f888eb38", which is not a valid tron address
What address did you pass? The legality verification of parameter addresses relies on the broadcast interface on the chain.
Hi I have given this address 0x3d877bd550376f266c16d1b8da648a39f888eb38 and its not a valid tron address but still it got proceed to some random address
@start940315 Hi I have given this address 0x3d877bd550376f266c16d1b8da648a39f888eb38 and its not a valid tron address but still it got proceed to some random address
@ferdinand026 I have passed this address in the above code "0x3d877bd550376f266c16d1b8da648a39f888eb38", which is not a valid tron address
It is an evm addrass. And adding 41 into the front of it will be the TRON hex format address. and for solidity and contract parameter encoding, the address of TRON address will not include the prefix 41. so it is a valid address for contract parameter.
So it is not valid tron for the above evm address it is creating new tron address and sending USDT token to that address?, Here is my case using above code with that address it got transferred to some account, I lost my funds, i checked that adress in tronweb it showing only USDT token, no TRX and it's not activated as it's showing in tronweb, means it not created and don't have any transactions for that, so I assuming it is created a address for tron and it got transferred if there no valid tron with that evm address am I correct?,
I just given some ETH adress by mistakely
TRON’s account generation algorithm is exactly the same as that of Ethereum, and TVM and EVM are basically fully compatible. so it is allowed to input a 20 bytes of hex format address in the above api.
Okay, thank you
const inputs = [ { type: "address", value: receiverAddress, }, { type: "uint256", value: 5, }, ]; const tx = await tronWeb.transactionBuilder.triggerSmartContract( trc20ContractAddress, "transfer(address,uint256)", options, inputs, tronWeb.address.toHex(sourceAddress) ); const results = await tronWeb.trx.sign(tx?.transaction, privateKey); console.log("results", results)