Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add CWC CatWifCap token #192

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .env.example

This file was deleted.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en" data-theme="dark">
<head>
<meta charset="UTF-8" />
Expand Down
13 changes: 13 additions & 0 deletions json/linea-goerli-token-shortlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@
}
],
"tokens": [
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is set in Goerli which has been deprecated

"chainId": 59140,
"chainURI": "https://goerli.lineascan.build/block/0",
"tokenId": "https://goerli.lineascan.build/token/0x092b9E25a7D143c83D44c27194F5CeE7c1150F22",
"tokenType": ["native"],
"address": "0x092b9E25a7D143c83D44c27194F5CeE7c1150F22",
"name": "CatWifCap",
"symbol": "CWC",
"decimals": 18,
"createdAt": "2024-12-02",
"updatedAt": "2024-12-02",
"logoURI": "https://dd.dexscreener.com/ds-data/tokens/linea/0x092b9e25a7d143c83d44c27194f5cee7c1150f22.png?size=lg&key=99da9c"
},
{
"chainId": 59140,
"chainURI": "https://goerli.lineascan.build/block/0",
Expand Down
169 changes: 165 additions & 4 deletions json/linea-mainnet-token-fulllist.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"tokenListId": "https://raw.githubusercontent.com/Consensys/linea-token-list/main/json/linea-mainnet-token-fulllist.json",
"name": "Linea Mainnet Token Full List",
"createdAt": "2023-09-13",
"updatedAt": "2024-07-01",
"updatedAt": "2024-12-02",
"versions": [
{
"major": 1,
"minor": 74,
"minor": 75,
"patch": 0
}
],
Expand Down Expand Up @@ -130,6 +130,25 @@
"rootAddress": "0x4d224452801aced8b2f0aebe155379bb5d594381"
}
},
{
"chainId": 1,
"chainURI": "https://etherscan.io/block/0",
"tokenId": "https://etherscan.io/address/0x0090817169eDf9dbe6a7D373BeAc216D328dd964",
"tokenType": [
"canonical-bridge"
],
"address": "0x0090817169eDf9dbe6a7D373BeAc216D328dd964",
"name": "Axelar",
"symbol": "AXL",
"decimals": 6,
"createdAt": "2024-12-02",
"updatedAt": "2024-12-02",
"extension": {
"rootChainId": 59144,
"rootChainURI": "https://lineascan.build/block/0",
"rootAddress": "0x23ee2343B892b1BB63503a4FAbc840E0e2C6810f"
}
},
{
"chainId": 59144,
"chainURI": "https://lineascan.build/block/0",
Expand Down Expand Up @@ -691,6 +710,21 @@
"rootAddress": "0x580E933D90091b9cE380740E3a4A39c67eB85B4c"
}
},
{
"chainId": 59144,
"chainURI": "https://lineascan.build/block/0",
"tokenId": "https://lineascan.build/address/0x42d4Eb291C00a243C7Cbc2759B47892ED1852a9d",
"tokenType": [
"native"
],
"address": "0x42d4Eb291C00a243C7Cbc2759B47892ED1852a9d",
"name": "Genesis",
"symbol": "GENESIS",
"decimals": 18,
"createdAt": "2024-10-20",
"updatedAt": "2024-10-20",
"logoURI": "https://d12kvghf2eznx1.cloudfront.net/tokens/images/fe58d536-fa14-44eb-96b6-3b2c09f6a004"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally images should be .png or similar extension - do you have one for this?

},
{
"chainId": 59144,
"chainURI": "https://lineascan.build/block/0",
Expand Down Expand Up @@ -831,6 +865,25 @@
"rootAddress": "0xc5102fE9359FD9a28f877a67E36B0F050d81a3CC"
}
},
{
"chainId": 1,
"chainURI": "https://etherscan.io/block/0",
"tokenId": "https://etherscan.io/address/0x75F1CE1Bcbb3b27A1298BB0963080Ce628e7Fb7C",
"tokenType": [
"canonical-bridge"
],
"address": "0x75F1CE1Bcbb3b27A1298BB0963080Ce628e7Fb7C",
"name": "ICHI Vault Liquidity",
"symbol": "IV-5-LYNX",
"decimals": 18,
"createdAt": "2024-12-02",
"updatedAt": "2024-12-02",
"extension": {
"rootChainId": 59144,
"rootChainURI": "https://lineascan.build/block/0",
"rootAddress": "0x92ccb773da4f3974c941974bDb978bAd7efa7744"
}
},
{
"chainId": 59144,
"chainURI": "https://lineascan.build/block/0",
Expand Down Expand Up @@ -890,6 +943,25 @@
"rootAddress": "0x96168402310c70fD7b45adf2Fb3892691E0627D9"
}
},
{
"chainId": 1,
"chainURI": "https://etherscan.io/block/0",
"tokenId": "https://etherscan.io/address/0x6d81B41D10950C9dDCbb3600F52f20329E3bF837",
"tokenType": [
"canonical-bridge"
],
"address": "0x6d81B41D10950C9dDCbb3600F52f20329E3bF837",
"name": "KelpDao Restaked ETH",
"symbol": "rsETH",
"decimals": 18,
"createdAt": "2024-12-02",
"updatedAt": "2024-12-02",
"extension": {
"rootChainId": 59144,
"rootChainURI": "https://lineascan.build/block/0",
"rootAddress": "0x4186BFC76E2E237523CBC30FD220FE055156b41F"
}
},
{
"chainId": 59144,
"chainURI": "https://lineascan.build/block/0",
Expand Down Expand Up @@ -980,6 +1052,21 @@
"rootAddress": "0x3E9BC21C9b189C09dF3eF1B824798658d5011937"
}
},
{
"chainId": 59144,
"chainURI": "https://lineascan.build/block/0",
"tokenId": "https://lineascan.build/address/0x81BE2aCB2e9291dB6400f9f6a4D0f35f24de2E77",
"tokenType": [
"native"
],
"address": "0x81BE2aCB2e9291dB6400f9f6a4D0f35f24de2E77",
"name": "Linpuss",
"symbol": "LPUSS",
"decimals": 18,
"createdAt": "2024-10-31",
"updatedAt": "2024-10-31",
"logoURI": "https://assets.coingecko.com/coins/images/51867/standard/linpuss_logo.png?1732093865"
},
{
"chainId": 59144,
"chainURI": "https://lineascan.build/block/0",
Expand Down Expand Up @@ -1296,10 +1383,10 @@
],
"address": "0xE2a6e74118E708f7652FC4c74D2F9Ee5Fa210563",
"name": "NotWifGary",
"symbol": "$NWG",
"symbol": "NWG",
"decimals": 18,
"createdAt": "2024-05-24",
"updatedAt": "2024-05-24",
"updatedAt": "2024-10-01",
"logoURI": "https://notwifgary.xyz/logo512.png"
},
{
Expand Down Expand Up @@ -1480,6 +1567,25 @@
"rootAddress": "0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce"
}
},
{
"chainId": 1,
"chainURI": "https://etherscan.io/block/0",
"tokenId": "https://etherscan.io/address/0x2F0118D3DB2e4AC97dE923708010d19ae5797a7A",
"tokenType": [
"canonical-bridge"
],
"address": "0x2F0118D3DB2e4AC97dE923708010d19ae5797a7A",
"name": "Sidus",
"symbol": "Sidus",
"decimals": 18,
"createdAt": "2024-12-02",
"updatedAt": "2024-12-02",
"extension": {
"rootChainId": 59144,
"rootChainURI": "https://lineascan.build/block/0",
"rootAddress": "0xD96536B77aE5500fE850Add2253bcf640e7824c1"
}
},
{
"chainId": 59144,
"chainURI": "https://lineascan.build/block/0",
Expand Down Expand Up @@ -1683,6 +1789,26 @@
"rootAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7"
}
},
{
"chainId": 59144,
"chainURI": "https://lineascan.build/block/0",
"tokenId": "https://lineascan.build/address/0x45DC7323e7357713D92eDEe756733dAda5865fd5",
"tokenType": [
"canonical-bridge"
],
"address": "0x45DC7323e7357713D92eDEe756733dAda5865fd5",
"name": "The Nemesis",
"symbol": "NEMS",
"decimals": 18,
"createdAt": "2024-06-20",
"updatedAt": "2024-07-11",
"logoURI": "https://s2.coinmarketcap.com/static/img/coins/64x64/25898.png",
"extension": {
"rootChainId": 1,
"rootChainURI": "https://etherscan.io/block/0",
"rootAddress": "0xb435A47eCea7F5366b2520e45B9beD7E01d2FFAe"
}
},
{
"chainId": 59144,
"chainURI": "https://lineascan.build/block/0",
Expand All @@ -1702,6 +1828,22 @@
"rootAddress": "0x3155BA85D5F96b2d030a4966AF206230e46849cb"
}
},
{
"chainId": 59144,
"chainURI": "https://lineascan.build/block/0",
"tokenId": "https://lineascan.build/address/0xeC859566fC5d7ED84Ac823509F3f7db06C461b20",
"tokenType": [
"bridge-reserved",
"external-bridge"
],
"address": "0xeC859566fC5d7ED84Ac823509F3f7db06C461b20",
"name": "Unfettered Ecosystem",
"symbol": "SOULS",
"decimals": 18,
"createdAt": "2024-09-13",
"updatedAt": "2024-09-13",
"logoURI": "https://i.ibb.co/FBdsdYq/white-on-black-logomark.png"
},
{
"chainId": 59144,
"chainURI": "https://lineascan.build/block/0",
Expand Down Expand Up @@ -1794,6 +1936,25 @@
"updatedAt": "2023-09-26",
"logoURI": "https://s2.coinmarketcap.com/static/img/coins/64x64/20317.png"
},
{
"chainId": 1,
"chainURI": "https://etherscan.io/block/0",
"tokenId": "https://etherscan.io/address/0x247E3e9ae6E1f12cC6EF8d48866c1F19F6ef0174",
"tokenType": [
"canonical-bridge"
],
"address": "0x247E3e9ae6E1f12cC6EF8d48866c1F19F6ef0174",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

USDC has its own bridge and is a reserved token - I don't think it belongs in this list as it is not bridgeable via the Linea Token Bridge

"name": "USDC",
"symbol": "USDC",
"decimals": 6,
"createdAt": "2024-12-02",
"updatedAt": "2024-12-02",
"extension": {
"rootChainId": 59144,
"rootChainURI": "https://lineascan.build/block/0",
"rootAddress": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff"
}
},
{
"chainId": 59144,
"chainURI": "https://lineascan.build/block/0",
Expand Down
41 changes: 35 additions & 6 deletions public/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function generateTokensHTML(tokens, elementId) {
(token, index) => `
<div class="token card bg-base-200 ${
highlightAddresses.includes(token.address) ? 'border border-gray-200' : 'bordered'
} shadow-xl space-y-4 m-4" style="width: 480px;">
} shadow-xl space-y-4 m-4" style="width: 490px;">
<div class="card-body space-y-2">
<div class="flex flex-row space-x-4 items-center">
<div class="badge badge-primary">${index + 1}</div>
Expand All @@ -69,16 +69,45 @@ function generateTokensHTML(tokens, elementId) {
</div>
</div>
</div>

${generateAddress1LinkHTML(token)}
${generateAddress2LinkHTML(token)}
<div class="flex items-center">
${generateAddress1LinkHTML(token)}
<button class="copy-btn flex items-center ml-2" data-address="${token.address}">
<span class="text-xs font-medium">Copy</span>
</button>
</div>
<div class="flex items-center">
${generateAddress2LinkHTML(token)}
<button class="copy-btn flex items-center ml-2" data-address="${token?.extension?.rootAddress}">
<span class="text-xs font-medium">Copy</span>
</button>
</div>

</div>
</div>
`
)
.join('');
}

if (typeof navigator !== 'undefined' && navigator?.clipboard) {
document.body.addEventListener('click', function (e) {
if (e.target.closest('.copy-btn')) {
const button = e.target.closest('.copy-btn');
const address = button.getAttribute('data-address');
if (address) {
navigator.clipboard
.writeText(address)
.then(() => {
alert(`Copied: ${address}`);
})
.catch((err) => {
console.error('Failed to copy text: ', err);
});
}
}
});
}

function generateAddress1LinkHTML(token) {
let layer = '';

Expand All @@ -95,7 +124,7 @@ function generateAddress1LinkHTML(token) {
}

return `<p class="text-gray-500 text-sm flex justify-between">
<span class='text-gray-400'>${layer}</span>
<span class='text-gray-400 mr-2'>${layer}</span>
<a href="${token.tokenId}" target="_blank" class="link text-gray-400">${token.address}</a>
</p>`;
}
Expand Down Expand Up @@ -126,7 +155,7 @@ function generateAddress2LinkHTML(token) {
const href = baseURL + token.extension.rootAddress;

return `<p class="text-gray-500 text-sm flex justify-between">
<span class='text-gray-400'>${layer}</span>
<span class='text-gray-400 mr-2'>${layer}</span>
<a href="${href}" target="_blank" class="link text-gray-400">${token.extension.rootAddress}</a>
</p>`;
}
Expand Down
Loading