eosio 節點操作工具 cleos

cleos 是個公開工具, 使用 command line 請求 nodeos 做部署或測試智能合約.

install

Github README

MacOS 安裝 cleos command line

1brew tap eosio/eosio
2brew install eosio

how to use

帳號

1# 查看帳號資訊
2bash-3.2$ cleos -u https://node1.eosphere.io:443 get account accountcreat

錢包

 1# 停止使用錢包
 2bash-3.2$ cleos wallet stop
 3OK
 4
 5# 建立錢包 (console 使用)
 6bash-3.2$ cleos -u https://node1.eosphere.io:443 wallet create -n eos --to-console
 7Creating wallet: eos
 8Save password to use in the future to unlock this wallet.
 9Without password imported keys will not be retrievable.
10"PW5KS..........uoX"
11
12# 匯入private key
13bash-3.2$ cleos wallet import -n eos
14private key: imported private key for: EOS......7hcQ

智能合約

1# Deploy A Smart Contract
2bash-3.2$ cleos -u https://node1.eosphere.io:443 set contract bbingamebac1 /projects/eos-go/contracts/heart bbingamebac1@active

References

  1. Eos (V2.0) / Cleos
comments powered by Disqus