evmchains 0.0.12__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.12'
16
- __version_tuple__ = version_tuple = (0, 0, 12)
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-09-05 18:21:01.387852
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": {
@@ -686,6 +724,7 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
686
724
  "rpc": [
687
725
  "https://rpc.linea.build",
688
726
  "https://linea-mainnet.infura.io/v3/${INFURA_API_KEY}",
727
+ "https://linea-rpc.publicnode.com",
689
728
  ],
690
729
  "shortName": "linea",
691
730
  "slip44": None,
@@ -718,6 +757,7 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
718
757
  "rpc": [
719
758
  "https://rpc.sepolia.linea.build",
720
759
  "https://linea-sepolia.infura.io/v3/${INFURA_API_KEY}",
760
+ "https://linea-sepolia-rpc.publicnode.com",
721
761
  ],
722
762
  "shortName": "linea-sepolia",
723
763
  "slip44": 1,
@@ -948,7 +988,7 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
948
988
  "icon": "polygon",
949
989
  "infoURL": "https://polygon.technology/",
950
990
  "name": "Amoy",
951
- "nativeCurrency": {"decimals": 18, "name": "MATIC", "symbol": "MATIC"},
991
+ "nativeCurrency": {"decimals": 18, "name": "POL", "symbol": "POL"},
952
992
  "networkId": 80002,
953
993
  "rpc": [
954
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.12
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
@@ -227,11 +227,10 @@ Requires-Dist: pydantic<3,>=2.5.3
227
227
  Provides-Extra: dev
228
228
  Requires-Dist: black~=23.12.1; extra == "dev"
229
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
230
  Requires-Dist: mypy~=1.8.0; extra == "dev"
233
231
  Requires-Dist: pytest~=7.4.4; extra == "dev"
234
232
  Requires-Dist: requests~=2.31.0; extra == "dev"
233
+ Requires-Dist: ruff~=0.6.8; extra == "dev"
235
234
  Requires-Dist: setuptools-scm~=8.0.4; extra == "dev"
236
235
  Requires-Dist: types-requests>=2.31.0.20240106; extra == "dev"
237
236
 
@@ -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 (74.1.2)
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=J9AUd4fAuSymrNadeGqOirSMYNZ9WQmqXwLZX1sdsUk,413
3
- evmchains/chains.py,sha256=B_KNZmTlYADl6Xzu8uxIqoIqlW8MBWhdL4oefvZG7to,39945
4
- evmchains/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- evmchains/types.py,sha256=oJV6vvbQpckiKP2TTUG-RQRe66i3cGT2M-ZkaMu1Om4,474
6
- evmchains-0.0.12.dist-info/LICENSE,sha256=wKVouzimXmZeaCj3f48Vua0vk91U4vjrrt2Ax0u3qBs,11342
7
- evmchains-0.0.12.dist-info/METADATA,sha256=G7YFo-cnHntevIf_t6Lfk1NRY3AgM1_1gnY8qtDMrH0,15797
8
- evmchains-0.0.12.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
9
- evmchains-0.0.12.dist-info/top_level.txt,sha256=qwbaOucZ5qXfj0eTHrIujLTezgtcInyR_U-Ef2P4oic,10
10
- evmchains-0.0.12.dist-info/RECORD,,