Skip to content

Commit

Permalink
remove gas token entries with empty addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Feb 5, 2024
1 parent da18a18 commit 54306c5
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 119 deletions.
63 changes: 20 additions & 43 deletions data/addresses.mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_testnet",
"coin_type": "ZRC20",
"type": "ZRC20",
"coin_type": "ERC20",
"decimals": 18,
"symbol": "ZetaChain ZRC20 USDC on BSC"
},
Expand All @@ -77,47 +78,30 @@
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_testnet",
"coin_type": "ZRC20",
"type": "ZRC20",
"coin_type": "ERC20",
"decimals": 18,
"symbol": "ZetaChain ZRC20 USDC on ETH"
},
{
"address": "",
"category": "omnichain",
"chain_id": "8332",
"chain_name": "btc_mainnet",
"coin_type": "Gas",
"decimals": 8,
"symbol": "BTC.BTC",
"zrc20": "0x13A0c5930C028511Dc02665E7285134B6d11A5f4"
},
{
"address": "0x13A0c5930C028511Dc02665E7285134B6d11A5f4",
"asset": "",
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_testnet",
"coin_type": "ZRC20",
"decimals": 18,
"symbol": "ZetaChain ZRC20 BTC-btc_mainnet"
},
{
"address": "",
"category": "omnichain",
"chain_id": "56",
"chain_name": "bsc_mainnet",
"type": "ZRC20",
"coin_type": "Gas",
"decimals": 18,
"symbol": "BNB.BSC",
"zrc20": "0x48f80608B672DC30DC7e3dbBd0343c5F02C738Eb"
"symbol": "ZetaChain ZRC20 BTC-btc_mainnet"
},
{
"address": "0x48f80608B672DC30DC7e3dbBd0343c5F02C738Eb",
"asset": "",
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_testnet",
"coin_type": "ZRC20",
"type": "ZRC20",
"coin_type": "Gas",
"decimals": 18,
"symbol": "ZetaChain ZRC20 BNB-bsc_mainnet"
},
Expand All @@ -137,7 +121,8 @@
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_testnet",
"coin_type": "ZRC20",
"type": "ZRC20",
"coin_type": "ERC20",
"decimals": 18,
"symbol": "ZetaChain ZRC20 USDT on ETH"
},
Expand All @@ -157,27 +142,19 @@
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_testnet",
"coin_type": "ZRC20",
"type": "ZRC20",
"coin_type": "ERC20",
"decimals": 18,
"symbol": "ZetaChain ZRC20 USDT on BSC"
},
{
"address": "",
"category": "omnichain",
"chain_id": "1",
"chain_name": "eth_mainnet",
"coin_type": "Gas",
"decimals": 18,
"symbol": "ETH.ETH",
"zrc20": "0xd97B1de3619ed2c6BEb3860147E30cA8A7dC9891"
},
{
"address": "0xd97B1de3619ed2c6BEb3860147E30cA8A7dC9891",
"asset": "",
"category": "omnichain",
"chain_id": 7000,
"chain_name": "zeta_testnet",
"coin_type": "ZRC20",
"type": "ZRC20",
"coin_type": "Gas",
"decimals": 18,
"symbol": "ZetaChain ZRC20 ETH-eth_mainnet"
},
Expand Down Expand Up @@ -252,17 +229,17 @@
"type": "erc20Custody"
},
{
"address": "0xaeB6dDB7708467814D557e340283248be8E43124",
"address": "0xaf28a257D292e7f0E531073f70a175b57E0261a8",
"category": "omnichain",
"chain_id": "1",
"chain_name": "eth_mainnet",
"chain_id": "56",
"chain_name": "bsc_mainnet",
"type": "tssUpdater"
},
{
"address": "0xaf28a257D292e7f0E531073f70a175b57E0261a8",
"address": "0xaeB6dDB7708467814D557e340283248be8E43124",
"category": "omnichain",
"chain_id": "56",
"chain_name": "bsc_mainnet",
"chain_id": "1",
"chain_name": "eth_mainnet",
"type": "tssUpdater"
},
{
Expand Down
97 changes: 32 additions & 65 deletions data/addresses.testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,67 +57,41 @@
"category": "omnichain",
"chain_id": 7001,
"chain_name": "zeta_testnet",
"coin_type": "ZRC20",
"type": "ZRC20",
"coin_type": "ERC20",
"decimals": 18,
"symbol": "USDC-goerli_testnet"
},
{
"address": "",
"category": "omnichain",
"chain_id": "5",
"chain_name": "goerli_testnet",
"coin_type": "Gas",
"decimals": 18,
"symbol": "gETH",
"zrc20": "0x13A0c5930C028511Dc02665E7285134B6d11A5f4"
},
{
"address": "0x13A0c5930C028511Dc02665E7285134B6d11A5f4",
"asset": "",
"category": "omnichain",
"chain_id": 7001,
"chain_name": "zeta_testnet",
"coin_type": "ZRC20",
"decimals": 18,
"symbol": "ETH-goerli_testnet"
},
{
"address": "",
"category": "omnichain",
"chain_id": "80001",
"chain_name": "mumbai_testnet",
"type": "ZRC20",
"coin_type": "Gas",
"decimals": 18,
"symbol": "tMATIC",
"zrc20": "0x48f80608B672DC30DC7e3dbBd0343c5F02C738Eb"
"symbol": "ETH-goerli_testnet"
},
{
"address": "0x48f80608B672DC30DC7e3dbBd0343c5F02C738Eb",
"asset": "",
"category": "omnichain",
"chain_id": 7001,
"chain_name": "zeta_testnet",
"coin_type": "ZRC20",
"type": "ZRC20",
"coin_type": "Gas",
"decimals": 18,
"symbol": "MATIC-mumbai_testnet"
},
{
"address": "",
"category": "omnichain",
"chain_id": "18332",
"chain_name": "btc_testnet",
"coin_type": "Gas",
"decimals": 8,
"symbol": "tBTC",
"zrc20": "0x65a45c57636f9BcCeD4fe193A602008578BcA90b"
},
{
"address": "0x65a45c57636f9BcCeD4fe193A602008578BcA90b",
"asset": "",
"category": "omnichain",
"chain_id": 7001,
"chain_name": "zeta_testnet",
"coin_type": "ZRC20",
"type": "ZRC20",
"coin_type": "Gas",
"decimals": 18,
"symbol": "BTC-btc_testnet-btc_testnet"
},
Expand All @@ -137,7 +111,8 @@
"category": "omnichain",
"chain_id": 7001,
"chain_name": "zeta_testnet",
"coin_type": "ZRC20",
"type": "ZRC20",
"coin_type": "ERC20",
"decimals": 18,
"symbol": "USDC-bsc_testnet"
},
Expand All @@ -157,27 +132,19 @@
"category": "omnichain",
"chain_id": 7001,
"chain_name": "zeta_testnet",
"coin_type": "ZRC20",
"type": "ZRC20",
"coin_type": "ERC20",
"decimals": 18,
"symbol": "USDC-mumbai_testnet"
},
{
"address": "",
"category": "omnichain",
"chain_id": "97",
"chain_name": "bsc_testnet",
"coin_type": "Gas",
"decimals": 18,
"symbol": "tBNB",
"zrc20": "0xd97B1de3619ed2c6BEb3860147E30cA8A7dC9891"
},
{
"address": "0xd97B1de3619ed2c6BEb3860147E30cA8A7dC9891",
"asset": "",
"category": "omnichain",
"chain_id": 7001,
"chain_name": "zeta_testnet",
"coin_type": "ZRC20",
"type": "ZRC20",
"coin_type": "Gas",
"decimals": 18,
"symbol": "BNB-bsc_testnet"
},
Expand Down Expand Up @@ -210,45 +177,45 @@
"type": "fungibleModule"
},
{
"address": "0x0000c304d2934c00db1d51995b9f6996affd17c0",
"address": "0x0000c9ec4042283e8139c74f4c64bcd1e0b9b54f",
"category": "messaging",
"chain_id": "5",
"chain_name": "goerli_testnet",
"chain_id": "80001",
"chain_name": "mumbai_testnet",
"type": "zetaToken"
},
{
"address": "0x00005e3125aba53c5652f9f0ce1a4cf91d8b15ea",
"address": "0x0000ecb8cdd25a18f12daa23f6422e07fbf8b9e1",
"category": "messaging",
"chain_id": "5",
"chain_name": "goerli_testnet",
"chain_id": "80001",
"chain_name": "mumbai_testnet",
"type": "connector"
},
{
"address": "0x000047f11c6e42293f433c82473532e869ce4ec5",
"address": "0x0000a7db254145767262c6a81a7ee1650684258e",
"category": "omnichain",
"chain_id": "5",
"chain_name": "goerli_testnet",
"chain_id": "80001",
"chain_name": "mumbai_testnet",
"type": "erc20Custody"
},
{
"address": "0x0000c9ec4042283e8139c74f4c64bcd1e0b9b54f",
"address": "0x0000c304d2934c00db1d51995b9f6996affd17c0",
"category": "messaging",
"chain_id": "80001",
"chain_name": "mumbai_testnet",
"chain_id": "5",
"chain_name": "goerli_testnet",
"type": "zetaToken"
},
{
"address": "0x0000ecb8cdd25a18f12daa23f6422e07fbf8b9e1",
"address": "0x00005e3125aba53c5652f9f0ce1a4cf91d8b15ea",
"category": "messaging",
"chain_id": "80001",
"chain_name": "mumbai_testnet",
"chain_id": "5",
"chain_name": "goerli_testnet",
"type": "connector"
},
{
"address": "0x0000a7db254145767262c6a81a7ee1650684258e",
"address": "0x000047f11c6e42293f433c82473532e869ce4ec5",
"category": "omnichain",
"chain_id": "80001",
"chain_name": "mumbai_testnet",
"chain_id": "5",
"chain_name": "goerli_testnet",
"type": "erc20Custody"
},
{
Expand Down
25 changes: 14 additions & 11 deletions tasks/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,23 +96,26 @@ const fetchForeignCoinsData = async (chains: any, addresses: any, network: Netwo
const foreignCoinsResponse: AxiosResponse<any> = await axios.get(URL);
if (foreignCoinsResponse.status === 200) {
foreignCoinsResponse.data.foreignCoins.forEach((token: any) => {
addresses.push({
address: token.asset,
category: "omnichain",
chain_id: token.foreign_chain_id,
chain_name: chains.find((c: any) => c.chain_id === token.foreign_chain_id)?.chain_name,
coin_type: token.coin_type,
decimals: token.decimals,
symbol: token.symbol,
zrc20: token.zrc20_contract_address, // TODO: dynamically fetch from contract (to verify)
});
if (token.coin_type !== "Gas") {
addresses.push({
address: token.asset,
category: "omnichain",
chain_id: token.foreign_chain_id,
chain_name: chains.find((c: any) => c.chain_id === token.foreign_chain_id)?.chain_name,
coin_type: token.coin_type,
decimals: token.decimals,
symbol: token.symbol,
zrc20: token.zrc20_contract_address, // TODO: dynamically fetch from contract (to verify)
});
}
addresses.push({
address: token.zrc20_contract_address,
asset: token.asset,
category: "omnichain",
chain_id,
chain_name: "zeta_testnet",
coin_type: "ZRC20",
type: "ZRC20",
coin_type: token.coin_type,
decimals: 18,
symbol: token.name, // TODO: dynamically fetch from contract
});
Expand Down

0 comments on commit 54306c5

Please sign in to comment.