Skip to content

Instantly share code, notes, and snippets.

@riordant
Created March 28, 2022 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save riordant/82c88353414c6cf3c19f371d51ba9ac6 to your computer and use it in GitHub Desktop.
Save riordant/82c88353414c6cf3c19f371d51ba9ac6 to your computer and use it in GitHub Desktop.
Converts a hardhat artifact JSON file to an interface from CLI. Useful for compiled contracts that you don't have an interface file for.
# requirements:
# jq
# abi2solidity
cat Contract.json | jq '.abi' > Contract.abi.json
abi2solidity -i Contract.abi.json -o IContract.sol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment