diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 724c95b57..ff9506e66 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,25 +1,55 @@ trigger: - - master + - master pool: - vmImage: 'ubuntu-latest' + vmImage: 'ubuntu-latest' variables: - npm_config_cache: '$(Pipeline.Workspace)/.npm' + npm_config_cache: '$(Pipeline.Workspace)/.npm' steps: - - task: NodeTool@0 - inputs: - versionSpec: '12.x' - displayName: Install Node.js + - checkout: self + persistCredentials: true + + # - task: CmdLine@2 + # displayName: Checkout $(Build.SourceBranchName) + # inputs: + # script: 'git checkout $(Build.SourceBranchName)' - - script: npm install - displayName: Install project dependencies + - task: NodeTool@0 + inputs: + versionSpec: '12.x' + displayName: Install Node.js + + - script: | + sudo npm install -g typescript + sudo npm install -g ts-node + displayName: Install global dependency + + - task: Npm@1 + inputs: + command: install + verbose: true + displayName: Install dependencies + # - task: Cache@2 + # inputs: + # key: 'npm | "$(Agent.OS)" | package-lock.json' + # path: $(npm_config_cache) + # displayName: Cache npm + + - script: | + git config --global user.email "bot@trustwallet.com" + git config --global user.name "TrustWalletBot" - - task: Cache@2 - inputs: - key: 'npm | "$(Agent.OS)" | package-lock.json' - path: $(npm_config_cache) - displayName: Cache npm + - script: sudo npm run checksum-erc20 + workingDirectory: $(Build.SourcesDirectory) + displayName: Run checksum script - - script: npm t \ No newline at end of file + - task: Bash@3 + displayName: Commit result of checksum script + inputs: + targetType: filePath + filePath: ./script/commit.sh + + - script: npm t + displayName: Run tests \ No newline at end of file diff --git a/blockchains/ethereum/assets/0x02b1669bC9EE893edAFf3cADfD326A294d643f99/logo.png b/blockchains/ethereum/assets/0x02b1669bC9EE893edAFf3cADfD326A294d643f99/logo.png new file mode 100644 index 000000000..8a9a62ffb Binary files /dev/null and b/blockchains/ethereum/assets/0x02b1669bC9EE893edAFf3cADfD326A294d643f99/logo.png differ diff --git a/blockchains/ethereum/0x223b6e268eea352572c3d081039daf00c822a4c5/logo.png b/blockchains/ethereum/assets/0x223B6e268Eea352572c3D081039DAf00c822A4c5/logo.png similarity index 100% rename from blockchains/ethereum/0x223b6e268eea352572c3d081039daf00c822a4c5/logo.png rename to blockchains/ethereum/assets/0x223B6e268Eea352572c3D081039DAf00c822A4c5/logo.png diff --git a/blockchains/ethereum/assets/0xA1248c718d52752b2cC257eeb0eBa900408dAeB8/logo.png b/blockchains/ethereum/assets/0xA1248c718d52752b2cC257eeb0eBa900408dAeB8/logo.png new file mode 100644 index 000000000..b608db458 Binary files /dev/null and b/blockchains/ethereum/assets/0xA1248c718d52752b2cC257eeb0eBa900408dAeB8/logo.png differ diff --git a/blockchains/ethereum/assets/0xD68515DbB439aC30BEFAeDAFf7487b3a00b57659/logo.png b/blockchains/ethereum/assets/0xD68515DbB439aC30BEFAeDAFf7487b3a00b57659/logo.png index 9452d589f..37a8a7914 100644 Binary files a/blockchains/ethereum/assets/0xD68515DbB439aC30BEFAeDAFf7487b3a00b57659/logo.png and b/blockchains/ethereum/assets/0xD68515DbB439aC30BEFAeDAFf7487b3a00b57659/logo.png differ diff --git a/blockchains/ethereum/assets/0xE5a3229CCb22b6484594973A03a3851dCd948756/logo.png b/blockchains/ethereum/assets/0xE5a3229CCb22b6484594973A03a3851dCd948756/logo.png new file mode 100644 index 000000000..dcffc694c Binary files /dev/null and b/blockchains/ethereum/assets/0xE5a3229CCb22b6484594973A03a3851dCd948756/logo.png differ diff --git a/blockchains/ethereum/assets/0xc962ad021a69D457564e985738C719aE3f79B707/logo.png b/blockchains/ethereum/assets/0xc962ad021a69D457564e985738C719aE3f79B707/logo.png new file mode 100644 index 000000000..5132146ae Binary files /dev/null and b/blockchains/ethereum/assets/0xc962ad021a69D457564e985738C719aE3f79B707/logo.png differ diff --git a/blockchains/ethereum/assets/0xce9e84a26Ddb9E2283De164F7eD595E0D27E32b3/logo.png b/blockchains/ethereum/assets/0xce9e84a26Ddb9E2283De164F7eD595E0D27E32b3/logo.png new file mode 100644 index 000000000..fd77c867b Binary files /dev/null and b/blockchains/ethereum/assets/0xce9e84a26Ddb9E2283De164F7eD595E0D27E32b3/logo.png differ diff --git a/package-lock.json b/package-lock.json index 2621c0606..d573147f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -643,10 +643,9 @@ } }, "@types/node": { - "version": "12.12.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.11.tgz", - "integrity": "sha512-O+x6uIpa6oMNTkPuHDa9MhMMehlxLAd5QcOvKRjAFsBVpeFWTOPnXbDvILvFgFFZfQ1xh1EZi1FbXxUix+zpsQ==", - "dev": true + "version": "13.7.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.1.tgz", + "integrity": "sha512-Zq8gcQGmn4txQEJeiXo/KiLpon8TzAl0kmKH4zdWctPj05nWwp1ClMdAVEloqrQKfaC48PNLdgN/aVaLqUrluA==" }, "@types/stack-utils": { "version": "1.0.1", @@ -8712,6 +8711,14 @@ "web3-net": "1.2.4", "web3-shh": "1.2.4", "web3-utils": "1.2.4" + }, + "dependencies": { + "@types/node": { + "version": "12.12.27", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.27.tgz", + "integrity": "sha512-odQFl/+B9idbdS0e8IxDl2ia/LP8KZLXhV3BUeI98TrZp0uoIzQPhGd+5EtzHmT0SMOIaPd7jfz6pOHLWTtl7A==", + "dev": true + } } }, "web3-bzz": { @@ -8747,6 +8754,14 @@ "web3-core-method": "1.2.4", "web3-core-requestmanager": "1.2.4", "web3-utils": "1.2.4" + }, + "dependencies": { + "@types/node": { + "version": "12.12.27", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.27.tgz", + "integrity": "sha512-odQFl/+B9idbdS0e8IxDl2ia/LP8KZLXhV3BUeI98TrZp0uoIzQPhGd+5EtzHmT0SMOIaPd7jfz6pOHLWTtl7A==", + "dev": true + } } }, "web3-core-helpers": { @@ -8933,6 +8948,14 @@ "web3-core-method": "1.2.4", "web3-net": "1.2.4", "web3-utils": "1.2.4" + }, + "dependencies": { + "@types/node": { + "version": "12.12.27", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.27.tgz", + "integrity": "sha512-odQFl/+B9idbdS0e8IxDl2ia/LP8KZLXhV3BUeI98TrZp0uoIzQPhGd+5EtzHmT0SMOIaPd7jfz6pOHLWTtl7A==", + "dev": true + } } }, "web3-net": { diff --git a/package.json b/package.json index c69aa5507..5f63c0b2e 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,9 @@ "typescript": "^3.7.5", "web3": "^1.2.4" }, - "dependencies": {}, + "dependencies": { + "@types/node": "^13.7.1" + }, "jest": { "setupFilesAfterEnv": [ "jest-expect-message" diff --git a/pricing/coinmarketcap/mapping.json b/pricing/coinmarketcap/mapping.json index 8d5f63170..7cb8bee61 100644 --- a/pricing/coinmarketcap/mapping.json +++ b/pricing/coinmarketcap/mapping.json @@ -500,12 +500,6 @@ "type": "coin", "id": 1141 }, - { - "coin": 60, - "type": "token", - "token_id": "0xAef38fBFBF932D1AeF3B808Bc8fBd8Cd8E1f8BC5", - "id": 1153 - }, { "coin": 42, "type": "coin", @@ -666,6 +660,12 @@ "type": "coin", "id": 1464 }, + { + "coin": 60, + "type": "token", + "token_id": "0x92E78dAe1315067a8819EFD6dCA432de9DCdE2e9", + "id": 1465 + }, { "coin": 197, "type": "coin", @@ -1574,12 +1574,6 @@ "token_id": "0xc42209aCcC14029c1012fB5680D95fBd6036E2a0", "id": 2036 }, - { - "coin": 60, - "type": "token", - "token_id": "0xEA610B1153477720748DC13ED378003941d84fAB", - "id": 2040 - }, { "coin": 177, "type": "coin", @@ -3426,12 +3420,6 @@ "token_id": "0x5102791cA02FC3595398400BFE0e33d7B6C82267", "id": 2580 }, - { - "coin": 60, - "type": "token", - "token_id": "0xEF2463099360a085f1f10b076Ed72Ef625497a06", - "id": 2581 - }, { "coin": 60, "type": "token", @@ -3492,12 +3480,6 @@ "token_id": "0x6Ba460AB75Cd2c56343b3517ffeBA60748654D26", "id": 2597 }, - { - "coin": 60, - "type": "token", - "token_id": "0x35a69642857083BA2F30bfaB735dacC7F0bac969", - "id": 2598 - }, { "coin": 60, "type": "token", @@ -4218,12 +4200,6 @@ "type": "coin", "id": 2773 }, - { - "coin": 60, - "type": "token", - "token_id": "0xEcE83617Db208Ad255Ad4f45Daf81E25137535bb", - "id": 2774 - }, { "coin": 60, "type": "token", @@ -5247,12 +5223,6 @@ "token_id": "0x832904863978b94802123106e6eB491BDF0Df928", "id": 3101 }, - { - "coin": 60, - "type": "token", - "token_id": "0x02F2D4a04E6E01aCE88bD2Cd632875543b2eF577", - "id": 3106 - }, { "coin": 60, "type": "token", @@ -8533,12 +8503,6 @@ "token_id": "0xe577e0B200d00eBdecbFc1cd3F7E8E04C70476BE", "id": 4109 }, - { - "coin": 60, - "type": "token", - "token_id": "0x2D153f2aDCCbe9364F9e4eD5843308AbD0bF93dA", - "id": 4111 - }, { "coin": 60, "type": "token", @@ -10045,6 +10009,12 @@ "type": "coin", "id": 5127 }, + { + "coin": 60, + "type": "token", + "token_id": "0xce9e84a26Ddb9E2283De164F7eD595E0D27E32b3", + "id": 5133 + }, { "coin": 60, "type": "token", @@ -10080,6 +10050,18 @@ "token_id": "WRX-ED1", "id": 5161 }, + { + "coin": 60, + "type": "token", + "token_id": "0x14409B0Fc5C7f87b5DAd20754fE22d29A3dE8217", + "id": 5169 + }, + { + "coin": 60, + "type": "token", + "token_id": "0xc962ad021a69D457564e985738C719aE3f79B707", + "id": 5170 + }, { "coin": 60, "type": "token", @@ -10127,5 +10109,11 @@ "type": "token", "token_id": "0x70da48f4B7e83c386ef983D4CEF4e58c2c09D8Ac", "id": 5220 + }, + { + "coin": 60, + "type": "token", + "token_id": "0x02b1669bC9EE893edAFf3cADfD326A294d643f99", + "id": 5232 } ] \ No newline at end of file diff --git a/pricing/coinmarketcap/script.ts b/pricing/coinmarketcap/script.ts index 8a09e076f..2b9cfe914 100644 --- a/pricing/coinmarketcap/script.ts +++ b/pricing/coinmarketcap/script.ts @@ -39,6 +39,7 @@ const custom: mapTiker[] = [ {"coin": 60, "type": typeToken, "token_id": "0x2fe39f22EAC6d3c1C86DD9D143640EbB94609FCE", "id": 4929}, // JDC Coin ERC20 {"coin": 60, "type": typeToken, "token_id": "0xdfbc9050F5B01DF53512DCC39B4f2B2BBaCD517A", "id": 4287}, // new Jobchain (JOB) {"coin": 60, "type": typeToken, "token_id": "0x5Cf04716BA20127F1E2297AdDCf4B5035000c9eb", "id": 2780}, // NKN (NKN) + {"coin": 714, "type": typeToken, "token_id": "CHZ-ECD", "id": 4066}, // Chilz (BEP-2) ] const permanentRemove = [ diff --git a/script/commit.sh b/script/commit.sh new file mode 100755 index 000000000..2735d3e9e --- /dev/null +++ b/script/commit.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +if [[ `git status --porcelain --untracked-files=no` ]]; then + git add . + git commit -m "Checksum ERC20 addresses [skip ci]" + echo Current branch + echo Pushing changes to branch: "$SYSTEM_PULLREQUEST_SOURCEBRANCH" + echo Current branch $(git branch) + git status + git push origin HEAD:"$SYSTEM_PULLREQUEST_SOURCEBRANCH" + echo Complete +else + echo "Nothing to commit" +fi \ No newline at end of file diff --git a/script/erc20_to_checksum.ts b/script/erc20_to_checksum.ts index 72561fa19..0198e9f8a 100644 --- a/script/erc20_to_checksum.ts +++ b/script/erc20_to_checksum.ts @@ -1,5 +1,4 @@ const { execSync } = require('child_process'); -const fs = require('fs') const path = require('path') const Web3 = require('web3') const web3 = new Web3('ws://localhost:8546');