From fc88bae02f0a69322bbbb3f469d1b129d706846a Mon Sep 17 00:00:00 2001 From: michaeltout Date: Fri, 12 Jul 2019 12:39:27 +0200 Subject: [PATCH 01/10] Switch proxies to https domains --- routes/api/electrum/proxy.js | 37 ++++++++++------------------ routes/electrumjs/electrumServers.js | 2 +- routes/shepherd/electrum/proxy.js | 13 +++++++--- 3 files changed, 23 insertions(+), 29 deletions(-) diff --git a/routes/api/electrum/proxy.js b/routes/api/electrum/proxy.js index 676ea4459..8346dd1d2 100644 --- a/routes/api/electrum/proxy.js +++ b/routes/api/electrum/proxy.js @@ -1,26 +1,15 @@ const request = require('request'); const Promise = require('bluebird'); const { getRandomIntInclusive } = require('agama-wallet-lib/src/utils'); +const { proxyServersHttps } = require('agama-wallet-lib/src/electrum-servers'); // TODO: reduce code // abstraction layer to communicate with electrum proxies -const proxyServers = [{ - ip: '94.130.225.86', - port: 80, -}, { - ip: '94.130.98.74', - port: 80, -}]; - // pick a random proxy server -const _randomServer = proxyServers[getRandomIntInclusive(0, proxyServers.length - 1)]; -const proxyServer = { - ip: _randomServer.ip, - port: _randomServer.port, -}; +const proxyServer = proxyServersHttps[getRandomIntInclusive(0, proxyServersHttps.length - 1)]; -console.log(`proxy server ${proxyServer.ip}:${proxyServer.port}`); +console.log(`proxy server ${proxyServer}`); module.exports = (api) => { /*api.httpReq = (url, type) => { @@ -68,7 +57,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/getbalance?${makeUrl({ address })}`, + url: `https://${proxyServer}/api/getbalance?${makeUrl({ address })}`, method: 'GET', }; @@ -99,7 +88,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/listunspent?${makeUrl({ address })}`, + url: `https://${proxyServer}/api/listunspent?${makeUrl({ address })}`, method: 'GET', }; @@ -130,7 +119,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/listtransactions?${makeUrl({ address })}`, + url: `https://${proxyServer}/api/listtransactions?${makeUrl({ address })}`, method: 'GET', }; @@ -161,7 +150,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/estimatefee?${makeUrl({ blocks })}`, + url: `https://${proxyServer}/api/estimatefee?${makeUrl({ blocks })}`, method: 'GET', }; @@ -192,7 +181,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/getblockinfo?${makeUrl({ height })}`, + url: `https://${proxyServer}/api/getblockinfo?${makeUrl({ height })}`, method: 'GET', }; @@ -223,7 +212,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/getcurrentblock?${makeUrl()}`, + url: `https://${proxyServer}/api/getcurrentblock?${makeUrl()}`, method: 'GET', }; @@ -254,7 +243,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/gettransaction?${makeUrl({ txid })}`, + url: `https://${proxyServer}/api/gettransaction?${makeUrl({ txid })}`, method: 'GET', }; @@ -285,7 +274,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/getmerkle?${makeUrl({ txid, height })}`, + url: `https://${proxyServer}/api/getmerkle?${makeUrl({ txid, height })}`, method: 'GET', }; @@ -316,7 +305,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/gettransaction?${makeUrl()}`, + url: `https://${proxyServer}/api/gettransaction?${makeUrl()}`, method: 'GET', }; @@ -347,7 +336,7 @@ module.exports = (api) => { return new Promise((resolve, reject) => { const options = { - url: `http://${proxyServer.ip}:${proxyServer.port}/api/pushtx`, + url: `https://${proxyServer}/api/pushtx`, method: 'POST', headers: { 'Content-Type': 'application/json', diff --git a/routes/electrumjs/electrumServers.js b/routes/electrumjs/electrumServers.js index 76fbb64cc..71dd326c7 100644 --- a/routes/electrumjs/electrumServers.js +++ b/routes/electrumjs/electrumServers.js @@ -1,5 +1,5 @@ const disableCoins = require('./electrumServersConfig'); -const _electrumServers = require('agama-wallet-lib/src/electrum-servers'); +const _electrumServers = require('agama-wallet-lib/src/electrum-servers').electrumServers; //const fs = require('fs'); const _electrumServersExtend = { diff --git a/routes/shepherd/electrum/proxy.js b/routes/shepherd/electrum/proxy.js index 7d62096a8..cd81d9abe 100644 --- a/routes/shepherd/electrum/proxy.js +++ b/routes/shepherd/electrum/proxy.js @@ -1,3 +1,7 @@ +//DEPRECATED TODO: DELETE + + +/* const request = require('request'); const Promise = require('bluebird'); @@ -28,9 +32,9 @@ const proxyServer = { console.log(`proxy server ${proxyServer.ip}:${proxyServer.port}`); module.exports = (shepherd) => { - /*shepherd.httpReq = (url, type) => { - - };*/ + //shepherd.httpReq = (url, type) => { + // + //}; shepherd.proxyActiveCoin = {}; shepherd.proxy = (network) => { @@ -391,4 +395,5 @@ module.exports = (shepherd) => { }; return shepherd; -} \ No newline at end of file +} +*/ \ No newline at end of file From f2b13bc7ede8c63846352ab0529ae357f98c6912 Mon Sep 17 00:00:00 2001 From: michaeltout Date: Sat, 13 Jul 2019 13:20:46 +0200 Subject: [PATCH 02/10] Fix issue with KMD not closing gracefully --- routes/api/quitDaemon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/api/quitDaemon.js b/routes/api/quitDaemon.js index 2b51c56d7..45de6006f 100644 --- a/routes/api/quitDaemon.js +++ b/routes/api/quitDaemon.js @@ -11,7 +11,7 @@ module.exports = (api) => { for (let key in api.coindInstanceRegistry) { if (api.appConfig.native.stopNativeDaemonsOnQuit) { const chain = key !== 'komodod' ? key : null; - let _coindQuitCmd = api.appConfig.reservedChains.indexOf(chain) === -1 ? api.veruscliBin : api.komodocliBin; + let _coindQuitCmd = api.appConfig.reservedChains.indexOf(key) === -1 ? api.veruscliBin : api.komodocliBin; // any coind if (api.nativeCoindList[key.toLowerCase()]) { From fec8f22fdce179e90d688729d82ccd5bdedb1ed2 Mon Sep 17 00:00:00 2001 From: Asher Date: Sat, 13 Jul 2019 17:04:47 -0700 Subject: [PATCH 03/10] Use Komodo 0.4.0a --- .gitlab-ci.yml | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0830b1dbb..640171d6d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,7 +11,7 @@ variables: DEFAULT_EASYDEXGUI_BRANCH: ${CI_COMMIT_REF_NAME} AGAMA_VERSION: 0.5.7-3 VERUSCOIN_VERSION: 0.5.7-2 - KOMODO_VERSION: 0.3.3b-2-beta + KOMODO_VERSION: 0.4.0a BINARY_SOURCE: VerusCoin EASYDEX_GUI_BUILD: build.tar.gz AGAMA_APPIMAGE: Agama-Linux-v${AGAMA_VERSION}.AppImage @@ -42,20 +42,20 @@ build:linux: --key-file AUTH_KEY.json && rm AUTH_KEY.json - if [ -z "${UPSTREAM_CLI_BRANCH}" ]; then export - VERUS_CLI_LINUX="${BINARY_SOURCE}/${DEFAULT_VERUSCOIN_BRANCH}/Linux/Verus-CLI-Linux-v${VERUSCOIN_VERSION}.tar.gz" - POST_COMMENT="${POST_COMMENT}Using ${BINARY_SOURCE}/${DEFAULT_VERUSCOIN_BRANCH} binaries."; + VERUS_CLI_LINUX="${BINARY_SOURCE}/${DEFAULT_VERUSCOIN_BRANCH}/Linux/Verus-CLI-Linux-v${VERUSCOIN_VERSION}.tar.gz" + POST_COMMENT="${POST_COMMENT}Using ${BINARY_SOURCE}/${DEFAULT_VERUSCOIN_BRANCH} binaries."; else - export POST_COMMENT="${POST_COMMENT}Using ${UPSTREAM_TRIGGER}/${UPSTREAM_CLI_BRANCH} binaries."; fi + export POST_COMMENT="${POST_COMMENT}Using ${UPSTREAM_TRIGGER}/${UPSTREAM_CLI_BRANCH} binaries."; fi - gsutil cp $STAGING/EasyDEX-GUI/$CI_COMMIT_REF_NAME/$EASYDEX_GUI_BUILD . - tar -xzf $EASYDEX_GUI_BUILD --directory gui/EasyDEX-GUI/react && rm ${EASYDEX_GUI_BUILD} - mkdir -p assets/bin/linux64/verusd - gsutil cp $STAGING/$VERUS_CLI_LINUX . - tar -xzvf Verus-CLI-Linux-v${VERUSCOIN_VERSION}.tar.gz --strip=1 --directory assets/bin/linux64/verusd - rm Verus-CLI-Linux-v${VERUSCOIN_VERSION}.tar.gz - - gsutil cp $STAGING/linux64.tar.gz . - - tar -xzvf linux64.tar.gz --strip=1 --directory assets/bin/linux64 - - rm linux64.tar.gz - - strip -g assets/bin/linux64/komodod && strip -g assets/bin/linux64/komodo-cli + - wget https://github.com/KomodoPlatform/komodo/releases/download/dev-multios-0.4.0a-alpha/linux_0.4.0a.tar.gz + - tar -xzvf linux_${KOMODO_VERSION}.tar.gz --strip=1 --directory assets/bin/linux64 + - rm linux_${KOMODO_VERSION}.tar.gz + - strip --strip-unneeded assets/bin/linux64/komodod && strip --strip-unneeded assets/bin/linux64/komodo-cli - yarn install script: - yarn run dist @@ -102,12 +102,10 @@ build:windows: - gsutil cp $STAGING/$VERUS_CLI_WINDOWS . - unzip -qq Verus-CLI-Windows-v${VERUSCOIN_VERSION}.zip -d assets/bin/win64 - mv assets/bin/win64/verus-cli assets/bin/win64/verusd - - gsutil cp $STAGING/win64.zip . - - unzip win64.zip - - mv win64/* assets/bin/win64 - - rm -rf win64 - - rm win64.zip - - strip -g assets/bin/win64/komodod.exe && strip -g assets/bin/win64/komodo-cli.exe && strip -g assets/bin/win64/komodo-tx.exe + - wget https://github.com/KomodoPlatform/komodo/releases/download/dev-multios-0.4.0a-alpha/windows_0.4.0a.zip + - unzip windows_${KOMODO_VERSION}.zip -d assets/bin + - rm windows_${KOMODO_VERSION}.zip + - strip --strip-unneeded assets/bin/win64/komodod.exe && strip --strip-unneeded assets/bin/win64/komodo-cli.exe && strip --strip-unneeded assets/bin/win64/komodo-tx.exe - rm Verus-CLI-Windows-v${VERUSCOIN_VERSION}.zip - yarn install script: @@ -145,12 +143,11 @@ build:mac: - tar -xzf $EASYDEX_GUI_BUILD --directory gui/EasyDEX-GUI/react && rm $EASYDEX_GUI_BUILD - gsutil cp $STAGING/$VERUS_CLI_MACOS . - - gsutil cp $STAGING/macos.tar.gz . + - wget https://github.com/KomodoPlatform/komodo/releases/download/dev-multios-0.4.0a-alpha/macOS_0.4.0a.tar.gz - mkdir -p assets/bin/osx/verusd - tar -xzf Verus-CLI-MacOS-v${VERUSCOIN_VERSION}.tar.gz --strip=1 --directory assets/bin/osx/verusd - - gsutil cp $STAGING/macos.tar.gz . - - tar -xzvf macos.tar.gz --strip=1 --directory assets/bin/osx - - rm macos.tar.gz + - tar -xzvf macOS_${KOMODO_VERSION}.tar.gz --strip=1 --directory assets/bin/osx + - rm macOS_${KOMODO_VERSION}.tar.gz - rm Verus-CLI-MacOS-v${VERUSCOIN_VERSION}.tar.gz - yarn install script: @@ -198,4 +195,4 @@ deploy: - ${AGAMA_WINDOWS_ZIP}.sha256 - ${AGAMA_MACOS} - ${AGAMA_MACOS}.sha256 - expire_in: 1 week \ No newline at end of file + expire_in: 1 week From afd1f86f5a68c9a1cf03262598189cdd6ab61553 Mon Sep 17 00:00:00 2001 From: Asher Date: Sat, 13 Jul 2019 17:05:32 -0700 Subject: [PATCH 04/10] Update version --- .gitlab-ci.yml | 2 +- package.json | 2 +- version | 4 ++-- version_build | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 640171d6d..6ddd98a20 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ variables: DOCKER_DRIVER: overlay2 DEFAULT_VERUSCOIN_BRANCH: ${CI_COMMIT_REF_NAME} DEFAULT_EASYDEXGUI_BRANCH: ${CI_COMMIT_REF_NAME} - AGAMA_VERSION: 0.5.7-3 + AGAMA_VERSION: 0.5.7-4 VERUSCOIN_VERSION: 0.5.7-2 KOMODO_VERSION: 0.4.0a BINARY_SOURCE: VerusCoin diff --git a/package.json b/package.json index 626e4bb07..85c72fc67 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Agama", "productName": "Agama", - "version": "0.5.7-3", + "version": "0.5.7-4", "description": "Agama Wallet Desktop App", "main": "main.js", "scripts": { diff --git a/version b/version index 0e76bbaae..bd62adfbd 100644 --- a/version +++ b/version @@ -1,3 +1,3 @@ -version=0.5.7-3 +version=0.5.7-4 type=beta -minversion=0.5.7-3 +minversion=0.5.7-4 diff --git a/version_build b/version_build index 011f7099a..89607b18f 100644 --- a/version_build +++ b/version_build @@ -1 +1 @@ -0.5.7-1 \ No newline at end of file +0.5.7-4 From 2bb9cfb383418befe00d0eee689f095a59ed7304 Mon Sep 17 00:00:00 2001 From: Asher Date: Sat, 13 Jul 2019 17:12:46 -0700 Subject: [PATCH 05/10] Update EasyDEX-GUI ref --- gui/EasyDEX-GUI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/EasyDEX-GUI b/gui/EasyDEX-GUI index ddbc37939..4575f706a 160000 --- a/gui/EasyDEX-GUI +++ b/gui/EasyDEX-GUI @@ -1 +1 @@ -Subproject commit ddbc37939eed25d8325a1986999eb6464994090b +Subproject commit 4575f706a7253b77cde88537f3a3f34229018526 From 3c32fd1ee556973d3be9a981efcb5a331483cb8a Mon Sep 17 00:00:00 2001 From: Asher Date: Sat, 13 Jul 2019 18:18:37 -0700 Subject: [PATCH 06/10] update agama-wallet-lib ref --- yarn.lock | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index e43283b6c..19de12be8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -60,7 +60,7 @@ after@0.8.2: "agama-wallet-lib@https://github.com/VerusCoin/agama-wallet-lib.git#dev": version "0.3.4" - resolved "https://github.com/VerusCoin/agama-wallet-lib.git#a8cc76bc132d5ab1feb911b4cfa5c15925807fb0" + resolved "https://github.com/VerusCoin/agama-wallet-lib.git#8f3591c71d63492da52fc72d2faf8c00a0e7a54e" dependencies: bigi "^1.4.2" bip32 "^1.0.2" @@ -549,7 +549,6 @@ bitcoin-ops@^1.3.0: "bitcoinjs-lib@https://github.com/SuperNETorg/bitcoinjs-lib.git": version "3.3.2" - uid "2325ac228f03efcd5b39aad8a672e79c407dcf00" resolved "https://github.com/SuperNETorg/bitcoinjs-lib.git#2325ac228f03efcd5b39aad8a672e79c407dcf00" dependencies: bech32 "^1.1.2" From 612a15bbc68eaf27161e421484dd2414afa0d04c Mon Sep 17 00:00:00 2001 From: Asher Date: Sat, 13 Jul 2019 18:20:42 -0700 Subject: [PATCH 07/10] Update EasyDEX-GUI ref --- gui/EasyDEX-GUI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/EasyDEX-GUI b/gui/EasyDEX-GUI index 4575f706a..f9df6ef44 160000 --- a/gui/EasyDEX-GUI +++ b/gui/EasyDEX-GUI @@ -1 +1 @@ -Subproject commit 4575f706a7253b77cde88537f3a3f34229018526 +Subproject commit f9df6ef44626f9b096f802c573ea50ccdc4f3f78 From 2e497cb370fa039f3b82100d4d5107cebd1c7755 Mon Sep 17 00:00:00 2001 From: Asher Date: Sat, 13 Jul 2019 19:54:52 -0700 Subject: [PATCH 08/10] Build instead of fetching pre built EasyDEX-GUI artifact. --- .gitlab-ci.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ddd98a20..eca29d5e3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,6 @@ stages: variables: DOCKER_DRIVER: overlay2 DEFAULT_VERUSCOIN_BRANCH: ${CI_COMMIT_REF_NAME} - DEFAULT_EASYDEXGUI_BRANCH: ${CI_COMMIT_REF_NAME} AGAMA_VERSION: 0.5.7-4 VERUSCOIN_VERSION: 0.5.7-2 KOMODO_VERSION: 0.4.0a @@ -46,8 +45,10 @@ build:linux: POST_COMMENT="${POST_COMMENT}Using ${BINARY_SOURCE}/${DEFAULT_VERUSCOIN_BRANCH} binaries."; else export POST_COMMENT="${POST_COMMENT}Using ${UPSTREAM_TRIGGER}/${UPSTREAM_CLI_BRANCH} binaries."; fi - - gsutil cp $STAGING/EasyDEX-GUI/$CI_COMMIT_REF_NAME/$EASYDEX_GUI_BUILD . - - tar -xzf $EASYDEX_GUI_BUILD --directory gui/EasyDEX-GUI/react && rm ${EASYDEX_GUI_BUILD} + - cd gui/EasyDEX-GUI/react + - yarn install + - yarn run build + - cd ../../.. - mkdir -p assets/bin/linux64/verusd - gsutil cp $STAGING/$VERUS_CLI_LINUX . - tar -xzvf Verus-CLI-Linux-v${VERUSCOIN_VERSION}.tar.gz --strip=1 --directory assets/bin/linux64/verusd @@ -96,8 +97,10 @@ build:windows: POST_COMMENT="${POST_COMMENT}Using ${BINARY_SOURCE}/${DEFAULT_VERUSCOIN_BRANCH} binaries."; else export POST_COMMENT="${POST_COMMENT}Using ${UPSTREAM_TRIGGER}/${UPSTREAM_CLI_BRANCH} binaries."; fi - - gsutil cp $STAGING/EasyDEX-GUI/$CI_COMMIT_REF_NAME/$EASYDEX_GUI_BUILD . - - tar -xzf $EASYDEX_GUI_BUILD --directory gui/EasyDEX-GUI/react && rm $EASYDEX_GUI_BUILD + - cd gui/EasyDEX-GUI/react + - yarn install + - yarn run build + - cd ../../.. - mkdir -p assets/bin/ - gsutil cp $STAGING/$VERUS_CLI_WINDOWS . - unzip -qq Verus-CLI-Windows-v${VERUSCOIN_VERSION}.zip -d assets/bin/win64 @@ -139,9 +142,10 @@ build:mac: POST_COMMENT="${POST_COMMENT}Using ${BINARY_SOURCE}/${DEFAULT_VERUSCOIN_BRANCH} binaries."; else export POST_COMMENT="${POST_COMMENT}Using ${UPSTREAM_TRIGGER}/${UPSTREAM_CLI_BRANCH} binaries."; fi - - gsutil cp $STAGING/EasyDEX-GUI/$CI_COMMIT_REF_NAME/$EASYDEX_GUI_BUILD . - - tar -xzf $EASYDEX_GUI_BUILD --directory gui/EasyDEX-GUI/react && - rm $EASYDEX_GUI_BUILD + - cd gui/EasyDEX-GUI/react + - yarn install + - yarn run build + - cd ../../.. - gsutil cp $STAGING/$VERUS_CLI_MACOS . - wget https://github.com/KomodoPlatform/komodo/releases/download/dev-multios-0.4.0a-alpha/macOS_0.4.0a.tar.gz - mkdir -p assets/bin/osx/verusd From 57245baa161e87b9087d18126ca8cbb4cb3e9803 Mon Sep 17 00:00:00 2001 From: Asher Date: Sat, 13 Jul 2019 21:43:10 -0700 Subject: [PATCH 09/10] Update EasyDEX-GUI ref --- gui/EasyDEX-GUI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/EasyDEX-GUI b/gui/EasyDEX-GUI index f9df6ef44..ff448b37c 160000 --- a/gui/EasyDEX-GUI +++ b/gui/EasyDEX-GUI @@ -1 +1 @@ -Subproject commit f9df6ef44626f9b096f802c573ea50ccdc4f3f78 +Subproject commit ff448b37c68a024f7b2ea29e2683583ec5250c89 From 3f34e7c9d943b39755ecc85ccb78ac43dac23209 Mon Sep 17 00:00:00 2001 From: michaeltout Date: Sun, 14 Jul 2019 07:21:51 +0200 Subject: [PATCH 10/10] Fix error where stopping KMD would stop verusd instead of komodod --- routes/api/quitDaemon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/api/quitDaemon.js b/routes/api/quitDaemon.js index 45de6006f..8efcecc70 100644 --- a/routes/api/quitDaemon.js +++ b/routes/api/quitDaemon.js @@ -85,7 +85,7 @@ module.exports = (api) => { api.post('/coind/stop', (req, res) => { if (api.checkToken(req.body.token)) { const _chain = req.body.chain; - let _coindQuitCmd = api.appConfig.reservedChains.indexOf(_chain) === -1 ? api.veruscliBin : api.komodocliBin; + let _coindQuitCmd = _chain && api.appConfig.reservedChains.indexOf(_chain) === -1 ? api.veruscliBin : api.komodocliBin; let _arg = [];