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/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 e243bb6..1980577 100644
--- a/scripts/validate-list.js
+++ b/scripts/validate-list.js
@@ -10,13 +10,28 @@ 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 = [
+ // Remote Bridged mBTC
+ "0x0Af3EC6F9592C193196bEf220BC0Ce4D9311527D",
+ // Bridged egETH
+ "0x027a9d301FB747cd972CFB29A63f3BDA551DFc5c",
+];
+
// 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..8de61c6 100644
--- a/src/hemi.tokenlist.json
+++ b/src/hemi.tokenlist.json
@@ -1,12 +1,23 @@
{
"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": [
+ {
+ "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,
@@ -23,6 +34,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,
@@ -226,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 @@
+
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 @@
+
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`);
});