kopia lustrzana https://github.com/bugout-dev/moonstream
Add sepolia.
rodzic
dcc5eeb5e2
commit
f51a862053
|
@ -36,6 +36,7 @@ class AvailableBlockchainType(Enum):
|
||||||
MUMBAI = "mumbai"
|
MUMBAI = "mumbai"
|
||||||
AMOY = "amoy"
|
AMOY = "amoy"
|
||||||
XDAI = "xdai"
|
XDAI = "xdai"
|
||||||
|
SEPOLIA = "sepolia"
|
||||||
ZKSYNC_ERA = "zksync_era"
|
ZKSYNC_ERA = "zksync_era"
|
||||||
ZKSYNC_ERA_TESTNET = "zksync_era_testnet"
|
ZKSYNC_ERA_TESTNET = "zksync_era_testnet"
|
||||||
ZKSYNC_ERA_SEPOLIA = "zksync_era_sepolia"
|
ZKSYNC_ERA_SEPOLIA = "zksync_era_sepolia"
|
||||||
|
@ -119,6 +120,8 @@ def get_label_model(blockchain_type: AvailableBlockchainType) -> Type[
|
||||||
|
|
||||||
if blockchain_type == AvailableBlockchainType.ETHEREUM:
|
if blockchain_type == AvailableBlockchainType.ETHEREUM:
|
||||||
label_model = EthereumLabel
|
label_model = EthereumLabel
|
||||||
|
elif blockchain_type == AvailableBlockchainType.SEPOLIA:
|
||||||
|
label_model = SepoliaLabel
|
||||||
elif blockchain_type == AvailableBlockchainType.POLYGON:
|
elif blockchain_type == AvailableBlockchainType.POLYGON:
|
||||||
label_model = PolygonLabel
|
label_model = PolygonLabel
|
||||||
elif blockchain_type == AvailableBlockchainType.MUMBAI:
|
elif blockchain_type == AvailableBlockchainType.MUMBAI:
|
||||||
|
|
|
@ -153,6 +153,59 @@ class EthereumReorgs(EvmBasedReorgs):
|
||||||
__tablename__ = "ethereum_reorgs"
|
__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
|
### Polygon
|
||||||
|
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue