34
34
SUPPORTED_NETWORK = {
35
35
# Key, (prefix_base, perfix_bytecode)
36
36
"mainet:" : (".etherscan.io" , "etherscan.io" ),
37
+ "optim:" : ("-optimistic.etherscan.io" , "optimistic.etherscan.io" ),
37
38
"ropsten:" : ("-ropsten.etherscan.io" , "ropsten.etherscan.io" ),
38
39
"kovan:" : ("-kovan.etherscan.io" , "kovan.etherscan.io" ),
39
40
"rinkeby:" : ("-rinkeby.etherscan.io" , "rinkeby.etherscan.io" ),
@@ -217,6 +218,7 @@ def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None:
217
218
avax_api_key = kwargs .get ("avax_api_key" , None )
218
219
ftmscan_api_key = kwargs .get ("ftmscan_api_key" , None )
219
220
bscan_api_key = kwargs .get ("bscan_api_key" , None )
221
+ optim_api_key = kwargs .get ("optim_api_key" , None )
220
222
221
223
export_dir = kwargs .get ("export_dir" , "crytic-export" )
222
224
export_dir = os .path .join (
@@ -241,6 +243,9 @@ def compile(self, crytic_compile: "CryticCompile", **kwargs: str) -> None:
241
243
if bscan_api_key and "bscscan" in etherscan_url :
242
244
etherscan_url += f"&apikey={ bscan_api_key } "
243
245
etherscan_bytecode_url += f"&apikey={ bscan_api_key } "
246
+ if optim_api_key and "optim" in etherscan_url :
247
+ etherscan_url += f"&apikey={ optim_api_key } "
248
+ etherscan_bytecode_url += f"&apikey={ optim_api_key } "
244
249
245
250
source_code : str = ""
246
251
result : Dict [str , Union [bool , str , int ]] = {}
0 commit comments