From 5390c29944420b1f0398765d5f8da5466a359147 Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Wed, 14 Feb 2024 15:57:24 +0100 Subject: [PATCH 1/3] Fixed Sepolia testnet chain ID --- glyphs/stax_chain_11155111_64px.gif | 1 + glyphs/stax_chain_58008_64px.gif | Bin 561 -> 0 bytes src/network.c | 2 +- 3 files changed, 2 insertions(+), 1 deletion(-) create mode 120000 glyphs/stax_chain_11155111_64px.gif delete mode 100644 glyphs/stax_chain_58008_64px.gif diff --git a/glyphs/stax_chain_11155111_64px.gif b/glyphs/stax_chain_11155111_64px.gif new file mode 120000 index 0000000..8ced0b7 --- /dev/null +++ b/glyphs/stax_chain_11155111_64px.gif @@ -0,0 +1 @@ +stax_chain_1_64px.gif \ No newline at end of file diff --git a/glyphs/stax_chain_58008_64px.gif b/glyphs/stax_chain_58008_64px.gif deleted file mode 100644 index 503a95f051979ee8966b6f0e899288f5609ab6d5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 561 zcmV-10?z$MNk%w1VL$*t0J8u9^78T|BqZhK<(Zk8e}8^WO-x>1Ue3M)j%0Tn zWjYQ8puVQl3~-GBj;siFKOwnB!{F;3ax!6}2m=g|!iK`dOeK&>p`%*DVWUD6SM>aX ziDS?an~fsU9w)mkoWeQRIXJq#X9ROWdtrVUWqN}{g%)dpi9&CS5?+CHU^|izd6kbs z1d@%Moeg4shoYS=exazHG;oxa4g>+CQaov!fd&c;3k$WKXk4sVybQ>{zrl&6MRIHe z1<2IC%FBtWOsvw?)z{Yn%tEg|u?ExL-{9cmxII7)$Likf_QAt72L$u<_4fA~EU`hr zpFw~K^T9}v&fq$P;mY+8P|zVYh}Q^EsUpCDMQae=3pg{fQBy;D5J^!u(E|X21SJO? zyysve0DjM&IHQP?oq=~w3ScU-W`MH;Cqe#Fa8#&*NKE26fJuSj#bpu!@KT`Q6BlSX z4s7IUP2&V7T)7r_$B~Uu3LQmOb((f$611s27^^7a9X z!)n>yDTd@RWUf#b;l*;9tJh3m*>wJyX#$`?o$X56?BFus(hmgZfSee1h0v}2uC>ib zwBLceE9mn3IXDHdh$S1Ba60$U Date: Wed, 14 Feb 2024 15:58:39 +0100 Subject: [PATCH 2/3] Added Holesky testnet --- glyphs/stax_chain_17000_64px.gif | 1 + src/network.c | 1 + 2 files changed, 2 insertions(+) create mode 120000 glyphs/stax_chain_17000_64px.gif diff --git a/glyphs/stax_chain_17000_64px.gif b/glyphs/stax_chain_17000_64px.gif new file mode 120000 index 0000000..8ced0b7 --- /dev/null +++ b/glyphs/stax_chain_17000_64px.gif @@ -0,0 +1 @@ +stax_chain_1_64px.gif \ No newline at end of file diff --git a/src/network.c b/src/network.c index 9ec63bb..1563c32 100644 --- a/src/network.c +++ b/src/network.c @@ -85,6 +85,7 @@ static const network_info_t NETWORK_MAPPING[] = { {.chain_id = 10507, .name = "Numbers Protocol", .ticker = "NUM"}, {.chain_id = 59144, .name = "Linea", .ticker = "ETH"}, {.chain_id = 11155111, .name = "Sepolia", .ticker = "ETH"}, + {.chain_id = 17000, .name = "Holesky", .ticker = "ETH"}, }; static const network_info_t *get_network_from_chain_id(const uint64_t *chain_id) { From 9b1b9f78bf6a5c3a85200b99108b88f201319ee0 Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Wed, 14 Feb 2024 16:38:26 +0100 Subject: [PATCH 3/3] Optimize Stax icons table code generation Now detects symlinks between glyphs to prevent duplicates --- tools/gen_networks.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/gen_networks.py b/tools/gen_networks.py index 7b7f9ab..7c91b17 100755 --- a/tools/gen_networks.py +++ b/tools/gen_networks.py @@ -4,6 +4,7 @@ import os import sys import re import argparse +from pathlib import Path class Network: @@ -62,7 +63,10 @@ const network_icon_t g_network_icons[%u] = {\ for net in networks: glyph_name = get_network_glyph_name(net) - if os.path.isfile("glyphs/%s.gif" % (glyph_name)): + glyph_file = "glyphs/%s.gif" % (glyph_name) + if os.path.isfile(glyph_file): + if os.path.islink(glyph_file): + glyph_name = Path(os.path.realpath(glyph_file)).stem print(" "*4, end="", file=out) print("{.chain_id = %u, .icon = &C_%s}, // %s" % (net.chain_id, glyph_name,