File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 1616import socket
1717import errno
1818import time
19+ from typing import Optional
1920
2021
2122logger = 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 ,
You can’t perform that action at this time.
0 commit comments