Sabre is a minimum viable MythX client. It analyzes a Solidity smart contracts using the MythX cloud service.
$ npm install -g sabre-mythx
Use Metamask or a web3-enabled browser to sign up for a free account on the MythX website and set your API password. Set up your environment using the Ethereum address you signed up with as the username (for increased convenience add those two lines into your .bashrc
or .bash_profile
).
export MYTHX_ETH_ADDRESS=0x(...)
export MYTHX_PASSWORD=password
$ sabre [options] <solidity_file>
OPTIONS:
--mode <quick/full> Analysis mode (default=quick)
--clientToolName <string> Override clientToolNames
--noCacheLookup Deactivate MythX cache lookups
--sendAST Submit AST instead of source code
--debug Print MythX API request and response
This analysis should take about 60 to 90 seconds to finish.
$ sabre contracts/token.sol
✔ Compiled with solc v0.5.7 successfully
token.sol
13:4 error The binary subtraction can underflow https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-101
14:4 error The binary addition can overflow https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-101
✖ 2 problems (2 errors, 0 warnings)
MythX tool builders will earn revenue share in Dai when we go live with paid subscription plans. Details will be released soon. Ping us on Discord if you'd like to get involved.
Some links: