Skip to content
Draft
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
4 changes: 2 additions & 2 deletions safe_eth/eth/account_abstraction/user_operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ def from_bundler_response(
HexBytes(user_operation["signature"]),
ChecksumAddress(user_operation_response["entryPoint"]),
ChecksumAddress(user_operation["factory"])
if "factory" in user_operation
if user_operation.get("factory") is not None
else None,
HexBytes(user_operation["factoryData"])
if "factoryData" in user_operation
if user_operation.get("factoryData") is not None
else None,
paymaster_verification_gas_limit,
paymaster_post_op_gas_limit,
Expand Down
26 changes: 19 additions & 7 deletions safe_eth/eth/clients/blockscout_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ class BlockScoutConfigurationProblem(BlockscoutClientException):

class BlockscoutClient:
NETWORK_WITH_URL = {
EthereumNetwork.METIS_ANDROMEDA_MAINNET: "https://andromeda-explorer.metis.io/api/v2/",
EthereumNetwork.FUSE_MAINNET: "https://explorer.fuse.io/api/v2/",
EthereumNetwork.STRATIS_MAINNET: "https://explorer.stratisevm.com/api/v2/",
EthereumNetwork.SHIMMEREVM: "https://explorer.evm.shimmer.network/api/v2/",
EthereumNetwork.BITROCK_MAINNET: "https://explorer.bit-rock.io/api/v2/",
EthereumNetwork.RSS3_VSL_SEPOLIA_TESTNET: "https://scan.testnet.rss3.io/api/v2/",
EthereumNetwork.RSS3_VSL_MAINNET: "https://scan.rss3.io/api/v2/",
EthereumNetwork.EDU_CHAIN: "https://educhain.blockscout.com/api/v2/",
EthereumNetwork.FILECOIN_MAINNET: "https://filecoin.blockscout.com/api/v2/",
EthereumNetwork.FILECOIN_CALIBRATION_TESTNET: "https://filecoin-testnet.blockscout.com/api/v2/",
EthereumNetwork.ACALA_NETWORK: "https://blockscout.acala.network/api/v2/",
EthereumNetwork.ALEPH_ZERO_EVM: "https://evm-explorer.alephzero.org/api/v2/",
EthereumNetwork.ARBITRUM_BLUEBERRY: "https://arb-blueberry.gelatoscout.com/api/v2/",
Expand Down Expand Up @@ -50,7 +60,8 @@ class BlockscoutClient:
EthereumNetwork.HASHKEY_CHAIN_TESTNET: "https://hashkeychain-testnet-explorer.alt.technology/api/v2/",
EthereumNetwork.IOTA_EVM: "https://iota-evm.blockscout.com/api/v2/",
EthereumNetwork.INK_SEPOLIA: "https://explorer-sepolia.inkonchain.com/api/v2/",
EthereumNetwork.JAPAN_OPEN_CHAIN_MAINNET: "https://mainnet.japanopenchain.org/api/v2/",
# EthereumNetwork.JAPAN_OPEN_CHAIN_MAINNET: "https://mainnet.japanopenchain.org/api/v2/",
EthereumNetwork.ASTAR_SHIBUYA: "https://shibuya.blockscout.com/api/v2/",
EthereumNetwork.JAPAN_OPEN_CHAIN_TESTNET: "https://explorer.testnet.japanopenchain.org/api/v2/",
EthereumNetwork.KAIA_KAIROS_TESTNET: "https://baobab.scope.klaytn.com/api/v2/",
EthereumNetwork.KAIA_MAINNET: "https://scope.klaytn.com/api/v2/",
Expand All @@ -59,15 +70,14 @@ class BlockscoutClient:
EthereumNetwork.LINEA: "https://api-explorer.linea.build/api/v2/",
EthereumNetwork.LISK: "https://blockscout.lisk.com/api/v2/",
EthereumNetwork.LISK_SEPOLIA_TESTNET: "https://sepolia-blockscout.lisk.com/api/v2/",
EthereumNetwork.LITVM_LITEFORGE_TESTNET: "https://liteforge.explorer.caldera.xyz/api/v2/",
EthereumNetwork.LORENZO: "https://scan.lorenzo-protocol.xyz/api/v2/",
EthereumNetwork.MANTLE: "https://explorer.mantle.xyz/api/v2/",
EthereumNetwork.MANTLE_SEPOLIA_TESTNET: "https://explorer.sepolia.mantle.xyz/api/v2/",
EthereumNetwork.MANTLE_TESTNET: "https://explorer.testnet.mantle.xyz/api/v2/",
EthereumNetwork.MANTLE_TESTNET: "https://explorer.testnet.mantle.xyz/api/v2/",
EthereumNetwork.MANTA_PACIFIC_MAINNET: "https://pacific-explorer.manta.network/api/v2/",
EthereumNetwork.METER_MAINNET: "https://scan.meter.io/api/v2/",
EthereumNetwork.METER_TESTNET: "https://scan-warringstakes.meter.io/api/v2/",
EthereumNetwork.MODE: "https://explorer.mode.network/api/v2/",
EthereumNetwork.MODE_TESTNET: "https://sepolia.explorer.mode.network/api/v2/",
EthereumNetwork.NAL_SEPOLIA_TESTNET: "https://testnet-scan.nal.network/api/v2/",
EthereumNetwork.NEON_EVM_DEVNET: "https://neon-devnet.blockscout.com/api/v2/",
Expand All @@ -91,8 +101,6 @@ class BlockscoutClient:
EthereumNetwork.SWELLCHAIN: "https://explorer.swellnetwork.io/api/v2/",
EthereumNetwork.SWELLCHAIN_TESTNET: "https://swell-testnet-explorer.alt.technology/api/v2/",
EthereumNetwork.TAIKO_HEKLA_L2: "https://blockscoutapi.hekla.taiko.xyz/api/v2/",
EthereumNetwork.VANA_MOKSHA_TESTNET: "https://api.moksha.vanascan.io/api/v2/",
EthereumNetwork.ZETACHAIN_TESTNET: "https://zetachain-athens-3.blockscout.com/api/v2/",
EthereumNetwork.ZORA: "https://explorer.zora.energy/api/v2/",
EthereumNetwork.ZORA_SEPOLIA_TESTNET: "https://sepolia.explorer.zora.energy/api/v2/",
EthereumNetwork.EVM_ON_FLOW: "https://evm.flowscan.io/api/v2/",
Expand All @@ -101,7 +109,6 @@ class BlockscoutClient:
EthereumNetwork.TAC_TURIN: "https://turin.explorer.tac.build/api/v2/",
EthereumNetwork.ALEPH_ZERO: "https://evm-explorer-testnet.alephzero.org/api/v2/",
EthereumNetwork.AUTONOMYS_TAURUS_TESTNET: "https://explorer.auto-evm.taurus.autonomys.xyz/api/v2/",
EthereumNetwork.STORY_AENEID_TESTNET: "https://aeneid.storyscan.xyz/api/v2/",
EthereumNetwork.STORY: "https://mainnet.storyscan.xyz/api/v2/",
EthereumNetwork.AUTONITY_PICCADILLY_TIBER_TESTNET: "https://piccadilly.autonity.org/api/v2/",
EthereumNetwork.SONEIUM_TESTNET_MINATO: "https://soneium-minato.blockscout.com/api/v2/",
Expand All @@ -113,7 +120,6 @@ class BlockscoutClient:
EthereumNetwork.SHAPE: "https://shapescan.xyz/api/v2/",
EthereumNetwork.SHAPE_SEPOLIA_TESTNET: "https://sepolia.shapescan.xyz/api/v2/",
EthereumNetwork.STORY_AENEID_TESTNET: "https://aeneid.storyscan.io/api/v2/",
EthereumNetwork.ETHEREAL_TESTNET: "https://explorer-ethereal-testnet.t.conduit.xyz/api/v2/",
EthereumNetwork.ENI_MAINNET: "https://scan.eniac.network/api/v2/",
EthereumNetwork.VANA: "https://vanascan.io/api/v2/",
EthereumNetwork.PAIX_DEVELOPMENT_NETWORK: "https://blockscout.ppaix.com/api/v2/",
Expand Down Expand Up @@ -144,6 +150,12 @@ class BlockscoutClient:
EthereumNetwork.ALPEN_TESTNET_II: "https://explorer.testnet.alpenlabs.io/api/v2/",
EthereumNetwork.TAIKO_HOODI: "https://blockscoutapi.hoodi.taiko.xyz/api/v2/",
EthereumNetwork.ADI_CHAIN: "https://explorer-bls.adifoundation.ai/api/v2",
EthereumNetwork.EXPCHAIN_TESTNET: "https://blockscout-testnet.expchain.ai/api/v2",
EthereumNetwork.ETHEREUM_HOODI: "https://eth-hoodi.blockscout.com/api/v2/",
EthereumNetwork.MANTRACHAIN_MAINNET: "https://blockscout.mantrascan.io/api/v2/",
EthereumNetwork.AULT_BLOCKCHAIN_TESTNET: "https://test-evm-explorer.cloud.aultblockchain.xyz/api/v2/",
EthereumNetwork.AULT_BLOCKCHAIN_MAINNET: "https://main-evm-explorer.cloud.aultblockchain.xyz/api/v2/",
EthereumNetwork.MIZUHIKI_TESTNET_AWAJI: "https://awaji.blockscout.com/api/v2/",
}

def __init__(
Expand Down
9 changes: 8 additions & 1 deletion safe_eth/eth/ethereum_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ class EthereumNetwork(Enum):
PRIMUSCHAIN_MAINNET = 78
ZENITH_MAINNET = 79
GENECHAIN = 80
JAPAN_OPEN_CHAIN_MAINNET = 81
# JAPAN_OPEN_CHAIN_MAINNET = 81
ASTAR_SHIBUYA = 81
METER_MAINNET = 82
METER_TESTNET = 83
LINQTO_DEVNET = 84
Expand Down Expand Up @@ -441,6 +442,7 @@ class EthereumNetwork(Enum):
GARIZON_TESTNET_STAGE1 = 901
GARIZON_TESTNET_STAGE2 = 902
GARIZON_TESTNET_STAGE3 = 903
AULT_BLOCKCHAIN_MAINNET = 904
PORTAL_FANTASY_CHAIN = 909
DECENTRABONE_LAYER1_TESTNET = 910
TAPROOT_MAINNET = 911
Expand Down Expand Up @@ -755,6 +757,7 @@ class EthereumNetwork(Enum):
KAVA = 2222
VCHAIN_MAINNET = 2223
KREST_NETWORK = 2241
MOCA_CHAIN_MAINNET = 2288
BOMB_CHAIN = 2300
EBRO_NETWORK = 2306
AREVIA = 2309
Expand Down Expand Up @@ -894,6 +897,7 @@ class EthereumNetwork(Enum):
BITINDI_TESTNET = 4096
BITINDI_MAINNET = 4099
AIOZ_NETWORK_TESTNET = 4102
PROTOFIRE_MISTERY = 4114
HUMANS_AI_TESTNET = 4139
TIPBOXCOIN_TESTNET = 4141
CROSSFI_TESTNET = 4157
Expand All @@ -914,6 +918,7 @@ class EthereumNetwork(Enum):
MEMECORE = 4352
CREDIT_SMART_CHAIN_MAINNET = 4400
TESTNET_PIKA = 4422
LITVM_LITEFORGE_TESTNET = 4441
HTMLCOIN_MAINNET = 4444
ORDERLY_SEPOLIA_TESTNET = 4460
HYDRA_CHAIN = 4488
Expand Down Expand Up @@ -1007,6 +1012,7 @@ class EthereumNetwork(Enum):
MEGAETH_TESTNET = 6342
DIGIT_SOUL_SMART_CHAIN = 6363
CONNEXT_SEPOLIA = 6398
MIZUHIKI_TESTNET_AWAJI = 6497
PEERPAY = 6502
FLAMMA_TESTNET = 6550
SCOLCOIN_WEICHAIN_TESTNET = 6552
Expand Down Expand Up @@ -1227,6 +1233,7 @@ class EthereumNetwork(Enum):
LAMINA1 = 10849
LAMINA1_IDENTITY = 10850
GAMESWIFT_CHAIN_TESTNET = 10888
AULT_BLOCKCHAIN_TESTNET = 10904
QUADRANS_BLOCKCHAIN = 10946
QUADRANS_BLOCKCHAIN_TESTNET = 10947
KB_CHAIN = 11000
Expand Down
6 changes: 6 additions & 0 deletions safe_eth/eth/multicall.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,12 @@ class Multicall(ContractBase):
EthereumNetwork.VANA_MOKSHA_TESTNET: "0xD8d2dFca27E8797fd779F8547166A2d3B29d360E",
EthereumNetwork.ARC_TESTNET: "0xcA11bde05977b3631167028862bE2a173976CA11",
EthereumNetwork.REDDIO: "0xcA11bde05977b3631167028862bE2a173976CA11",
EthereumNetwork.PHAROS_MAINNET: "0xcA11bde05977b3631167028862bE2a173976CA11",
EthereumNetwork.ALPEN_TESTNET_II: "0xcA11bde05977b3631167028862bE2a173976CA11",
EthereumNetwork.TAIKO_HOODI: "0xcA11bde05977b3631167028862bE2a173976CA11",
EthereumNetwork.AULT_BLOCKCHAIN_MAINNET: "0xcA11bde05977b3631167028862bE2a173976CA11",
EthereumNetwork.LITVM_LITEFORGE_TESTNET: "0xcA11bde05977b3631167028862bE2a173976CA11",
EthereumNetwork.MIZUHIKI_TESTNET_AWAJI: "0xcA11bde05977b3631167028862bE2a173976CA11",
}

def __init__(
Expand Down
Loading