(txHash)
| 16 | |
| 17 | |
| 18 | const main = async (txHash) => { |
| 19 | const tx = await provider.getTransaction(txHash) |
| 20 | if (!tx) { |
| 21 | console.log('tx not found') |
| 22 | } else { |
| 23 | const code = await provider.call(tx) |
| 24 | console.log('revert reason:', code) |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | main('input your txHash'); |