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

232 dup: feat: add new platforms to "--supported-platforms" #347

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
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
17 changes: 16 additions & 1 deletion crytic_compile/platform/all_platforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
106 changes: 105 additions & 1 deletion crytic_compile/platform/etherscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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