From a8b76a34e80a430eb84e0c63ef5498b20798db48 Mon Sep 17 00:00:00 2001 From: Thomas Cox Date: Thu, 3 May 2018 14:23:12 -0700 Subject: [PATCH 1/8] add the VOTEPRODUCER Ricardian contract partially satisfies #1948 --- .../eosio.system/eosio.system.voteproducer-rc.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 contracts/eosio.system/eosio.system.voteproducer-rc.md diff --git a/contracts/eosio.system/eosio.system.voteproducer-rc.md b/contracts/eosio.system/eosio.system.voteproducer-rc.md new file mode 100644 index 00000000000..670cb99fb44 --- /dev/null +++ b/contracts/eosio.system/eosio.system.voteproducer-rc.md @@ -0,0 +1,13 @@ +#Ricardian Contract for VOTEPRODUCER +This Ricardian contract for the system command VOTEPRODUCER is legally binding and can be used in the event of a dispute. Disputes shall be settled in this system's default arbitration forum. + + +VOTEPRODUCER (voter; array:producers) +Intent: cast a valid vote for up to 30 BP candidates +As an authorized party I {{ signer }} wish to vote on behalf of {{ voter }} in favor of the block producer candidates {{ array:producers }} with a voting weight equal to all tokens currently owned by {{ voter }} and staked for CPU or bandwidth. + +If I am not the beneficial owner of these shares I stipulate I have proof that I’ve been authorized to vote these shares by their beneficial owner(s). + +I stipulate I have not and will not accept anything of value in exchange for these votes, on penalty of confiscation of these tokens, and other penalties. + +I acknowledge that using any system of automatic voting, re-voting, or vote refreshing, or allowing such a system to be used on my behalf or on behalf of another, is forbidden and doing so violates this contract. \ No newline at end of file From 5daafc25fe9c78cf1b4cc7b8fab455b03292e6d8 Mon Sep 17 00:00:00 2001 From: enumivo Date: Tue, 15 May 2018 14:42:34 +0800 Subject: [PATCH 2/8] move ricardian contract --- .../eosio.system.voteproducer-rc.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename contracts/{eosio.system => enumivo.system}/eosio.system.voteproducer-rc.md (100%) diff --git a/contracts/eosio.system/eosio.system.voteproducer-rc.md b/contracts/enumivo.system/eosio.system.voteproducer-rc.md similarity index 100% rename from contracts/eosio.system/eosio.system.voteproducer-rc.md rename to contracts/enumivo.system/eosio.system.voteproducer-rc.md From 8f4964f486356cce6a59b1426af7915b6af23b35 Mon Sep 17 00:00:00 2001 From: enumivo Date: Tue, 15 May 2018 14:43:28 +0800 Subject: [PATCH 3/8] rename ricardian contract --- ...ystem.voteproducer-rc.md => enumivo.system.voteproducer-rc.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename contracts/enumivo.system/{eosio.system.voteproducer-rc.md => enumivo.system.voteproducer-rc.md} (100%) diff --git a/contracts/enumivo.system/eosio.system.voteproducer-rc.md b/contracts/enumivo.system/enumivo.system.voteproducer-rc.md similarity index 100% rename from contracts/enumivo.system/eosio.system.voteproducer-rc.md rename to contracts/enumivo.system/enumivo.system.voteproducer-rc.md From 6ea789b3431584a72a1dfb203a55e6851e99544e Mon Sep 17 00:00:00 2001 From: enumivo Date: Tue, 15 May 2018 14:49:07 +0800 Subject: [PATCH 4/8] move cleos to enu-cli --- programs/{cleos => enu-cli}/CLI11.hpp | 0 programs/{cleos => enu-cli}/CMakeLists.txt | 0 programs/{cleos => enu-cli}/config.hpp.in | 0 programs/{cleos => enu-cli}/eosc.pot | 0 programs/{cleos => enu-cli}/help_text.cpp | 0 programs/{cleos => enu-cli}/help_text.hpp | 0 programs/{cleos => enu-cli}/httpc.cpp | 0 programs/{cleos => enu-cli}/httpc.hpp | 0 programs/{cleos => enu-cli}/localize.hpp | 0 programs/{cleos => enu-cli}/main.cpp | 0 10 files changed, 0 insertions(+), 0 deletions(-) rename programs/{cleos => enu-cli}/CLI11.hpp (100%) rename programs/{cleos => enu-cli}/CMakeLists.txt (100%) rename programs/{cleos => enu-cli}/config.hpp.in (100%) rename programs/{cleos => enu-cli}/eosc.pot (100%) rename programs/{cleos => enu-cli}/help_text.cpp (100%) rename programs/{cleos => enu-cli}/help_text.hpp (100%) rename programs/{cleos => enu-cli}/httpc.cpp (100%) rename programs/{cleos => enu-cli}/httpc.hpp (100%) rename programs/{cleos => enu-cli}/localize.hpp (100%) rename programs/{cleos => enu-cli}/main.cpp (100%) diff --git a/programs/cleos/CLI11.hpp b/programs/enu-cli/CLI11.hpp similarity index 100% rename from programs/cleos/CLI11.hpp rename to programs/enu-cli/CLI11.hpp diff --git a/programs/cleos/CMakeLists.txt b/programs/enu-cli/CMakeLists.txt similarity index 100% rename from programs/cleos/CMakeLists.txt rename to programs/enu-cli/CMakeLists.txt diff --git a/programs/cleos/config.hpp.in b/programs/enu-cli/config.hpp.in similarity index 100% rename from programs/cleos/config.hpp.in rename to programs/enu-cli/config.hpp.in diff --git a/programs/cleos/eosc.pot b/programs/enu-cli/eosc.pot similarity index 100% rename from programs/cleos/eosc.pot rename to programs/enu-cli/eosc.pot diff --git a/programs/cleos/help_text.cpp b/programs/enu-cli/help_text.cpp similarity index 100% rename from programs/cleos/help_text.cpp rename to programs/enu-cli/help_text.cpp diff --git a/programs/cleos/help_text.hpp b/programs/enu-cli/help_text.hpp similarity index 100% rename from programs/cleos/help_text.hpp rename to programs/enu-cli/help_text.hpp diff --git a/programs/cleos/httpc.cpp b/programs/enu-cli/httpc.cpp similarity index 100% rename from programs/cleos/httpc.cpp rename to programs/enu-cli/httpc.cpp diff --git a/programs/cleos/httpc.hpp b/programs/enu-cli/httpc.hpp similarity index 100% rename from programs/cleos/httpc.hpp rename to programs/enu-cli/httpc.hpp diff --git a/programs/cleos/localize.hpp b/programs/enu-cli/localize.hpp similarity index 100% rename from programs/cleos/localize.hpp rename to programs/enu-cli/localize.hpp diff --git a/programs/cleos/main.cpp b/programs/enu-cli/main.cpp similarity index 100% rename from programs/cleos/main.cpp rename to programs/enu-cli/main.cpp From af9e3be2a305481171f72c21c3400a172b355ef6 Mon Sep 17 00:00:00 2001 From: enumivo Date: Tue, 15 May 2018 14:50:46 +0800 Subject: [PATCH 5/8] rename cleos.sh --- Docker/{cleos.sh => enu-cli.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Docker/{cleos.sh => enu-cli.sh} (100%) mode change 100755 => 100644 diff --git a/Docker/cleos.sh b/Docker/enu-cli.sh old mode 100755 new mode 100644 similarity index 100% rename from Docker/cleos.sh rename to Docker/enu-cli.sh From 21c75cb837ee89ac29355a574e50d2d497871db7 Mon Sep 17 00:00:00 2001 From: enumivo Date: Tue, 15 May 2018 14:52:28 +0800 Subject: [PATCH 6/8] rename cleos --- .gitignore | 4 +- CMakeLists.txt | 2 +- Docker/README.md | 14 ++--- EXCHANGE_README.md | 44 +++++++-------- contracts/dice/README.md | 50 ++++++++--------- contracts/enumivo.msig/README.md | 8 +-- plugins/txn_test_gen_plugin/README.md | 4 +- programs/CMakeLists.txt | 2 +- programs/exchange-tutorial-python/README.md | 18 +++--- .../exchange_tutorial.py | 10 ++-- testnet.template | 12 ++-- tests/nodeos_run_test.py | 2 +- tests/p2p_tests/sync/test.sh | 2 +- tests/testUtils.py | 8 +-- tests/trans_sync_across_mixed_cluster_test.sh | 56 +++++++++---------- 15 files changed, 118 insertions(+), 118 deletions(-) diff --git a/.gitignore b/.gitignore index 52a03636b97..0438d710013 100644 --- a/.gitignore +++ b/.gitignore @@ -43,11 +43,11 @@ libraries/wasm-jit/Source/Programs/Disassemble libraries/wasm-jit/Source/Programs/Test libraries/wasm-jit/Source/Programs/wavm -programs/cleos/cleos +programs/enu-cli/enu-cli programs/js_operation_serializer/js_operation_serializer programs/data-dir programs/enu-abigen/enu-abigen -programs/cleos/config.hpp +programs/enu-cli/config.hpp programs/enu-applesedemo/enu-applesedemo programs/enu-launcher/config.hpp programs/enu-launcher/enu-launcher diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d75645b362..383892e1bc7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ set(VERSION_MAJOR 4) set(VERSION_MINOR 0) set(VERSION_PATCH 0) -set( CLI_CLIENT_EXECUTABLE_NAME cleos ) +set( CLI_CLIENT_EXECUTABLE_NAME enu-cli ) set( GUI_CLIENT_EXECUTABLE_NAME eosio ) set( CUSTOM_URL_SCHEME "gcs" ) set( INSTALLER_APP_ID "68ad7005-8eee-49c9-95ce-9eed97e5b347" ) diff --git a/Docker/README.md b/Docker/README.md index bb79b087d6e..574b02223d0 100644 --- a/Docker/README.md +++ b/Docker/README.md @@ -60,22 +60,22 @@ docker volume create --name=keosd-data-volume docker-compose up -d ``` -After `docker-compose up -d`, two services named `nodeosd` and `keosd` will be started. nodeos service would expose ports 8888 and 9876 to the host. keosd service does not expose any port to the host, it is only accessible to cleos when running cleos is running inside the keosd container as described in "Execute cleos commands" section. +After `docker-compose up -d`, two services named `nodeosd` and `keosd` will be started. nodeos service would expose ports 8888 and 9876 to the host. keosd service does not expose any port to the host, it is only accessible to enu-cli when running enu-cli is running inside the keosd container as described in "Execute enu-cli commands" section. -### Execute cleos commands +### Execute enu-cli commands -You can run the `cleos` commands via a bash alias. +You can run the `enu-cli` commands via a bash alias. ```bash -alias cleos='docker-compose exec keosd /opt/eosio/bin/cleos -u http://nodeosd:8888' -cleos get info -cleos get account inita +alias enu-cli='docker-compose exec keosd /opt/eosio/bin/enu-cli -u http://nodeosd:8888' +enu-cli get info +enu-cli get account inita ``` Upload sample exchange contract ```bash -cleos set contract exchange contracts/exchange/exchange.wast contracts/exchange/exchange.abi +enu-cli set contract exchange contracts/exchange/exchange.wast contracts/exchange/exchange.abi ``` If you don't need keosd afterwards, you can stop the keosd service using diff --git a/EXCHANGE_README.md b/EXCHANGE_README.md index 313f84666ea..783188929fd 100644 --- a/EXCHANGE_README.md +++ b/EXCHANGE_README.md @@ -8,7 +8,7 @@ native token conforms to the standard. Configuring Nodeos ------------------ -This tutorial uses the `cleos` commandline tool to query a local `nodeos` server +This tutorial uses the `enu-cli` commandline tool to query a local `nodeos` server which should be connected to an eosio blockchain. `nodeos` will need to be configured with the following plugins: @@ -51,14 +51,14 @@ a couple of minutes, but either way nodeos will keep you posted on the status. ## Initial Condition ``` -./cleos get currency balance enumivo.coin scott EOS +./enu-cli get currency balance enumivo.coin scott EOS 900.0000 EOS ``` We will now deposit some funds to exchange: ``` -./cleos transfer scott exchange "1.0000 EOS" +./enu-cli transfer scott exchange "1.0000 EOS" executed transaction: 5ec797175dd24612acd8fc5a8685fa44caa8646cec0a87b12568db22a3df02fb 256 bytes 8k cycles # enumivo.coin <= enumivo.coin::transfer {"from":"scott","to":"exchange","quantity":"1.0000 EOS","memo":""} >> transfer @@ -80,7 +80,7 @@ irreversible transactions are printed in "green" while unconfirmed transactions can tell whether a transaction is confirmed or not by the first character, '#' for irreversible and '?' for potentially reversable. ``` -./cleos get actions exchange +./enu-cli get actions exchange # seq when contract::action => receiver trx id... args ================================================================================================================ # 0 2018-04-29T01:09:45.000 enumivo.coin::transfer => exchange 5ec79717... {"from":"scott","to":"exchange","quantity":"1.0000 EOS","mem... @@ -89,7 +89,7 @@ can tell whether a transaction is confirmed or not by the first character, '#' f Do a few more transfers: ``` -./cleos get actions exchange +./enu-cli get actions exchange # seq when contract::action => receiver trx id... args ================================================================================================================ # 0 2018-04-29T01:09:45.000 enumivo.coin::transfer => exchange 5ec79717... {"from":"scott","to":"exchange","quantity":"1.0000 EOS","mem... @@ -102,11 +102,11 @@ The last transfer is still pending, waiting on irreversibility. The "seq" column represents the index of actions for your specific account, it will always increment as new relevant actions are added. -The `cleos get actions` command allows you some control over which actions are fetched, you can view the help for this command with `-h` +The `enu-cli get actions` command allows you some control over which actions are fetched, you can view the help for this command with `-h` ``` -./cleos get actions -h -Usage: ./cleos get actions [OPTIONS] account_name [pos] [offset] +./enu-cli get actions -h +Usage: ./enu-cli get actions [OPTIONS] account_name [pos] [offset] Positionals: account_name TEXT name of account to query on @@ -123,7 +123,7 @@ Positionals: To get only the last action you would do the following... ``` -./cleos get actions exchange -1 -1 +./enu-cli get actions exchange -1 -1 # seq when contract::action => receiver trx id... args ================================================================================================================ # 2 2018-04-29T01:19:54.000 enumivo.coin::transfer => exchange 213f3797... {"from":"scott","to":"exchange","quantity":"1.0000 EOS","mem... @@ -141,7 +141,7 @@ microservice will need to track the seq number of the "last processed seq". For We pass pos=1 and offset=0 to get the range [1,1+0] or [1,1]. ``` -./cleos get actions exchange 1 0 +./enu-cli get actions exchange 1 0 # seq when contract::action => receiver trx id... args ================================================================================================================ # 1 2018-04-29T01:16:25.000 enumivo.coin::transfer => exchange 2269828c... {"from":"scott","to":"exchange","quantity":"1.0000 EOS","mem... @@ -151,20 +151,20 @@ We can call this in a loop procesing each confirmed action (those starting with we find an unconfirmed action (starting with ?). ``` -./cleos get actions exchange 3 0 +./enu-cli get actions exchange 3 0 # seq when contract::action => receiver trx id... args ================================================================================================================ ``` ### Machine Readable Account History (JSON) -So far this tutorial has focused on using `cleos` to fetch and display the history, but cleos is merely a light-weight -wrapper around a json-rpc interface. `cleos` can dump the raw json returned from the json-rpc request or you can make +So far this tutorial has focused on using `enu-cli` to fetch and display the history, but enu-cli is merely a light-weight +wrapper around a json-rpc interface. `enu-cli` can dump the raw json returned from the json-rpc request or you can make your own json-rpc request. Here is the JSON returned when querying sequence 2. ``` -./cleos get actions exchange 2 0 -j +./enu-cli get actions exchange 2 0 -j { "actions": [{ "global_action_seq": 32856, @@ -245,7 +245,7 @@ then you may process "false deposits". Now that we have received 3 deposits we should see that the exchange has a balance of 3.0000 EOS. ``` -./cleos get currency balance enumivo.coin exchange EOS +./enu-cli get currency balance enumivo.coin exchange EOS 3.0000 EOS ``` @@ -254,13 +254,13 @@ Now that we have received 3 deposits we should see that the exchange has a balan (note, while generating this tutorial scott deposited another 1.0000 EOS (seq 3) for total exchange balance of 4.0000 EOS.) When a user requests a withdraw from your exchange they will need to provide you with their eosio account name and -the amount to be withdrawn. You can then run the cleos command which will interact with the "unlocked" wallet +the amount to be withdrawn. You can then run the enu-cli command which will interact with the "unlocked" wallet running on `nodeos` which should only enable localhost connections. More advanced usage would have a separate key-server (`keos`), but that will be covered later. Lets assume scott wants to withdraw `1.0000 EOS`: ``` -./cleos transfer exchange scott "1.0000 EOS" +./enu-cli transfer exchange scott "1.0000 EOS" executed transaction: 93e785202e7502bb1383ad10e786cc20f7dd738d3fd3da38712b3fb38fb9af26 256 bytes 8k cycles # enumivo.coin <= enumivo.coin::transfer {"from":"exchange","to":"scott","quantity":"1.0000 EOS","memo":""} >> transfer @@ -278,7 +278,7 @@ sender ('exchange') processed it and so did the receiver ('scott') and all 3 con state transitions based upon the action. ``` -./cleos get actions exchange -1 -8 +./enu-cli get actions exchange -1 -8 # seq when contract::action => receiver trx id... args ================================================================================================================ # 0 2018-04-29T01:09:45.000 enumivo.coin::transfer => exchange 5ec79717... {"from":"scott","to":"exchange","quantity":"1.0000 EOS","mem... @@ -302,10 +302,10 @@ the transaction to expire. Every transaction has an "expiration" after which the moved past the expiration time you can safely mark your attempted withdaw as failed and not worry about it "floating around the ether" to be applied when you least expect. -By default cleos sets an expiration window of just 2 minutes. This is long enough to allow all 21 producers an opportunity to include the transaction. +By default enu-cli sets an expiration window of just 2 minutes. This is long enough to allow all 21 producers an opportunity to include the transaction. ``` - ./cleos transfer exchange scott "1.0000 EOS" -j -d + ./enu-cli transfer exchange scott "1.0000 EOS" -j -d { "expiration": "2018-04-29T01:58:12", "ref_block_num": 37282, @@ -318,9 +318,9 @@ By default cleos sets an expiration window of just 2 minutes. This is long enou ``` -Your microservice can query the last irreversible block number and the head block time using cleos. +Your microservice can query the last irreversible block number and the head block time using enu-cli. ``` -./cleos get info +./enu-cli get info { "server_version": "0812f84d", "head_block_num": 39313, diff --git a/contracts/dice/README.md b/contracts/dice/README.md index 331e5832e62..63fff5ebc23 100644 --- a/contracts/dice/README.md +++ b/contracts/dice/README.md @@ -43,7 +43,7 @@ Potential Vulnerabilities - under normal operation of DPOS chains there are few if any chain reorganizations -Example game session using cleos +Example game session using enu-cli ------- #### Prerequisites * Wallet must be unlock and have at least the following private keys @@ -53,72 +53,72 @@ Example game session using cleos ##### Upload bios contract ````bash -cleos set contract eosio build/contracts/enumivo.bios -p eosio +enu-cli set contract eosio build/contracts/enumivo.bios -p eosio ```` ##### Ceate enumivo.coin account ````bash -cleos create account eosio enumivo.coin EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 +enu-cli create account eosio enumivo.coin EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 ```` ##### Set enumivo.coin contract to enumivo.coin account ````bash -cleos set contract enumivo.coin build/contracts/enumivo.coin -p enumivo.coin +enu-cli set contract enumivo.coin build/contracts/enumivo.coin -p enumivo.coin ```` ##### Create dice account ````bash -cleos create account eosio dice EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 +enu-cli create account eosio dice EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 ```` ##### Set dice contract to dice account ````bash -cleos set contract dice build/contracts/dice -p dice +enu-cli set contract dice build/contracts/dice -p dice ```` ##### Create native EOS token ````bash -cleos push action enumivo.coin create '[ "eosio", "1000000000.0000 EOS", 0, 0, 0]' -p enumivo.coin +enu-cli push action enumivo.coin create '[ "eosio", "1000000000.0000 EOS", 0, 0, 0]' -p enumivo.coin ```` ##### Create alice account ````bash -cleos create account eosio alice EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 +enu-cli create account eosio alice EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 ```` ##### Create bob account ````bash -cleos create account eosio bob EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 +enu-cli create account eosio bob EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 ```` ##### Issue 1000 EOS to alice ````bash -cleos push action enumivo.coin issue '[ "alice", "1000.0000 EOS", "" ]' -p eosio +enu-cli push action enumivo.coin issue '[ "alice", "1000.0000 EOS", "" ]' -p eosio ```` ##### Issue 1000 EOS to bob ````bash -cleos push action enumivo.coin issue '[ "bob", "1000.0000 EOS", "" ]' -p eosio +enu-cli push action enumivo.coin issue '[ "bob", "1000.0000 EOS", "" ]' -p eosio ```` ##### Allow dice contract to make transfers on alice behalf (deposit) ````bash -cleos set account permission alice active '{"threshold": 1,"keys": [{"key": "EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4","weight": 1}],"accounts": [{"permission":{"actor":"dice","permission":"active"},"weight":1}]}' owner -p alice +enu-cli set account permission alice active '{"threshold": 1,"keys": [{"key": "EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4","weight": 1}],"accounts": [{"permission":{"actor":"dice","permission":"active"},"weight":1}]}' owner -p alice ```` ##### Allow dice contract to make transfers on bob behalf (deposit) ````bash -cleos set account permission bob active '{"threshold": 1,"keys": [{"key": "EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4","weight": 1}],"accounts": [{"permission":{"actor":"dice","permission":"active"},"weight":1}]}' owner -p bob +enu-cli set account permission bob active '{"threshold": 1,"keys": [{"key": "EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4","weight": 1}],"accounts": [{"permission":{"actor":"dice","permission":"active"},"weight":1}]}' owner -p bob ```` ##### Alice deposits 100 EOS into the dice contract ````bash -cleos push action dice deposit '[ "alice", "100.0000 EOS" ]' -p alice +enu-cli push action dice deposit '[ "alice", "100.0000 EOS" ]' -p alice ```` ##### Bob deposits 100 EOS into the dice contract ````bash -cleos push action dice deposit '[ "bob", "100.0000 EOS" ]' -p bob +enu-cli push action dice deposit '[ "bob", "100.0000 EOS" ]' -p bob ```` ##### Alice generates a secret @@ -135,7 +135,7 @@ d533f24d6f28ddcef3f066474f7b8355383e485681ba8e793e037f5cf36e4883 ##### Alice bets 3 EOS ````bash -cleos push action dice offerbet '[ "3.0000 EOS", "alice", "d533f24d6f28ddcef3f066474f7b8355383e485681ba8e793e037f5cf36e4883" ]' -p alice +enu-cli push action dice offerbet '[ "3.0000 EOS", "alice", "d533f24d6f28ddcef3f066474f7b8355383e485681ba8e793e037f5cf36e4883" ]' -p alice ```` ##### Bob generates a secret @@ -152,12 +152,12 @@ echo -n '15fe76d25e124b08feb835f12e00a879bd15666a33786e64b655891fba7d6c12' | xxd ##### Bob also bets 3 EOS (a game is started) ````bash -cleos push action dice offerbet '[ "3.0000 EOS", "bob", "50ed53fcdaf27f88d51ea4e835b1055efe779bb87e6cfdff47d28c88ffb27129" ]' -p bob +enu-cli push action dice offerbet '[ "3.0000 EOS", "bob", "50ed53fcdaf27f88d51ea4e835b1055efe779bb87e6cfdff47d28c88ffb27129" ]' -p bob ```` ##### Dice contract tables right after the game started ````bash -cleos get table dice dice account +enu-cli get table dice dice account ```` ````json { @@ -178,7 +178,7 @@ cleos get table dice dice account ```` ````bash -cleos get table dice dice game +enu-cli get table dice dice game ```` ````json { @@ -202,12 +202,12 @@ cleos get table dice dice game ##### Bob reveals his secret ````bash -cleos push action dice reveal '[ "50ed53fcdaf27f88d51ea4e835b1055efe779bb87e6cfdff47d28c88ffb27129", "15fe76d25e124b08feb835f12e00a879bd15666a33786e64b655891fba7d6c12" ]' -p bob +enu-cli push action dice reveal '[ "50ed53fcdaf27f88d51ea4e835b1055efe779bb87e6cfdff47d28c88ffb27129", "15fe76d25e124b08feb835f12e00a879bd15666a33786e64b655891fba7d6c12" ]' -p bob ```` ##### Game table after bob revealed (now the game has a deadline for alice to reveal) ````bash -cleos get table dice dice game +enu-cli get table dice dice game ```` ````json { @@ -231,12 +231,12 @@ cleos get table dice dice game ##### Alice reveals her secret (the winner is determined, the game is removed) ````bash -cleos push action dice reveal '[ "d533f24d6f28ddcef3f066474f7b8355383e485681ba8e793e037f5cf36e4883", "28349b1d4bcdc9905e4ef9719019e55743c84efa0c5e9a0b077f0b54fcd84905" ]' -p alice +enu-cli push action dice reveal '[ "d533f24d6f28ddcef3f066474f7b8355383e485681ba8e793e037f5cf36e4883", "28349b1d4bcdc9905e4ef9719019e55743c84efa0c5e9a0b077f0b54fcd84905" ]' -p alice ```` ##### Balance of the accounts after game ends ````bash -cleos get table dice dice account +enu-cli get table dice dice account ```` ````json { @@ -258,12 +258,12 @@ cleos get table dice dice account ##### Alice withdraw from her dice account 103 EOS ````bash -cleos push action dice withdraw '[ "alice", "103.0000 EOS" ]' -p alice +enu-cli push action dice withdraw '[ "alice", "103.0000 EOS" ]' -p alice ```` ##### Balance of alice after withdraw ````bash -cleos get currency balance enumivo.coin alice eos +enu-cli get currency balance enumivo.coin alice eos 1003.0000 EOS ```` diff --git a/contracts/enumivo.msig/README.md b/contracts/enumivo.msig/README.md index 78982d10dd4..e7f50b28afd 100644 --- a/contracts/enumivo.msig/README.md +++ b/contracts/enumivo.msig/README.md @@ -52,14 +52,14 @@ Prerequisites: One user creates a proposal: ```` -$ cleos multisig propose test '[{"actor": "treasury", "permission": "active"}]' '[{"actor": "treasury", "permission": "active"}]' enumivo.coin issue '{"to": "tester", "quantity": "1000.0000 EOS", "memo": ""}' -p tester +$ enu-cli multisig propose test '[{"actor": "treasury", "permission": "active"}]' '[{"actor": "treasury", "permission": "active"}]' enumivo.coin issue '{"to": "tester", "quantity": "1000.0000 EOS", "memo": ""}' -p tester executed transaction: e26f3a3a7cba524a7b15a0b6c77c7daa73d3ba9bf84e83f9c2cdf27fcb183d61 336 bytes 107520 cycles # enumivo.msig <= enumivo.msig::propose {"proposer":"tester","proposal_name":"test","requested":[{"actor":"treasury","permission":"active"}]... ```` Another user reviews the transaction: ```` -$ cleos multisig review tester test -p treasury +$ enu-cli multisig review tester test -p treasury { "proposal_name": "test", "requested_approvals": [{ @@ -100,14 +100,14 @@ $ cleos multisig review tester test -p treasury And then approves it: ```` -$ cleos multisig approve tester test '{"actor": "treasury", "permission": "active"}' -p treasury +$ enu-cli multisig approve tester test '{"actor": "treasury", "permission": "active"}' -p treasury executed transaction: 475970a4b0016368d0503d1ce01577376f91f5a5ba63dd4353683bd95101b88d 256 bytes 108544 cycles # enumivo.msig <= enumivo.msig::approve {"proposer":"tester","proposal_name":"test","level":{"actor":"treasury","permission":"active"}} ```` First user initiates execution: ```` -$ cleos multisig exec tester test -p tester +$ enu-cli multisig exec tester test -p tester executed transaction: 64e5eaceb77362694055f572ae35876111e87b637a55250de315b1b55e56d6c2 248 bytes 109568 cycles # enumivo.msig <= enumivo.msig::exec {"proposer":"tester","proposal_name":"test","executer":"tester"} ```` diff --git a/plugins/txn_test_gen_plugin/README.md b/plugins/txn_test_gen_plugin/README.md index fef868345c1..49141a39794 100644 --- a/plugins/txn_test_gen_plugin/README.md +++ b/plugins/txn_test_gen_plugin/README.md @@ -59,8 +59,8 @@ $ ./nodeos -d ~/eos.data/generator_node --config-dir ~/eos.data/generator_node - ### Create a wallet on the non-producer and set bios contract ```bash -$ ./cleos wallet create -$ ./cleos set contract eosio ~/eos/build.release/contracts/enumivo.bios/ +$ ./enu-cli wallet create +$ ./enu-cli set contract eosio ~/eos/build.release/contracts/enumivo.bios/ ``` ### Initialize the accounts txn_test_gen_plugin uses diff --git a/programs/CMakeLists.txt b/programs/CMakeLists.txt index 8bc716f974f..95f0dc31475 100644 --- a/programs/CMakeLists.txt +++ b/programs/CMakeLists.txt @@ -1,5 +1,5 @@ add_subdirectory( nodeos ) -add_subdirectory( cleos ) +add_subdirectory( enu-cli ) add_subdirectory( keosd ) add_subdirectory( enu-launcher ) add_subdirectory( enu-applesedemo ) diff --git a/programs/exchange-tutorial-python/README.md b/programs/exchange-tutorial-python/README.md index 52bf287f104..a9d438da47b 100644 --- a/programs/exchange-tutorial-python/README.md +++ b/programs/exchange-tutorial-python/README.md @@ -13,24 +13,24 @@ Deleting the `transactions.txt` file will prevent replay from working. ### Create wallet -`cleos wallet create` +`enu-cli wallet create` ### Create account steps -`cleos create key` +`enu-cli create key` -`cleos create key` +`enu-cli create key` -`cleos wallet import ` +`enu-cli wallet import ` -`cleos wallet import ` +`enu-cli wallet import ` -`cleos create account eosio ` +`enu-cli create account eosio ` ### Set contract steps -`cleos set contract enumivo.coin /contracts/enumivo.coin -p enumivo.coin@active` +`enu-cli set contract enumivo.coin /contracts/enumivo.coin -p enumivo.coin@active` ### Create EOS token steps -`cleos push action enumivo.coin create '{"issuer": "enumivo.coin", "maximum_supply": "100000.0000 EOS", "can_freeze": 1, "can_recall": 1, "can_whitelist": 1}' -p enumivo.coin@active` +`enu-cli push action enumivo.coin create '{"issuer": "enumivo.coin", "maximum_supply": "100000.0000 EOS", "can_freeze": 1, "can_recall": 1, "can_whitelist": 1}' -p enumivo.coin@active` ### Issue token steps -`cleos push action enumivo.coin issue '{"to": "scott", "quantity": "900.0000 EOS", "memo": "testing"}' -p enumivo.coin@active` +`enu-cli push action enumivo.coin issue '{"to": "scott", "quantity": "900.0000 EOS", "memo": "testing"}' -p enumivo.coin@active` diff --git a/programs/exchange-tutorial-python/exchange_tutorial.py b/programs/exchange-tutorial-python/exchange_tutorial.py index 06359402ceb..b5d07b0304a 100644 --- a/programs/exchange-tutorial-python/exchange_tutorial.py +++ b/programs/exchange-tutorial-python/exchange_tutorial.py @@ -30,7 +30,7 @@ def main(): def monitor_exchange(): action_num = get_last_action() + 1 - results = cleos('get actions exchange {} 0 -j'.format(action_num)) + results = enu-cli('get actions exchange {} 0 -j'.format(action_num)) results = json.loads(results.stdout) action_list = results['actions'] @@ -64,7 +64,7 @@ def update_balance(action, to): def transfer(to, quantity): if quantity[:-4] != ' EOS': quantity += ' EOS' - results = cleos('transfer exchange {} "{}" {} -j'.format(to, quantity, KEY_TO_INTERNAL_ACCOUNT)) + results = enu-cli('transfer exchange {} "{}" {} -j'.format(to, quantity, KEY_TO_INTERNAL_ACCOUNT)) transaction_info = json.loads(str(results.stdout, 'utf-8')) transaction_id = transaction_info['transaction_id'] @@ -133,12 +133,12 @@ def is_valid_withdrawal(action): print('Invalid withdrawal') return False -def cleos(args): +def enu-cli(args): if isinstance(args, list): - command = ['./cleos'] + command = ['./enu-cli'] command.extend(args) else: - command = './cleos ' + args + command = './enu-cli ' + args results = subprocess.run(command, stdin=PIPE, stdout=PIPE, stderr=PIPE, shell=True, check=True) return results diff --git a/testnet.template b/testnet.template index ccd9767b3ee..91a52ef7ec3 100644 --- a/testnet.template +++ b/testnet.template @@ -44,9 +44,9 @@ sleep 1 ecmd () { echo ===== Start: $step ============ >> $logfile - echo executing: cleos --wallet-url $wdurl --url http://$bioshost:$biosport $* | tee -a $logfile + echo executing: enu-cli --wallet-url $wdurl --url http://$bioshost:$biosport $* | tee -a $logfile echo ----------------------- >> $logfile - programs/cleos/cleos --wallet-url $wdurl --url http://$bioshost:$biosport $* >> $logfile 2>&1 + programs/enu-cli/enu-cli --wallet-url $wdurl --url http://$bioshost:$biosport $* >> $logfile 2>&1 echo ==== End: $step ============== >> $logfile step=$(($step + 1)) } @@ -89,18 +89,18 @@ ecmd set contract eosio contracts/enumivo.bios contracts/enumivo.bios/enumivo.bi #the setprods.json argument cannot pass through the function call due to embedded quotes echo ===== Start: $step ============ >> $logfile -echo executing: cleos --wallet-url $wdurl --url http://$bioshost:$biosport push action eosio setprods setprods.json -p eosio@active | tee -a $logfile +echo executing: enu-cli --wallet-url $wdurl --url http://$bioshost:$biosport push action eosio setprods setprods.json -p eosio@active | tee -a $logfile echo ----------------------- >> $logfile -programs/cleos/cleos --wallet-url $wdurl --url http://$bioshost:$biosport push action eosio setprods setprods.json -p eosio@active >> $logfile 2>&1 +programs/enu-cli/enu-cli --wallet-url $wdurl --url http://$bioshost:$biosport push action eosio setprods setprods.json -p eosio@active >> $logfile 2>&1 echo ==== End: $step ============== >> $logfile step=$(($step + 1)) ecmd set contract eosio contracts/enumivo.system contracts/enumivo.system/enumivo.system.wast contracts/enumivo.system/enumivo.system.abi echo ===== Start: $step ============ >> $logfile -echo executing: cleos --wallet-url $wdurl --url http://$bioshost:$biosport push action eosio issue '{"to":"eosio","quantity":"1000000000.0000 EOS","memo":"init"}' -p eosio@active | tee -a $logfile +echo executing: enu-cli --wallet-url $wdurl --url http://$bioshost:$biosport push action eosio issue '{"to":"eosio","quantity":"1000000000.0000 EOS","memo":"init"}' -p eosio@active | tee -a $logfile echo ----------------------- >> $logfile -programs/cleos/cleos --wallet-url $wdurl --url http://$bioshost:$biosport push action eosio issue '{"to":"eosio","quantity":"1000000000.0000 EOS","memo":"init"}' -p eosio@active >> $logfile 2>&1 +programs/enu-cli/enu-cli --wallet-url $wdurl --url http://$bioshost:$biosport push action eosio issue '{"to":"eosio","quantity":"1000000000.0000 EOS","memo":"init"}' -p eosio@active >> $logfile 2>&1 echo ==== End: $step ============== >> $logfile step=$(($step + 1)) diff --git a/tests/nodeos_run_test.py b/tests/nodeos_run_test.py index 1f02c4de85c..6cd0c391b08 100755 --- a/tests/nodeos_run_test.py +++ b/tests/nodeos_run_test.py @@ -75,7 +75,7 @@ def cmdError(name, cmdCode=0, exitNow=False): killWallet=not dontKill WalletdName="keosd" -ClientName="cleos" +ClientName="enu-cli" # testUtils.Utils.setMongoSyncTime(50) try: diff --git a/tests/p2p_tests/sync/test.sh b/tests/p2p_tests/sync/test.sh index 350c595945f..e71d5a1c86a 100755 --- a/tests/p2p_tests/sync/test.sh +++ b/tests/p2p_tests/sync/test.sh @@ -54,7 +54,7 @@ fi total_nodes="${total_nodes:-`echo $pnodes`}" launcherPath="programs/enu-launcher/enu-launcher" -clientPath="programs/cleos/cleos" +clientPath="programs/enu-cli/enu-cli" rm -rf etc/eosio/node_* var/lib/* stage ls -l etc/eosio var/lib diff --git a/tests/testUtils.py b/tests/testUtils.py index 0b3aa1626ea..805ff7e1791 100755 --- a/tests/testUtils.py +++ b/tests/testUtils.py @@ -22,7 +22,7 @@ class Utils: Debug=False FNull = open(os.devnull, 'w') - EosClientPath="programs/cleos/cleos" + EosClientPath="programs/enu-cli/enu-cli" EosWalletName="keosd" EosWalletPath="programs/keosd/"+ EosWalletName @@ -676,7 +676,7 @@ def getAccountsByKey(self, key): Utils.Print("ERROR: Exception during accounts by key retrieval. %s" % (msg)) return None - # Get actions mapped to an account (cleos get actions) + # Get actions mapped to an account (enu-cli get actions) def getActions(self, account, pos=-1, offset=-1): assert(isinstance(account, Account)) assert(isinstance(pos, int)) @@ -717,7 +717,7 @@ def getServantsArr(self, name): return servants def getAccountEosBalanceStr(self, scope): - """Returns EOS currency0000 account balance from cleos get table command. Returned balance is string following syntax "98.0311 EOS". """ + """Returns EOS currency0000 account balance from enu-cli get table command. Returned balance is string following syntax "98.0311 EOS". """ assert isinstance(scope, str) if not self.enableMongo: amount=self.getNodeAccountBalance("enumivo.coin", scope) @@ -737,7 +737,7 @@ def getAccountEosBalanceStr(self, scope): return None def getAccountEosBalance(self, scope): - """Returns EOS currency0000 account balance from cleos get table command. Returned balance is an integer e.g. 980311. """ + """Returns EOS currency0000 account balance from enu-cli get table command. Returned balance is an integer e.g. 980311. """ balanceStr=self.getAccountEosBalanceStr(scope) balanceStr=balanceStr.split()[0] balance=int(decimal.Decimal(balanceStr[1:])*10000) diff --git a/tests/trans_sync_across_mixed_cluster_test.sh b/tests/trans_sync_across_mixed_cluster_test.sh index df420b3c4ca..8f977052592 100755 --- a/tests/trans_sync_across_mixed_cluster_test.sh +++ b/tests/trans_sync_across_mixed_cluster_test.sh @@ -79,8 +79,8 @@ cleanup() # result stored in HEAD_BLOCK_NUM getHeadBlockNum() { - INFO="$(programs/cleos/cleos get info)" - verifyErrorCode "cleos get info" + INFO="$(programs/enu-cli/enu-cli get info)" + verifyErrorCode "enu-cli get info" HEAD_BLOCK_NUM="$(echo "$INFO" | awk '/head_block_num/ {print $2}')" # remove trailing coma HEAD_BLOCK_NUM=${HEAD_BLOCK_NUM%,} @@ -126,22 +126,22 @@ echo endPort: $endPort port2=$startPort while [ $port2 -ne $endport ]; do echo Request block 1 from node on port $port2 - TRANS_INFO="$(programs/cleos/cleos --port $port2 get block 1)" - verifyErrorCode "cleos get block" + TRANS_INFO="$(programs/enu-cli/enu-cli --port $port2 get block 1)" + verifyErrorCode "enu-cli get block" port2=`expr $port2 + 1` done # create 3 keys -KEYS="$(programs/cleos/cleos create key)" -verifyErrorCode "cleos create key" +KEYS="$(programs/enu-cli/enu-cli create key)" +verifyErrorCode "enu-cli create key" PRV_KEY1="$(echo "$KEYS" | awk '/Private/ {print $3}')" PUB_KEY1="$(echo "$KEYS" | awk '/Public/ {print $3}')" -KEYS="$(programs/cleos/cleos create key)" -verifyErrorCode "cleos create key" +KEYS="$(programs/enu-cli/enu-cli create key)" +verifyErrorCode "enu-cli create key" PRV_KEY2="$(echo "$KEYS" | awk '/Private/ {print $3}')" PUB_KEY2="$(echo "$KEYS" | awk '/Public/ {print $3}')" -KEYS="$(programs/cleos/cleos create key)" -verifyErrorCode "cleos create key" +KEYS="$(programs/enu-cli/enu-cli create key)" +verifyErrorCode "enu-cli create key" PRV_KEY3="$(echo "$KEYS" | awk '/Private/ {print $3}')" PUB_KEY3="$(echo "$KEYS" | awk '/Public/ {print $3}')" if [ -z "$PRV_KEY1" ] || [ -z "$PRV_KEY2" ] || [ -z "$PRV_KEY3" ] || [ -z "$PUB_KEY1" ] || [ -z "$PUB_KEY2" ] || [ -z "$PUB_KEY3" ]; then @@ -150,21 +150,21 @@ fi # create wallet for inita -PASSWORD_INITA="$(programs/cleos/cleos wallet create --name inita)" -verifyErrorCode "cleos wallet create" +PASSWORD_INITA="$(programs/enu-cli/enu-cli wallet create --name inita)" +verifyErrorCode "enu-cli wallet create" # strip out password from output PASSWORD_INITA="$(echo "$PASSWORD_INITA" | awk '/PW/ {print $1}')" # remove leading/trailing quotes PASSWORD_INITA=${PASSWORD_INITA#\"} PASSWORD_INITA=${PASSWORD_INITA%\"} -programs/cleos/cleos wallet import --name inita $INITA_PRV_KEY -verifyErrorCode "cleos wallet import" -programs/cleos/cleos wallet import --name inita $PRV_KEY1 -verifyErrorCode "cleos wallet import" -programs/cleos/cleos wallet import --name inita $PRV_KEY2 -verifyErrorCode "cleos wallet import" -programs/cleos/cleos wallet import --name inita $PRV_KEY3 -verifyErrorCode "cleos wallet import" +programs/enu-cli/enu-cli wallet import --name inita $INITA_PRV_KEY +verifyErrorCode "enu-cli wallet import" +programs/enu-cli/enu-cli wallet import --name inita $PRV_KEY1 +verifyErrorCode "enu-cli wallet import" +programs/enu-cli/enu-cli wallet import --name inita $PRV_KEY2 +verifyErrorCode "enu-cli wallet import" +programs/enu-cli/enu-cli wallet import --name inita $PRV_KEY3 +verifyErrorCode "enu-cli wallet import" # # Account and Transfer Tests @@ -172,12 +172,12 @@ verifyErrorCode "cleos wallet import" # create new account echo Creating account testera -ACCOUNT_INFO="$(programs/cleos/cleos create account inita testera $PUB_KEY1 $PUB_KEY3)" -verifyErrorCode "cleos create account" +ACCOUNT_INFO="$(programs/enu-cli/enu-cli create account inita testera $PUB_KEY1 $PUB_KEY3)" +verifyErrorCode "enu-cli create account" waitForNextBlock # verify account created -ACCOUNT_INFO="$(programs/cleos/cleos get account testera)" -verifyErrorCode "cleos get account" +ACCOUNT_INFO="$(programs/enu-cli/enu-cli get account testera)" +verifyErrorCode "enu-cli get account" count=`echo $ACCOUNT_INFO | grep -c "staked_balance"` if [ $count == 0 ]; then error "FAILURE - account creation failed: $ACCOUNT_INFO" @@ -189,8 +189,8 @@ echo Producing node port: $pPort while [ $port -ne $endport ]; do echo Sending transfer request to node on port $port. - TRANSFER_INFO="$(programs/cleos/cleos transfer inita testera 975321 "test transfer")" - verifyErrorCode "cleos transfer" + TRANSFER_INFO="$(programs/enu-cli/enu-cli transfer inita testera 975321 "test transfer")" + verifyErrorCode "enu-cli transfer" getTransactionId "$TRANSFER_INFO" echo Transaction id: $TRANS_ID @@ -200,8 +200,8 @@ while [ $port -ne $endport ]; do port2=$startPort while [ $port2 -ne $endport ]; do echo Verifying transaction exists on node on port $port2 - TRANS_INFO="$(programs/cleos/cleos --port $port2 get transaction $TRANS_ID)" - verifyErrorCode "cleos get transaction trans_id of <$TRANS_INFO> from node on port $port2" + TRANS_INFO="$(programs/enu-cli/enu-cli --port $port2 get transaction $TRANS_ID)" + verifyErrorCode "enu-cli get transaction trans_id of <$TRANS_INFO> from node on port $port2" port2=`expr $port2 + 1` done From a04bf0d362f29a581a3466d161df6a99b9a55da6 Mon Sep 17 00:00:00 2001 From: enumivo Date: Tue, 15 May 2018 14:56:30 +0800 Subject: [PATCH 7/8] rename cleos --- Docker/enu-cli.sh | 8 ++++---- programs/enu-cli/CMakeLists.txt | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Docker/enu-cli.sh b/Docker/enu-cli.sh index 26d2e38e8ea..27e1c922a81 100644 --- a/Docker/enu-cli.sh +++ b/Docker/enu-cli.sh @@ -1,14 +1,14 @@ #!/bin/bash # Usage: -# Go into cmd loop: sudo ./cleos.sh -# Run single cmd: sudo ./cleos.sh +# Go into cmd loop: sudo ./enu-cli.sh +# Run single cmd: sudo ./enu-cli.sh -PREFIX="docker exec docker_nodeos_1 cleos" +PREFIX="docker exec docker_nodeos_1 enu-cli" if [ -z $1 ] ; then while : do - read -e -p "cleos " cmd + read -e -p "enu-cli " cmd history -s "$cmd" $PREFIX $cmd done diff --git a/programs/enu-cli/CMakeLists.txt b/programs/enu-cli/CMakeLists.txt index 938032d1f19..ed77f6592db 100644 --- a/programs/enu-cli/CMakeLists.txt +++ b/programs/enu-cli/CMakeLists.txt @@ -1,4 +1,4 @@ -add_executable( cleos main.cpp httpc.cpp help_text.cpp localize.hpp config.hpp CLI11.hpp) +add_executable( enu-cli main.cpp httpc.cpp help_text.cpp localize.hpp config.hpp CLI11.hpp) if( UNIX AND NOT APPLE ) set(rt_library rt ) endif() @@ -15,30 +15,30 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../../.git) execute_process( COMMAND ${GIT_EXECUTABLE} rev-parse --short=8 HEAD WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../.." - OUTPUT_VARIABLE "cleos_BUILD_VERSION" + OUTPUT_VARIABLE "enu-cli_BUILD_VERSION" ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) - message(STATUS "Git commit revision: ${cleos_BUILD_VERSION}") + message(STATUS "Git commit revision: ${enu-cli_BUILD_VERSION}") else() - set(cleos_BUILD_VERSION 0) + set(enu-cli_BUILD_VERSION 0) endif() else() - set(cleos_BUILD_VERSION 0) + set(enu-cli_BUILD_VERSION 0) endif() find_package(Intl REQUIRED) set(LOCALEDIR ${CMAKE_INSTALL_PREFIX}/share/locale) -set(LOCALEDOMAIN cleos) +set(LOCALEDOMAIN enu-cli) configure_file(config.hpp.in config.hpp ESCAPE_QUOTES) -target_include_directories(cleos PUBLIC ${Intl_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}) +target_include_directories(enu-cli PUBLIC ${Intl_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}) -target_link_libraries( cleos +target_link_libraries( enu-cli PRIVATE appbase chain_api_plugin producer_plugin chain_plugin http_plugin eosio_chain fc ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS} ${Intl_LIBRARIES} ) install( TARGETS - cleos + enu-cli RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} From fbe317978f92cf61387582947532bf6a8b9c18db Mon Sep 17 00:00:00 2001 From: enumivo Date: Tue, 15 May 2018 14:57:24 +0800 Subject: [PATCH 8/8] rename cleos --- contracts/enumivo.msig/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/enumivo.msig/README.md b/contracts/enumivo.msig/README.md index e7f50b28afd..52f076e3274 100644 --- a/contracts/enumivo.msig/README.md +++ b/contracts/enumivo.msig/README.md @@ -42,7 +42,7 @@ Execute a proposal - **executer** account executing the transaction -Cleos usage example. +enu-cli usage example. Prerequisites: - enumivo.coin contract installed to enumivo.coin accountm, enumivo.msig contract installed on enumivo.msig account which is a priviliged account.