Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Solidity Tool

Build GitHub tag (latest SemVer pre-release)

CLI tool to help you do two things:

  1. Generate (write) a solc --standard-json compatible file deterministically
  2. Automatically verify (verify) a deployed contract on etherscan.



wget -O ~/.local/bin/solt
chmod +x ~/.local/bin/solt


wget -O ~/.local/bin/solt
chmod +x ~/.local/bin/solt



Creates a standard-json compatible file.

solt write [directory or solidity file]

Optional flags

  • --no-optimization -no-opt Flag for whether to exclude optimization in the output
  • --runs -r [number] Number of optimization runs, only used when optimizing, by default 200
  • --npm Flag for whether this project uses npm style imports (node_modules)
  • --output [string] Output file name (defaults to solc-input-[file].json)
  • --help -h Usage info

Note that you are expected to run this from the root of your Solidity project. That is, from the same directory where "node_modules" can be found. Otherwise, certain features like the --npm flag will not work.


Verifies contract on etherscan

solt verify [output.json] [contract address] [contract name in output-file] [--compiler solc-version]

Required flags:

  • --compiler -c [string] the compiler version used, e.g. 'v0.6.12'

Optional flags:

  • --license -l [string] License according to etherscan, valid codes 1-12 where 1=No License .. 12=Apache 2.0, see
  • --network -n [string] The network name [rinkeby, kovan etc], defaults to mainnet
  • --infura [string] Optional infura API key (if the shared one is rate limited)
  • --etherscan [string] Optional etherscan API Key (if the shared one is rate limited)
  • --help -h Usage info

Usage example

  1. Generate standard-json input format
git clone /tmp/example
cd /tmp/example
yarn install # installs node dependencies

solt write contracts --npm

# solc-input-contracts.json is generated
  1. Verify on etherscan
solt verify solc-input-contracts.json <deployed address> <contract name>

# You can obtain your contract name using the following command
# $ cat solc-input-contracts.json | jq .sources | jq 'keys'

Why does this exist?

Flattening your solidity code before verifying them on etherscan is not recommended. Yet it seems to be the most common approach for verification on etherscan.

While this is fine for small projects, you run into weird edge cases where flattening your code will yield different bytecodes from the deployed ones as the complexity of your code grows. This could be due to the usage of experimental features such as ABIEncoderV2 in your source code, and/or the usage of abosolute file paths when compiling your contracts (see here).

One approach that has worked consistently was using the compiler standard-json input method, which is also used by buidler behind the scenes.

solt was built as we wanted a static-binary that could:

  1. Generate a standard-json file for solc
  2. Be configured without any .config.js file
  3. Programmatically obtain the abi encoded constructor args to ease the etherscan verification process


Did solt save you engineering time? Any donations will be greatly appreciated!

❤️ Sponsor


No description, website, or topics provided.






Sponsor this project



No packages published

Contributors 4