From 752b1866f4bf082936fab7a9ddd477fee0d2eeba Mon Sep 17 00:00:00 2001 From: Juliya Smith Date: Tue, 15 Oct 2024 15:20:55 -0600 Subject: [PATCH] feat: opBNB testnet --- ape_bsc/ecosystem.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ape_bsc/ecosystem.py b/ape_bsc/ecosystem.py index bd9c560..74b62b2 100644 --- a/ape_bsc/ecosystem.py +++ b/ape_bsc/ecosystem.py @@ -13,11 +13,14 @@ "mainnet": (56, 56), "testnet": (97, 97), "opBNB": (204, 204), + "opBNB-testnet": (5611, 5611), } -def _create_config() -> NetworkConfig: - return create_network_config(block_time=3, default_transaction_type=TransactionType.STATIC) +def _create_config(block_time: int = 3) -> NetworkConfig: + return create_network_config( + block_time=block_time, default_transaction_type=TransactionType.STATIC + ) class BSCConfig(BaseEthereumConfig): @@ -25,7 +28,10 @@ class BSCConfig(BaseEthereumConfig): NETWORKS: ClassVar[dict[str, tuple[int, int]]] = NETWORKS mainnet: NetworkConfig = _create_config() testnet: NetworkConfig = _create_config() - opBNB: NetworkConfig = _create_config() + + # opBNB is really fast, hence the low block time. + opBNB: NetworkConfig = _create_config(block_time=1) + opBNB_testnet: NetworkConfig = _create_config(block_time=1) class BSC(Ethereum):