Skip to content

Commit

Permalink
feat: reup
Browse files Browse the repository at this point in the history
  • Loading branch information
Majorfi committed Apr 8, 2023
0 parents commit ce474fe
Show file tree
Hide file tree
Showing 1,650 changed files with 97,645 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/addNewToken.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!--
Thanks for creating this pull request 🤗
Please make sure that the pull request is limited to one token at a time a that all the field below are filled!
-->

## 📑 Description
<!-- Some basic informations about the token you want to add -->
- Token Address: <!-- 0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e -->
- Token Name: <!-- Yearn Finance (YFI) -->
- Explorer URI: <!-- https://etherscan.io/token/0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e -->
- Project URI: <!-- https://yearn.finance -->
- Supported chains: <!-- 1, 10, 250, 42161 -->

## ✅ Checks
<!-- Make sure your pr passes the CI checks and do check the following fields as needed - -->
- [ ] I added a new folder in the corresponding chainID directory with the address of my token in lowercase
- [ ] I added the token's logo as a `32x32` PNG file, named `logo-32.png`
- [ ] I added the token's logo as a `128x128` PNG file, named `logo-128.png`
- [ ] I added the token's logo as a SVG file, named `logo.svg`
- [ ] All the tests have passed
66 changes: 66 additions & 0 deletions .github/scripts/verify.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import fs from "fs-extra";
import path from "path";

const DataDirectory = ".";
const IndexName = "index.json";

function validate(directory) {
let allValid = true;
for (let name of fs.readdirSync(directory)) {
if (name.startsWith(".") || name === IndexName || name === 'node_modules') continue;
const file = path.join(directory, name);
const stat = fs.lstatSync(file);
if (stat.isDirectory()) {
if (name.startsWith("0x")) {
try {
if (name.toLowerCase() !== name) {
console.error(`Error: "${name}" is not lowercased. Should be "${name.toLowerCase()}".`);
allValid = false;
}
} catch(error) {
console.error(`Error: "${name}" is not lowercased. Should be "${name.toLowerCase()}".`);
allValid = false;
}
}
if (name.startsWith("_")) {
continue
}
if (name.startsWith("0x")) {
if (!fs.existsSync(path.join(file, "logo-128.png"))) {
console.error(`Error: "${file}" is missing logo-128.png`);
allValid = false;
}
if (!fs.existsSync(path.join(file, "logo-32.png"))) {
console.error(`Error: "${file}" is missing logo-32.png`);
allValid = false;
}
if (!fs.existsSync(path.join(file, "logo.svg"))) {
console.error(`Error: "${file}" is missing logo.svg`);
allValid = false;
}
}
allValid &= validate(file);
}
}
return allValid;
}

function verify(dataDir) {
const valid = validate(dataDir);
if (!valid)
process.exit(1);
}

const cwd = process.cwd();
if (!fs.existsSync(path.join(cwd, ".git"))) {
console.error("Error: script should be run in the root of the repo.");
process.exit(1);
}

try {
verify(DataDirectory);
console.log("Ok: all files match schema definitions!");
} catch (error) {
console.error(error);
process.exit(1);
}
25 changes: 25 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Validation
on:
push:
branches:
- main
pull_request:
jobs:
verify:
name: Checksum check
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Node 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Install deps
run: npm install

- name: Verify checksum
run: node ./.github/scripts/verify.mjs
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
node_modules
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions 1/0x0000000000085d4780b73119b644ae5ecd22b376/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions 1/0x00e8eb340f8af587eea6200d2081e31dc87285ac/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions 1/0x0100546f2cd4c9d97f798ffc9755e47865ff7ee6/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ce474fe

Please sign in to comment.