kopia lustrzana https://github.com/bugout-dev/moonstream
ZkSync mainnet support changes
rodzic
adea116388
commit
ec918609db
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
Ładowanie…
Reference in New Issue