Skip to content

Commit

Permalink
feat: opBNB testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Oct 15, 2024
1 parent 5222fe1 commit 752b186
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions ape_bsc/ecosystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,25 @@
"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):
DEFAULT_TRANSACTION_TYPE: ClassVar[int] = TransactionType.STATIC.value
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):
Expand Down

0 comments on commit 752b186

Please sign in to comment.