Skip to content

Commit ff13435

Browse files
authored
Merge pull request #358 from kleros/feat/add-more-chains-to-rich-address
feat: add more chains to rich address
2 parents 9b76c97 + 54cb6f3 commit ff13435

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

src/utils/rich-address.ts

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ export const namespaces: Namespace[] = [
3535
{
3636
id: 'solana',
3737
test: (s: string) => /(^[1-9A-HJ-NP-Za-km-z]{32,44}$)/.test(s)
38+
},
39+
{
40+
id: 'tvm',
41+
test: (s: string) =>
42+
/^(0|-1):[a-fA-F0-9]{64}$/.test(s) ||
43+
/^[EU][Q|f][A-Za-z0-9_-]{46}$/.test(s)
44+
},
45+
{
46+
id: 'stacks',
47+
test: (s: string) => /^(SP|ST)[\da-km-zA-HJ-NP-Z]{38}$/.test(s)
3848
}
3949
]
4050

@@ -208,6 +218,62 @@ export const references: Reference[] = [
208218
name: 'Blast',
209219
label: 'BLAST',
210220
explorer: 'blastscan.io'
221+
},
222+
{
223+
id: '9745',
224+
namespaceId: 'eip155',
225+
name: 'Plasma',
226+
label: 'XPL',
227+
explorer: 'explorer.plasma.to'
228+
},
229+
{
230+
id: '999',
231+
namespaceId: 'eip155',
232+
name: 'Hyperliquid',
233+
label: 'HYPE',
234+
explorer: 'hyperevmscan.io'
235+
},
236+
{
237+
id: '747474',
238+
namespaceId: 'eip155',
239+
name: 'Katana',
240+
label: 'ETH',
241+
explorer: 'katanascan.com'
242+
},
243+
{
244+
id: '130',
245+
namespaceId: 'eip155',
246+
name: 'Unichain',
247+
label: 'ETH',
248+
explorer: 'unichain.blockscout.com'
249+
},
250+
{
251+
id: '80094',
252+
namespaceId: 'eip155',
253+
name: 'Berachain',
254+
label: 'BERA',
255+
explorer: 'berascan.com'
256+
},
257+
{
258+
id: '480',
259+
namespaceId: 'eip155',
260+
name: 'World Chain',
261+
label: 'ETH',
262+
explorer: 'worldscan.org'
263+
},
264+
{
265+
id: '-239',
266+
namespaceId: 'tvm',
267+
name: 'TON',
268+
label: 'TON',
269+
explorer: 'tonscan.org'
270+
},
271+
{
272+
id: '1',
273+
namespaceId: 'stacks',
274+
name: 'Stacks',
275+
label: 'STX',
276+
explorer: 'explorer.hiro.so'
211277
}
212278
]
213279

0 commit comments

Comments
 (0)