diff --git a/crawlers/mooncrawl/mooncrawl/blockchain.py b/crawlers/mooncrawl/mooncrawl/blockchain.py index 26e4896f..abb95ecc 100644 --- a/crawlers/mooncrawl/mooncrawl/blockchain.py +++ b/crawlers/mooncrawl/mooncrawl/blockchain.py @@ -129,7 +129,10 @@ def add_block(db_session, block: Any, blockchain_type: AvailableBlockchainType) ) if blockchain_type == AvailableBlockchainType.XDAI: block_obj.author = block.author - if blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_TESTNET: + if ( + blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_TESTNET + or blockchain_type == AvailableBlockchainType.ZKSYNC_ERA + ): block_obj.mix_hash = block.get("mixHash", "") block_obj.sha3_uncles = block.get("sha3Uncles", "") block_obj.l1_batch_number = ( @@ -171,7 +174,10 @@ def add_block_transactions( transaction_type=int(tx["type"], 0) if tx.get("type") is not None else None, value=tx.value, ) - if blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_TESTNET: + if ( + blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_TESTNET + or blockchain_type == AvailableBlockchainType.ZKSYNC_ERA + ): tx_obj.l1_batch_number = ( int(tx.get("l1BatchNumber"), 0) if tx.get("l1BatchNumber") is not None diff --git a/moonstreamapi/moonstreamapi/actions.py b/moonstreamapi/moonstreamapi/actions.py index 96e542ef..f654b075 100644 --- a/moonstreamapi/moonstreamapi/actions.py +++ b/moonstreamapi/moonstreamapi/actions.py @@ -56,6 +56,7 @@ blockchain_by_subscription_id = { "xdai_blockchain": "xdai", "wyrm_blockchain": "wyrm", "zksync_era_testnet_blockchain": "zksync_era_testnet", + "zksync_era_blockchain": "zksync_era", "ethereum_smartcontract": "ethereum", "polygon_smartcontract": "polygon", "mumbai_smartcontract": "mumbai", diff --git a/moonstreamapi/moonstreamapi/admin/subscription_types.py b/moonstreamapi/moonstreamapi/admin/subscription_types.py index aa043fc0..e1c4896e 100644 --- a/moonstreamapi/moonstreamapi/admin/subscription_types.py +++ b/moonstreamapi/moonstreamapi/admin/subscription_types.py @@ -78,7 +78,7 @@ CANONICAL_SUBSCRIPTION_TYPES = { blockchain="zksync_era", choices=["input:address", "tag:erc721"], description="Contracts events and tx_calls of contract of zkSync Era blockchain.", - icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/zksync-era-testnet-token-logo.png", + icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/zksync-era-token-logo.png", stripe_product_id=None, stripe_price_id=None, active=True, @@ -149,6 +149,17 @@ CANONICAL_SUBSCRIPTION_TYPES = { stripe_price_id=None, active=False, ), + "zksync_era_blockchain": SubscriptionTypeResourceData( + id="zksync_era_blockchain", + name="zkSync Era transactions", + blockchain="zksync_era", + choices=["input:address", "tag:erc721"], + description="ZkSync Era chain transactions subscription.", + icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/zksync-era-token-logo.png", + stripe_product_id=None, + stripe_price_id=None, + active=False, + ), "zksync_era_testnet_blockchain": SubscriptionTypeResourceData( id="zksync_era_testnet_blockchain", name="zkSync Era testnet transactions",