diff --git a/crytic_compile/platform/all_platforms.py b/crytic_compile/platform/all_platforms.py index 624629e2..ef3996a1 100644 --- a/crytic_compile/platform/all_platforms.py +++ b/crytic_compile/platform/all_platforms.py @@ -8,7 +8,22 @@ from .dapp import Dapp from .embark import Embark from .etherlime import Etherlime -from .etherscan import Etherscan +from .etherscan import ( + Etherscan, + Kovan, + Ropsten, + Rinkeby, + Goerli, + Arbitrum, + ArbitrumTestnet, + Avalanche, + AvalancheTestnet, + Binance, + BinanceTestnet, + Fantom, + Tobalaba, + Polygon, +) from .hardhat import Hardhat from .solc import Solc from .solc_standard_json import SolcStandardJson diff --git a/crytic_compile/platform/etherscan.py b/crytic_compile/platform/etherscan.py index d090476e..21c6546f 100644 --- a/crytic_compile/platform/etherscan.py +++ b/crytic_compile/platform/etherscan.py @@ -33,7 +33,7 @@ SUPPORTED_NETWORK = { # Key, (prefix_base, perfix_bytecode) - "mainet:": (".etherscan.io", "etherscan.io"), + "mainnet:": (".etherscan.io", "etherscan.io"), "optim:": ("-optimistic.etherscan.io", "optimistic.etherscan.io"), "ropsten:": ("-ropsten.etherscan.io", "ropsten.etherscan.io"), "kovan:": ("-kovan.etherscan.io", "kovan.etherscan.io"), @@ -419,3 +419,107 @@ def _relative_to_short(relative: Path) -> Path: Path: Translated path """ return relative + + +class Ropsten(Etherscan): + """Ropsten Etherscan""" + + NAME = "Ropsten" + PROJECT_URL = "https://ropsten.etherscan.io" + TYPE = Type.ETHERSCAN + + +class Kovan(Etherscan): + """Kovan Etherscan""" + + NAME = "Kovan" + PROJECT_URL = "https://kovan.etherscan.io" + TYPE = Type.ETHERSCAN + + +class Rinkeby(Etherscan): + """Rinkeby Etherscan""" + + NAME = "Rinkeby" + PROJECT_URL = "https://rinkeby.etherscan.io" + TYPE = Type.ETHERSCAN + + +class Goerli(Etherscan): + """Goerli Etherscan""" + + NAME = "Goerli" + PROJECT_URL = "https://goerli.etherscan.io" + TYPE = Type.ETHERSCAN + + +class Tobalaba(Etherscan): + """Tobalaba Etherscan""" + + NAME = "Tobalaba" + PROJECT_URL = "https://tobalaba.etherscan.io" + TYPE = Type.ETHERSCAN + + +class Binance(Etherscan): + """Binance Etherscan""" + + NAME = "Binance Smart Chain" + PROJECT_URL = "https://bscscan.com" + TYPE = Type.ETHERSCAN + + +class BinanceTestnet(Etherscan): + """Binance Testnet Etherscan""" + + NAME = "Binance Smart Chain Testnet" + PROJECT_URL = "https://testnet.bscscan.com" + TYPE = Type.ETHERSCAN + + +class Arbitrum(Etherscan): + """Artbitrum Etherscan""" + + NAME = "Arbitrum" + PROJECT_URL = "https://arbiscan.io" + TYPE = Type.ETHERSCAN + + +class ArbitrumTestnet(Etherscan): + """Artbitrum Testnet Etherscan""" + + NAME = "Arbitrum Testnet" + PROJECT_URL = "https://testnet.arbiscan.io" + TYPE = Type.ETHERSCAN + + +class Polygon(Etherscan): + """Polygon Etherscan""" + + NAME = "Polygon" + PROJECT_URL = "https://polygonscan.com" + TYPE = Type.ETHERSCAN + + +class Avalanche(Etherscan): + """Avalanche Etherscan""" + + NAME = "Avalanche" + PROJECT_URL = "https://snowtrace.io" + TYPE = Type.ETHERSCAN + + +class AvalancheTestnet(Etherscan): + """Avalanche Testnet Etherscan""" + + NAME = "Avalanche Testnet" + PROJECT_URL = "https://testnet.snowtrace.io" + TYPE = Type.ETHERSCAN + + +class Fantom(Etherscan): + """Fantom Etherscan""" + + NAME = "Fantom" + PROJECT_URL = "https://ftmscan.com" + TYPE = Type.ETHERSCAN