Skip to content

Commit

Permalink
feat: uv style config (#110)
Browse files Browse the repository at this point in the history
* feat: uv style config

* fix: lint
  • Loading branch information
PatrickAlphaC authored Oct 18, 2024
1 parent 3389fa7 commit d2746d9
Show file tree
Hide file tree
Showing 36 changed files with 953 additions and 140 deletions.
4 changes: 4 additions & 0 deletions docs/source/_autogenerated/eravm_defaults.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
is_zksync = true
prompt_live = false
save_to_db = false
live_or_staging = false
318 changes: 318 additions & 0 deletions docs/source/_autogenerated/explorer_defaults.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,318 @@
[mainnet]
explorer = "https://eth.blockscout.com/"
explorer_type = "blockscout"
multicall2 = "0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696"
chain_id = 1

[sepolia]
explorer = "https://eth-sepolia.blockscout.com/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 11155111

[goerli]
explorer = "https://eth-goerli.blockscout.com/"
explorer_type = "blockscout"
multicall2 = "0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696"
chain_id = 5

[arbitrum]
explorer = "https://arbitrum.blockscout.com/"
explorer_type = "blockscout"
multicall2 = "0x5B5CFE992AdAC0C9D48E05854B2d91C73a003858"
chain_id = 42161

[optimism-main]
explorer = "https://optimism.blockscout.com/"
explorer_type = "blockscout"
multicall2 = "0x2DC0E2aa608532Da689e89e237dF582B783E552C"
chain_id = 10

[optimism-test]
explorer = "https://optimism-sepolia.blockscout.com/"
explorer_type = "blockscout"
multicall2 = "0x2DC0E2aa608532Da689e89e237dF582B783E552C"
chain_id = 420

[polygon-main]
explorer = "https://polygon.blockscout.com/"
explorer_type = "blockscout"
multicall2 = "0xc8E51042792d7405184DfCa245F2d27B94D013b6"
chain_id = 137

[gnosis-main]
explorer = "https://gnosis.blockscout.com/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 100

[gnosis-test]
explorer = "https://gnosis-chiado.blockscout.com/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 10200

[base-main]
explorer = "https://base.blockscout.com/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 8453

[syscoin]
explorer = "https://explorer.syscoin.org/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 57

[ethereumclassic]
explorer = "https://etc.blockscout.com/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 61

[nova-network]
explorer = "https://explorer.novanetwork.io/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 87

[velas]
explorer = "https://evmexplorer.velas.com/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 106

[thundercore]
explorer = "https://explorer-mainnet.thundercore.com/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 108

[fuse]
explorer = "https://explorer.fuse.io/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 122

[heco]
explorer = ""
multicall2 = ""
chain_id = 128

[shimmer_evm]
explorer = "https://explorer.evm.shimmer.network/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 148

[manta]
explorer = "https://pacific-explorer.manta.network/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 169

[energyweb]
explorer = "https://explorer.energyweb.org/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 246

[oasys]
explorer = "https://explorer.oasys.games/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 248

[omax]
explorer = "https://omaxscan.com/"
multicall2 = ""
chain_id = 311

[filecoin]
explorer = "https://filecoin.blockscout.com/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 314

[kucoin]
explorer = "https://scan.kcc.io/"
multicall2 = ""
chain_id = 321

[zksync-era]
explorer = "https://zksync2-mainnet-explorer.zksync.io"
explorer_type = "zksyncexplorer"
multicall2 = ""
chain_id = 324

[sepolia-zksync-era]
explorer = "https://explorer.sepolia.era.zksync.dev"
explorer_type = "zksyncexplorer"
multicall2 = ""
chain_id = 300

[shiden]
explorer = "https://shiden.blockscout.com/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 336

[rollux]
explorer = "https://explorer.rollux.com/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 570

[astar]
explorer = "https://astar.blockscout.com/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 592

[callisto]
explorer = "https://explorer.callisto.network/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 820

[lyra-chain]
explorer = "https://explorer.lyra.finance/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 957

[bifrost]
explorer = "https://explorer.mainnet.bifrostnetwork.com/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 996

[metis]
explorer = "https://andromeda-explorer.metis.io/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 1088

[polygon-zkevm]
explorer = "https://zkevm.blockscout.com/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 1101

[core]
explorer = ""
multicall2 = ""
chain_id = 1116

[lisk]
explorer = "https://blockscout.lisk.com/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 1135

[reya-network]
explorer = "https://explorer.reya.network/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 1729

[onus]
explorer = "https://explorer.onuschain.io/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 1975

[hubblenet]
explorer = ""
multicall2 = ""
chain_id = 1992

[sanko]
explorer = "https://explorer.sanko.xyz/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 1996

[dogechain]
explorer = "https://explorer.dogechain.dog/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 2000

[milkomeda]
explorer = "https://explorer-mainnet-cardano-evm.c1.milkomeda.com/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 2001

[kava]
explorer = "https://testnet.kavascan.com/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 2222

[mantle]
explorer = "https://explorer.mantle.xyz/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 5000

[zetachain]
explorer = "https://zetachain.blockscout.com/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 7000

[celo]
explorer = "https://explorer.celo.org/mainnet/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 42220

[oasis]
explorer = "https://explorer.emerald.oasis.dev/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 42262

[linea]
explorer = "https://explorer.linea.build/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 59144

[blast]
explorer = "https://blast.blockscout.com/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 81457

[taiko]
explorer = "https://blockscoutapi.mainnet.taiko.xyz/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 167000

[scroll]
explorer = "https://blockscout.scroll.io/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 534352

[zora]
explorer = "https://explorer.zora.energy/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 7777777

[neon]
explorer = "https://neon.blockscout.com/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 245022934

[aurora]
explorer = "https://explorer.mainnet.aurora.dev/"
explorer_type = "blockscout"
multicall2 = ""
chain_id = 1313161554
4 changes: 4 additions & 0 deletions docs/source/_autogenerated/fork_defaults.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
is_zksync = false
prompt_live = false
save_to_db = false
live_or_staging = false
4 changes: 4 additions & 0 deletions docs/source/_autogenerated/pyevm_defaults.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
is_zksync = false
prompt_live = false
save_to_db = false
live_or_staging = false
43 changes: 43 additions & 0 deletions docs/source/_generate_vars.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
from pathlib import Path

import tomli_w

from moccasin.constants.vars import (
DEFAULT_NETWORKS_BY_NAME,
ERAVM,
FORK_NETWORK_DEFAULTS,
LOCAL_NETWORK_DEFAULTS,
PYEVM,
)

AUTOGENERATED_DIR = Path(__file__).parent.joinpath("_autogenerated")

PYEVM_FILE = "pyevm_defaults.rst"
ERAVM_FILE = "eravm_defaults.rst"
FORKS_FILE = "fork_defaults.rst"
EXPLORER_FILE = "explorer_defaults.rst"


def clean_dict_for_toml(networks_dict):
cleaned = {}
for network, config in networks_dict.items():
cleaned[network] = {k: ("" if v is None else v) for k, v in config.items()}
return cleaned


if __name__ == "__main__":
with open(AUTOGENERATED_DIR.joinpath(PYEVM_FILE), "wb") as f:
defaults = LOCAL_NETWORK_DEFAULTS[PYEVM]
tomli_w.dump(defaults, f)

with open(AUTOGENERATED_DIR.joinpath(ERAVM_FILE), "wb") as f:
defaults = LOCAL_NETWORK_DEFAULTS[ERAVM]
tomli_w.dump(defaults, f)

with open(AUTOGENERATED_DIR.joinpath(FORKS_FILE), "wb") as f:
defaults = FORK_NETWORK_DEFAULTS
tomli_w.dump(defaults, f)

with open(AUTOGENERATED_DIR.joinpath(EXPLORER_FILE), "wb") as f:
defaults = clean_dict_for_toml(DEFAULT_NETWORKS_BY_NAME)
tomli_w.dump(defaults, f)
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

master_doc = "toctree"
templates_path = ["_templates"]
exclude_patterns = [".DS_Store"]
exclude_patterns = [".DS_Store", "_autogenerated/*.rst", "coming_soon.rst"]

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
Expand Down
Loading

0 comments on commit d2746d9

Please sign in to comment.