Last active
November 8, 2018 15:30
-
-
Save cookie-ag/b58615d49c0f92cddd26b8eda6053ab9 to your computer and use it in GitHub Desktop.
Revisions
-
Gautam Anand revised this gist
Nov 8, 2018 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ docker pull eosio/eos-dev (b) Start the container from the image -> OSX sudo docker run --rm --name nodeos -d -p 8888:8888 -p 9876:9876 -v /tmp/work:/work -v /tmp/eosio/data:/mnt/dev/data -v /tmp/eosio/config:/mnt/dev/config eosio/eos-dev /bin/bash -c "nodeos -e -p eosio --plugin eosio::wallet_api_plugin --plugin eosio::wallet_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::chain_api_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:8888 --access-control-allow-origin=* --contracts-console" -> WIN 10 docker network create eosdev @@ -19,5 +19,5 @@ sudo docker logs --tail 10 eosio http://localhost:8888/v1/chain/get_info (e) Stop/Start container docker stop nodeos docker start nodeos -
Gautam Anand revised this gist
Nov 8, 2018 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,8 +5,13 @@ the core EOSIO daemon that can be configured with plugins to run a node. Example docker pull eosio/eos-dev (b) Start the container from the image -> OSX sudo docker run --rm --name eosio -d -p 8888:8888 -p 9876:9876 -v /tmp/work:/work -v /tmp/eosio/data:/mnt/dev/data -v /tmp/eosio/config:/mnt/dev/config eosio/eos-dev /bin/bash -c "nodeos -e -p eosio --plugin eosio::wallet_api_plugin --plugin eosio::wallet_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::chain_api_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:8888 --access-control-allow-origin=* --contracts-console" -> WIN 10 docker network create eosdev docker run --name nodeos -d -p 8888:8888 --network eosdev -v C:\eosio\work:/work -v C:\eosio\data:/mnt/dev/data -v C:\eosio\config:/mnt/dev/config eosio/eos-dev /bin/bash -c "nodeos -e -p eosio --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::chain_api_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:8888 --access-control-allow-origin=* --contracts-console --http-validate-host=false" (c) See if this image is working sudo docker logs --tail 10 eosio -
Gautam Anand revised this gist
Jun 9, 2018 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -18,3 +18,6 @@ eosiocpp -o ${contract}.wast ${contract}.cpp (e) Create abi file from hpp eosiocpp -g ${contract}.abi ${contract}.hpp (f) set contract to the block chain cleos set contract $CURRENCY ${contract}.wast ${contract}.abi -
Gautam Anand revised this gist
Jun 9, 2018 . 1 changed file with 9 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,8 +6,15 @@ Before anything go through the communication doc: https://developers.eos.io/eosi alias eosiocpp='docker exec eosio eosiocpp' (b) Create a new contract from template eosiocpp -n ${contract} (c) Access this new contract file docker exec -it $CONTAINERID /bin/bash cd ${contract} -> This is the place where we have our smart contract hpp and cpp file. (d) Create wast/wasm from cpp eosiocpp -o ${contract}.wast ${contract}.cpp (e) Create abi file from hpp eosiocpp -g ${contract}.abi ${contract}.hpp -
Gautam Anand revised this gist
Jun 9, 2018 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,4 +6,8 @@ Before anything go through the communication doc: https://developers.eos.io/eosi alias eosiocpp='docker exec eosio eosiocpp' (b) Create a new contract from template eosiocpp -n g1contract (c) Access this new contract file docker exec -it $CONTAINERID /bin/bash cd tmp/g1contract -
Gautam Anand revised this gist
Jun 9, 2018 . 2 changed files with 13 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,38 +4,35 @@ cleos is a command line tool that interfaces with the REST API exposed by nodeos (a) Create a alias so as cleos is available from terminal alias cleos='docker exec eosio /opt/eosio/bin/cleos --wallet-url http://localhost:8888' (b) Create Key cleos create key (c) Create Wallet/List all wallets cleos wallet create cleos wallet list (d) Open a wallet cleos wallet open (e) Unlock a wallet (Assuming you opened a default) cleos wallet unlock --password XXXXXXXmypassword (f) Relate private keys inside your wallet and your wallet is unlocked cleos wallet import myprivatekeyXXXXX (g) Create Account (First time user should be eosio) cleos create account eosio $ACCOUNTNAME EOSXXXPublicKey EOSXXXPublicKey # This is very useful when creating accounts. Always use eosio as the creator for local development. (h) Get block/account/code or abi info cleos get info cleos get account eosio cleos get code eosio.token (i) Get table for specific contract cleos get table eosio.token eosio accounts (j) Get table for specific contract cleos get currency balance eosio.token eosio SYMBOL This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,4 +3,7 @@ Before anything go through the communication doc: https://developers.eos.io/eosi # We need to setup a tool call eosiocpp (a) Create a alias so as eosiocpp is available from terminal alias eosiocpp='docker exec eosio eosiocpp' (b) Create a new contract from template eosiocpp -n g1contract -
Gautam Anand revised this gist
Jun 9, 2018 . 2 changed files with 10 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,5 +4,8 @@ docker image ls (b) Show containers docker container ls (c) Access docker bash for a container docker exec -it $CONTAINERID /bin/bash (c) More https://www.digitalocean.com/community/tutorials/naming-docker-containers-3-tips-for-beginners This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ Before anything go through the communication doc: https://developers.eos.io/eosio-cpp/docs/communication-model # We need to setup a tool call eosiocpp (a) Create a alias so as eosiocpp is available from terminal alias eosiocpp='docker exec eosio eosiocpp' -
Gautam Anand revised this gist
Jun 9, 2018 . 1 changed file with 14 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,20 @@ cleos wallet unlock --password XXXXXXXmypassword (g) Relate private keys inside your wallet and your wallet is unlocked cleos wallet import myprivatekeyXXXXX (h) Create Account (First time user should be eosio) cleos create account eosio $ACCOUNTNAME EOSXXXPublicKey EOSXXXPublicKey # This is very useful when creating accounts. Always use eosio as the creator for local development. (i) Get block/account/code or abi info cleos get info cleos get account eosio cleos get code eosio.token (j) Get table for specific contract cleos get table eosio.token eosio accounts (h) Get table for specific contract cleos get currency balance eosio.token eosio SYMBOL -
Gautam Anand revised this gist
Jun 9, 2018 . 1 changed file with 6 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -10,8 +10,9 @@ cleos create wallet (c) Create Key cleos create key (d) Create Wallet/List all wallets cleos wallet create cleos wallet list (e) Open a wallet cleos wallet open @@ -22,5 +23,7 @@ cleos wallet unlock --password XXXXXXXmypassword (g) Relate private keys inside your wallet and your wallet is unlocked cleos wallet import myprivatekeyXXXXX (g) Create Account (First time user should be eosio) cleos create account eosio $ACCOUNTNAME EOSXXXPublicKey EOSXXXPublicKey # This is very useful when creating accounts. Always use eosio as the creator for local development. -
Gautam Anand revised this gist
Jun 9, 2018 . 1 changed file with 14 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -10,5 +10,17 @@ cleos create wallet (c) Create Key cleos create key (d) Create Wallet cleos wallet create (e) Open a wallet cleos wallet open (f) Unlock a wallet (Assuming you opened a default) cleos wallet unlock --password XXXXXXXmypassword (g) Relate private keys inside your wallet and your wallet is unlocked cleos wallet import myprivatekeyXXXXX (g) Create Account cleos create account creator mytestaccount EOSXXXPublicKey -
Gautam Anand revised this gist
Jun 9, 2018 . 3 changed files with 25 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ (a) Show images docker image ls (b) Show containers docker container ls (c) More https://www.digitalocean.com/community/tutorials/naming-docker-containers-3-tips-for-beginners This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -10,3 +10,9 @@ sudo docker run --rm --name eosio -d -p 8888:8888 -p 9876:9876 -v /tmp/work:/wor (c) See if this image is working sudo docker logs --tail 10 eosio (d) Got to the web-browser http://localhost:8888/v1/chain/get_info (e) Stop/Start container docker stop eosio docker start eosio This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,14 @@ #Cleos cleos is a command line tool that interfaces with the REST API exposed by nodeos. In order to use cleos you will need to have the end point (IP address and port number) to a nodeos instance and also configure cleos to load the 'eosio::chain_api_plugin'. cleos contains documentation for all of its commands (a) Create a alias so as cleos is available from terminal alias cleos='docker exec eosio /opt/eosio/bin/cleos --wallet-url http://localhost:8888' (b) Create Local Wallet cleos create wallet (c) Create Key cleos create key (d) Create Account cleos create account creator "MYNAME" OwnerKey EOSXXXXXXXXXXX -
Gautam Anand revised this gist
Jun 9, 2018 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,12 @@ #Nodeos the core EOSIO daemon that can be configured with plugins to run a node. Example uses are block production, dedicated API endpoints, and local development. (a) Download IMAGE for Development docker pull eosio/eos-dev (b) Start the container from the image sudo docker run --rm --name eosio -d -p 8888:8888 -p 9876:9876 -v /tmp/work:/work -v /tmp/eosio/data:/mnt/dev/data -v /tmp/eosio/config:/mnt/dev/config eosio/eos-dev /bin/bash -c "nodeos -e -p eosio --plugin eosio::wallet_api_plugin --plugin eosio::wallet_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::chain_api_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:8888 --access-control-allow-origin=* --contracts-console" (c) See if this image is working sudo docker logs --tail 10 eosio -
Gautam Anand revised this gist
Jun 9, 2018 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ # Check API: http://localhost:8888/v1/chain/get_info #Cleos cleos is a command line tool that interfaces with the REST API exposed by nodeos. In order to use cleos you will need to have the end point (IP address and port number) to a nodeos instance and also configure cleos to load the 'eosio::chain_api_plugin'. cleos contains documentation for all of its commands alias cleos='docker exec eosio /opt/eosio/bin/cleos --wallet-url http://localhost:8888' -
Gautam Anand renamed this gist
Jun 9, 2018 . 1 changed file with 1 addition and 7 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,9 @@ #Nodeos the core EOSIO daemon that can be configured with plugins to run a node. Example uses are block production, dedicated API endpoints, and local development. docker pull eosio/eos-dev sudo docker run --rm --name eosio -d -p 8888:8888 -p 9876:9876 -v /tmp/work:/work -v /tmp/eosio/data:/mnt/dev/data -v /tmp/eosio/config:/mnt/dev/config eosio/eos-dev /bin/bash -c "nodeos -e -p eosio --plugin eosio::wallet_api_plugin --plugin eosio::wallet_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::chain_api_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:8888 --access-control-allow-origin=* --contracts-console" sudo docker logs --tail 10 eosio -
Gautam Anand created this gist
Jun 9, 2018 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ #Nodeos docker pull eosio/eos-dev sudo docker run --rm --name eosio -d -p 8888:8888 -p 9876:9876 -v /tmp/work:/work -v /tmp/eosio/data:/mnt/dev/data -v /tmp/eosio/config:/mnt/dev/config eosio/eos-dev /bin/bash -c "nodeos -e -p eosio --plugin eosio::wallet_api_plugin --plugin eosio::wallet_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::chain_api_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:8888 --access-control-allow-origin=* --contracts-console" sudo docker logs --tail 10 eosio # Check API: http://localhost:8888/v1/chain/get_info #Cleos cleos is a command line tool that interfaces with the REST API exposed by nodeos. In order to use cleos you will need to have the end point (IP address and port number) to a nodeos instance and also configure cleos to load the 'eosio::chain_api_plugin'. cleos contains documentation for all of its commands alias cleos='docker exec eosio /opt/eosio/bin/cleos --wallet-url http://localhost:8888'