https://github.com/jellydn/tx-revert-reason
Get the revert reason from an Ethereum transaction hash
https://github.com/jellydn/tx-revert-reason
ethereum ethersjs web3js
Last synced: 3 months ago
JSON representation
Get the revert reason from an Ethereum transaction hash
- Host: GitHub
- URL: https://github.com/jellydn/tx-revert-reason
- Owner: jellydn
- License: mit
- Created: 2020-06-18T00:40:22.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-04-07T04:58:53.000Z (6 months ago)
- Last Synced: 2025-04-07T05:30:14.501Z (6 months ago)
- Topics: ethereum, ethersjs, web3js
- Language: TypeScript
- Homepage: https://tx-revert-reason.productsway.com/
- Size: 451 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Welcome to tx-revert-reason 👋
[](https://www.npmjs.com/package/tx-revert-reason)
[](#)> Decode revert reason from failed transaction
## 🏠 [Homepage](https://github.com/jellydn/tx-revert-reason)
### ✨ [API documentation](https://tx-revert-reason.productsway.com)## Install
```sh
yarn add tx-revert-reason
```## Usage
### CLI
```sh
cp .env.example .env # Fill the provider url
npx tx-revert-reason --help
```### Typescript
```typescript
import { getReasonByWeb3Js, getReasonByEthersJs } from 'tx-revert-reason';const reasonByWeb3 = await getReasonByWeb3Js(txHash, providerUrl);
const reasonByEthers = await getReasonByEthersJs(txHash, providerUrl);```
## Develop
```sh
cp .env.example .env # Fill the provider url
yarn start TX_HASH # Check revert reason from tx hash
yarn start --help # Show help
```## Stargazers
[](https://github.com/jellydn/tx-revert-reason/stargazers)
## Show your support
Give a ⭐️ if this project helped you!
[](https://ko-fi.com/Q5Q61Q7YM)
## Show your support
Give a ⭐️ if this project helped you!
---
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_