Last active
July 11, 2018 05:10
-
-
Save tpmccallum/9c1efaabaef96e92fb442342f5b6ba5d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prerequisite: mining setup instructions at https://gist.github.com/tpmccallum/8ffc14ce5bf131e366d985412257499d | |
sudo apt-get update | |
sudo apt-get upgrade | |
#Using docker ps -q because the -q flag just returns the ID which you will need later. Running docker ps (without the flag) verbosely returns everything. | |
docker ps -q | |
#Start the python interpreter using the Docker Id from the previous command as an argument | |
docker exec -it dockerContainerIdFromPreviousDockerPsCommandOutput python | |
#Then at the python prompt type | |
from web3 import Web3, HTTPProvider | |
web3 = Web3(HTTPProvider('http://localhost:8545')) | |
web3.eth.getBalance(web3.eth.accounts[0]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment