Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't find log field with GetTransactionInfoById #6069

Open
inapeace0 opened this issue Nov 6, 2024 · 5 comments
Open

I can't find log field with GetTransactionInfoById #6069

inapeace0 opened this issue Nov 6, 2024 · 5 comments

Comments

@inapeace0
Copy link

inapeace0 commented Nov 6, 2024

Hello,

https://tronscan.org/#/transaction/aebfcad791c00033b72c2287535512cfa929ef483eec25a91d3fb9113b62a3dd

https://developers.tron.network/reference/gettransactioninfobyid

This is the result after calling the above api.

{
  id: 'aebfcad791c00033b72c2287535512cfa929ef483eec25a91d3fb9113b62a3dd',
  fee: 13739430,
  blockNumber: 66747568,
  blockTimeStamp: 1730892183000,
  contractResult: [ '' ],
  contract_address: '41a614f803b6fd780986a42c78ec9c7f77e6ded13c',
  receipt: {
    energy_usage: 32007,
    energy_fee: 13394430,
    energy_usage_total: 95790,
    net_fee: 345000,
    result: 'OUT_OF_ENERGY',
    energy_penalty_total: 25905
  },
  result: 'FAILED',
  resMessage: '4e6f7420656e6f75676820656e6572677920666f7220275353544f524527206f7065726174696f6e20657865637574696e673a20637572496e766f6b65456e657267794c696d69745b39353739305d2c206375724f70456e657267795b
32303030305d2c2070656e616c7479456e657267795b36383030305d2c2075736564456e657267795b33333536375d'
}

I'm not sure why I can't see log field.

image

❓❓❓Actually, I was going to get token amount from log data. Is there another way to approach?

Thanks

@inapeace0 inapeace0 changed the title I can't find log in failed transaction I can't find log field in failed transaction Nov 6, 2024
@inapeace0 inapeace0 changed the title I can't find log field in failed transaction I can't find log field with GetTransactionInfoById Nov 6, 2024
@DongDongSunny
Copy link

the transaction is failed for energy not enough, the event log is not generated

@abn2357
Copy link

abn2357 commented Nov 11, 2024

the transaction is failed for energy not enough, the event log is not generated

What is the difference between energe_usage and energe_usage_total in receipt?

@DongDongSunny
Copy link

DongDongSunny commented Nov 12, 2024

energy_usage_total is the total energy usage.

Breakdown:

  • energy_usage is the energy used from your staked energy or from delegation.
  • energy_penalty_total: The amount of extra energy that needs to be paid for calling a few popular contracts.
  • energy_fee: the amount of TRX burned to pay for energy. It = (energy_usage_total - energy_usage) * (TRX to energy rate = 0.00021)

Tron will first consume your staked or delegated energy, if not enough, it will burn TRX to pay for energy based on a dynamic energy model, energy_penalty_total is one calculated from it when you use popular token transfer.

@abn2357
Copy link

abn2357 commented Nov 13, 2024

energy_usage_total is the total energy usage.

Breakdown:

  • energy_usage is the energy used from your staked energy or from delegation.
  • energy_penalty_total: The amount of extra energy that needs to be paid for calling a few popular contracts.
  • energy_fee: the amount of TRX burned to pay for energy. It = (energy_usage_total - energy_usage) * (TRX to energy rate = 0.00021)

Tron will first consume your staked or delegated energy, if not enough, it will burn TRX to pay for energy based on a dynamic energy model, energy_penalty_total is one calculated from it when you use popular token transfer.

Any detail information about energy_penalty_total? It would be even better if a specific example could be provided. Thx.

@DongDongSunny
Copy link

energy_usage_total is the total energy usage.
Breakdown:

  • energy_usage is the energy used from your staked energy or from delegation.
  • energy_penalty_total: The amount of extra energy that needs to be paid for calling a few popular contracts.
  • energy_fee: the amount of TRX burned to pay for energy. It = (energy_usage_total - energy_usage) * (TRX to energy rate = 0.00021)

Tron will first consume your staked or delegated energy, if not enough, it will burn TRX to pay for energy based on a dynamic energy model, energy_penalty_total is one calculated from it when you use popular token transfer.

Any detail information about energy_penalty_total? It would be even better if a specific example could be provided. Thx.

well it quite complex, please refer here ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@inapeace0 @abn2357 @DongDongSunny and others