From 7ce01f73bc651f10f4eef43752fcd563479e99da Mon Sep 17 00:00:00 2001 From: Gonzalo D'elia Date: Mon, 3 Mar 2025 16:51:59 -0300 Subject: [PATCH 1/4] Add Remote Bridged mBTC token --- scripts/validate-list.js | 12 +++++++++++- src/hemi.tokenlist.json | 11 +++++++++++ src/logos/remote-bridged-mbtc.svg | 27 +++++++++++++++++++++++++++ test/hemi.tokenlist.test.js | 8 ++++++-- 4 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 src/logos/remote-bridged-mbtc.svg diff --git a/scripts/validate-list.js b/scripts/validate-list.js index e243bb6..fa47242 100644 --- a/scripts/validate-list.js +++ b/scripts/validate-list.js @@ -10,13 +10,23 @@ const tokenList = JSON.parse( const schemaUrl = "https://raw.githubusercontent.com/Uniswap/token-lists/main/src/tokenlist.schema.json"; +// Some tokens are invalid (they were deployed with a schema that doesn't match the expected Uniswap list). +// So we must exclude these. +// TODO see https://github.com/hemilabs/token-list/issues/41 +const tokenAddressToExclude = ["0x0Af3EC6F9592C193196bEf220BC0Ce4D9311527D"]; + // See https://github.com/uniswap/token-lists?tab=readme-ov-file#validating-token-lists async function validate() { const ajv = new Ajv({ allErrors: true, verbose: true }); addFormats(ajv); const schema = await fetch(schemaUrl).then((r) => r.json()); const validator = ajv.compile(schema); - const valid = validator(tokenList); + const valid = validator({ + ...tokenList, + tokens: tokenList.tokens.filter( + (token) => !tokenAddressToExclude.includes(token.address), + ), + }); if (valid) { return; } diff --git a/src/hemi.tokenlist.json b/src/hemi.tokenlist.json index 594dc70..ab4cd4d 100644 --- a/src/hemi.tokenlist.json +++ b/src/hemi.tokenlist.json @@ -23,6 +23,17 @@ "name": "Wrapped BTC", "symbol": "WBTC" }, + { + "address": "0x0Af3EC6F9592C193196bEf220BC0Ce4D9311527D", + "chainId": 43111, + "decimals": 8, + "extensions": { + "birthBlock": 1187223 + }, + "logoURI": "https://raw.githubusercontent.com/hemilabs/token-list/master/src/logos/remote-bridged-mbtc.svg", + "name": "Liquid Staked BTC", + "symbol": "Remote Bridged mBTC" + }, { "address": "0x12B6e6FC45f81cDa81d2656B974E8190e4ab8D93", "chainId": 43111, diff --git a/src/logos/remote-bridged-mbtc.svg b/src/logos/remote-bridged-mbtc.svg new file mode 100644 index 0000000..c83f1c2 --- /dev/null +++ b/src/logos/remote-bridged-mbtc.svg @@ -0,0 +1,27 @@ + + + + + + + + + diff --git a/test/hemi.tokenlist.test.js b/test/hemi.tokenlist.test.js index f71c948..7586657 100644 --- a/test/hemi.tokenlist.test.js +++ b/test/hemi.tokenlist.test.js @@ -78,13 +78,17 @@ describe("List of tokens", function () { }); it("image URL and file should be valid", function () { - const repoUrl = "https://raw.githubusercontent.com/hemilabs/token-list"; - const filename = symbol.toLowerCase().replace(".e", ""); // TODO https://github.com/hemilabs/token-list/issues/36 testnet bitcoin logo url needs to be updated if (address === "0x36Ab5Dba83d5d470F670BC4c06d7Da685d9afAe7") { this.skip(); return; } + const repoUrl = "https://raw.githubusercontent.com/hemilabs/token-list"; + const filename = symbol + .toLowerCase() + .replace(".e", "") + .replaceAll(" ", "-") + .toLowerCase(); assert.equal(logoURI, `${repoUrl}/master/src/logos/${filename}.svg`); fs.accessSync(`src/logos/${filename}.svg`); }); From 0d6b4e3669672a16a2dd232c3058a24c41b743ab Mon Sep 17 00:00:00 2001 From: Gonzalo D'elia Date: Mon, 3 Mar 2025 17:08:38 -0300 Subject: [PATCH 2/4] Add Bridged egETH --- scripts/add-token.js | 6 +++++- scripts/validate-list.js | 7 ++++++- src/hemi.tokenlist.json | 9 +++++++++ src/logos/bridged-egeth.svg | 27 +++++++++++++++++++++++++++ 4 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 src/logos/bridged-egeth.svg diff --git a/scripts/add-token.js b/scripts/add-token.js index aaeafb4..ffd0055 100644 --- a/scripts/add-token.js +++ b/scripts/add-token.js @@ -54,7 +54,11 @@ async function addToken() { () => undefined, ); - const filename = symbol.toLowerCase().replace(".e", ""); + const filename = symbol + .toLowerCase() + .replace(".e", "") + .replaceAll(" ", "-") + .toLowerCase(); const repoUrl = "https://raw.githubusercontent.com/hemilabs/token-list"; const logoURI = `${repoUrl}/master/src/logos/${filename}.svg`; tokenList.tokens.push({ diff --git a/scripts/validate-list.js b/scripts/validate-list.js index fa47242..1980577 100644 --- a/scripts/validate-list.js +++ b/scripts/validate-list.js @@ -13,7 +13,12 @@ const schemaUrl = // Some tokens are invalid (they were deployed with a schema that doesn't match the expected Uniswap list). // So we must exclude these. // TODO see https://github.com/hemilabs/token-list/issues/41 -const tokenAddressToExclude = ["0x0Af3EC6F9592C193196bEf220BC0Ce4D9311527D"]; +const tokenAddressToExclude = [ + // Remote Bridged mBTC + "0x0Af3EC6F9592C193196bEf220BC0Ce4D9311527D", + // Bridged egETH + "0x027a9d301FB747cd972CFB29A63f3BDA551DFc5c", +]; // See https://github.com/uniswap/token-lists?tab=readme-ov-file#validating-token-lists async function validate() { diff --git a/src/hemi.tokenlist.json b/src/hemi.tokenlist.json index ab4cd4d..db3f7a9 100644 --- a/src/hemi.tokenlist.json +++ b/src/hemi.tokenlist.json @@ -7,6 +7,15 @@ "patch": 0 }, "tokens": [ + { + "address": "0x027a9d301FB747cd972CFB29A63f3BDA551DFc5c", + "chainId": 43111, + "decimals": 18, + "extensions": { "birthBlock": 1129497 }, + "logoURI": "https://raw.githubusercontent.com/hemilabs/token-list/master/src/logos/bridged-egeth.svg", + "name": "Bridged egETH", + "symbol": "Bridged egETH" + }, { "address": "0x03C7054BCB39f7b2e5B2c7AcB37583e32D70Cfa3", "chainId": 43111, diff --git a/src/logos/bridged-egeth.svg b/src/logos/bridged-egeth.svg new file mode 100644 index 0000000..5a98fea --- /dev/null +++ b/src/logos/bridged-egeth.svg @@ -0,0 +1,27 @@ + + + + + + + + + From 20e487b48f0269f55277d20d67c7fff1bc208690 Mon Sep 17 00:00:00 2001 From: Gonzalo D'elia Date: Mon, 3 Mar 2025 17:09:15 -0300 Subject: [PATCH 3/4] 1.11.0 --- package-lock.json | 4 ++-- package.json | 2 +- src/hemi.tokenlist.json | 8 +++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index f5d5623..bd2d62c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@hemilabs/token-list", - "version": "1.10.0", + "version": "1.11.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@hemilabs/token-list", - "version": "1.10.0", + "version": "1.11.0", "license": "MIT", "devDependencies": { "@commitlint/cli": "19.5.0", diff --git a/package.json b/package.json index c91dc9b..e566dd2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hemilabs/token-list", - "version": "1.10.0", + "version": "1.11.0", "description": "List of ERC-20 tokens in the Hemi Network chains", "bugs": { "url": "https://github.com/hemilabs/token-list/issues" diff --git a/src/hemi.tokenlist.json b/src/hemi.tokenlist.json index db3f7a9..6d2aded 100644 --- a/src/hemi.tokenlist.json +++ b/src/hemi.tokenlist.json @@ -1,9 +1,9 @@ { "name": "Hemi Token List", - "timestamp": "2025-02-14T18:27:35.910Z", + "timestamp": "2025-03-03T20:09:15.197Z", "version": { "major": 1, - "minor": 10, + "minor": 11, "patch": 0 }, "tokens": [ @@ -11,7 +11,9 @@ "address": "0x027a9d301FB747cd972CFB29A63f3BDA551DFc5c", "chainId": 43111, "decimals": 18, - "extensions": { "birthBlock": 1129497 }, + "extensions": { + "birthBlock": 1129497 + }, "logoURI": "https://raw.githubusercontent.com/hemilabs/token-list/master/src/logos/bridged-egeth.svg", "name": "Bridged egETH", "symbol": "Bridged egETH" From e18a18fa6d73f59e887bd07295b8e12595085fa5 Mon Sep 17 00:00:00 2001 From: Gonzalo D'elia Date: Mon, 3 Mar 2025 17:31:05 -0300 Subject: [PATCH 4/4] Add brBTC token --- src/hemi.tokenlist.json | 11 +++++++++++ src/logos/brbtc.svg | 27 +++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 src/logos/brbtc.svg diff --git a/src/hemi.tokenlist.json b/src/hemi.tokenlist.json index 6d2aded..8de61c6 100644 --- a/src/hemi.tokenlist.json +++ b/src/hemi.tokenlist.json @@ -248,6 +248,17 @@ "protocol": "exSat" } }, + { + "address": "0x93919784C523f39CACaa98Ee0a9d96c3F32b593e", + "chainId": 43111, + "decimals": 8, + "extensions": { + "birthBlock": 971348 + }, + "logoURI": "https://raw.githubusercontent.com/hemilabs/token-list/master/src/logos/brbtc.svg", + "name": "brBTC", + "symbol": "brBTC" + }, { "address": "0x98D6E32f3092D39A6c0B36062cC9EB1E52Ccc99D", "chainId": 43111, diff --git a/src/logos/brbtc.svg b/src/logos/brbtc.svg new file mode 100644 index 0000000..0617289 --- /dev/null +++ b/src/logos/brbtc.svg @@ -0,0 +1,27 @@ + + + + + + + + +