From fe479093a71617ee1ef2c3f039e5bddf4a6b2fa7 Mon Sep 17 00:00:00 2001 From: thomasRalee Date: Mon, 8 Apr 2024 23:50:50 +0800 Subject: [PATCH] fix: debug token build performance --- .github/workflows/master.yaml | 2 +- .github/workflows/test.yaml | 29 ++++++ tokens/bankMetadata/devnet.json | 10 ++ tokens/bankMetadata/mainnet.json | 40 ++++++++ tokens/bankSupplyDenoms/devnet.json | 1 + tokens/bankSupplyDenoms/mainnet.json | 3 + tokens/bankSupplyDenoms/testnet.json | 1 + tokens/bankSupplyTokens/devnet.json | 12 +++ tokens/bankSupplyTokens/mainnet.json | 36 +++++++ tokens/bankSupplyTokens/testnet.json | 28 ++++-- tokens/devnet.json | 13 +++ tokens/mainnet.json | 39 ++++++++ tokens/peggyTokens/testnet.json | 135 ++++++++++++++++++++++++++- tokens/testnet.json | 16 ++++ ts-scripts/fetchPeggyMetadata.ts | 3 +- ts-scripts/generateExternalTokens.ts | 14 +++ ts-scripts/generateSupplyTokens.ts | 18 +++- ts-scripts/helper/utils.ts | 4 +- 18 files changed, 391 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml index 58ab686f1c..f81c8ac23d 100644 --- a/.github/workflows/master.yaml +++ b/.github/workflows/master.yaml @@ -1,4 +1,4 @@ -name: Mito Devnet Deployments +name: Injective list - generate data on: push: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000000..a74fc5e566 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,29 @@ +name: Debug token build performance + +on: + push: + branches: + - fix/debug-token-build-perf + +jobs: + master: + name: "Regenerate JSON files" + runs-on: ubuntu-latest + permissions: write-all + env: + ## Github Actions + ACTIONS_ALLOW_UNSECURE_COMMANDS: true + + steps: + - uses: actions/checkout@v4 + with: + token: "${{ secrets.GH_TOKEN }}" + + - name: Install dependencies + run: cd ts-scripts && yarn + + - name: Generate tokens + uses: borales/actions-yarn@v4 + with: + cmd: tokens:generate + dir: "ts-scripts" diff --git a/tokens/bankMetadata/devnet.json b/tokens/bankMetadata/devnet.json index abce6cde9a..37605b088a 100644 --- a/tokens/bankMetadata/devnet.json +++ b/tokens/bankMetadata/devnet.json @@ -9,6 +9,16 @@ "description": "", "decimals": 0 }, + { + "logo": "", + "name": "KISH", + "denom": "factory/inj17gkuet8f6pssxd8nycm3qr9d9y699rupv6397z/KISH", + "address": "factory/inj17gkuet8f6pssxd8nycm3qr9d9y699rupv6397z/KISH", + "symbol": "KISH", + "display": "KISH", + "description": "KISH", + "decimals": 6 + }, { "logo": "", "name": "", diff --git a/tokens/bankMetadata/mainnet.json b/tokens/bankMetadata/mainnet.json index b678e2ee6a..7d7b26e95a 100644 --- a/tokens/bankMetadata/mainnet.json +++ b/tokens/bankMetadata/mainnet.json @@ -3089,6 +3089,16 @@ "description": "spuun", "decimals": 6 }, + { + "logo": "https://dd.dexscreener.com/ds-data/tokens/solana/4a73rNgwwGLmxXjCQ3huy8sqH7cxfuLmQ9kvpQ2znfnj.png?size=lg&key=48cd13", + "name": "TrempBoden", + "denom": "factory/inj168pjvcxwdr28uv295fchjtkk6pc5cd0lg3h450/trempboden", + "address": "factory/inj168pjvcxwdr28uv295fchjtkk6pc5cd0lg3h450/trempboden", + "symbol": "TrempBoden", + "display": "trempboden", + "description": "Tremp and Boden", + "decimals": 6 + }, { "logo": "", "name": "", @@ -4579,6 +4589,36 @@ "description": "", "decimals": 0 }, + { + "logo": "", + "name": "", + "denom": "factory/inj1cs57nurqssdy09a0tuzqetxn6nyzphj5w220jh/1712583066.521732861InjUsdt18d0.9P", + "address": "factory/inj1cs57nurqssdy09a0tuzqetxn6nyzphj5w220jh/1712583066.521732861InjUsdt18d0.9P", + "symbol": "", + "display": "", + "description": "", + "decimals": 0 + }, + { + "logo": "", + "name": "", + "denom": "factory/inj1cs57nurqssdy09a0tuzqetxn6nyzphj5w220jh/1712583066.521732861InjUsdt24d1.17C", + "address": "factory/inj1cs57nurqssdy09a0tuzqetxn6nyzphj5w220jh/1712583066.521732861InjUsdt24d1.17C", + "symbol": "", + "display": "", + "description": "", + "decimals": 0 + }, + { + "logo": "", + "name": "", + "denom": "factory/inj1cs57nurqssdy09a0tuzqetxn6nyzphj5w220jh/1712583066.521732861InjUsdt30d1.12C", + "address": "factory/inj1cs57nurqssdy09a0tuzqetxn6nyzphj5w220jh/1712583066.521732861InjUsdt30d1.12C", + "symbol": "", + "display": "", + "description": "", + "decimals": 0 + }, { "logo": "", "name": "", diff --git a/tokens/bankSupplyDenoms/devnet.json b/tokens/bankSupplyDenoms/devnet.json index af2016e853..2a3f2674ea 100644 --- a/tokens/bankSupplyDenoms/devnet.json +++ b/tokens/bankSupplyDenoms/devnet.json @@ -3,6 +3,7 @@ "factory/inj14ejqjyq8um4p3xfqj74yld5waqljf88f9eneuk/inj14au322k9munkmx5wrchz9q30juf5wjgz2cfqku", "factory/inj14ejqjyq8um4p3xfqj74yld5waqljf88f9eneuk/inj1q6kpxy6ar5lkxqudjvryarrrttmakwsvzkvcyh", "factory/inj14ejqjyq8um4p3xfqj74yld5waqljf88f9eneuk/inj1q6zlut7gtkzknkk773jecujwsdkgq882akqksk", + "factory/inj17gkuet8f6pssxd8nycm3qr9d9y699rupv6397z/KISH", "factory/inj1etz0laas6h7vemg3qtd67jpr6lh8v7xz7gfzqw/hdro", "factory/inj1hdvy6tl89llqy3ze8lv6mz5qh66sx9enn0jxg6/inj12sqy9uzzl3h3vqxam7sz9f0yvmhampcgesh3qw", "factory/inj1pd7kfgvr5tpcv0xnlv46c4jsq9jg2r79ke0ytl/inj1dc34p57spmhguak2ns88u3vxmt73gnu3sh73r0", diff --git a/tokens/bankSupplyDenoms/mainnet.json b/tokens/bankSupplyDenoms/mainnet.json index d635d8e81c..1cd6cccc0a 100644 --- a/tokens/bankSupplyDenoms/mainnet.json +++ b/tokens/bankSupplyDenoms/mainnet.json @@ -278,6 +278,7 @@ "factory/inj168pjvcxwdr28uv295fchjtkk6pc5cd0lg3h450/pondo", "factory/inj168pjvcxwdr28uv295fchjtkk6pc5cd0lg3h450/simpsons", "factory/inj168pjvcxwdr28uv295fchjtkk6pc5cd0lg3h450/spuun", + "factory/inj168pjvcxwdr28uv295fchjtkk6pc5cd0lg3h450/trempboden", "factory/inj169ed97mcnf8ay6rgvskn95n6tyt46uwvy5qgs0/aoi", "factory/inj16a7s0v3c2hp575s0ugmva8cedq9yvsmz4mvdcd/YKZ", "factory/inj16c0cnvw4jd20k9fkdlt4cauyd05hhg6jk7fedh/TRUMP", @@ -417,6 +418,7 @@ "factory/inj1cs57nurqssdy09a0tuzqetxn6nyzphj5w220jh/1712063630.920057621InjUsdt18d0.9P", "factory/inj1cs57nurqssdy09a0tuzqetxn6nyzphj5w220jh/1712063630.920057621InjUsdt24d1.17C", "factory/inj1cs57nurqssdy09a0tuzqetxn6nyzphj5w220jh/1712063630.920057621InjUsdt30d1.12C", + "factory/inj1cs57nurqssdy09a0tuzqetxn6nyzphj5w220jh/1712583066.521732861InjUsdt30d1.12C", "factory/inj1csmzuxsp5vp2ng5cue7wdknudk8m69wlr62rq5/uLP", "factory/inj1cxcjn04l2vxg4zwrlhpghh32fdel856xn3a3rr/BONK", "factory/inj1d0zfq42409a5mhdagjutl8u6u9rgcm4h8zfmfq/nbla", @@ -784,6 +786,7 @@ "factory/inj1vcqkkvqs7prqu70dpddfj7kqeqfdz5gg662qs3/lpinj1v8v8jepsjdsxj29hxmm62qwzmg54r75v6mq6q9", "factory/inj1vcqkkvqs7prqu70dpddfj7kqeqfdz5gg662qs3/lpinj1ve3uga90prrwtpsptjrhnxlfd9u0qwuf0v43ke", "factory/inj1vcqkkvqs7prqu70dpddfj7kqeqfdz5gg662qs3/lpinj1wzt78jy575ejcps76gpc2m8k2v4x2526aksnk0", + "factory/inj1vcqkkvqs7prqu70dpddfj7kqeqfdz5gg662qs3/lpinj1xar9nfhqc9al47hkh7eljrc3g66lntqch8hh0r", "factory/inj1vcqkkvqs7prqu70dpddfj7kqeqfdz5gg662qs3/lpinj1zxk9xvs6mnq2m5yws8gdgqstrmcqntuedlnua3", "factory/inj1vg2vj46d3cy54l63qkjprtcnel2svkjhgwkfhy/dontbuy", "factory/inj1vgrf5mcvvg9p5c6jajqefn840nq74wjzgkt30z/GROK", diff --git a/tokens/bankSupplyDenoms/testnet.json b/tokens/bankSupplyDenoms/testnet.json index 86a865f1d9..310e771994 100644 --- a/tokens/bankSupplyDenoms/testnet.json +++ b/tokens/bankSupplyDenoms/testnet.json @@ -1765,6 +1765,7 @@ "ibc/90FE7A5C905DA053907AEEABAE0C57E64C76D5346EE46F0E3C994C5470D311C0", "ibc/97498452BF27CC90656FD7D6EFDA287FA2BFFFF3E84691C84CB9E0451F6DF0A4", "ibc/A190CF3FC762D25A46A49E7CB0E998F4A494C7F64A356DA17C25A2D8B0069D3B", + "ibc/A2BBF23BE4234FD27AEF7269B30A124B91E3EB2D7F33E756B5EC2FC1F3DCF0B3", "ibc/B0D9A85855FFB4C6472AD514B48C91275453B2AFC501472EE29895C400463E6B", "ibc/BE8B9A10C7F6E014F617E4C883D24A8E34A4399C2E18D583DD9506CEADF0D7E5", "ibc/DAB0823884DB5785F08EE136EE9EB362E166F4C7455716641B03E93CE7F14193", diff --git a/tokens/bankSupplyTokens/devnet.json b/tokens/bankSupplyTokens/devnet.json index 2c7ba73760..4b1e6227a2 100644 --- a/tokens/bankSupplyTokens/devnet.json +++ b/tokens/bankSupplyTokens/devnet.json @@ -35,6 +35,18 @@ "tokenType": "cw20", "tokenVerification": "unverified" }, + { + "denom": "factory/inj17gkuet8f6pssxd8nycm3qr9d9y699rupv6397z/KISH", + "address": "factory/inj17gkuet8f6pssxd8nycm3qr9d9y699rupv6397z/KISH", + "isNative": false, + "symbol": "KISH", + "name": "KISH", + "logo": "unknown.png", + "coinGeckoId": "", + "decimals": 6, + "tokenType": "tokenFactory", + "tokenVerification": "unverified" + }, { "denom": "factory/inj1pd7kfgvr5tpcv0xnlv46c4jsq9jg2r79ke0ytl/inj1dc34p57spmhguak2ns88u3vxmt73gnu3sh73r0", "address": "factory/inj1pd7kfgvr5tpcv0xnlv46c4jsq9jg2r79ke0ytl/inj1dc34p57spmhguak2ns88u3vxmt73gnu3sh73r0", diff --git a/tokens/bankSupplyTokens/mainnet.json b/tokens/bankSupplyTokens/mainnet.json index f3c7b0df0a..344c861a74 100644 --- a/tokens/bankSupplyTokens/mainnet.json +++ b/tokens/bankSupplyTokens/mainnet.json @@ -649,6 +649,18 @@ "tokenType": "tokenFactory", "tokenVerification": "unverified" }, + { + "denom": "factory/inj168pjvcxwdr28uv295fchjtkk6pc5cd0lg3h450/trempboden", + "address": "factory/inj168pjvcxwdr28uv295fchjtkk6pc5cd0lg3h450/trempboden", + "isNative": false, + "symbol": "TrempBoden", + "name": "TrempBoden", + "logo": "https://dd.dexscreener.com/ds-data/tokens/solana/4a73rNgwwGLmxXjCQ3huy8sqH7cxfuLmQ9kvpQ2znfnj.png?size=lg&key=48cd13", + "coinGeckoId": "", + "decimals": 6, + "tokenType": "tokenFactory", + "tokenVerification": "unverified" + }, { "denom": "factory/inj16a7s0v3c2hp575s0ugmva8cedq9yvsmz4mvdcd/YKZ", "address": "factory/inj16a7s0v3c2hp575s0ugmva8cedq9yvsmz4mvdcd/YKZ", @@ -1593,6 +1605,18 @@ "tokenType": "tokenFactory", "tokenVerification": "unverified" }, + { + "denom": "factory/inj1cs57nurqssdy09a0tuzqetxn6nyzphj5w220jh/1712583066.521732861InjUsdt30d1.12C", + "address": "factory/inj1cs57nurqssdy09a0tuzqetxn6nyzphj5w220jh/1712583066.521732861InjUsdt30d1.12C", + "isNative": false, + "symbol": "Unknown", + "name": "Unknown", + "logo": "unknown.png", + "coinGeckoId": "", + "decimals": 18, + "tokenType": "tokenFactory", + "tokenVerification": "unverified" + }, { "denom": "factory/inj1csmzuxsp5vp2ng5cue7wdknudk8m69wlr62rq5/uLP", "address": "factory/inj1csmzuxsp5vp2ng5cue7wdknudk8m69wlr62rq5/uLP", @@ -4148,6 +4172,18 @@ "tokenType": "tokenFactory", "tokenVerification": "unverified" }, + { + "denom": "factory/inj1vcqkkvqs7prqu70dpddfj7kqeqfdz5gg662qs3/lpinj1xar9nfhqc9al47hkh7eljrc3g66lntqch8hh0r", + "address": "factory/inj1vcqkkvqs7prqu70dpddfj7kqeqfdz5gg662qs3/lpinj1xar9nfhqc9al47hkh7eljrc3g66lntqch8hh0r", + "isNative": false, + "symbol": "Unknown", + "name": "Unknown", + "logo": "unknown.png", + "coinGeckoId": "", + "decimals": 18, + "tokenType": "tokenFactory", + "tokenVerification": "unverified" + }, { "denom": "factory/inj1vcqkkvqs7prqu70dpddfj7kqeqfdz5gg662qs3/lpinj1zxk9xvs6mnq2m5yws8gdgqstrmcqntuedlnua3", "address": "factory/inj1vcqkkvqs7prqu70dpddfj7kqeqfdz5gg662qs3/lpinj1zxk9xvs6mnq2m5yws8gdgqstrmcqntuedlnua3", diff --git a/tokens/bankSupplyTokens/testnet.json b/tokens/bankSupplyTokens/testnet.json index 81f7d096b9..b5f2fd4f65 100644 --- a/tokens/bankSupplyTokens/testnet.json +++ b/tokens/bankSupplyTokens/testnet.json @@ -20957,6 +20957,21 @@ "tokenType": "ibc", "tokenVerification": "unverified" }, + { + "denom": "ibc/A2BBF23BE4234FD27AEF7269B30A124B91E3EB2D7F33E756B5EC2FC1F3DCF0B3", + "path": "transfer/channel-544/transfer/channel-4280", + "channelId": "channel-4280", + "baseDenom": "uusdc", + "address": "ibc/A2BBF23BE4234FD27AEF7269B30A124B91E3EB2D7F33E756B5EC2FC1F3DCF0B3", + "isNative": false, + "symbol": "uusdc", + "name": "ibc/A2BBF23BE4234FD27AEF7269B30A124B91E3EB2D7F33E756B5EC2FC1F3DCF0B3", + "logo": "unknown.png", + "coinGeckoId": "", + "decimals": 18, + "tokenType": "ibc", + "tokenVerification": "unverified" + }, { "denom": "ibc/B0D9A85855FFB4C6472AD514B48C91275453B2AFC501472EE29895C400463E6B", "path": "transfer/channel-46", @@ -21033,16 +21048,15 @@ "tokenVerification": "unverified" }, { - "denom": "peggy0x33132640fF610A2E362856530a2D1E5d60FAe191", - "address": "peggy0x33132640fF610A2E362856530a2D1E5d60FAe191", - "isNative": false, - "symbol": "Unknown", - "name": "Unknown", + "decimals": 18, "logo": "unknown.png", + "name": "xbot V4", + "symbol": "XTBV4", + "denom": "peggy0x33132640fF610A2E362856530a2D1E5d60FAe191", "coinGeckoId": "", - "decimals": 18, + "address": "0x33132640fF610A2E362856530a2D1E5d60FAe191", "tokenType": "erc20", - "tokenVerification": "unverified" + "tokenVerification": "external" }, { "denom": "peggy0x43871C5e85144EC340A3A63109F3F11C3745FE4E", diff --git a/tokens/devnet.json b/tokens/devnet.json index 9eefdf17f6..85a83424ed 100644 --- a/tokens/devnet.json +++ b/tokens/devnet.json @@ -475,6 +475,19 @@ "tokenVerification": "verified", "externalLogo": "injective-v3.png" }, + { + "denom": "factory/inj17gkuet8f6pssxd8nycm3qr9d9y699rupv6397z/KISH", + "address": "factory/inj17gkuet8f6pssxd8nycm3qr9d9y699rupv6397z/KISH", + "isNative": false, + "symbol": "KISH", + "name": "KISH", + "logo": "https://imagedelivery.net/DYKOWp0iCc0sIkF-2e4dNw/1fb4f29a-9aed-4349-4e0b-0db6b28e7500/public", + "coinGeckoId": "", + "decimals": 6, + "tokenType": "tokenFactory", + "tokenVerification": "unverified", + "externalLogo": "unknown.png" + }, { "address": "factory/inj17gkuet8f6pssxd8nycm3qr9d9y699rupv6397z/mt", "isNative": false, diff --git a/tokens/mainnet.json b/tokens/mainnet.json index bc1e0dc0dc..c72d3c6179 100644 --- a/tokens/mainnet.json +++ b/tokens/mainnet.json @@ -4518,6 +4518,19 @@ "tokenVerification": "external", "externalLogo": "https://pbs.twimg.com/profile_images/1775587396156862464/tNsBq_UW_400x400.jpg" }, + { + "denom": "factory/inj168pjvcxwdr28uv295fchjtkk6pc5cd0lg3h450/trempboden", + "address": "factory/inj168pjvcxwdr28uv295fchjtkk6pc5cd0lg3h450/trempboden", + "isNative": false, + "symbol": "TrempBoden", + "name": "TrempBoden", + "logo": "https://imagedelivery.net/DYKOWp0iCc0sIkF-2e4dNw/1fb4f29a-9aed-4349-4e0b-0db6b28e7500/public", + "coinGeckoId": "", + "decimals": 6, + "tokenType": "tokenFactory", + "tokenVerification": "unverified", + "externalLogo": "https://dd.dexscreener.com/ds-data/tokens/solana/4a73rNgwwGLmxXjCQ3huy8sqH7cxfuLmQ9kvpQ2znfnj.png?size=lg&key=48cd13" + }, { "address": "factory/inj169ed97mcnf8ay6rgvskn95n6tyt46uwvy5qgs0/$aoi", "isNative": false, @@ -8160,6 +8173,19 @@ "tokenVerification": "unverified", "externalLogo": "unknown.png" }, + { + "denom": "factory/inj1cs57nurqssdy09a0tuzqetxn6nyzphj5w220jh/1712583066.521732861InjUsdt30d1.12C", + "address": "factory/inj1cs57nurqssdy09a0tuzqetxn6nyzphj5w220jh/1712583066.521732861InjUsdt30d1.12C", + "isNative": false, + "symbol": "Unknown", + "name": "Unknown", + "logo": "https://imagedelivery.net/DYKOWp0iCc0sIkF-2e4dNw/1fb4f29a-9aed-4349-4e0b-0db6b28e7500/public", + "coinGeckoId": "", + "decimals": 18, + "tokenType": "tokenFactory", + "tokenVerification": "unverified", + "externalLogo": "unknown.png" + }, { "denom": "factory/inj1csmzuxsp5vp2ng5cue7wdknudk8m69wlr62rq5/uLP", "address": "factory/inj1csmzuxsp5vp2ng5cue7wdknudk8m69wlr62rq5/uLP", @@ -21990,6 +22016,19 @@ "tokenVerification": "unverified", "externalLogo": "unknown.png" }, + { + "denom": "factory/inj1vcqkkvqs7prqu70dpddfj7kqeqfdz5gg662qs3/lpinj1xar9nfhqc9al47hkh7eljrc3g66lntqch8hh0r", + "address": "factory/inj1vcqkkvqs7prqu70dpddfj7kqeqfdz5gg662qs3/lpinj1xar9nfhqc9al47hkh7eljrc3g66lntqch8hh0r", + "isNative": false, + "symbol": "Unknown", + "name": "Unknown", + "logo": "https://imagedelivery.net/DYKOWp0iCc0sIkF-2e4dNw/1fb4f29a-9aed-4349-4e0b-0db6b28e7500/public", + "coinGeckoId": "", + "decimals": 18, + "tokenType": "tokenFactory", + "tokenVerification": "unverified", + "externalLogo": "unknown.png" + }, { "denom": "factory/inj1vcqkkvqs7prqu70dpddfj7kqeqfdz5gg662qs3/lpinj1zxk9xvs6mnq2m5yws8gdgqstrmcqntuedlnua3", "address": "factory/inj1vcqkkvqs7prqu70dpddfj7kqeqfdz5gg662qs3/lpinj1zxk9xvs6mnq2m5yws8gdgqstrmcqntuedlnua3", diff --git a/tokens/peggyTokens/testnet.json b/tokens/peggyTokens/testnet.json index 0967ef424b..adb71383f0 100644 --- a/tokens/peggyTokens/testnet.json +++ b/tokens/peggyTokens/testnet.json @@ -1 +1,134 @@ -{} +{ + "peggy0x33132640ff610a2e362856530a2d1e5d60fae191": { + "decimals": 18, + "logo": "unknown.png", + "name": "xbot V4", + "symbol": "XTBV4", + "denom": "peggy0x33132640fF610A2E362856530a2D1E5d60FAe191", + "coinGeckoId": "", + "address": "0x33132640fF610A2E362856530a2D1E5d60FAe191", + "tokenType": "erc20", + "tokenVerification": "external" + }, + "peggy0x43871c5e85144ec340a3a63109f3f11c3745fe4e": { + "decimals": 18, + "logo": "usdt.png", + "name": "Tether", + "symbol": "USDT", + "denom": "peggy0x43871C5e85144EC340A3A63109F3F11C3745FE4E", + "coinGeckoId": "", + "address": "0x43871C5e85144EC340A3A63109F3F11C3745FE4E", + "tokenType": "erc20", + "tokenVerification": "external" + }, + "peggy0x6f3050fa31c4cc2bb4a213b7d53c220ac04dd59d": { + "decimals": 18, + "logo": "unknown.png", + "name": "AK", + "symbol": "AK", + "denom": "peggy0x6F3050fa31c4CC2bB4A213B7d53c220Ac04Dd59D", + "coinGeckoId": "", + "address": "0x6F3050fa31c4CC2bB4A213B7d53c220Ac04Dd59D", + "tokenType": "erc20", + "tokenVerification": "external" + }, + "peggy0x85abeac4f09762e28a49d7da91260a46766f4f79": { + "decimals": 18, + "logo": "injective-v3.png", + "name": "TINJ", + "symbol": "TINJ", + "denom": "peggy0x85AbEac4F09762e28a49D7dA91260A46766F4F79", + "coinGeckoId": "", + "address": "0x85AbEac4F09762e28a49D7dA91260A46766F4F79", + "tokenType": "erc20", + "tokenVerification": "external" + }, + "peggy0x91efc46e7c52ab1ffca310ca7972aea48891e5cd": { + "decimals": 18, + "logo": "ethereum.png", + "name": "Wrapped Ethereum", + "symbol": "wETH", + "denom": "peggy0x91Efc46E7C52ab1fFca310Ca7972AeA48891E5CD", + "coinGeckoId": "", + "address": "0x91Efc46E7C52ab1fFca310Ca7972AeA48891E5CD", + "tokenType": "erc20", + "tokenVerification": "external" + }, + "peggy0x9ff0b0da21e77d775eb27a4845ecbf9700bfcf0b": { + "name": "USD Coin", + "decimals": 18, + "symbol": "USDC", + "logo": "usdc.png", + "coinGeckoId": "", + "denom": "peggy0x9ff0b0dA21e77D775eB27A4845eCbF9700bfCF0B", + "address": "0x9ff0b0dA21e77D775eB27A4845eCbF9700bfCF0B", + "tokenType": "erc20", + "tokenVerification": "external" + }, + "peggy0xa4ee602c16c448dc0d1fc38e6fc12f0d6c672cbe": { + "name": "FCC Token", + "decimals": 18, + "symbol": "TKN", + "logo": "unknown.png", + "coinGeckoId": "", + "denom": "peggy0xA4eE602c16C448Dc0D1fc38E6FC12f0d6C672Cbe", + "address": "0xA4eE602c16C448Dc0D1fc38E6FC12f0d6C672Cbe", + "tokenType": "erc20", + "tokenVerification": "external" + }, + "peggy0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6": { + "decimals": 18, + "logo": "ethereum.png", + "name": "Wrapped Ethereum", + "symbol": "wETH", + "denom": "peggy0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6", + "coinGeckoId": "", + "address": "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6", + "tokenType": "erc20", + "tokenVerification": "external" + }, + "peggy0xc2c527c0cacf457746bd31b2a698fe89de2b6d49": { + "decimals": 6, + "logo": "usdt.png", + "name": "Tether", + "symbol": "USDT", + "denom": "peggy0xC2C527C0CACF457746Bd31B2a698Fe89de2b6d49", + "coinGeckoId": "", + "address": "0xC2C527C0CACF457746Bd31B2a698Fe89de2b6d49", + "tokenType": "erc20", + "tokenVerification": "external" + }, + "peggy0xd87ba7a50b2e7e660f678a895e4b72e7cb4ccd9c": { + "name": "USD Coin", + "decimals": 6, + "symbol": "USDC", + "logo": "usdc.png", + "coinGeckoId": "", + "denom": "peggy0xD87Ba7A50B2E7E660f678A895E4B72E7CB4CCd9C", + "address": "0xD87Ba7A50B2E7E660f678A895E4B72E7CB4CCd9C", + "tokenType": "erc20", + "tokenVerification": "external" + }, + "peggy0xdfb34a71b682e578c1a05ab6c9ef68661f1cc291": { + "name": "AA", + "decimals": 18, + "symbol": "AA", + "logo": "unknown.png", + "coinGeckoId": "", + "denom": "peggy0xdfb34A71B682e578C1a05ab6c9eF68661F1cC291", + "address": "0xdfb34A71B682e578C1a05ab6c9eF68661F1cC291", + "tokenType": "erc20", + "tokenVerification": "external" + }, + "peggy0xf9152067989bdc8783ff586624124c05a529a5d1": { + "name": "USD Coin", + "decimals": 6, + "symbol": "USDC", + "logo": "usdc.png", + "coinGeckoId": "", + "denom": "peggy0xf9152067989BDc8783fF586624124C05A529A5D1", + "address": "0xf9152067989BDc8783fF586624124C05A529A5D1", + "tokenType": "erc20", + "tokenVerification": "external" + } +} diff --git a/tokens/testnet.json b/tokens/testnet.json index 4d17de0c64..3f8cab2b13 100644 --- a/tokens/testnet.json +++ b/tokens/testnet.json @@ -25244,6 +25244,22 @@ "tokenVerification": "unverified", "externalLogo": "unknown.png" }, + { + "denom": "ibc/A2BBF23BE4234FD27AEF7269B30A124B91E3EB2D7F33E756B5EC2FC1F3DCF0B3", + "path": "transfer/channel-544/transfer/channel-4280", + "channelId": "channel-4280", + "baseDenom": "uusdc", + "address": "ibc/A2BBF23BE4234FD27AEF7269B30A124B91E3EB2D7F33E756B5EC2FC1F3DCF0B3", + "isNative": false, + "symbol": "uusdc", + "name": "ibc/A2BBF23BE4234FD27AEF7269B30A124B91E3EB2D7F33E756B5EC2FC1F3DCF0B3", + "logo": "https://imagedelivery.net/DYKOWp0iCc0sIkF-2e4dNw/1fb4f29a-9aed-4349-4e0b-0db6b28e7500/public", + "coinGeckoId": "", + "decimals": 18, + "tokenType": "ibc", + "tokenVerification": "unverified", + "externalLogo": "unknown.png" + }, { "address": "ibc/A8B0B746B5AB736C2D8577259B510D56B8AF598008F68041E3D634BCDE72BE97", "isNative": false, diff --git a/ts-scripts/fetchPeggyMetadata.ts b/ts-scripts/fetchPeggyMetadata.ts index e7332a89a4..d2de79ca3b 100644 --- a/ts-scripts/fetchPeggyMetadata.ts +++ b/ts-scripts/fetchPeggyMetadata.ts @@ -1,6 +1,6 @@ import 'dotenv/config' import { Alchemy, Network as AlchemyNetwork } from 'alchemy-sdk' -import { Network, isMainnet } from '@injectivelabs/networks' +import { Network, isMainnet, isTestnet } from '@injectivelabs/networks' import { TokenType, TokenVerification } from '@injectivelabs/token-metadata' import { updateJSONFile, @@ -43,6 +43,7 @@ export const fetchPeggyTokenMetaData = async ( path: `tokens/peggyTokens/${getNetworkFileName(network)}.json`, fallback: {} }) + const existingPeggyToken = existingPeggyTokensMap[denom.toLowerCase()] if (existingPeggyToken) { diff --git a/ts-scripts/generateExternalTokens.ts b/ts-scripts/generateExternalTokens.ts index 9de50d98e9..dfdbe0fbd6 100644 --- a/ts-scripts/generateExternalTokens.ts +++ b/ts-scripts/generateExternalTokens.ts @@ -9,6 +9,7 @@ import { getSymbolMeta, updateJSONFile, tokensToDenomMap, + getNetworkFileName, tokensToAddressMap } from './helper/utils' import { fetchPeggyTokenMetaData } from './fetchPeggyMetadata' @@ -52,6 +53,11 @@ const formatApiTokenMetadata = async ( const externalTokens = [] as any + const existingCW20TokensMap = readJSONFile({ + path: `tokens/cw20Tokens/${getNetworkFileName(Network.MainnetSentry)}.json`, + fallback: {} + }) + for (const tokenMetadata of filteredTokenMetadata) { const denom = tokenMetadata.contractAddr.toLowerCase() @@ -92,6 +98,14 @@ const formatApiTokenMetadata = async ( } if (isCw20ContractAddress(denom)) { + const existingCW20Token = existingCW20TokensMap[denom.toLowerCase()] + + if (existingCW20Token) { + externalTokens.push(existingCW20Token) + + continue + } + const cw20Token = await fetchCw20ContractMetaData( denom, Network.MainnetSentry diff --git a/ts-scripts/generateSupplyTokens.ts b/ts-scripts/generateSupplyTokens.ts index d138ac1f0f..60a9dfd2fa 100644 --- a/ts-scripts/generateSupplyTokens.ts +++ b/ts-scripts/generateSupplyTokens.ts @@ -70,6 +70,11 @@ export const generateSupplyToken = async (network: Network) => { existingIbcTokensMap = mainnetIbcSupplyTokensMap } + const existingCW20TokensMap = readJSONFile({ + path: `tokens/cw20Tokens/${getNetworkFileName(network)}.json`, + fallback: {} + }) + try { const filteredDenoms = supplyDenoms.filter( (denom: string) => !existingStaticTokensMap[denom.toLowerCase()] @@ -91,6 +96,15 @@ export const generateSupplyToken = async (network: Network) => { const cwContractAddress = denom.split('/').pop() if (cwContractAddress && isCw20ContractAddress(cwContractAddress)) { + const existingCW20Token = + existingCW20TokensMap[cwContractAddress.toLowerCase()] + + if (existingCW20Token) { + supplyTokens.push(existingCW20Token) + + continue + } + const cw20Token = await fetchCw20ContractMetaData(denom, network) if (cw20Token) { @@ -178,6 +192,6 @@ export const generateSupplyToken = async (network: Network) => { } } -generateSupplyToken(Network.Devnet) -generateSupplyToken(Network.MainnetSentry) +// generateSupplyToken(Network.Devnet) +// generateSupplyToken(Network.MainnetSentry) generateSupplyToken(Network.TestnetSentry) diff --git a/ts-scripts/helper/utils.ts b/ts-scripts/helper/utils.ts index 09ae69fb54..b728a49a74 100644 --- a/ts-scripts/helper/utils.ts +++ b/ts-scripts/helper/utils.ts @@ -201,7 +201,9 @@ export const readJSONFile = ({ } try { - return JSON.parse(readFileSync(resolve(__dirname, filePath), 'utf8')) + const data = readFileSync(resolve(__dirname, filePath), 'utf8') + + return JSON.parse(data) } catch (e: any) { console.error(`Error reading JSON file: ${path}`, e)