Hp740319
Hp740319

Reputation: 747

Send Tron transaction with Ethereum compatible address

Is it possible to make a transaction for the Tron network with the Nethereum library?

As you know, Tron addresses can be converted to Ethereum format with the help of the following site https://tronscan.org/#/tools/code-converter/tron-ethereum-address

For example, public address TA3Pynm9EUEheHYoXshViEFMSxm2vNNN4s

In Ethereum format, it is as follows: 0x00CAD3F26E3E2D7D777354FFC9CF51D581D0F17C

I have been able to get the balance of the wallet using the public address in the Ethereum format with the Nethereum library

var account = new Account(privateKey);

var web3 = new Web3(rpcClient);

var contractAddress = ConvertTronToEthereumAddress("TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t");

var service = web3.Eth.ERC20.GetContractService(contractAddress);

Console.WriteLine(await service.BalanceOfQueryAsync(account.Address));

But I couldn't make a transfer transaction.

Thank you in advance

Upvotes: 1

Views: 88

Answers (0)

Related Questions