pull/1112/head
Andrey 2024-07-22 14:00:22 +03:00
rodzic dcc5eeb5e2
commit f51a862053
2 zmienionych plików z 56 dodań i 0 usunięć

Wyświetl plik

@ -36,6 +36,7 @@ class AvailableBlockchainType(Enum):
MUMBAI = "mumbai"
AMOY = "amoy"
XDAI = "xdai"
SEPOLIA = "sepolia"
ZKSYNC_ERA = "zksync_era"
ZKSYNC_ERA_TESTNET = "zksync_era_testnet"
ZKSYNC_ERA_SEPOLIA = "zksync_era_sepolia"
@ -119,6 +120,8 @@ def get_label_model(blockchain_type: AvailableBlockchainType) -> Type[
if blockchain_type == AvailableBlockchainType.ETHEREUM:
label_model = EthereumLabel
elif blockchain_type == AvailableBlockchainType.SEPOLIA:
label_model = SepoliaLabel
elif blockchain_type == AvailableBlockchainType.POLYGON:
label_model = PolygonLabel
elif blockchain_type == AvailableBlockchainType.MUMBAI:

Wyświetl plik

@ -153,6 +153,59 @@ class EthereumReorgs(EvmBasedReorgs):
__tablename__ = "ethereum_reorgs"
class EthereumSepoliaBlockIndex(EvmBasedBlocks):
__tablename__ = "ethereum_sepolia_blocks"
class EthereumSepoliaTransactionIndex(EvmBasedTransactions):
__tablename__ = "ethereum_sepolia_transactions"
block_number = Column(
BigInteger,
ForeignKey("ethereum_sepolia_blocks.block_number", ondelete="CASCADE"),
nullable=False,
index=True,
)
class EthereumSepoliaLogIndex(EvmBasedLogs):
__tablename__ = "ethereum_sepolia_logs"
__table_args__ = (
Index(
"idx_ethereum_sepolia_logs_address_selector",
"address",
"selector",
unique=False,
),
Index(
"idx_ethereum_sepolia_logs_block_hash_log_index",
"block_hash",
"log_index",
unique=True,
),
UniqueConstraint(
"transaction_hash",
"log_index",
name="uq_ethereum_sepolia_log_index_transaction_hash_log_index",
),
PrimaryKeyConstraint(
"transaction_hash", "log_index", name="pk_ethereum_sepolia_log_index"
),
)
transaction_hash = Column(
VARCHAR(256),
ForeignKey("ethereum_sepolia_transactions.hash", ondelete="CASCADE"),
nullable=False,
index=True,
)
class EthereumSepoliaReorgs(EvmBasedReorgs):
__tablename__ = "ethereum_sepolia_reorgs"
### Polygon