Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tryCall script to get the revert reason of reverted Tx #328

Merged
merged 1 commit into from
Mar 14, 2022

Conversation

pmprete
Copy link
Contributor

@pmprete pmprete commented Mar 14, 2022

Add script to perform a call using the transaction parameters.
This is very helpfull to detect reverted reasons for example if you have https://explorer.rsk.co/tx/0xddcdc5e6917b1f92069fe67585d288b42f1ee11f195597b73e00b206a42d20a3
The script will response

 npx hardhat run --network rskmainnet ./hardhat/script/tryTxCall.js                       5s
Error: Returned error: VM Exception while processing transaction: revert AllowTokens: Lower than limit
    at Object.ErrorResponse (/Users/pedro/git/rsk/tokenbridge/bridge/node_modules/web3-core-helpers/lib/errors.js:28:19)
    at /Users/pedro/git/rsk/tokenbridge/bridge/node_modules/web3-core-requestmanager/lib/index.js:302:36
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@lgtm-com
Copy link

lgtm-com bot commented Mar 14, 2022

This pull request introduces 1 alert when merging 891775a into 5e1de58 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@aguschirico aguschirico merged commit 394a95c into nftbridge-rebased Mar 14, 2022
@aguschirico aguschirico deleted the TBRE-517-tryCall branch March 14, 2022 16:14
Dominikkq pushed a commit to Dominikkq/tokenbridge that referenced this pull request Jan 19, 2025
Add tryCall script to get the revert reason of reverted Tx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants