post https://api.shasta.trongrid.io/wallet/gettransactioninfobyid
Query the transaction fee, block height by transaction id
Returns
This interface returns a TransactionInfo object, which contains the following fields:
Filed | Type | Description |
---|---|---|
id | string | Transaction ID |
fee | int64 | The total number of TRX burned in this transaction, including TRX burned for bandwidth/energy, memo fee, account activation fee, multi-signature fee and other fees |
blockNumber | int64 | The block number |
blockTimeStamp | int64 | The block timestamp, the unit is millisecond |
contractResult | string[] | Transaction Execution Results |
contract_address | string | Contract address |
receipt | ResourceReceipt | Transaction receipt, including transaction execution result and transaction fee details, which contains the following fields: 1. energy_usage : the amount of energy consumed in the caller's account2. energy_fee : the amount of TRX burned to pay for energy3. origin_energy_usage : the amount of energy consumed in the contract deployer's account4. energy_usage_total : The total amount of energy consumed by the transaction5. net_usage : The amount of bandwidth consumed6. net_fee : The amount of TRX burned to pay for the bandwidth7. result : transaction execution result8. energy_penalty_total : The amount of extra energy that needs to be paid for calling a few popular contracts |
log | Log[] | The log of events triggered during the smart contract call, each log includes the following information: 1. address : Contract address. In order to be compatible with EVM, the address in TVM is a hex format address without the prefix 0x41, so if you want to parse the address in the log, you need to add 41 to the beginning of the log address , and then convert it to Base58 format.2. topics : The topic of the event, including the event itself and parameters marked as indexed.3. data : Non-indexed parameters of events. |
result | int | Execution results. If the execution is successful, the field will not be displayed in the returned value, if the execution fails, the field will be "FAILED" |
resMessage | string | When the transaction execution fails, the details of the failure will be returned through this field. Hex format, you can convert it to a string to get plaintext information. |
withdraw_amount | int64 | For the withdrawal reward transaction、unfreeze transaction, they will withdraw the vote reward to account. The number of rewards withdrawn to the account is returned through this field, and the unit is sun |
unfreeze_amount | int64 | In the Stake1.0 stage, for unstaking transactions, this field returns the amount of unstaked TRX, the unit is sun |
internal_transactions | InternalTransaction[] | Internal transaction |
withdraw_expire_amount | int64 | In the Stake2.0 stage, for unstaking transaction and withdrawing unfrozen balance transaction, and cancelling all unstakes transaction, this field returns the amount of unfrozen TRX withdrawn to the account in this transaction, the unit is sun |
cancel_unfreezeV2_amount | map<string, int64> | The amount of TRX re-staked to obtain various types of resources, in sun, that is, the amount of unstaked principal that has been canceled, the key is: "BANDWIDTH" or "ENERGY" or "TRON_POWER" |