Skip to content

📝 Get the revert reason from an POSIChain transaction hash

License

Notifications You must be signed in to change notification settings

PositionExchange/psc-revert-reason

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

psc-revert-reason

Get the revert reason from a tx hash on POSIChain

License NPM version

Install

 yarn global add 'PositionExchange/psc-revert-reason'

Getting started

psc-revert-reason [tx_hash]
# Specific network
psc-revert-reason [tx_hash] [psc_testnet|psc_mainnet]

Notes

Make sure you have add yarn bin to your $PATH

For bash for example, you can add this line at the end of your .bashrc:

export PATH="$(yarn global bin):$PATH"

More info: https://classic.yarnpkg.com/lang/en/docs/cli/global/

Future work

The following features will be added over time:

  1. A better way to determine whether or not a node is full-archive.
  2. A better way to determine whether or not a node exposes Parity trace methods.
  3. Reduce the number of calls made by the provider.
  4. Use raw RPC calls instead of a library
    • Will require unwrapping the provider from the library if provider is still a parameter
      • Note: this would still require using the ethers default provider

Test

npm test

License

MIT

About

📝 Get the revert reason from an POSIChain transaction hash

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%