@pioneer-platform/pioneer-discovery 8.15.31 → 8.15.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/lib/generatedAssetData.json +28349 -21237
- package/package.json +2 -2
- package/scripts/add-decimals-from-shapeshift.js +108 -0
- package/scripts/download-icons.log +28250 -0
- package/scripts/download-with-coingecko-api.js +1 -1
- package/scripts/fix-icon-permissions.js +170 -0
- package/scripts/fix-major-tokens.log +399 -0
- package/scripts/fix-major-tokens.sh +156 -0
- package/scripts/missing-assets.json +46864 -10688
- package/scripts/upload-all-case-variants.sh +73 -0
- package/scripts/upload-both-cases.js +174 -0
- package/scripts/upload-both.log +68 -0
- package/scripts/upload-to-s3.js +1 -1
- package/scripts/upload.log +42713 -0
- package/scripts/validate-and-download-icons-fast.js +1 -1
- package/scripts/.download-progress.json +0 -65
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Fix major stablecoins and top 100 tokens
|
|
4
|
+
# Downloads from CoinGecko and uploads to S3 CDN
|
|
5
|
+
|
|
6
|
+
export AWS_ACCESS_KEY_ID="DO00FXP8KK64LCXYAEZP"
|
|
7
|
+
export AWS_SECRET_ACCESS_KEY="Uyw/cq63rrQmFV9yy1HbovTSMNhLkEwImqPa88N/E/s"
|
|
8
|
+
|
|
9
|
+
COINS_DIR="/Users/highlander/WebstormProjects/keepkey-stack/projects/pioneer/services/pioneer-server/coins"
|
|
10
|
+
S3_ENDPOINT="https://sfo3.digitaloceanspaces.com"
|
|
11
|
+
S3_BUCKET="keepkey"
|
|
12
|
+
S3_REGION="sfo3"
|
|
13
|
+
|
|
14
|
+
cd "$COINS_DIR"
|
|
15
|
+
|
|
16
|
+
# CoinGecko image IDs for major tokens
|
|
17
|
+
declare -A COINGECKO_IDS=(
|
|
18
|
+
["usdc"]="6319"
|
|
19
|
+
["usdt"]="325"
|
|
20
|
+
["dai"]="9956"
|
|
21
|
+
["wbtc"]="7598"
|
|
22
|
+
["weth"]="2396"
|
|
23
|
+
["link"]="877"
|
|
24
|
+
["uni"]="12504"
|
|
25
|
+
["aave"]="7278"
|
|
26
|
+
["mkr"]="1518"
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
# Function to process a single asset
|
|
30
|
+
process_asset() {
|
|
31
|
+
local symbol="$1"
|
|
32
|
+
local caip="$2"
|
|
33
|
+
local cg_id="${COINGECKO_IDS[$symbol]}"
|
|
34
|
+
|
|
35
|
+
if [ -z "$cg_id" ]; then
|
|
36
|
+
echo "❌ No CoinGecko ID for $symbol"
|
|
37
|
+
return 1
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
# Base64 encode the CAIP
|
|
41
|
+
local encoded=$(echo -n "$caip" | base64)
|
|
42
|
+
local filename="${encoded}.png"
|
|
43
|
+
|
|
44
|
+
echo ""
|
|
45
|
+
echo "🔄 Processing $symbol - $caip"
|
|
46
|
+
echo " 📦 Filename: $filename"
|
|
47
|
+
|
|
48
|
+
# Download from CoinGecko
|
|
49
|
+
local url="https://assets.coingecko.com/coins/images/${cg_id}/large/${symbol}.png"
|
|
50
|
+
echo " ⬇️ Downloading from CoinGecko..."
|
|
51
|
+
|
|
52
|
+
if curl -s -o "$filename" "$url"; then
|
|
53
|
+
if [ -s "$filename" ]; then
|
|
54
|
+
echo " ✅ Downloaded ($(ls -lh "$filename" | awk '{print $5}'))"
|
|
55
|
+
|
|
56
|
+
# Upload to S3
|
|
57
|
+
echo " ⬆️ Uploading to S3..."
|
|
58
|
+
if aws s3 cp "$filename" "s3://${S3_BUCKET}/coins/${filename}" \
|
|
59
|
+
--endpoint-url="${S3_ENDPOINT}" \
|
|
60
|
+
--acl public-read \
|
|
61
|
+
--region "${S3_REGION}" \
|
|
62
|
+
--quiet; then
|
|
63
|
+
echo " ✅ Uploaded to CDN"
|
|
64
|
+
|
|
65
|
+
# Verify accessible
|
|
66
|
+
sleep 1
|
|
67
|
+
if curl -s -I "https://keepkey.sfo3.cdn.digitaloceanspaces.com/coins/${filename}" | grep -q "200"; then
|
|
68
|
+
echo " ✅ Verified accessible"
|
|
69
|
+
return 0
|
|
70
|
+
else
|
|
71
|
+
echo " ⚠️ Upload succeeded but not yet accessible"
|
|
72
|
+
return 0
|
|
73
|
+
fi
|
|
74
|
+
else
|
|
75
|
+
echo " ❌ Upload failed"
|
|
76
|
+
return 1
|
|
77
|
+
fi
|
|
78
|
+
else
|
|
79
|
+
echo " ❌ Downloaded file is empty"
|
|
80
|
+
return 1
|
|
81
|
+
fi
|
|
82
|
+
else
|
|
83
|
+
echo " ❌ Download failed"
|
|
84
|
+
return 1
|
|
85
|
+
fi
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
echo "🚀 Fixing major tokens and stablecoins"
|
|
89
|
+
echo "======================================"
|
|
90
|
+
|
|
91
|
+
# Process each major token across all chains
|
|
92
|
+
process_asset "usdc" "eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
|
|
93
|
+
process_asset "usdt" "eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7"
|
|
94
|
+
process_asset "dai" "eip155:1/erc20:0x6b175474e89094c44da98b954eedeac495271d0f"
|
|
95
|
+
process_asset "wbtc" "eip155:1/erc20:0x2260fac5e5542a773aa44fbcfedf7c193bc2c599"
|
|
96
|
+
process_asset "weth" "eip155:1/erc20:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
|
|
97
|
+
process_asset "link" "eip155:1/erc20:0x514910771af9ca656af840dff83e8264ecf986ca"
|
|
98
|
+
process_asset "uni" "eip155:1/erc20:0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
|
|
99
|
+
process_asset "aave" "eip155:1/erc20:0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"
|
|
100
|
+
process_asset "mkr" "eip155:1/erc20:0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2"
|
|
101
|
+
|
|
102
|
+
# Optimism
|
|
103
|
+
process_asset "usdc" "eip155:10/erc20:0x0b2c639c533813f4aa9d7837caf62653d097ff85"
|
|
104
|
+
process_asset "usdt" "eip155:10/erc20:0x94b008aa00579c1307b0ef2c499ad98a8ce58e58"
|
|
105
|
+
process_asset "dai" "eip155:10/erc20:0xda10009cbd5d07dd0cecc66161fc93d7c9000da1"
|
|
106
|
+
process_asset "wbtc" "eip155:10/erc20:0x68f180fcce6836688e9084f035309e29bf0a2095"
|
|
107
|
+
process_asset "weth" "eip155:10/erc20:0x4200000000000000000000000000000000000006"
|
|
108
|
+
process_asset "link" "eip155:10/erc20:0x350a791bfc2c21f9ed5d10980dad2e2638ffa7f6"
|
|
109
|
+
process_asset "uni" "eip155:10/erc20:0x6fd9d7ad17242c41f7131d257212c54a0e816691"
|
|
110
|
+
process_asset "aave" "eip155:10/erc20:0x76fb31fb4af56892a25e32cfc43de717950c9278"
|
|
111
|
+
|
|
112
|
+
# Polygon
|
|
113
|
+
process_asset "usdc" "eip155:137/erc20:0x3c499c542cef5e3811e1192ce70d8cc03d5c3359"
|
|
114
|
+
process_asset "usdt" "eip155:137/erc20:0xc2132d05d31c914a87c6611c10748aeb04b58e8f"
|
|
115
|
+
process_asset "dai" "eip155:137/erc20:0x8f3cf7ad23cd3cadbd9735aff958023239c6a063"
|
|
116
|
+
process_asset "wbtc" "eip155:137/erc20:0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6"
|
|
117
|
+
process_asset "weth" "eip155:137/erc20:0x7ceb23fd6bc0add59e62ac25578270cff1b9f619"
|
|
118
|
+
process_asset "link" "eip155:137/erc20:0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39"
|
|
119
|
+
process_asset "mkr" "eip155:137/erc20:0x6f7c932e7684666c9fd1d44527765433e01ff61d"
|
|
120
|
+
|
|
121
|
+
# Arbitrum
|
|
122
|
+
process_asset "usdc" "eip155:42161/erc20:0xaf88d065e77c8cc2239327c5edb3a432268e5831"
|
|
123
|
+
process_asset "usdt" "eip155:42161/erc20:0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9"
|
|
124
|
+
process_asset "dai" "eip155:42161/erc20:0xda10009cbd5d07dd0cecc66161fc93d7c9000da1"
|
|
125
|
+
process_asset "wbtc" "eip155:42161/erc20:0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f"
|
|
126
|
+
process_asset "weth" "eip155:42161/erc20:0x82af49447d8a07e3bd95bd0d56f35241523fbab1"
|
|
127
|
+
process_asset "link" "eip155:42161/erc20:0xf97f4df75117a78c1a5a0dbb814af92458539fb4"
|
|
128
|
+
process_asset "uni" "eip155:42161/erc20:0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0"
|
|
129
|
+
|
|
130
|
+
# Base (already did USDC on Base)
|
|
131
|
+
process_asset "usdt" "eip155:8453/erc20:0xfde4c96c8593536e31f229ea8f37b2ada2699bb2"
|
|
132
|
+
process_asset "dai" "eip155:8453/erc20:0x50c5725949a6f0c72e6c4a641f24049a917db0cb"
|
|
133
|
+
|
|
134
|
+
# Avalanche
|
|
135
|
+
process_asset "usdc" "eip155:43114/erc20:0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e"
|
|
136
|
+
process_asset "usdt" "eip155:43114/erc20:0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7"
|
|
137
|
+
process_asset "dai" "eip155:43114/erc20:0xd586e7f844cea2f87f50152665bcbc2c279d8d70"
|
|
138
|
+
process_asset "wbtc" "eip155:43114/erc20:0x50b7545627a5162f82a992c33b87adc75187b218"
|
|
139
|
+
process_asset "weth" "eip155:43114/erc20:0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab"
|
|
140
|
+
process_asset "link" "eip155:43114/erc20:0x5947bb275c521040051d82396192181b413227a3"
|
|
141
|
+
process_asset "aave" "eip155:43114/erc20:0x63a72806098bd3d9520cc43356dd78afe5d386d9"
|
|
142
|
+
process_asset "uni" "eip155:43114/erc20:0x8ebaf22b6f053dffeaf46f4dd9efa95d89ba8580"
|
|
143
|
+
|
|
144
|
+
# BSC
|
|
145
|
+
process_asset "usdc" "eip155:56/erc20:0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d"
|
|
146
|
+
process_asset "usdt" "eip155:56/bep20:0x55d398326f99059ff775485246999027b3197955"
|
|
147
|
+
process_asset "dai" "eip155:56/bep20:0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3"
|
|
148
|
+
process_asset "wbtc" "eip155:56/bep20:0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c"
|
|
149
|
+
process_asset "weth" "eip155:56/bep20:0x2170ed0880ac9a755fd29b2688956bd959f933f8"
|
|
150
|
+
process_asset "link" "eip155:56/bep20:0xf8a0bf9cf54bb92f17374d9e9a321e6a111a51bd"
|
|
151
|
+
process_asset "uni" "eip155:56/bep20:0xbf5140a22578168fd562dccf235e5d43a02ce9b1"
|
|
152
|
+
process_asset "aave" "eip155:56/bep20:0xfb6115445bff7b52feb98650c87f44907e58f802"
|
|
153
|
+
|
|
154
|
+
echo ""
|
|
155
|
+
echo "======================================"
|
|
156
|
+
echo "✅ Major tokens processing complete!"
|