A pocket knife for auditing smart contracts.
npm install pocketh
_______________________________________________________________________________________/\\\_________
____________________________________________/\\\______________________________________\/\\\_________
___/\\\\\\\\\______________________________\/\\\____________________________/\\\______\/\\\_________
__/\\\/////\\\_____/\\\\\________/\\\\\\\\_\/\\\\\\\\________/\\\\\\\\___/\\\\\\\\\\\_\/\\\_________
_\/\\\\\\\\\\____/\\\///\\\____/\\\//////__\/\\\////\\\____/\\\/////\\\_\////\\\////__\/\\\\\\\\\\__
_\/\\\//////____/\\\__\//\\\__/\\\_________\/\\\\\\\\/____/\\\\\\\\\\\_____\/\\\______\/\\\/////\\\_
_\/\\\_________\//\\\__/\\\__\//\\\________\/\\\///\\\___\//\\///////______\/\\\_/\\__\/\\\___\/\\\_
_\/\\\__________\///\\\\\/____\///\\\\\\\\_\/\\\_\///\\\__\//\\\\\\\\\\____\//\\\\\___\/\\\___\/\\\_
_\///_____________\/////________\////////__\///____\///____\//////////______\/////____\///____\///__
A pocket knife for developing and auditing smart contracts. Provides a series of cli commands that allow you to quickly operate on a contract, such as:
```
- getcode
- split
- inheritance
- members
- selectors
- calldata - Splits up calldata into a more readable format.
- blockdate
- txs
- pastevents
- disassemble
- hex2str
- str2hex
- transaction
- block
- info
- hex2uint
- uint2hex
- convert [value] [sourceDenom] [destDenom] - Converts between ether denominations.
- pad
- compile
- storage
- liststorage
- checksum - Checksums an address.
- selector
- docyul [keyword] - Gets yul documentation.
- int2hex
- hex2int
#### One script to rule them all!
Pocketh is basically a curated list of useful scripts, packed up in a commanderjs program.
#### On the fly compilation :rocket:
Pocketh uses AST information for analysing contracts, but it doesn't require you to do any compilation at all. Whenever pocketh sees a Solidity file, it will compile it in background. Pocketh's compiler is super handy btw; it can compile anything, on the spot.
npm install --global pocketh
`$3
`
pocketh [options]
`$3
Please refer to the inline documentation of the program for a list of available commands,`
pocketh --help
`
or, for command specific documentation.
`
pocketh --help
`$3
If you think of something useful that could be added to the tool, or have an idea, please don't hesitate to create a new issue with your feature request. Or, even better, go ahead and create a PR! Pocketh's architecture is intended to be as simple as possible so that it's super easy to add new scripts. Every command is pretty much a standalone script, with the exception of a few convenient tools that are shared between some of the commands.#### Running tests
Make sure that you run
npm run ganache before starting tests. Then run npm test`._Note: Unfortunately, pocketh currently requires an active internet connection for some of its tests, since some commands interact with public networks like mainnet and ropsten, and use public apis like Etherscan's api._