stoway / TronNet

.net sdk of tron
MIT License
69 stars 43 forks source link

After BroadcastTransactionAsync() how can I get the TxID? #41

Open hy-net opened 2 years ago

hy-net commented 2 years ago

Normally I can get the TxID when I signed the transaction online.

But here since we are signing offline, we won't get any TxID when signing.

And the result returned by BroadcastTransactionAsync() is only TRUE. Nothing else.

stoway commented 2 years ago

Normally I can get the TxID when I signed the transaction online.

But here since we are signing offline, we won't get any TxID when signing.

And the result returned by BroadcastTransactionAsync() is only TRUE. Nothing else.

var transactionSigned = transactionClient.GetTransactionSign(transaction.Transaction, privateKey);

var result = await transactionClient.BroadcastTransactionAsync(transactionSigned); var txId = transactionSigned.GetTxid();