From 781d778b3e880dd190bea0a88119383be4619c95 Mon Sep 17 00:00:00 2001 From: 0xkenj1 Date: Tue, 10 Sep 2024 17:32:23 -0300 Subject: [PATCH 1/5] feat: add validation workflow --- .github/validate_json.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/validate_json.yaml diff --git a/.github/validate_json.yaml b/.github/validate_json.yaml new file mode 100644 index 0000000..6070bee --- /dev/null +++ b/.github/validate_json.yaml @@ -0,0 +1,31 @@ +name: Validate JSON + +on: + push: + paths: + - '**/*.json' + pull_request: + paths: + - '**/*.json' + +jobs: + json-validation: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install jq + run: sudo apt-get update && sudo apt-get install -y jq + + - name: Validate JSON files + run: | + find . -name "*.json" -print0 | while IFS= read -r -d '' file; do + echo "Validating $file" + if jq empty "$file"; then + echo "Valid JSON: $file" + else + echo "Invalid JSON in file: $file" + exit 1 + fi + done From 89fcf13d07bd38fc5452b4b3c325a73191303592 Mon Sep 17 00:00:00 2001 From: 0xkenj1 Date: Tue, 10 Sep 2024 17:32:54 -0300 Subject: [PATCH 2/5] fix: readme --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index f9c4841..7a05ef8 100644 --- a/README.md +++ b/README.md @@ -12,24 +12,24 @@ This file contains an array of Chain metadata. To add a new one, follow the foll ```json { - "chainId": 324, //mandatory - "name": "ZKsyncERA", //mandatory - "iconUrl": "https://s2.coinmarketcap.com/static/img/coins/64x64/24091.png", //optional + "chainId": 324, // mandatory + "name": "ZKsyncERA", // mandatory + "iconUrl": "https://s2.coinmarketcap.com/static/img/coins/64x64/24091.png", // optional "publicRpcs": [ "https://mainnet.era.zksync.io", "https://zksync.drpc.org", "https://zksync.meowrpc.com" ], //optional, - "explorerUrl": "https://explorer.zksync.io/", //optional - "launchDate": 1679626800, //mandatory + "explorerUrl": "https://explorer.zksync.io/", // optional + "launchDate": 1679626800, // mandatory "chainType": "Rollup", // "Rollup" | "Validium" "baseToken": { - "name": "Ether", //mandatory - "symbol": "ETH", //mandatory + "name": "Ether", // mandatory + "symbol": "ETH", // mandatory "type": "native", // "native" | "erc20" "contractAddress": null, // null if "native", address if "erc20" - "imageUrl": "https://coin-images.coingecko.com/coins/images/279/large/ethereum.png?1696501628", //optional - "decimals": 18 //mandatory + "imageUrl": "https://coin-images.coingecko.com/coins/images/279/large/ethereum.png?1696501628", // optional + "decimals": 18 // mandatory } } ``` From 74627ccf0793b5418b0daab3559593d642594852 Mon Sep 17 00:00:00 2001 From: 0xkenj1 Date: Tue, 10 Sep 2024 17:35:19 -0300 Subject: [PATCH 3/5] chore: test json --- tokens_mainnet.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokens_mainnet.json b/tokens_mainnet.json index 640c5c2..5779742 100644 --- a/tokens_mainnet.json +++ b/tokens_mainnet.json @@ -5,7 +5,7 @@ "contractAddress": "0xE41d2489571d322189246DaFA5ebDe1F4699F498", "coingeckoId": "0x", "imageUrl": "https://assets.coingecko.com/coins/images/863/large/0x.png?1696501996", - "type": "erc20", + "type": "erc20" "decimals": 18 }, { From bfbf2563829d37a38794c944a0ead3206a7d548d Mon Sep 17 00:00:00 2001 From: nigiri <168690269+0xnigir1@users.noreply.github.com> Date: Tue, 10 Sep 2024 18:02:54 -0300 Subject: [PATCH 4/5] ci: gh workflow fix --- .github/{ => workflows}/validate_json.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/validate_json.yaml (100%) diff --git a/.github/validate_json.yaml b/.github/workflows/validate_json.yaml similarity index 100% rename from .github/validate_json.yaml rename to .github/workflows/validate_json.yaml From 4c2e20ea1adb92a7890c8d87d63b0bf2227fa2fe Mon Sep 17 00:00:00 2001 From: nigiri <168690269+0xnigir1@users.noreply.github.com> Date: Tue, 10 Sep 2024 18:04:15 -0300 Subject: [PATCH 5/5] fix: tokens.json --- tokens_mainnet.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokens_mainnet.json b/tokens_mainnet.json index 5779742..640c5c2 100644 --- a/tokens_mainnet.json +++ b/tokens_mainnet.json @@ -5,7 +5,7 @@ "contractAddress": "0xE41d2489571d322189246DaFA5ebDe1F4699F498", "coingeckoId": "0x", "imageUrl": "https://assets.coingecko.com/coins/images/863/large/0x.png?1696501996", - "type": "erc20" + "type": "erc20", "decimals": 18 }, {