Can I get the time stamp on when a transaction was added to the mempool and when it was successfully added to a block?
Is there an API to do this?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
You cannot get a timestamp for the transaction when it was added to the mempool because transactions do not have a concept of time, only
blockNumber. While in the mempool, the transaction's
blockNumber parameter is
Once a miner has included a transaction into a block, the transaction will update with the appropriate
blockNumber that it was included in. That block also has a timestamp associated with it, so you can now get a time that the transaction was included in the blockchain.