Skip to content

Instantly share code, notes, and snippets.

@MioGreen
Created August 29, 2018 11:20
Show Gist options
  • Save MioGreen/4305f8afbf18c2c7483240c4aea88957 to your computer and use it in GitHub Desktop.
Save MioGreen/4305f8afbf18c2c7483240c4aea88957 to your computer and use it in GitHub Desktop.
EOS
https://developers.eos.io/eosio-nodeos/docs/docker-quickstart
docker exec -it $(docker ps -aqf "name=eosio") bash
~/eosio-wallet/default.wallet
v1.1.6
➜ docker pull eosio/eos-dev:v1.1.6
➜ 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:v1.1.6 /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 --plugin eosio::wallet_plugin --plugin eosio::wallet_api_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"
➜ alias cleos='docker exec -it eosio /opt/eosio/bin/cleos -u http://0.0.0.0:8888 --wallet-url http://0.0.0.0:8888'
➜ alias eosiocpp=‘docker exec eosio /opt/eosio/bin/eosiocpp’
➜ cleos wallet create
Creating wallet: default
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
"PW5KkuKvp8fwqt2FRHiEzjGfnKRuw75ezi9211ZVZF1TBXA3tPCGb"
➜ cleos create key
Private key: 5Jjra5QJ4zn1XFLyUsf3gjDgvGYJBmTSSMDyBq49H6eW9WcSt8F
Public key: EOS7PoNxRrRVQUoUa5nq7WqFKawp6zRjuDsACKC39nTvibNVKgYgg
➜ cleos create key
Private key: 5KRtZb3g2SVi7WQSprNEPETtvAZmfYYxjUHu7NQnCtxv1FPY4p7
Public key: EOS8B1vgviW7BFLseeDjeXP8gPKXjPJxe2qwk1Jy1xBBrMzXQq27f
Creating wallet: miogreen
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
"PW5JauHpCLJzNaX8WWKc6Jpd1kSXxRWjrM9FEHr3ERcq9uUVDM4yJ"
➜ cleos wallet import --private-key 5Jjra5QJ4zn1XFLyUsf3gjDgvGYJBmTSSMDyBq49H6eW9WcSt8F
➜ !!!! cleos wallet import eosio accoun from config init !!!
eosio = 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3
➜ cleos create account eosio naviaddress EOS7PoNxRrRVQUoUa5nq7WqFKawp6zRjuDsACKC39nTvibNVKgYgg EOS8B1vgviW7BFLseeDjeXP8gPKXjPJxe2qwk1Jy1xBBrMzXQq27f
➜ cleos get account naviaddress -j
➜ eosiocpp -o hello/hello.wast hello/hello.cpp
➜ eosiocpp -g hello/hello.abi hello/hello.cpp
➜ cp YOUR_FORLDER /tmp/work
➜ cleos set contract naviaddress /work/hello -p naviaddress@active
➜ cleos push action naviaddress hi '["user"]' -p naviaddress@active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment