evmchains 0.0.4__tar.gz → 0.0.6__tar.gz

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.
@@ -61,7 +61,7 @@ jobs:
61
61
  strategy:
62
62
  matrix:
63
63
  os: [ubuntu-latest, macos-latest] # eventually add `windows-latest`
64
- python-version: ["3.8", "3.9", "3.10", "3.11"]
64
+ python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
65
65
 
66
66
  steps:
67
67
  - uses: actions/checkout@v3
@@ -0,0 +1,49 @@
1
+ # Development
2
+
3
+ To get started with working on the codebase, use the following steps prepare your local environment:
4
+
5
+ ```bash
6
+ # clone the github repo and navigate into the folder
7
+ git clone https://github.com/ApeWorX/evmchains.git
8
+ cd evmchains
9
+
10
+ # create and load a virtual environment
11
+ python3 -m venv venv
12
+ source venv/bin/activate
13
+
14
+ # install evmchains into the virtual environment
15
+ python setup.py install
16
+
17
+ # install the developer dependencies (-e is interactive mode)
18
+ pip install -e .'[dev]'
19
+ ```
20
+
21
+ ## Pre-Commit Hooks
22
+
23
+ We use [`pre-commit`](https://pre-commit.com/) hooks to simplify linting and ensure consistent formatting among contributors.
24
+ Use of `pre-commit` is not a requirement, but is highly recommended.
25
+
26
+ Install `pre-commit` locally from the root folder:
27
+
28
+ ```bash
29
+ pip install pre-commit
30
+ pre-commit install
31
+ ```
32
+
33
+ Committing will now automatically run the local hooks and ensure that your commit passes all lint checks.
34
+
35
+ ## Pull Requests
36
+
37
+ Pull requests are welcomed! Please adhere to the following:
38
+
39
+ - Ensure your pull request passes our linting checks
40
+ - Include test cases for any new functionality
41
+ - Include any relevant documentation updates
42
+
43
+ It's a good idea to make pull requests early on.
44
+ A pull request represents the start of a discussion, and doesn't necessarily need to be the final, finished submission.
45
+
46
+ If you are opening a work-in-progress pull request to verify that it passes CI tests, please consider
47
+ [marking it as a draft](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests#draft-pull-requests).
48
+
49
+ Join the ApeWorX [Discord](https://discord.gg/apeworx) if you have any questions.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: evmchains
3
- Version: 0.0.4
3
+ Version: 0.0.6
4
4
  Summary: Packaged metadata on Ethereum Virtual Machine (EVM) chains
5
5
  License: Apache License
6
6
  Version 2.0, January 2004
@@ -218,6 +218,7 @@ Classifier: Programming Language :: Python :: 3.8
218
218
  Classifier: Programming Language :: Python :: 3.9
219
219
  Classifier: Programming Language :: Python :: 3.10
220
220
  Classifier: Programming Language :: Python :: 3.11
221
+ Classifier: Programming Language :: Python :: 3.12
221
222
  Requires-Python: >=3.8
222
223
  Description-Content-Type: text/markdown
223
224
  License-File: LICENSE
@@ -277,3 +278,13 @@ assert chain.chainId == 1
277
278
 
278
279
  Please see the [contributing guide](CONTRIBUTING.md) to learn more how to contribute to this project.
279
280
  Comments, questions, criticisms and pull requests are welcomed.
281
+
282
+ ### Adding Chains
283
+
284
+ To add a chain to the metadata, please open a pull request with the following changes:
285
+
286
+ - Update `CHAIN_IDS` in `scripts/update.py` with the chain IDs you want to add
287
+ - Run `python scripts/update.py`
288
+ - Submit a PR with the updated script and updated `evmchain/chains.py` metdata file
289
+
290
+ **Do not edit `evmchain/chains.py` manually.** Any manual changes are likely to be overwritten later.
@@ -42,3 +42,13 @@ assert chain.chainId == 1
42
42
 
43
43
  Please see the [contributing guide](CONTRIBUTING.md) to learn more how to contribute to this project.
44
44
  Comments, questions, criticisms and pull requests are welcomed.
45
+
46
+ ### Adding Chains
47
+
48
+ To add a chain to the metadata, please open a pull request with the following changes:
49
+
50
+ - Update `CHAIN_IDS` in `scripts/update.py` with the chain IDs you want to add
51
+ - Run `python scripts/update.py`
52
+ - Submit a PR with the updated script and updated `evmchain/chains.py` metdata file
53
+
54
+ **Do not edit `evmchain/chains.py` manually.** Any manual changes are likely to be overwritten later.
@@ -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.4'
16
- __version_tuple__ = version_tuple = (0, 0, 4)
15
+ __version__ = version = '0.0.6'
16
+ __version_tuple__ = version_tuple = (0, 0, 6)
@@ -1,5 +1,5 @@
1
- # This file is auto-generated by scripts/update_rpc.py
2
- # 2024-03-08 22:05:08.915228
1
+ # This file is auto-generated by scripts/update.py
2
+ # 2024-04-09 14:08:35.326760
3
3
  # Do not edit this file directly.
4
4
  from typing import Any, Dict
5
5
 
@@ -280,7 +280,7 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
280
280
  "symbol": "ETH",
281
281
  },
282
282
  "networkId": 168587773,
283
- "rpc": ["https://sepolia.blast.io"],
283
+ "rpc": ["https://sepolia.blast.io", "https://blast-sepolia.drpc.org"],
284
284
  "shortName": "blastsepolia",
285
285
  "slip44": None,
286
286
  },
@@ -410,6 +410,7 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
410
410
  "https://rpc.mevblocker.io/fast",
411
411
  "https://rpc.mevblocker.io/noreverts",
412
412
  "https://rpc.mevblocker.io/fullprivacy",
413
+ "https://eth.drpc.org",
413
414
  ],
414
415
  "shortName": "eth",
415
416
  "slip44": 60,
@@ -488,6 +489,7 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
488
489
  "https://sepolia.infura.io/v3/${INFURA_API_KEY}",
489
490
  "https://sepolia.gateway.tenderly.co",
490
491
  "https://ethereum-sepolia-rpc.publicnode.com",
492
+ "https://sepolia.drpc.org",
491
493
  ],
492
494
  "shortName": "sep",
493
495
  "slip44": 1,
@@ -519,7 +521,11 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
519
521
  "name": "Fantom Opera",
520
522
  "nativeCurrency": {"decimals": 18, "name": "Fantom", "symbol": "FTM"},
521
523
  "networkId": 250,
522
- "rpc": ["https://rpc.ftm.tools", "https://fantom-rpc.publicnode.com"],
524
+ "rpc": [
525
+ "https://rpc.ftm.tools",
526
+ "https://fantom-rpc.publicnode.com",
527
+ "https://fantom.drpc.org",
528
+ ],
523
529
  "shortName": "ftm",
524
530
  "slip44": None,
525
531
  },
@@ -545,6 +551,7 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
545
551
  "rpc": [
546
552
  "https://rpc.testnet.fantom.network",
547
553
  "https://fantom-testnet-rpc.publicnode.com",
554
+ "https://fantom-testnet.drpc.org",
548
555
  ],
549
556
  "shortName": "tftm",
550
557
  "slip44": 1,
@@ -636,6 +643,7 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
636
643
  "https://mainnet.optimism.io",
637
644
  "https://optimism-rpc.publicnode.com",
638
645
  "https://optimism.gateway.tenderly.co",
646
+ "https://optimism.drpc.org",
639
647
  ],
640
648
  "shortName": "oeth",
641
649
  "slip44": None,
@@ -663,6 +671,7 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
663
671
  "https://goerli.optimism.io",
664
672
  "https://optimism-goerli-rpc.publicnode.com",
665
673
  "https://optimism-goerli.gateway.tenderly.co",
674
+ "https://optimism-testnet.drpc.org",
666
675
  ],
667
676
  "shortName": "ogor",
668
677
  "slip44": 1,
@@ -690,7 +699,7 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
690
699
  "symbol": "ETH",
691
700
  },
692
701
  "networkId": 11155420,
693
- "rpc": ["https://sepolia.optimism.io"],
702
+ "rpc": ["https://sepolia.optimism.io", "https://optimism-sepolia.drpc.org"],
694
703
  "shortName": "opsep",
695
704
  "slip44": 1,
696
705
  },
@@ -777,6 +786,7 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
777
786
  "https://matic-mainnet-full-rpc.bwarelabs.com",
778
787
  "https://polygon-bor-rpc.publicnode.com",
779
788
  "https://polygon.gateway.tenderly.co",
789
+ "https://polygon.drpc.org",
780
790
  ],
781
791
  "shortName": "matic",
782
792
  "slip44": 966,
@@ -828,7 +838,7 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
828
838
  "name": "Polygon zkEVM",
829
839
  "nativeCurrency": {"decimals": 18, "name": "Ether", "symbol": "ETH"},
830
840
  "networkId": 1101,
831
- "rpc": ["https://zkevm-rpc.com"],
841
+ "rpc": ["https://zkevm-rpc.com", "https://polygon-zkevm.drpc.org"],
832
842
  "shortName": "zkevm",
833
843
  "slip44": None,
834
844
  },
@@ -850,9 +860,84 @@ PUBLIC_CHAIN_META: Dict[str, Dict[str, Dict[str, Any]]] = {
850
860
  "name": "Polygon zkEVM Testnet",
851
861
  "nativeCurrency": {"decimals": 18, "name": "Ether", "symbol": "ETH"},
852
862
  "networkId": 1442,
853
- "rpc": ["https://rpc.public.zkevm-test.net"],
863
+ "rpc": [
864
+ "https://rpc.public.zkevm-test.net",
865
+ "https://polygon-zkevm-testnet.drpc.org",
866
+ ],
854
867
  "shortName": "testnet-zkEVM-mango",
855
868
  "slip44": 1,
856
869
  },
857
870
  },
871
+ "linea": {
872
+ "mainnet": {
873
+ "chain": "ETH",
874
+ "chainId": 59144,
875
+ "ens": None,
876
+ "explorers": [
877
+ {
878
+ "icon": "linea",
879
+ "name": "Etherscan",
880
+ "standard": "EIP3091",
881
+ "url": "https://lineascan.build",
882
+ },
883
+ {
884
+ "icon": "linea",
885
+ "name": "Blockscout",
886
+ "standard": "EIP3091",
887
+ "url": "https://explorer.linea.build",
888
+ },
889
+ {
890
+ "icon": "linea",
891
+ "name": "L2scan",
892
+ "standard": "EIP3091",
893
+ "url": "https://linea.l2scan.co",
894
+ },
895
+ ],
896
+ "faucets": [],
897
+ "features": None,
898
+ "icon": "linea",
899
+ "infoURL": "https://linea.build",
900
+ "name": "Linea",
901
+ "nativeCurrency": {"decimals": 18, "name": "Linea Ether", "symbol": "ETH"},
902
+ "networkId": 59144,
903
+ "rpc": [
904
+ "https://rpc.linea.build",
905
+ "https://linea-mainnet.infura.io/v3/${INFURA_API_KEY}",
906
+ ],
907
+ "shortName": "linea",
908
+ "slip44": None,
909
+ },
910
+ "sepolia": {
911
+ "chain": "ETH",
912
+ "chainId": 59141,
913
+ "ens": None,
914
+ "explorers": [
915
+ {
916
+ "icon": "linea",
917
+ "name": "Etherscan",
918
+ "standard": "EIP3091",
919
+ "url": "https://sepolia.lineascan.build",
920
+ },
921
+ {
922
+ "icon": "linea",
923
+ "name": "Blockscout",
924
+ "standard": "EIP3091",
925
+ "url": "https://explorer.sepolia.linea.build",
926
+ },
927
+ ],
928
+ "faucets": [],
929
+ "features": None,
930
+ "icon": "linea",
931
+ "infoURL": "https://linea.build",
932
+ "name": "Linea Sepolia",
933
+ "nativeCurrency": {"decimals": 18, "name": "Linea Ether", "symbol": "ETH"},
934
+ "networkId": 59141,
935
+ "rpc": [
936
+ "https://rpc.sepolia.linea.build",
937
+ "https://linea-sepolia.infura.io/v3/${INFURA_API_KEY}",
938
+ ],
939
+ "shortName": "linea-sepolia",
940
+ "slip44": 1,
941
+ },
942
+ },
858
943
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: evmchains
3
- Version: 0.0.4
3
+ Version: 0.0.6
4
4
  Summary: Packaged metadata on Ethereum Virtual Machine (EVM) chains
5
5
  License: Apache License
6
6
  Version 2.0, January 2004
@@ -218,6 +218,7 @@ Classifier: Programming Language :: Python :: 3.8
218
218
  Classifier: Programming Language :: Python :: 3.9
219
219
  Classifier: Programming Language :: Python :: 3.10
220
220
  Classifier: Programming Language :: Python :: 3.11
221
+ Classifier: Programming Language :: Python :: 3.12
221
222
  Requires-Python: >=3.8
222
223
  Description-Content-Type: text/markdown
223
224
  License-File: LICENSE
@@ -277,3 +278,13 @@ assert chain.chainId == 1
277
278
 
278
279
  Please see the [contributing guide](CONTRIBUTING.md) to learn more how to contribute to this project.
279
280
  Comments, questions, criticisms and pull requests are welcomed.
281
+
282
+ ### Adding Chains
283
+
284
+ To add a chain to the metadata, please open a pull request with the following changes:
285
+
286
+ - Update `CHAIN_IDS` in `scripts/update.py` with the chain IDs you want to add
287
+ - Run `python scripts/update.py`
288
+ - Submit a PR with the updated script and updated `evmchain/chains.py` metdata file
289
+
290
+ **Do not edit `evmchain/chains.py` manually.** Any manual changes are likely to be overwritten later.
@@ -1,4 +1,5 @@
1
1
  .gitignore
2
+ CONTRIBUTING.md
2
3
  LICENSE
3
4
  README.md
4
5
  pyproject.toml
@@ -23,6 +23,7 @@ classifiers = [
23
23
  "Programming Language :: Python :: 3.9",
24
24
  "Programming Language :: Python :: 3.10",
25
25
  "Programming Language :: Python :: 3.11",
26
+ "Programming Language :: Python :: 3.12",
26
27
  ]
27
28
  dependencies = [
28
29
  "pydantic~=2.5.3",
@@ -54,7 +55,7 @@ write_to = "evmchains/_meta.py"
54
55
  # character.
55
56
 
56
57
  [tool.black]
57
- target-version = ['py38', 'py39', 'py310', 'py311']
58
+ target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
58
59
  include = '\.pyi?$'
59
60
 
60
61
  [tool.pytest.ini_options]
@@ -72,6 +72,10 @@ CHAIN_IDS = {
72
72
  "mainnet": 1101,
73
73
  "testnet": 1442,
74
74
  },
75
+ "linea": {
76
+ "mainnet": 59144,
77
+ "sepolia": 59141,
78
+ },
75
79
  }
76
80
 
77
81
  pp = PrettyPrinter(indent=4)
@@ -132,7 +136,7 @@ def fetch_chains() -> Dict[str, Dict[str, Chain]]:
132
136
 
133
137
  def write_chain_const(chains: Dict[str, Dict[str, Chain]]):
134
138
  """Write the file with Python constant"""
135
- file_str = "# This file is auto-generated by scripts/update_rpc.py\n"
139
+ file_str = "# This file is auto-generated by scripts/update.py\n"
136
140
  file_str += f"# {stamp()}\n"
137
141
  file_str += "# Do not edit this file directly.\n"
138
142
  file_str += "from typing import Any, Dict\n\n"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes