with one click
add-icon
// Add new crypto icon(s) to the project: compress PNGs, update _record.json, regenerate index, and open a PR. Use when the user says /add-icon, asks to add a crypto icon, or wants to register a new token icon.
// Add new crypto icon(s) to the project: compress PNGs, update _record.json, regenerate index, and open a PR. Use when the user says /add-icon, asks to add a crypto icon, or wants to register a new token icon.
| name | add-icon |
| description | Add new crypto icon(s) to the project: compress PNGs, update _record.json, regenerate index, and open a PR. Use when the user says /add-icon, asks to add a crypto icon, or wants to register a new token icon. |
Add one or more crypto icons to the repository, end-to-end.
Ask the user for:
~/-relative path to each 144ร144 PNG.hyperevm/erc20/token_name_0xaddress)._record.json key (e.g. KHYPE). If not provided, infer from the filename.cp <source_png> compress/<TICKER>.png
Repeat for each icon.
cd lib && pnpm compress
This runs zopflipng on every PNG in compress/. It can be slow.
After compression, verify each output in compress/out/ is โค 50 KB.
cp compress/out/<TICKER>.png assets/<TICKER>.png
_record.jsonOpen assets/_record.json and insert a new entry in alphabetical order:
"<TICKER>": {
"ids": [
"<ledger_id_1>",
"<ledger_id_2>"
]
}
Keep the file sorted by key.
cd lib && pnpm generate:index
Confirm the new entries appear in assets/index.json.
Remove the working files from the compress folder:
rm compress/<TICKER>.png compress/out/<TICKER>.png
git checkout -b feat/add-<ticker(s)>-icon.assets/<TICKER>.png, assets/_record.json, and assets/index.json.feat: add <TICKER> icon(s).gh pr create.The repo has a PR template at .github/PULL_REQUEST_TEMPLATE.md. Fill it in:
Add <TICKER> icon (<Full Name>) โ <ledger_id>[x]) since all steps were completed.