Skip to content

Commit

Permalink
API-1628 - Creates a mechanism to build a contract map for releases. (#…
Browse files Browse the repository at this point in the history
…1424)

* chore: copy images to new caip-19 folders

* chore: updated docs

* chore: created scripts for building the contract map in caip-19 fmt

* chore: removes double ..

* chore: add tests for caip map

* chore: push

* chore: get rid of yarn lock

* chore: delete erc721 icons
  • Loading branch information
blurpesec authored Feb 7, 2025
1 parent 7faa3ab commit 6d2c6f0
Show file tree
Hide file tree
Showing 628 changed files with 764 additions and 626 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ imageElForEVMToken (ethereumNetworkChainId, "0x06012c8cf97BEaD5deAe237070F9587f8
Maintaining this list is a considerable chore, and it is not our highest priority. We do not guarantee inclusion in this list on any urgent timeline. We are actively looking for fair and safe ways to maintain a list like this in a decentralized way, because maintaining it is a large and security-delicate task.
1. Fork this repository.
2. Add your logo image in `.svg` file format to the `icons/` folder.
2. Add your logo image in `.svg` file format to the `icons` folder.
3. Add your asset metadata in a json format to a `metadata/${caip19AssetId}.json` file with the CAIP-19 Asset ID as the key inside of the `metadata/` folder.
Criteria:
Expand Down
26 changes: 26 additions & 0 deletions buildindex.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const fs = require("fs");
const path = require("path");

const fetchAndBuild = (() => {
const metadataFolder = "./metadata";
// step through every file in the metadata folder, recursively, and build the contractMap
const contractMap = {};
const recursiveFileNames = (dir) => {
const files = fs.readdirSync(dir);
files.forEach((file) => {
const filePath = path.join(dir, file);
if (fs.statSync(filePath).isDirectory()) {
recursiveFileNames(filePath);
} else {
const fileData = fs.readFileSync(filePath);
const metadata = JSON.parse(fileData);
// console.log(filePath.split("/").slice(1).join("/").split(".")[0]);
contractMap[filePath.split("/").slice(1).join("/").split(".")[0]] =
metadata;
}
});
};
recursiveFileNames(metadataFolder);
return contractMap;
})();
module.exports = fetchAndBuild;
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./contract-map.json')
module.exports = require("./contract-map.json");
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "TUSD",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x0000000000085d4780B73119b644AE5ecd22b376.svg"
"logo": "./icons/eip155:1/erc20:0x0000000000085d4780B73119b644AE5ecd22b376.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "TGBP",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x00000000441378008EA67F4284A57932B1c000a5.svg"
"logo": "./icons/eip155:1/erc20:0x00000000441378008EA67F4284A57932B1c000a5.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "TCAD",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x00000100F2A2bd000715001920eB70D229700085.svg"
"logo": "./icons/eip155:1/erc20:0x00000100F2A2bd000715001920eB70D229700085.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "USDA",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x0000206329b97DB379d5E1Bf586BbDB969C63274.svg"
"logo": "./icons/eip155:1/erc20:0x0000206329b97DB379d5E1Bf586BbDB969C63274.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "TAUD",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x00006100F7090010005F1bd7aE6122c3C2CF0090.svg"
"logo": "./icons/eip155:1/erc20:0x00006100F7090010005F1bd7aE6122c3C2CF0090.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "THKD",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x0000852600CEB001E08e00bC008be620d60031F2.svg"
"logo": "./icons/eip155:1/erc20:0x0000852600CEB001E08e00bC008be620d60031F2.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "C10",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x000C100050E98C91f9114fa5Dd75CE6869Bf4F53.svg"
"logo": "./icons/eip155:1/erc20:0x000C100050E98C91f9114fa5Dd75CE6869Bf4F53.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "stUSD",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776.svg"
"logo": "./icons/eip155:1/erc20:0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "stEUR",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x004626A008B1aCdC4c74ab51644093b155e59A23.svg"
"logo": "./icons/eip155:1/erc20:0x004626A008B1aCdC4c74ab51644093b155e59A23.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "bYFL",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x008377EB0C62cE8e0BA3D7Bb4A5638591f21588E.svg"
"logo": "./icons/eip155:1/erc20:0x008377EB0C62cE8e0BA3D7Bb4A5638591f21588E.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "SKL",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x00c83aeCC790e8a4453e5dD3B0B4b3680501a7A7.svg"
"logo": "./icons/eip155:1/erc20:0x00c83aeCC790e8a4453e5dD3B0B4b3680501a7A7.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "VAL",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x011E128Ec62840186F4A07E85E3ACe28858c5606.svg"
"logo": "./icons/eip155:1/erc20:0x011E128Ec62840186F4A07E85E3ACe28858c5606.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "CVL",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x01FA555c97D7958Fa6f771f3BbD5CCD508f81e22.svg"
"logo": "./icons/eip155:1/erc20:0x01FA555c97D7958Fa6f771f3BbD5CCD508f81e22.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "GTON",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x01e0E2e61f554eCAaeC0cC933E739Ad90f24a86d.svg"
"logo": "./icons/eip155:1/erc20:0x01e0E2e61f554eCAaeC0cC933E739Ad90f24a86d.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "OIL",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x0275E1001e293C46CFe158B3702AADe0B99f88a5.svg"
"logo": "./icons/eip155:1/erc20:0x0275E1001e293C46CFe158B3702AADe0B99f88a5.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "aDAI",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x028171bCA77440897B824Ca71D1c56caC55b68A3.svg"
"logo": "./icons/eip155:1/erc20:0x028171bCA77440897B824Ca71D1c56caC55b68A3.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "LIKE",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x02F61Fd266DA6E8B102D4121f5CE7b992640CF98.svg"
"logo": "./icons/eip155:1/erc20:0x02F61Fd266DA6E8B102D4121f5CE7b992640CF98.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "aWETH",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x030bA81f1c18d280636F32af80b9AAd02Cf0854e.svg"
"logo": "./icons/eip155:1/erc20:0x030bA81f1c18d280636F32af80b9AAd02Cf0854e.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "unLINK",
"decimals": 8,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x031002d15B0D0Cd7c9129d6F644446368deaE391.svg"
"logo": "./icons/eip155:1/erc20:0x031002d15B0D0Cd7c9129d6F644446368deaE391.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "KCS",
"decimals": 6,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x039B5649A59967e3e936D7471f9c3700100Ee1ab.svg"
"logo": "./icons/eip155:1/erc20:0x039B5649A59967e3e936D7471f9c3700100Ee1ab.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "RAI",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x03ab458634910AaD20eF5f1C8ee96F1D6ac54919.svg"
"logo": "./icons/eip155:1/erc20:0x03ab458634910AaD20eF5f1C8ee96F1D6ac54919.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "DSCP",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x03e3f0c25965f13DbbC58246738C183E27b26a56.svg"
"logo": "./icons/eip155:1/erc20:0x03e3f0c25965f13DbbC58246738C183E27b26a56.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "SKM",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x048Fe49BE32adfC9ED68C37D32B5ec9Df17b3603.svg"
"logo": "./icons/eip155:1/erc20:0x048Fe49BE32adfC9ED68C37D32B5ec9Df17b3603.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "UMA",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x04Fa0d235C4abf4BcF4787aF4CF447DE572eF828.svg"
"logo": "./icons/eip155:1/erc20:0x04Fa0d235C4abf4BcF4787aF4CF447DE572eF828.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "GUSD",
"decimals": 2,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd.svg"
"logo": "./icons/eip155:1/erc20:0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "aBAT",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x05Ec93c0365baAeAbF7AefFb0972ea7ECdD39CF1.svg"
"logo": "./icons/eip155:1/erc20:0x05Ec93c0365baAeAbF7AefFb0972ea7ECdD39CF1.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "ZIL",
"decimals": 12,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x05f4a42e251f2d52b8ed15E9FEdAacFcEF1FAD27.svg"
"logo": "./icons/eip155:1/erc20:0x05f4a42e251f2d52b8ed15E9FEdAacFcEF1FAD27.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "steCRV",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x06325440D014e39736583c165C2963BA99fAf14E.svg"
"logo": "./icons/eip155:1/erc20:0x06325440D014e39736583c165C2963BA99fAf14E.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "CHAI",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x06AF07097C9Eeb7fD685c692751D5C66dB49c215.svg"
"logo": "./icons/eip155:1/erc20:0x06AF07097C9Eeb7fD685c692751D5C66dB49c215.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "XGG",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x06B179e292f080871825beD5D722162fD96B4c95.svg"
"logo": "./icons/eip155:1/erc20:0x06B179e292f080871825beD5D722162fD96B4c95.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "ZKT",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x07c52c2537D84e532a9F15d32E152C8B94D2b232.svg"
"logo": "./icons/eip155:1/erc20:0x07c52c2537D84e532a9F15d32E152C8B94D2b232.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "GOL",
"decimals": 4,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x083D41d6DD21EE938f0c055CA4fb12268DF0EfaC.svg"
"logo": "./icons/eip155:1/erc20:0x083D41d6DD21EE938f0c055CA4fb12268DF0EfaC.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "EDG",
"decimals": 0,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x08711D3B02C8758F2FB3ab4e80228418a7F8e39c.svg"
"logo": "./icons/eip155:1/erc20:0x08711D3B02C8758F2FB3ab4e80228418a7F8e39c.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "STOS",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x08c32b0726C5684024ea6e141C50aDe9690bBdcc.svg"
"logo": "./icons/eip155:1/erc20:0x08c32b0726C5684024ea6e141C50aDe9690bBdcc.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "DCN",
"decimals": 0,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x08d32b0da63e2C3bcF8019c9c5d849d7a9d791e6.svg"
"logo": "./icons/eip155:1/erc20:0x08d32b0da63e2C3bcF8019c9c5d849d7a9d791e6.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "MATH",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x08d967bb0134F2d07f7cfb6E246680c53927DD30.svg"
"logo": "./icons/eip155:1/erc20:0x08d967bb0134F2d07f7cfb6E246680c53927DD30.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "DHN",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x09E6d500D14D13e0528d2c0fff24E5ffF68237B4.svg"
"logo": "./icons/eip155:1/erc20:0x09E6d500D14D13e0528d2c0fff24E5ffF68237B4.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "MIR",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x09a3EcAFa817268f77BE1283176B946C4ff2E608.svg"
"logo": "./icons/eip155:1/erc20:0x09a3EcAFa817268f77BE1283176B946C4ff2E608.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "ynETH",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x09db87A538BD693E9d08544577d5cCfAA6373A48.svg"
"logo": "./icons/eip155:1/erc20:0x09db87A538BD693E9d08544577d5cCfAA6373A48.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "DNT",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x0AbdAce70D3790235af448C88547603b945604ea.svg"
"logo": "./icons/eip155:1/erc20:0x0AbdAce70D3790235af448C88547603b945604ea.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "STAKE",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x0Ae055097C6d159879521C384F1D2123D1f195e6.svg"
"logo": "./icons/eip155:1/erc20:0x0Ae055097C6d159879521C384F1D2123D1f195e6.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "USDD",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x0C10bF8FcB7Bf5412187A595ab97a3609160b5c6.svg"
"logo": "./icons/eip155:1/erc20:0x0C10bF8FcB7Bf5412187A595ab97a3609160b5c6.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "veOGV",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x0C4576Ca1c365868E162554AF8e385dc3e7C66D9.svg"
"logo": "./icons/eip155:1/erc20:0x0C4576Ca1c365868E162554AF8e385dc3e7C66D9.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "XDATA",
"decimals": 18,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x0Cf0Ee63788A0849fE5297F3407f701E122cC023.svg"
"logo": "./icons/eip155:1/erc20:0x0Cf0Ee63788A0849fE5297F3407f701E122cC023.svg"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"symbol": "J8T",
"decimals": 8,
"erc20": true,
"logo": "../icons/eip155:1/erc20:0x0D262e5dC4A06a0F1c90cE79C7a60C09DfC884E4.svg"
"logo": "./icons/eip155:1/erc20:0x0D262e5dC4A06a0F1c90cE79C7a60C09DfC884E4.svg"
}
Loading

0 comments on commit 6d2c6f0

Please sign in to comment.