Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: constants updates for sn mainnet #1370

Merged
merged 3 commits into from
Sep 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions kakarot_scripts/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import logging
import os
from enum import Enum, IntEnum
from math import ceil, log
from pathlib import Path
from typing import Dict, List

Expand Down Expand Up @@ -34,22 +33,24 @@ class NetworkType(Enum):

NETWORKS = {
"mainnet": {
"name": "mainnet",
"name": "starknet-mainnet",
"explorer_url": "https://starkscan.co",
"rpc_url": f"https://starknet-mainnet.infura.io/v3/{os.getenv('INFURA_KEY')}",
"rpc_url": f"https://rpc.nethermind.io/mainnet-juno/?apikey={os.getenv('NETHERMIND_API_KEY')}",
"l1_rpc_url": f"https://mainnet.infura.io/v3/{os.getenv('INFURA_KEY')}",
"type": NetworkType.PROD,
"chain_id": StarknetChainId.MAINNET,
"check_interval": 1,
"max_wait": 10,
},
"sepolia": {
"name": "starknet-sepolia",
"explorer_url": "https://sepolia.starkscan.co/",
"rpc_url": os.getenv("STARKNET_SEPOLIA_RPC_URL"),
"rpc_url": f"https://rpc.nethermind.io/sepolia-juno/?apikey={os.getenv('NETHERMIND_API_KEY')}",
"l1_rpc_url": f"https://sepolia.infura.io/v3/{os.getenv('INFURA_KEY')}",
"type": NetworkType.STAGING,
"chain_id": StarknetChainId.SEPOLIA,
"check_interval": 5,
"max_wait": 30,
"check_interval": 1,
"max_wait": 10,
},
"starknet-devnet": {
"name": "starknet-devnet",
Expand Down Expand Up @@ -347,7 +348,7 @@ def __next__(self) -> Account:
)
)

if NETWORK.get("chain_id"):
logger.info(
f"ℹ️ Connected to CHAIN_ID {NETWORK['chain_id'].value.to_bytes(ceil(log(NETWORK['chain_id'].value, 256)), 'big')}"
)
logger.info(
f"ℹ️ Connected to Starknet chain id {bytes.fromhex(f'{ChainId.starknet_chain_id.value:x}')} "
f"and Kakarot chain id {bytes.fromhex(f'{ChainId.chain_id.value:x}')}"
)
Loading