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

feat: add new networks and clients #662

Merged
merged 12 commits into from
Nov 14, 2023
Merged
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
21 changes: 20 additions & 1 deletion gnosis/eth/clients/blockscout_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class BlockscoutClient:
EthereumNetwork.ACALA_NETWORK: "https://blockscout.acala.network/graphiql",
EthereumNetwork.KARURA_NETWORK_TESTNET: "https://blockscout.karura.network/graphiql",
EthereumNetwork.ASTAR: "https://blockscout.com/astar/graphiql",
EthereumNetwork.SHIDEN: "https://blockscout.com/shiden/graphiql",
EthereumNetwork.EVMOS: "https://evm.evmos.org/graphiql",
EthereumNetwork.EVMOS_TESTNET: "https://evm.evmos.dev/graphiql",
EthereumNetwork.KCC_MAINNET: "https://scan.kcc.io/graphiql",
Expand All @@ -54,9 +55,27 @@ class BlockscoutClient:
EthereumNetwork.CROSSBELL: "https://scan.crossbell.io/graphiql",
EthereumNetwork.ETHEREUM_CLASSIC_MAINNET: "https://blockscout.com/etc/mainnet/graphiql",
EthereumNetwork.ETHEREUM_CLASSIC_TESTNET_MORDOR: "https://blockscout.com/etc/mordor/graphiql",
EthereumNetwork.SCROLL_SEPOLIA_TESTNET: "https://sepolia-blockscout.scroll.io/",
EthereumNetwork.SCROLL_SEPOLIA_TESTNET: "https://sepolia-blockscout.scroll.io/graphiql",
EthereumNetwork.MANTLE: "https://explorer.mantle.xyz/graphiql",
EthereumNetwork.MANTLE_TESTNET: "https://explorer.testnet.mantle.xyz/graphiql",
EthereumNetwork.ZETACHAIN_ATHENS_TESTNET: "https://zetachain-athens-3.blockscout.com/graphiql",
EthereumNetwork.SCROLL: "https://blockscout.scroll.io/graphiql",
EthereumNetwork.RSK_MAINNET: "https://rootstock.blockscout.com/graphiql",
EthereumNetwork.RSK_TESTNET: "https://rootstock-testnet.blockscout.com/graphiql",
EthereumNetwork.LINEA: "https://explorer.linea.build/graphiql",
EthereumNetwork.LINEA_TESTNET: "https://explorer.goerli.linea.build/graphiql",
EthereumNetwork.NEON_EVM_MAINNET: "https://neon.blockscout.com/graphiql",
EthereumNetwork.NEON_EVM_DEVNET: "https://neon-devnet.blockscout.com/graphiql",
EthereumNetwork.OASIS_SAPPHIRE: "https://explorer.sapphire.oasis.io/graphiql",
EthereumNetwork.OASIS_SAPPHIRE_TESTNET: "https://testnet.explorer.sapphire.oasis.dev/graphiql",
EthereumNetwork.CASCADIA_TESTNET: "https://explorer.cascadia.foundation/graphiql",
EthereumNetwork.TENET: "https://tenetscan.io/graphiql",
EthereumNetwork.TENET_TESTNET: "https://testnet.tenetscan.io/graphiql",
EthereumNetwork.VELAS_EVM_MAINNET: "https://evmexplorer.velas.com/graphiql",
EthereumNetwork.CRONOS_MAINNET_BETA: "https://cronos.org/explorer/graphiql",
EthereumNetwork.CRONOS_TESTNET: "https://cronos.org/explorer/testnet3/graphiql",
EthereumNetwork.THUNDERCORE_MAINNET: "https://explorer-mainnet.thundercore.com/graphiql",
EthereumNetwork.THUNDERCORE_TESTNET: "https://explorer-testnet.thundercore.com/graphiql",
}

def __init__(self, network: EthereumNetwork):
Expand Down
4 changes: 4 additions & 0 deletions gnosis/eth/clients/etherscan_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ class EtherscanClient:
EthereumNetwork.LINEA_TESTNET: "https://goerli.lineascan.build",
EthereumNetwork.MANTLE: "https://explorer.mantle.xyz",
EthereumNetwork.MANTLE_TESTNET: "https://explorer.testnet.mantle.xyz",
EthereumNetwork.SCROLL_SEPOLIA_TESTNET: "https://sepolia.scrollscan.dev",
EthereumNetwork.SCROLL: "https://scrollscan.com",
}

NETWORK_WITH_API_URL = {
Expand Down Expand Up @@ -88,6 +90,8 @@ class EtherscanClient:
EthereumNetwork.LINEA_TESTNET: "https://api-testnet.lineascan.build",
EthereumNetwork.MANTLE: "https://explorer.mantle.xyz",
EthereumNetwork.MANTLE_TESTNET: "https://explorer.testnet.mantle.xyz",
EthereumNetwork.SCROLL_SEPOLIA_TESTNET: "https://api-sepolia.scrollscan.dev",
EthereumNetwork.SCROLL: "https://api.scrollscan.com",
}
HTTP_HEADERS = {
"User-Agent": "curl/7.77.0",
Expand Down
14 changes: 14 additions & 0 deletions gnosis/safe/addresses.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,14 @@
("0x3E5c63644E683549055b9Be8653de26E0B4CD36E", 2362236, "1.3.0+L2"),
("0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552", 2362238, "1.3.0"),
],
EthereumNetwork.ZETACHAIN_ATHENS_TESTNET: [
("0xfb1bffC9d739B8D520DaF37dF666da4C687191EA", 1962980, "1.3.0+L2"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nick8319 I couldn't verify the deploy block using the blockexplorer https://zetachain-athens-3.blockscout.com/address/0xfb1bffC9d739B8D520DaF37dF666da4C687191EA
How do you get this block?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @moisses89, unfortunately Blockscout doesn't index internal transactions on Zetachain Testnet that's why it doesn't recognize safe-contracts as contracts. But I have transaction hashes saved during safe-contracts deployment. Here they are:
GnosisSafe: https://zetachain-athens-3.blockscout.com/tx/0x614a1428afd37470db6836abe53f191b3cc4470fd08212e0b3706166fcc24b44?tab=index
GnosisSafeL2: https://zetachain-athens-3.blockscout.com/tx/0x2934f55bae338f3af78fd2f86d98b42fd82f517feb9008b99837aaa4237b66e2?tab=index
GnosisSafeProxyFactory: https://zetachain-athens-3.blockscout.com/tx/0xfc3ba1aea3dd297d63172c4429bc59a47f6ddb0a1525ac156a6e83b8d6734cb9?tab=index

("0x69f4D1788e39c87893C980c06EdF4b7f686e2938", 1962981, "1.3.0"),
],
EthereumNetwork.SCROLL: [
("0x3E5c63644E683549055b9Be8653de26E0B4CD36E", 187, "1.3.0+L2"),
("0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552", 189, "1.3.0"),
],
}

PROXY_FACTORIES: Dict[EthereumNetwork, List[Tuple[str, int]]] = {
Expand Down Expand Up @@ -990,4 +998,10 @@
EthereumNetwork.RSK_TESTNET: [
("0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2", 2362232), # v1.3.0
],
EthereumNetwork.ZETACHAIN_ATHENS_TESTNET: [
("0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC", 1962972), # v1.3.0
],
EthereumNetwork.SCROLL: [
("0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2", 179), # v1.3.0
],
}
Loading