evmchains 0.0.11__py3-none-any.whl → 0.0.13__py3-none-any.whl

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.
evmchains/__init__.py CHANGED
@@ -1,3 +1,9 @@
1
+ """EVM-compatible chains metadata.
2
+
3
+ Chain data is organized by Ape-style ecosystem and network and provided by the
4
+ below utility functions.
5
+ """
6
+
1
7
  import os
2
8
  import random
3
9
  import re
@@ -10,7 +16,7 @@ ENV_VAR_REGEX = re.compile(r"\$\{([A-Za-z0-9_]+)\}")
10
16
 
11
17
 
12
18
  def get_chain_meta(ecosystem: str, network: str) -> Chain:
13
- """Return a Chain instance with metadata for an EVM chain"""
19
+ """Return a Chain instance with metadata for an EVM chain."""
14
20
  if (
15
21
  ecosystem not in PUBLIC_CHAIN_META
16
22
  or network not in PUBLIC_CHAIN_META[ecosystem]
@@ -21,7 +27,7 @@ def get_chain_meta(ecosystem: str, network: str) -> Chain:
21
27
 
22
28
 
23
29
  def get_rpcs(ecosystem: str, network: str) -> List[str]:
24
- """Get a list of valid RPC endpoints for an ecosystem:network pair"""
30
+ """Get a list of valid RPC endpoints for an ecosystem:network pair."""
25
31
  rpcs = []
26
32
 
27
33
  chain = get_chain_meta(ecosystem, network)
@@ -42,7 +48,7 @@ def get_rpcs(ecosystem: str, network: str) -> List[str]:
42
48
 
43
49
 
44
50
  def get_random_rpc(ecosystem: str, network: str) -> str:
45
- """Return a random RPC endpoint for an ecosystem:network pair"""
51
+ """Return a random RPC endpoint for an ecosystem:network pair."""
46
52
  rpcs = get_rpcs(ecosystem, network)
47
53
  return random.choice(rpcs)
48
54
 
evmchains/_meta.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.0.11'
16
- __version_tuple__ = version_tuple = (0, 0, 11)
15
+ __version__ = version = '0.0.13'
16
+ __version_tuple__ = version_tuple = (0, 0, 13)
evmchains/chains.py CHANGED
@@ -1,6 +1,12 @@
1
- # This file is auto-generated by scripts/update.py
2
- # 2024-07-03 20:26:21.491217
3
- # Do not edit this file directly.
1
+ """Constants containing metadata for EVM-comaptitble chains.
2
+
3
+ !!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!
4
+ !!!! DO NOT EDIT THIS FILE DIRECTLY! !!!!
5
+ !!!! This file is auto-generated by scripts/update.py !!!!
6
+ !!!! 2024-10-15 20:35:49.075377+00:00 !!!!
7
+ !!!!!!!!!!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!
8
+ """
9
+
4
10
  from typing import Any, Dict
5
11
 
6
12
  PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
@@ -367,6 +373,38 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
367
373
  "shortName": "bnbt",
368
374
  "slip44": 1,
369
375
  },
376
+ "opBNB": {
377
+ "chain": "opBNB",
378
+ "chainId": 204,
379
+ "ens": None,
380
+ "explorers": [
381
+ {
382
+ "name": "opbnbscan",
383
+ "standard": "EIP3091",
384
+ "url": "https://mainnet.opbnbscan.com",
385
+ }
386
+ ],
387
+ "faucets": [],
388
+ "features": None,
389
+ "icon": "bnbchain",
390
+ "infoURL": "https://opbnb.bnbchain.org/en",
391
+ "name": "opBNB Mainnet",
392
+ "nativeCurrency": {
393
+ "decimals": 18,
394
+ "name": "BNB Chain Native Token",
395
+ "symbol": "BNB",
396
+ },
397
+ "networkId": 204,
398
+ "rpc": [
399
+ "https://opbnb-mainnet-rpc.bnbchain.org",
400
+ "https://opbnb-mainnet.nodereal.io/v1/64a9df0874fb4a93b9d0a3849de012d3",
401
+ "https://opbnb-mainnet.nodereal.io/v1/e9a36765eb8a40b9bd12e680a1fd2bc5",
402
+ "https://opbnb-rpc.publicnode.com",
403
+ "https://opbnb.drpc.org",
404
+ ],
405
+ "shortName": "obnb",
406
+ "slip44": 714,
407
+ },
370
408
  },
371
409
  "ethereum": {
372
410
  "mainnet": {
@@ -528,13 +566,11 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
528
566
  "rpc": [
529
567
  "https://rpc.sepolia.org",
530
568
  "https://rpc2.sepolia.org",
531
- "https://rpc-sepolia.rockx.com",
532
569
  "https://rpc.sepolia.ethpandaops.io",
533
570
  "https://sepolia.infura.io/v3/${INFURA_API_KEY}",
534
571
  "https://sepolia.gateway.tenderly.co",
535
572
  "https://ethereum-sepolia-rpc.publicnode.com",
536
573
  "https://sepolia.drpc.org",
537
- "https://rpc-sepolia.rockx.com",
538
574
  ],
539
575
  "shortName": "sep",
540
576
  "slip44": 1,
@@ -688,6 +724,7 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
688
724
  "rpc": [
689
725
  "https://rpc.linea.build",
690
726
  "https://linea-mainnet.infura.io/v3/${INFURA_API_KEY}",
727
+ "https://linea-rpc.publicnode.com",
691
728
  ],
692
729
  "shortName": "linea",
693
730
  "slip44": None,
@@ -720,6 +757,7 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
720
757
  "rpc": [
721
758
  "https://rpc.sepolia.linea.build",
722
759
  "https://linea-sepolia.infura.io/v3/${INFURA_API_KEY}",
760
+ "https://linea-sepolia-rpc.publicnode.com",
723
761
  ],
724
762
  "shortName": "linea-sepolia",
725
763
  "slip44": 1,
@@ -892,7 +930,7 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
892
930
  "icon": "polygon",
893
931
  "infoURL": "https://polygon.technology/",
894
932
  "name": "Polygon Mainnet",
895
- "nativeCurrency": {"decimals": 18, "name": "MATIC", "symbol": "MATIC"},
933
+ "nativeCurrency": {"decimals": 18, "name": "POL", "symbol": "POL"},
896
934
  "networkId": 137,
897
935
  "rpc": [
898
936
  "https://polygon-rpc.com/",
@@ -905,7 +943,7 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
905
943
  "https://polygon.gateway.tenderly.co",
906
944
  "https://polygon.drpc.org",
907
945
  ],
908
- "shortName": "matic",
946
+ "shortName": "pol",
909
947
  "slip44": 966,
910
948
  },
911
949
  "mumbai": {
@@ -950,7 +988,7 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
950
988
  "icon": "polygon",
951
989
  "infoURL": "https://polygon.technology/",
952
990
  "name": "Amoy",
953
- "nativeCurrency": {"decimals": 18, "name": "MATIC", "symbol": "MATIC"},
991
+ "nativeCurrency": {"decimals": 18, "name": "POL", "symbol": "POL"},
954
992
  "networkId": 80002,
955
993
  "rpc": [
956
994
  "https://rpc-amoy.polygon.technology",
evmchains/types.py CHANGED
@@ -1,9 +1,14 @@
1
+ """Types used in the evmchains package."""
2
+
3
+ # ruff: noqa: N815
1
4
  from typing import Any, Dict, List, Optional
2
5
 
3
6
  from pydantic import BaseModel
4
7
 
5
8
 
6
9
  class Chain(BaseModel):
10
+ """Chain object format for chain data from ethereum-lists/chains."""
11
+
7
12
  chainId: int
8
13
  networkId: int
9
14
  name: str
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: evmchains
3
- Version: 0.0.11
3
+ Version: 0.0.13
4
4
  Summary: Packaged metadata on Ethereum Virtual Machine (EVM) chains
5
5
  License: Apache License
6
6
  Version 2.0, January 2004
@@ -223,17 +223,16 @@ Classifier: Programming Language :: Python :: 3.12
223
223
  Requires-Python: >=3.8
224
224
  Description-Content-Type: text/markdown
225
225
  License-File: LICENSE
226
- Requires-Dist: pydantic <3,>=2.5.3
226
+ Requires-Dist: pydantic<3,>=2.5.3
227
227
  Provides-Extra: dev
228
- Requires-Dist: black ~=23.12.1 ; extra == 'dev'
229
- Requires-Dist: build ~=1.0.3 ; extra == 'dev'
230
- Requires-Dist: flake8 ~=7.0.0 ; extra == 'dev'
231
- Requires-Dist: isort ~=5.13.2 ; extra == 'dev'
232
- Requires-Dist: mypy ~=1.8.0 ; extra == 'dev'
233
- Requires-Dist: pytest ~=7.4.4 ; extra == 'dev'
234
- Requires-Dist: requests ~=2.31.0 ; extra == 'dev'
235
- Requires-Dist: setuptools-scm ~=8.0.4 ; extra == 'dev'
236
- Requires-Dist: types-requests >=2.31.0.20240106 ; extra == 'dev'
228
+ Requires-Dist: black~=23.12.1; extra == "dev"
229
+ Requires-Dist: build~=1.0.3; extra == "dev"
230
+ Requires-Dist: mypy~=1.8.0; extra == "dev"
231
+ Requires-Dist: pytest~=7.4.4; extra == "dev"
232
+ Requires-Dist: requests~=2.31.0; extra == "dev"
233
+ Requires-Dist: ruff~=0.6.8; extra == "dev"
234
+ Requires-Dist: setuptools-scm~=8.0.4; extra == "dev"
235
+ Requires-Dist: types-requests>=2.31.0.20240106; extra == "dev"
237
236
 
238
237
  # Python EVM Chains Metadata
239
238
 
@@ -0,0 +1,10 @@
1
+ evmchains/__init__.py,sha256=9lCyb-ttFWgOcLEPEjkF8qyFmu5YpJMI7RU9FMVkkb0,1658
2
+ evmchains/_meta.py,sha256=FMLMzW4kZnBuc3z5uydtuxnwzYOv6BBwKN68kOrxpEo,413
3
+ evmchains/chains.py,sha256=0ChZ7chw-wvoMXDZcZGTvmZtTdVBQKE09_K3mNbsyOg,41441
4
+ evmchains/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ evmchains/types.py,sha256=7_2lxPL-mSE0r85rX4GqrE5HL7tPHnyRqvx4QWQNnIA,611
6
+ evmchains-0.0.13.dist-info/LICENSE,sha256=wKVouzimXmZeaCj3f48Vua0vk91U4vjrrt2Ax0u3qBs,11342
7
+ evmchains-0.0.13.dist-info/METADATA,sha256=2X1a08m11QU6tKHROHRYQwlomEnkvcazkYlpEAIhU4U,15750
8
+ evmchains-0.0.13.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
9
+ evmchains-0.0.13.dist-info/top_level.txt,sha256=qwbaOucZ5qXfj0eTHrIujLTezgtcInyR_U-Ef2P4oic,10
10
+ evmchains-0.0.13.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.2.0)
2
+ Generator: setuptools (75.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,10 +0,0 @@
1
- evmchains/__init__.py,sha256=xoRq5QxDP8bhHXPae0HVSH9pK0uPZu6go4Tr2Kc3G_M,1510
2
- evmchains/_meta.py,sha256=Ht_kK4WoZp7blBjGQJ5CR8Vli99GsMsH_I96HrAX0WE,413
3
- evmchains/chains.py,sha256=WyQA34ByOlZqJM6swGS6KuXq9ZlU9PMevLP2bkvwixU,40049
4
- evmchains/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- evmchains/types.py,sha256=oJV6vvbQpckiKP2TTUG-RQRe66i3cGT2M-ZkaMu1Om4,474
6
- evmchains-0.0.11.dist-info/LICENSE,sha256=wKVouzimXmZeaCj3f48Vua0vk91U4vjrrt2Ax0u3qBs,11342
7
- evmchains-0.0.11.dist-info/METADATA,sha256=jJirQoTi523u3farIDawKPTLfCgsaO6pwV6r73-GulM,15816
8
- evmchains-0.0.11.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
9
- evmchains-0.0.11.dist-info/top_level.txt,sha256=qwbaOucZ5qXfj0eTHrIujLTezgtcInyR_U-Ef2P4oic,10
10
- evmchains-0.0.11.dist-info/RECORD,,