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?
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.
No, because smart contracts live on the blockchain, which essentially is a list of transactions, or 'history'. Transactions that are not mined yet, are not part of the blockchain 'history'. That means that for a smart contract, transactions don't exist until they are executed, or mined.
To check that a transaction was mined, you will have to check the effects it has had to the state of the blockchain. You could store the hash of a transaction you need to check in a
mapping(bytes32 => bool) whenever a certain function is called. That depends on what you want to do with it.