Solidity – How to Get TX Receipt of Transaction from Within a Solidity Smart Contract

contract-designcontract-developmentsolidityweb3js

I want to keep one condition where transaction status is derived from TXhash so
is there any way in where i can retrieve inside solidity smart-contract so that can get transaction status from it and check the condition.
so do solidity have any function like this?

Best Answer

No.

A function should not depend on transactions in the past. That's the state's job. You should never need to look back.

And, it won't work. Can a contract view the details of a transaction, given a transaction id?

Hope it helps.