kopia lustrzana https://github.com/bugout-dev/moonstream
Better with exception
rodzic
c2b8a55778
commit
3b965522d4
|
@ -144,11 +144,14 @@ def continuous_crawler(
|
|||
if web3 is None:
|
||||
web3 = _retry_connect_web3(blockchain_type, access_id=access_id)
|
||||
|
||||
network = Network.ethereum
|
||||
if blockchain_type == AvailableBlockchainType.POLYGON:
|
||||
if blockchain_type == AvailableBlockchainType.ETHEREUM:
|
||||
network = Network.ethereum
|
||||
elif blockchain_type == AvailableBlockchainType.POLYGON:
|
||||
network = Network.polygon
|
||||
elif blockchain_type == AvailableBlockchainType.XDAI:
|
||||
network = Network.xdai
|
||||
else:
|
||||
raise ValueError(f"Unknown blockchain type: {blockchain_type}")
|
||||
|
||||
ethereum_state_provider = MoonstreamEthereumStateProvider(
|
||||
web3,
|
||||
|
|
|
@ -71,11 +71,14 @@ def function_call_crawler(
|
|||
end_block: int,
|
||||
batch_size: int,
|
||||
):
|
||||
network = Network.ethereum
|
||||
if blockchain_type == AvailableBlockchainType.POLYGON:
|
||||
if blockchain_type == AvailableBlockchainType.ETHEREUM:
|
||||
network = Network.ethereum
|
||||
elif blockchain_type == AvailableBlockchainType.POLYGON:
|
||||
network = Network.polygon
|
||||
elif blockchain_type == AvailableBlockchainType.XDAI:
|
||||
network = Network.xdai
|
||||
else:
|
||||
raise ValueError(f"Unknown blockchain type: {blockchain_type}")
|
||||
|
||||
ethereum_state_provider = MoonstreamEthereumStateProvider(
|
||||
web3,
|
||||
|
|
Ładowanie…
Reference in New Issue