forked from SmolDapp/tokenAssets
-
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.
- Loading branch information
0 parents
commit ce474fe
Showing
1,650 changed files
with
97,645 additions
and
0 deletions.
There are no files selected for viewing
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,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 |
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,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); | ||
} |
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: 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 |
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,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.
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
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
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.
Oops, something went wrong.