forked from ethereum-lists/chains
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from ethereum-lists/master
Sync fork
- Loading branch information
Showing
2,260 changed files
with
35,413 additions
and
4,879 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: gradle | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
open-pull-requests-limit: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Build | ||
on: [pull_request] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.1 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v41 | ||
|
||
- name: Check changed files | ||
run: | | ||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | ||
./gradlew clean run --args="verbose singleChainCheck $file" | ||
done | ||
- name: Build | ||
run: | | ||
./gradlew run | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: [ master ] | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.1 | ||
with: | ||
submodules: recursive | ||
- name: Build | ||
run: | | ||
./gradlew run | ||
- name: Set Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
- name: Run yarn install | ||
uses: borales/actions-yarn@v4 | ||
with: | ||
dir: 'website' | ||
cmd: install # will run `yarn install` command | ||
- name: Run yarn build | ||
uses: borales/actions-yarn@v4 | ||
with: | ||
dir: 'website' | ||
cmd: run build # will run `yarn test` command | ||
- name: Merge | ||
run: | | ||
cp -a output/. website/public/ | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@4.1.4 | ||
with: | ||
branch: gh-pages | ||
folder: website/public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
on: | ||
pull_request_target: | ||
types: [closed] | ||
jobs: | ||
comment_on_merged_pr: | ||
if: github.event.pull_request.merged | ||
runs-on: ubuntu-latest | ||
name: Comment after PR merge | ||
steps: | ||
- name: Comment PR | ||
uses: thollander/actions-comment-pull-request@v2 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
message: | | ||
PR merged - please consider contributing some funds to lists.eth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
name: Run PR Checks | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
validate_icons: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: nrwl/nx-set-shas@v3 | ||
id: last_successful_commit_push | ||
with: | ||
main-branch-name: master | ||
workflow-id: 'pr_checks.yml' | ||
|
||
- name: Get changed icons | ||
id: changed-icons | ||
uses: tj-actions/changed-files@v41 | ||
with: | ||
files: _data/icons/*.json | ||
base_sha: ${{ steps.last_successful_commit_push.outputs.base }} | ||
|
||
- name: Get changed icon blobs | ||
id: changed-icon-blobs | ||
uses: tj-actions/changed-files@v41 | ||
with: | ||
files: _data/iconsDownload/* | ||
base_sha: ${{ steps.last_successful_commit_push.outputs.base }} | ||
|
||
- run: sudo apt-get -y install jq curl exiftool | ||
|
||
- name: Verify the changed icons | ||
if: steps.changed-icons.outputs.any_changed == 'true' | ||
run: | | ||
set -euo pipefail | ||
BAD=0 | ||
CHANGED_ICON_BLOBS=(${{ steps.changed-icon-blobs.outputs.all_changed_files }}) | ||
for CHANGED_FILE in ${{ steps.changed-icons.outputs.all_changed_files }}; do | ||
echo "Checking icon $CHANGED_FILE" | ||
URL=$(cat "$CHANGED_FILE" | jq '.[0].url' -r) | ||
if [[ "$URL" =~ ^ipfs://([A-Za-z0-9]+)$ ]]; then | ||
IPFS_HASH=${BASH_REMATCH[1]} | ||
if [[ "${CHANGED_ICON_BLOBS[*]} " =~ "_data/iconsDownload/$IPFS_HASH " ]]; then | ||
TARGET_FILE="_data/iconsDownload/$IPFS_HASH" | ||
else | ||
echo "Trying to download the image..." | ||
TARGET_FILE=icon | ||
curl -Lo icon "https://cloudflare-ipfs.com/ipfs/$IPFS_HASH" 2>/dev/null | ||
fi | ||
METADATA=$(exiftool $TARGET_FILE -json) | ||
SCHEMA_WIDTH=$(cat "$CHANGED_FILE" | jq '.[0].width' -r) | ||
SCHEMA_HEIGHT=$(cat "$CHANGED_FILE" | jq '.[0].height' -r) | ||
SCHEMA_TYPE=$(cat "$CHANGED_FILE" | jq '.[0].format' -r) | ||
META_WIDTH=$(echo "$METADATA" | jq '.[0].ImageWidth' -r) | ||
META_HEIGHT=$(echo "$METADATA" | jq '.[0].ImageHeight' -r) | ||
META_TYPE=$(echo "$METADATA" | jq '.[0].FileTypeExtension' -r) | ||
if [ "$SCHEMA_WIDTH" != "$META_WIDTH" ]; then | ||
echo "Expected width $SCHEMA_WIDTH, got $META_WIDTH" | ||
BAD=1 | ||
fi | ||
if [ "$SCHEMA_HEIGHT" != "$META_HEIGHT" ]; then | ||
echo "Expected height $SCHEMA_HEIGHT, got $META_HEIGHT" | ||
BAD=1 | ||
fi | ||
case "$SCHEMA_TYPE" in | ||
png) | ||
if [ "$META_TYPE" != "png" ]; then | ||
echo "Expected type png, got $META_TYPE" | ||
BAD=1 | ||
fi | ||
;; | ||
jpg) | ||
if [ "$META_TYPE" != "jpg" ]; then | ||
echo "Expected type jpg, got $META_TYPE" | ||
BAD=1 | ||
fi | ||
;; | ||
svg) | ||
if [ "$META_TYPE" != "svg" ]; then | ||
echo "Expected type svg, got $META_TYPE" | ||
BAD=1 | ||
fi | ||
;; | ||
*) | ||
echo "Expected type png, jpg, or svg, got $SCHEMA_TYPE" | ||
BAD=1 | ||
;; | ||
esac | ||
else | ||
echo "Expected an IPFS URL, got $URL" | ||
BAD=1 | ||
fi | ||
done | ||
exit $BAD | ||
validate_formatting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: nrwl/nx-set-shas@v3 | ||
id: last_successful_commit_push | ||
with: | ||
main-branch-name: master | ||
workflow-id: 'pr_checks.yml' | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v41 | ||
with: | ||
files: _data/*/*.json | ||
base_sha: ${{ steps.last_successful_commit_push.outputs.base }} | ||
|
||
- run: sudo npm i -g prettier | ||
|
||
- name: Verify the changed icons | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: | | ||
set -euo pipefail | ||
BAD=0 | ||
for CHANGED_FILE in ${{ steps.changed-files.outputs.all_changed_files }}; do | ||
echo "Checking $CHANGED_FILE" | ||
diff -u "$CHANGED_FILE" <(prettier "$CHANGED_FILE") | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Run prettier | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
prettier: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
name: Configure npm caching | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-npm-${{ hashFiles('**/workflows/prettier.yml') }} | ||
restore-keys: | | ||
${{ runner.os }}-npm- | ||
- name: Run prettier | ||
run: |- | ||
npx prettier --check '_data/*/*.json' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Automatic Rebase | ||
on: | ||
issue_comment: | ||
types: [created] | ||
jobs: | ||
rebase: | ||
name: Rebase | ||
runs-on: ubuntu-latest | ||
if: >- | ||
github.event.issue.pull_request != '' && | ||
( | ||
contains(github.event.comment.body, '/rebase') || | ||
contains(github.event.comment.body, '/autosquash') | ||
) | ||
steps: | ||
- name: Checkout the latest code | ||
uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo | ||
- name: Automatic Rebase | ||
uses: cirrus-actions/rebase@1.7 | ||
with: | ||
autosquash: ${{ contains(github.event.comment.body, '/autosquash') || contains(github.event.comment.body, '/rebase-autosquash') }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: 'Close stale issues and PRs' | ||
on: | ||
schedule: | ||
- cron: '30 1 * * *' | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v4 | ||
with: | ||
stale-issue-message: 'This issue has no activity in a while - it will be closed soon.' | ||
exempt-issue-labels: enhancement | ||
stale-pr-message: 'This PR has no activity in a while - it will be closed soon.' | ||
days-before-stale: 42 | ||
days-before-close: 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Check JSON Schema | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
validate_json: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
name: Configure npm caching | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-npm-${{ hashFiles('**/workflows/validate_json.yml') }} | ||
restore-keys: | | ||
${{ runner.os }}-npm- | ||
- name: Run JSON Validation | ||
working-directory: ./tools | ||
run: |- | ||
npm install | ||
node schemaCheck.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "website"] | ||
path = website | ||
url = https://github.com/FrederikBolding/chainlist.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
jdk: openjdk11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Using Prettier for JSON files only in _data | ||
|
||
# Command to format all existing JSON files | ||
# npx prettier --write --ignore-unknown _data | ||
|
||
model | ||
processor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"tabWidth": 2, | ||
"semi": false, | ||
"singleQuote": false | ||
} |
Oops, something went wrong.