diff --git a/scripts/wallets.mjs b/scripts/wallets.mjs index 82e81bf65..cccd63d4b 100644 --- a/scripts/wallets.mjs +++ b/scripts/wallets.mjs @@ -7,12 +7,22 @@ import _ from 'lodash' const CRYPTOS_DATA_FILE_PATH = resolve('src/lib/constants/cryptos/data.json') const CRYPTOS_ICONS_DIR_PATH = resolve('src/components/icons/cryptos') const GENERAL_ASSETS_PATH = resolve('adamant-wallets/assets/general') +const BRANCH = process.argv[2] -run() +void run(BRANCH) -async function run() { +/** + * + * @param {string} branch The branch to pull from. E.g.: dev, master + * @return {Promise} + */ +async function run(branch = 'master') { // update adamant-wallets repo - await $`git submodule foreach git pull origin master` + await $`git submodule init` + await $`git submodule update` + await $`git submodule foreach git pull origin ${branch}` + + console.log('Updating coins data from `adamant-wallets`. Using branch:', branch) const { coins, config, coinDirNames, coinSymbols } = await initCoins() await applyBlockchains(coins, coinSymbols) @@ -24,6 +34,8 @@ async function run() { await updateProductionConfig(config) await updateDevelopmentConfig(config) await updateTorConfig(config) + + console.log('Coins updated successfully') } async function initCoins() { @@ -75,8 +87,11 @@ async function initCoins() { } }) + // Sort by key (coin symbol) + const sortedCoins = _.chain(coins).toPairs().sortBy(0).fromPairs().value() + return { - coins, + coins: sortedCoins, config, coinDirNames, coinSymbols @@ -120,10 +135,12 @@ async function copyIcons(coins, coinDirNames) { for (const [name, coin] of Object.entries(coins)) { const iconComponentName = `${_.capitalize(coin.symbol)}Icon.vue` + const iconPathDestination = join(CRYPTOS_ICONS_DIR_PATH, iconComponentName) await copyFile( join(GENERAL_ASSETS_PATH, coinDirNames[name], 'images', 'icon.vue'), - join(CRYPTOS_ICONS_DIR_PATH, iconComponentName) + iconPathDestination ) + await $`git add ${iconPathDestination}` // git track newly added icon } } diff --git a/src/components/icons/cryptos/FlokiIcon.vue b/src/components/icons/cryptos/FlokiIcon.vue index 9db648ea6..8411a36f0 100644 --- a/src/components/icons/cryptos/FlokiIcon.vue +++ b/src/components/icons/cryptos/FlokiIcon.vue @@ -1,31 +1,16 @@ diff --git a/src/config/development.json b/src/config/development.json index d880b162f..5dd4176e8 100644 --- a/src/config/development.json +++ b/src/config/development.json @@ -40,7 +40,20 @@ "url": "https://node2.blockchain2fa.io" }, { - "url": "https://sunshine.adamant.im" + "url": "https://phecda.adm.im", + "alt_ip": "http://46.250.234.248:36666" + }, + { + "url": "https://tegmine.adm.im", + "alt_ip": "http://5.104.87.219:36666" + }, + { + "url": "https://tauri.adm.im", + "alt_ip": "http://154.26.159.245:36666" + }, + { + "url": "https://dschubba.adm.im", + "alt_ip": "http://85.239.234.17:36666" } ], "healthCheck": { @@ -142,11 +155,6 @@ "explorerTx": "https://etherscan.io/tx/${ID}", "nodes": { "list": [ - { - "url": "https://ethnode1.adamant.im", - "alt_ip": "http://95.216.41.106:44099", - "hasIndex": true - }, { "url": "https://ethnode2.adamant.im", "alt_ip": "http://95.216.114.252:44099", @@ -218,4 +226,4 @@ "explorer": "https://liskscan.com", "explorerAddress": "https://liskscan.com/account/${ID}" } -} +} \ No newline at end of file diff --git a/src/config/production.json b/src/config/production.json index fb431b283..4b7d74a10 100644 --- a/src/config/production.json +++ b/src/config/production.json @@ -39,7 +39,20 @@ "url": "https://node2.blockchain2fa.io" }, { - "url": "https://sunshine.adamant.im" + "url": "https://phecda.adm.im", + "alt_ip": "http://46.250.234.248:36666" + }, + { + "url": "https://tegmine.adm.im", + "alt_ip": "http://5.104.87.219:36666" + }, + { + "url": "https://tauri.adm.im", + "alt_ip": "http://154.26.159.245:36666" + }, + { + "url": "https://dschubba.adm.im", + "alt_ip": "http://85.239.234.17:36666" } ], "healthCheck": { @@ -141,11 +154,6 @@ "eth": { "nodes": { "list": [ - { - "url": "https://ethnode1.adamant.im", - "alt_ip": "http://95.216.41.106:44099", - "hasIndex": true - }, { "url": "https://ethnode2.adamant.im", "alt_ip": "http://95.216.114.252:44099", @@ -218,4 +226,4 @@ "explorer": "https://liskscan.com", "explorerAddress": "https://liskscan.com/account/${ID}" } -} +} \ No newline at end of file diff --git a/src/config/tor.json b/src/config/tor.json index e8962c414..42b233b28 100644 --- a/src/config/tor.json +++ b/src/config/tor.json @@ -110,10 +110,6 @@ "eth": { "nodes": { "list": [ - { - "url": "http://vj3qid4h2d4cj2gexivjuuybah3mjzenpdyr5bj6z4hctp52jn6qsgid.onion", - "hasIndex": true - }, { "url": "http://jpbrp6xapsyfnvyosrpu5wmoi62fqotazkicjeiob32yz77rt7axobqd.onion", "hasIndex": true @@ -178,4 +174,4 @@ "explorer": "https://liskscan.com", "explorerAddress": "https://liskscan.com/account/${ID}" } -} +} \ No newline at end of file diff --git a/src/lib/constants/cryptos/data.json b/src/lib/constants/cryptos/data.json index 28a6edb30..07efca096 100644 --- a/src/lib/constants/cryptos/data.json +++ b/src/lib/constants/cryptos/data.json @@ -45,7 +45,20 @@ "url": "https://node2.blockchain2fa.io" }, { - "url": "https://sunshine.adamant.im" + "url": "https://phecda.adm.im", + "alt_ip": "http://46.250.234.248:36666" + }, + { + "url": "https://tegmine.adm.im", + "alt_ip": "http://5.104.87.219:36666" + }, + { + "url": "https://tauri.adm.im", + "alt_ip": "http://154.26.159.245:36666" + }, + { + "url": "https://dschubba.adm.im", + "alt_ip": "http://85.239.234.17:36666" } ], "healthCheck": { @@ -68,6 +81,19 @@ "defaultOrdinalLevel": 0, "explorerTx": "https://explorer.adamant.im/tx/${ID}" }, + "BNB": { + "symbol": "BNB", + "name": "Binance Coin", + "decimals": 18, + "contractId": "0xB8c77482e45F1F44dE1745F52C74426C631bDD52", + "createCoin": false, + "cryptoTransferDecimals": 6, + "defaultGasLimit": 58000, + "status": "active", + "mainCoin": "ETH", + "type": "ERC20", + "fees": "ethereum" + }, "BTC": { "symbol": "BTC", "name": "Bitcoin", @@ -109,42 +135,44 @@ "defaultOrdinalLevel": 10, "explorerTx": "https://explorer.btc.com/btc/transaction/${ID}" }, - "BZZ": { - "symbol": "BZZ", - "name": "Swarm", - "decimals": 16, - "contractId": "0x19062190B1925b5b6689D7073fDfC8c2976EF8Cb", + "BUSD": { + "symbol": "BUSD", + "name": "Binance USD", + "decimals": 18, + "contractId": "0x4fabb145d64652a948d72533023f6e7a623c7c53", "createCoin": false, "cryptoTransferDecimals": 6, - "defaultVisibility": true, "defaultGasLimit": 58000, - "defaultOrdinalLevel": 95, "status": "active", "mainCoin": "ETH", "type": "ERC20", "fees": "ethereum" }, - "BNB": { - "symbol": "BNB", - "name": "Binance Coin", - "decimals": 18, - "contractId": "0xB8c77482e45F1F44dE1745F52C74426C631bDD52", + "BZZ": { + "symbol": "BZZ", + "name": "Swarm", + "decimals": 16, + "contractId": "0x19062190B1925b5b6689D7073fDfC8c2976EF8Cb", "createCoin": false, "cryptoTransferDecimals": 6, + "defaultVisibility": true, "defaultGasLimit": 58000, + "defaultOrdinalLevel": 95, "status": "active", "mainCoin": "ETH", "type": "ERC20", "fees": "ethereum" }, - "BUSD": { - "symbol": "BUSD", - "name": "Binance USD", + "DAI": { + "symbol": "DAI", + "name": "Dai", "decimals": 18, - "contractId": "0x4fabb145d64652a948d72533023f6e7a623c7c53", + "contractId": "0x6b175474e89094c44da98b954eedeac495271d0f", "createCoin": false, "cryptoTransferDecimals": 6, + "defaultVisibility": true, "defaultGasLimit": 58000, + "defaultOrdinalLevel": 50, "status": "active", "mainCoin": "ETH", "type": "ERC20", @@ -231,31 +259,14 @@ "defaultOrdinalLevel": 70, "explorerTx": "https://dogechain.info/tx/${ID}" }, - "FLOKI": { - "symbol": "FLOKI", - "name": "Floki", - "decimals": 9, - "contractId": "0xcf0c122c6b73ff809c693db761e7baebe62b6a2e", - "createCoin": false, - "cryptoTransferDecimals": 6, - "defaultVisibility": true, - "defaultGasLimit": 58000, - "defaultOrdinalLevel": 100, - "status": "active", - "mainCoin": "ETH", - "type": "ERC20", - "fees": "ethereum" - }, - "DAI": { - "symbol": "DAI", - "name": "Dai", + "ENS": { + "symbol": "ENS", + "name": "Ethereum Name Service", "decimals": 18, - "contractId": "0x6b175474e89094c44da98b954eedeac495271d0f", + "contractId": "0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72", "createCoin": false, "cryptoTransferDecimals": 6, - "defaultVisibility": true, "defaultGasLimit": 58000, - "defaultOrdinalLevel": 50, "status": "active", "mainCoin": "ETH", "type": "ERC20", @@ -269,11 +280,6 @@ "decimals": 18, "nodes": { "list": [ - { - "url": "https://ethnode1.adamant.im", - "alt_ip": "http://95.216.41.106:44099", - "hasIndex": true - }, { "url": "https://ethnode2.adamant.im", "alt_ip": "http://95.216.114.252:44099", @@ -308,6 +314,21 @@ "defaultOrdinalLevel": 20, "explorerTx": "https://etherscan.io/tx/${ID}" }, + "FLOKI": { + "symbol": "FLOKI", + "name": "Floki", + "decimals": 9, + "contractId": "0xcf0c122c6b73ff809c693db761e7baebe62b6a2e", + "createCoin": false, + "cryptoTransferDecimals": 6, + "defaultVisibility": true, + "defaultGasLimit": 58000, + "defaultOrdinalLevel": 100, + "status": "active", + "mainCoin": "ETH", + "type": "ERC20", + "fees": "ethereum" + }, "FLUX": { "symbol": "FLUX", "name": "Flux", @@ -323,11 +344,26 @@ "type": "ERC20", "fees": "ethereum" }, - "ENS": { - "symbol": "ENS", - "name": "Ethereum Name Service", + "GT": { + "symbol": "GT", + "name": "Gate", "decimals": 18, - "contractId": "0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72", + "contractId": "0xe66747a101bff2dba3697199dcce5b743b454759", + "createCoin": false, + "cryptoTransferDecimals": 6, + "defaultVisibility": true, + "defaultGasLimit": 58000, + "defaultOrdinalLevel": 115, + "status": "active", + "mainCoin": "ETH", + "type": "ERC20", + "fees": "ethereum" + }, + "HOT": { + "symbol": "HOT", + "name": "Holo", + "decimals": 18, + "contractId": "0x6c6ee5e31d828de241282b9606c8e98ea48526e2", "createCoin": false, "cryptoTransferDecimals": 6, "defaultGasLimit": 58000, @@ -336,16 +372,29 @@ "type": "ERC20", "fees": "ethereum" }, - "GT": { - "symbol": "GT", - "name": "Gate", + "INJ": { + "symbol": "INJ", + "name": "Injective", + "regexAddress": "^(inj)[a-zA-HJ-NP-Z0-9]{25,39}$", "decimals": 18, - "contractId": "0xe66747a101bff2dba3697199dcce5b743b454759", + "contractId": "0xe28b3b32b6c345a34ff64674606124dd5aceca30", + "createCoin": false, + "cryptoTransferDecimals": 6, + "defaultGasLimit": 58000, + "explorerTx": "https://explorer.injective.network/transaction/${ID}", + "status": "active", + "mainCoin": "ETH", + "type": "ERC20", + "fees": "ethereum" + }, + "LINK": { + "symbol": "LINK", + "name": "Chainlink", + "decimals": 18, + "contractId": "0x514910771af9ca656af840dff83e8264ecf986ca", "createCoin": false, "cryptoTransferDecimals": 6, - "defaultVisibility": true, "defaultGasLimit": 58000, - "defaultOrdinalLevel": 115, "status": "active", "mainCoin": "ETH", "type": "ERC20", @@ -395,47 +444,6 @@ "defaultOrdinalLevel": 60, "explorerTx": "https://liskscan.com/transaction/${ID}" }, - "INJ": { - "symbol": "INJ", - "name": "Injective", - "regexAddress": "^(inj)[a-zA-HJ-NP-Z0-9]{25,39}$", - "decimals": 18, - "contractId": "0xe28b3b32b6c345a34ff64674606124dd5aceca30", - "createCoin": false, - "cryptoTransferDecimals": 6, - "defaultGasLimit": 58000, - "explorerTx": "https://explorer.injective.network/transaction/${ID}", - "status": "active", - "mainCoin": "ETH", - "type": "ERC20", - "fees": "ethereum" - }, - "LINK": { - "symbol": "LINK", - "name": "Chainlink", - "decimals": 18, - "contractId": "0x514910771af9ca656af840dff83e8264ecf986ca", - "createCoin": false, - "cryptoTransferDecimals": 6, - "defaultGasLimit": 58000, - "status": "active", - "mainCoin": "ETH", - "type": "ERC20", - "fees": "ethereum" - }, - "HOT": { - "symbol": "HOT", - "name": "Holo", - "decimals": 18, - "contractId": "0x6c6ee5e31d828de241282b9606c8e98ea48526e2", - "createCoin": false, - "cryptoTransferDecimals": 6, - "defaultGasLimit": 58000, - "status": "active", - "mainCoin": "ETH", - "type": "ERC20", - "fees": "ethereum" - }, "MANA": { "symbol": "MANA", "name": "Decentraland", @@ -477,11 +485,11 @@ "type": "ERC20", "fees": "ethereum" }, - "REN": { - "symbol": "REN", - "name": "Ren", + "QNT": { + "symbol": "QNT", + "name": "Quant", "decimals": 18, - "contractId": "0x408e41876cccdc0f92210600ef50372656052a38", + "contractId": "0x4a220E6096B25EADb88358cb44068A3248254675", "createCoin": false, "cryptoTransferDecimals": 6, "defaultGasLimit": 58000, @@ -490,11 +498,11 @@ "type": "ERC20", "fees": "ethereum" }, - "QNT": { - "symbol": "QNT", - "name": "Quant", + "REN": { + "symbol": "REN", + "name": "Ren", "decimals": 18, - "contractId": "0x4a220E6096B25EADb88358cb44068A3248254675", + "contractId": "0x408e41876cccdc0f92210600ef50372656052a38", "createCoin": false, "cryptoTransferDecimals": 6, "defaultGasLimit": 58000, @@ -544,6 +552,34 @@ "type": "ERC20", "fees": "ethereum" }, + "STORJ": { + "symbol": "STORJ", + "name": "Storj", + "decimals": 8, + "contractId": "0xb64ef51c888972c908cfacf59b47c1afbc0ab8ac", + "createCoin": false, + "cryptoTransferDecimals": 6, + "defaultVisibility": true, + "defaultGasLimit": 58000, + "defaultOrdinalLevel": 105, + "status": "active", + "mainCoin": "ETH", + "type": "ERC20", + "fees": "ethereum" + }, + "TUSD": { + "symbol": "TUSD", + "name": "TrueUSD", + "decimals": 18, + "contractId": "0x0000000000085d4780b73119b644ae5ecd22b376", + "createCoin": false, + "cryptoTransferDecimals": 6, + "defaultGasLimit": 58000, + "status": "active", + "mainCoin": "ETH", + "type": "ERC20", + "fees": "ethereum" + }, "UNI": { "symbol": "UNI", "name": "Uniswap", @@ -572,19 +608,6 @@ "type": "ERC20", "fees": "ethereum" }, - "TUSD": { - "symbol": "TUSD", - "name": "TrueUSD", - "decimals": 18, - "contractId": "0x0000000000085d4780b73119b644ae5ecd22b376", - "createCoin": false, - "cryptoTransferDecimals": 6, - "defaultGasLimit": 58000, - "status": "active", - "mainCoin": "ETH", - "type": "ERC20", - "fees": "ethereum" - }, "USDP": { "symbol": "USDP", "name": "PAX Dollar", @@ -598,29 +621,29 @@ "type": "ERC20", "fees": "ethereum" }, - "STORJ": { - "symbol": "STORJ", - "name": "Storj", - "decimals": 8, - "contractId": "0xb64ef51c888972c908cfacf59b47c1afbc0ab8ac", + "USDS": { + "symbol": "USDS", + "name": "Stably USD", + "decimals": 6, + "contractId": "0xa4bdb11dc0a2bec88d24a3aa1e6bb17201112ebe", "createCoin": false, "cryptoTransferDecimals": 6, - "defaultVisibility": true, "defaultGasLimit": 58000, - "defaultOrdinalLevel": 105, "status": "active", "mainCoin": "ETH", "type": "ERC20", "fees": "ethereum" }, - "USDS": { - "symbol": "USDS", - "name": "Stably USD", + "USDT": { + "symbol": "USDT", + "name": "Tether", "decimals": 6, - "contractId": "0xa4bdb11dc0a2bec88d24a3aa1e6bb17201112ebe", + "contractId": "0xdac17f958d2ee523a2206206994597c13d831ec7", "createCoin": false, "cryptoTransferDecimals": 6, + "defaultVisibility": true, "defaultGasLimit": 58000, + "defaultOrdinalLevel": 30, "status": "active", "mainCoin": "ETH", "type": "ERC20", @@ -641,21 +664,6 @@ "type": "ERC20", "fees": "ethereum" }, - "USDT": { - "symbol": "USDT", - "name": "Tether", - "decimals": 6, - "contractId": "0xdac17f958d2ee523a2206206994597c13d831ec7", - "createCoin": false, - "cryptoTransferDecimals": 6, - "defaultVisibility": true, - "defaultGasLimit": 58000, - "defaultOrdinalLevel": 30, - "status": "active", - "mainCoin": "ETH", - "type": "ERC20", - "fees": "ethereum" - }, "WOO": { "symbol": "WOO", "name": "WOO Network",