Get transaction id in contract method

nixoidnixoid San FranciscoMember Posts: 11
Hi there.
I wasn't able to find a way to get transaction id inside the method of contract. I need an id of transaction that invoked the method.
This is some obvious feature to have. Am i missing something?

Thank you


  • chrisethchriseth Member Posts: 170 ✭✭✭
    It might be that some transaction data is only available after the transaction is executed (because the result influences the hash). But at least the index of the transaction inside the current block should be available to the EVM, which is not the case in the current version of the EVM, we might change that for the next version.

    Of course, you can always create your own counters inside your contract.
  • psmadjapsmadja Member Posts: 7
    I do not understand the answer. When a transaction is produced, it is signed by the sender, so the transaction data cannot be modified by the miners - so normally the EVM can provide the transaction identifier to non-constant contract methods.
    Am I wrong ?
Sign In or Register to comment.