Skip to content

Instantly share code, notes, and snippets.

@saurfang
Last active April 14, 2018 20:17
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 saurfang/b2fcbc314a420d9a98a80e6bc886b751 to your computer and use it in GitHub Desktop.
Save saurfang/b2fcbc314a420d9a98a80e6bc886b751 to your computer and use it in GitHub Desktop.
# install solidity on Mac
brew update
brew upgrade
brew tap ethereum/ethereum
brew install solidity
brew linkapps solidity
# compile solidity contract
cat << EOF | solc - --abi
pragma solidity ^0.4.21;
contract CallMeChallenge {
bool public isComplete = false;
function callme() public {
isComplete = true;
}
}
EOF
############## prints ###########################################
======= <stdin>:CallMeChallenge =======
Contract JSON ABI
[{"constant":false,"inputs":[],"name":"callme","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isComplete","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment