Skip to content

Instantly share code, notes, and snippets.

@step21
Created December 28, 2020 14:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save step21/1b3b8abac97eaa03d3f9b6d8246f515c to your computer and use it in GitHub Desktop.
Save step21/1b3b8abac97eaa03d3f9b6d8246f515c to your computer and use it in GitHub Desktop.
solidity compiler (solc) in jupyter notebook

The line below gives an example of how to compile solidity code from a jupyter notebook cell. Replaces the '--ast-json' with whatever options or output you like, and adjust the binary to where your solc is. The dash at the end is necessary to signify stdin.

%alias_magic solidity script -p "/home/jovyan/.solcx/solc-v0.6.7 --ast-json -"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment