Last active
November 23, 2018 20:36
-
-
Save cookie-ag/6ed633a41a303430f4d9026f9bb5ba2d to your computer and use it in GitHub Desktop.
DISH 2018 - Setup and general queries
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
1. Get yourself a docker | |
https://www.docker.com/get-started | |
2. Create a local working directory | |
mkdir contracts | |
3. Download eos docker image | |
docker pull eosio/eos:v1.4.2 | |
4. Run NodeOS | |
(Replace CONTRACTS_DIR:CONTRACTS_DIR to something like /Users/gautamanand/Library/Github/docker/eoscontracts:/tmp/work) | |
docker run --name eosio \ | |
--publish 7777:7777 \ | |
--publish 127.0.0.1:5555:5555 \ | |
--volume CONTRACTS_DIR:CONTRACTS_DIR \ | |
--detach \ | |
eosio/eos:v1.4.2 \ | |
/bin/bash -c \ | |
"keosd --http-server-address=0.0.0.0:5555 & exec nodeos -e -p eosio --plugin eosio::producer_plugin --plugin eosio::chain_api_plugin --plugin eosio::history_plugin --plugin eosio::history_api_plugin --plugin eosio::http_plugin -d /mnt/dev/data --config-dir /mnt/dev/config --http-server-address=0.0.0.0:7777 --access-control-allow-origin=* --contracts-console --http-validate-host=false --filter-on='*'" | |
5. Some simple checks (Seperate Terminal) | |
# This will show logs | |
docker logs --tail 10 eosio | |
#Lets call cleos inside from docker | |
docker exec -it eosio bash | |
cleos --wallet-url http://127.0.0.1:5555 wallet list | |
(expected outcome is empty Wallet []) | |
exit | |
6. Run HTTP API | |
curl http://localhost:7777/v1/chain/get_info | |
7. Aliasing Cleos | |
alias cleos='docker exec -it eosio /opt/eosio/bin/cleos --url http://127.0.0.1:7777 --wallet-url http://127.0.0.1:5555' | |
8. (Optional, Use when required only) Remove a Container | |
docker rm eosio | |
9. Important docker paths | |
docker start eosio | |
docker stop eosio | |
docker exec -it eosio bash | |
10. Install CDT | |
(OSX) | |
brew tap eosio/eosio.cdt | |
brew install eosio.cdt | |
(Optional, Use when required only) brew remove eosio.cdt | |
(Linux) Ubuntu | |
wget https://github.com/eosio/eosio.cdt/releases/download/v1.3.2/eosio.cdt-1.3.2.x86_64.deb | |
sudo apt install ./eosio.cdt-1.3.2.x86_64.deb | |
(Optional, Use when required only) sudo apt remove eosio.cdt | |
(Linux) Centos | |
wget https://github.com/eosio/eosio.cdt/releases/download/v1.3.2/eosio.cdt-1.3.2.x86_64-0.x86_64.rpm | |
sudo yum install ./eosio.cdt-1.3.2.x86_64-0.x86_64.rpm | |
sudo yum remove eosio.cdt | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment