Skip to content

Commit eb32ff7

Browse files
authored
feat: devnet parm (#118)
1 parent c19a948 commit eb32ff7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

python/test_utils/starknet_test_utils.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import socket
1717
import errno
1818
import time
19+
from typing import Optional
1920

2021

2122
logger = logging.getLogger(__name__)
@@ -146,6 +147,8 @@ def __init__(
146147
initial_balance: int = 10**30,
147148
accounts: int = 15,
148149
starknet_chain_id: StarknetChainId = StarknetChainId.SEPOLIA,
150+
fork_network: Optional[str] = None,
151+
fork_block: Optional[int] = None,
149152
):
150153
"""
151154
Runs starknet.
@@ -171,6 +174,12 @@ def __init__(
171174
"--lite-mode",
172175
]
173176

177+
if fork_network is not None:
178+
command.extend(["--fork-network", fork_network])
179+
180+
if fork_block is not None:
181+
command.extend(["--fork-block", str(fork_block)])
182+
174183
self.starknet_proc = subprocess.Popen(
175184
command,
176185
stdout=subprocess.DEVNULL,

0 commit comments

Comments
 (0)