Game7 Orbit, Arbitrum, Xai and Mantle blockchain mdb v3 models

pull/1074/head
kompotkot 2024-05-29 13:21:31 +00:00
rodzic 62adb3becd
commit 0d955a56c3
6 zmienionych plików z 1245 dodań i 0 usunięć

Wyświetl plik

@ -39,6 +39,7 @@ from moonstreamdbv3.models import (
ArbitrumNovaLabel,
ArbitrumOneLabel,
ArbitrumSepoliaLabel,
Game7OrbitArbitrumSepoliaLabel,
XaiLabel,
XaiSepoliaLabel,
AvalancheLabel,
@ -48,6 +49,8 @@ from moonstreamdbv3.models import (
ProofOfPlayApexLabel,
StarknetLabel,
StarknetSepoliaLabel,
MantleLabel,
MantleSepoliaLabel,
)
@ -63,7 +66,9 @@ def include_symbol(tablename, schema):
ZkSyncEraSepoliaLabel.__tablename__,
BaseLabel.__tablename__,
ArbitrumNovaLabel.__tablename__,
ArbitrumOneLabel.__tablename__,
ArbitrumSepoliaLabel.__tablename__,
Game7OrbitArbitrumSepoliaLabel.__tablename__,
XaiLabel.__tablename__,
XaiSepoliaLabel.__tablename__,
AvalancheLabel.__tablename__,
@ -73,6 +78,8 @@ def include_symbol(tablename, schema):
ProofOfPlayApexLabel.__tablename__,
StarknetLabel.__tablename__,
StarknetSepoliaLabel.__tablename__,
MantleLabel.__tablename__,
MantleSepoliaLabel.__tablename__,
}

Wyświetl plik

@ -0,0 +1,157 @@
"""Game7 Orbit and Mantle blockchain models
Revision ID: 9ca39b11e12a
Revises: d2ceff33be47
Create Date: 2024-05-29 13:17:07.194421
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision: str = '9ca39b11e12a'
down_revision: Union[str, None] = 'd2ceff33be47'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('game7_orbit_arbitrum_sepolia_labels',
sa.Column('id', sa.UUID(), nullable=False),
sa.Column('label', sa.VARCHAR(length=256), nullable=False),
sa.Column('transaction_hash', sa.VARCHAR(length=128), nullable=False),
sa.Column('log_index', sa.Integer(), nullable=True),
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('block_timestamp', sa.BigInteger(), nullable=False),
sa.Column('caller_address', sa.VARCHAR(length=64), nullable=True),
sa.Column('origin_address', sa.VARCHAR(length=64), nullable=True),
sa.Column('address', sa.VARCHAR(length=64), nullable=True),
sa.Column('label_name', sa.Text(), nullable=True),
sa.Column('label_type', sa.VARCHAR(length=64), nullable=True),
sa.Column('label_data', postgresql.JSONB(astext_type=sa.Text()), nullable=True),
sa.Column('created_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.PrimaryKeyConstraint('id', name=op.f('pk_game7_orbit_arbitrum_sepolia_labels')),
sa.UniqueConstraint('id', name=op.f('uq_game7_orbit_arbitrum_sepolia_labels_id'))
)
op.create_index('ix_g7o_arbitrum_sepolia_labels_addr_block_num', 'game7_orbit_arbitrum_sepolia_labels', ['address', 'block_number'], unique=False)
op.create_index('ix_g7o_arbitrum_sepolia_labels_addr_block_ts', 'game7_orbit_arbitrum_sepolia_labels', ['address', 'block_timestamp'], unique=False)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_labels_address'), 'game7_orbit_arbitrum_sepolia_labels', ['address'], unique=False)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_labels_block_number'), 'game7_orbit_arbitrum_sepolia_labels', ['block_number'], unique=False)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_labels_caller_address'), 'game7_orbit_arbitrum_sepolia_labels', ['caller_address'], unique=False)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_labels_label'), 'game7_orbit_arbitrum_sepolia_labels', ['label'], unique=False)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_labels_label_name'), 'game7_orbit_arbitrum_sepolia_labels', ['label_name'], unique=False)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_labels_label_type'), 'game7_orbit_arbitrum_sepolia_labels', ['label_type'], unique=False)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_labels_origin_address'), 'game7_orbit_arbitrum_sepolia_labels', ['origin_address'], unique=False)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_labels_transaction_hash'), 'game7_orbit_arbitrum_sepolia_labels', ['transaction_hash'], unique=False)
op.create_index('uk_g7o_arbitrum_sepolia_labels_tx_hash_log_idx_evt', 'game7_orbit_arbitrum_sepolia_labels', ['transaction_hash', 'log_index'], unique=True, postgresql_where=sa.text("label='seer' and label_type='event'"))
op.create_index('uk_g7o_arbitrum_sepolia_labels_tx_hash_tx_call', 'game7_orbit_arbitrum_sepolia_labels', ['transaction_hash'], unique=True, postgresql_where=sa.text("label='seer' and label_type='tx_call'"))
op.create_table('mantle_labels',
sa.Column('id', sa.UUID(), nullable=False),
sa.Column('label', sa.VARCHAR(length=256), nullable=False),
sa.Column('transaction_hash', sa.VARCHAR(length=128), nullable=False),
sa.Column('log_index', sa.Integer(), nullable=True),
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('block_timestamp', sa.BigInteger(), nullable=False),
sa.Column('caller_address', sa.VARCHAR(length=64), nullable=True),
sa.Column('origin_address', sa.VARCHAR(length=64), nullable=True),
sa.Column('address', sa.VARCHAR(length=64), nullable=True),
sa.Column('label_name', sa.Text(), nullable=True),
sa.Column('label_type', sa.VARCHAR(length=64), nullable=True),
sa.Column('label_data', postgresql.JSONB(astext_type=sa.Text()), nullable=True),
sa.Column('created_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.PrimaryKeyConstraint('id', name=op.f('pk_mantle_labels')),
sa.UniqueConstraint('id', name=op.f('uq_mantle_labels_id'))
)
op.create_index('ix_mantle_labels_addr_block_num', 'mantle_labels', ['address', 'block_number'], unique=False)
op.create_index('ix_mantle_labels_addr_block_ts', 'mantle_labels', ['address', 'block_timestamp'], unique=False)
op.create_index(op.f('ix_mantle_labels_address'), 'mantle_labels', ['address'], unique=False)
op.create_index(op.f('ix_mantle_labels_block_number'), 'mantle_labels', ['block_number'], unique=False)
op.create_index(op.f('ix_mantle_labels_caller_address'), 'mantle_labels', ['caller_address'], unique=False)
op.create_index(op.f('ix_mantle_labels_label'), 'mantle_labels', ['label'], unique=False)
op.create_index(op.f('ix_mantle_labels_label_name'), 'mantle_labels', ['label_name'], unique=False)
op.create_index(op.f('ix_mantle_labels_label_type'), 'mantle_labels', ['label_type'], unique=False)
op.create_index(op.f('ix_mantle_labels_origin_address'), 'mantle_labels', ['origin_address'], unique=False)
op.create_index(op.f('ix_mantle_labels_transaction_hash'), 'mantle_labels', ['transaction_hash'], unique=False)
op.create_index('uk_mantle_labels_tx_hash_log_idx_evt', 'mantle_labels', ['transaction_hash', 'log_index'], unique=True, postgresql_where=sa.text("label='seer' and label_type='event'"))
op.create_index('uk_mantle_labels_tx_hash_tx_call', 'mantle_labels', ['transaction_hash'], unique=True, postgresql_where=sa.text("label='seer' and label_type='tx_call'"))
op.create_table('mantle_sepolia_labels',
sa.Column('id', sa.UUID(), nullable=False),
sa.Column('label', sa.VARCHAR(length=256), nullable=False),
sa.Column('transaction_hash', sa.VARCHAR(length=128), nullable=False),
sa.Column('log_index', sa.Integer(), nullable=True),
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('block_timestamp', sa.BigInteger(), nullable=False),
sa.Column('caller_address', sa.VARCHAR(length=64), nullable=True),
sa.Column('origin_address', sa.VARCHAR(length=64), nullable=True),
sa.Column('address', sa.VARCHAR(length=64), nullable=True),
sa.Column('label_name', sa.Text(), nullable=True),
sa.Column('label_type', sa.VARCHAR(length=64), nullable=True),
sa.Column('label_data', postgresql.JSONB(astext_type=sa.Text()), nullable=True),
sa.Column('created_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.PrimaryKeyConstraint('id', name=op.f('pk_mantle_sepolia_labels')),
sa.UniqueConstraint('id', name=op.f('uq_mantle_sepolia_labels_id'))
)
op.create_index('ix_mantle_sepolia_labels_addr_block_num', 'mantle_sepolia_labels', ['address', 'block_number'], unique=False)
op.create_index('ix_mantle_sepolia_labels_addr_block_ts', 'mantle_sepolia_labels', ['address', 'block_timestamp'], unique=False)
op.create_index(op.f('ix_mantle_sepolia_labels_address'), 'mantle_sepolia_labels', ['address'], unique=False)
op.create_index(op.f('ix_mantle_sepolia_labels_block_number'), 'mantle_sepolia_labels', ['block_number'], unique=False)
op.create_index(op.f('ix_mantle_sepolia_labels_caller_address'), 'mantle_sepolia_labels', ['caller_address'], unique=False)
op.create_index(op.f('ix_mantle_sepolia_labels_label'), 'mantle_sepolia_labels', ['label'], unique=False)
op.create_index(op.f('ix_mantle_sepolia_labels_label_name'), 'mantle_sepolia_labels', ['label_name'], unique=False)
op.create_index(op.f('ix_mantle_sepolia_labels_label_type'), 'mantle_sepolia_labels', ['label_type'], unique=False)
op.create_index(op.f('ix_mantle_sepolia_labels_origin_address'), 'mantle_sepolia_labels', ['origin_address'], unique=False)
op.create_index(op.f('ix_mantle_sepolia_labels_transaction_hash'), 'mantle_sepolia_labels', ['transaction_hash'], unique=False)
op.create_index('uk_mantle_sepolia_labels_tx_hash_log_idx_evt', 'mantle_sepolia_labels', ['transaction_hash', 'log_index'], unique=True, postgresql_where=sa.text("label='seer' and label_type='event'"))
op.create_index('uk_mantle_sepolia_labels_tx_hash_tx_call', 'mantle_sepolia_labels', ['transaction_hash'], unique=True, postgresql_where=sa.text("label='seer' and label_type='tx_call'"))
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index('uk_mantle_sepolia_labels_tx_hash_tx_call', table_name='mantle_sepolia_labels', postgresql_where=sa.text("label='seer' and label_type='tx_call'"))
op.drop_index('uk_mantle_sepolia_labels_tx_hash_log_idx_evt', table_name='mantle_sepolia_labels', postgresql_where=sa.text("label='seer' and label_type='event'"))
op.drop_index(op.f('ix_mantle_sepolia_labels_transaction_hash'), table_name='mantle_sepolia_labels')
op.drop_index(op.f('ix_mantle_sepolia_labels_origin_address'), table_name='mantle_sepolia_labels')
op.drop_index(op.f('ix_mantle_sepolia_labels_label_type'), table_name='mantle_sepolia_labels')
op.drop_index(op.f('ix_mantle_sepolia_labels_label_name'), table_name='mantle_sepolia_labels')
op.drop_index(op.f('ix_mantle_sepolia_labels_label'), table_name='mantle_sepolia_labels')
op.drop_index(op.f('ix_mantle_sepolia_labels_caller_address'), table_name='mantle_sepolia_labels')
op.drop_index(op.f('ix_mantle_sepolia_labels_block_number'), table_name='mantle_sepolia_labels')
op.drop_index(op.f('ix_mantle_sepolia_labels_address'), table_name='mantle_sepolia_labels')
op.drop_index('ix_mantle_sepolia_labels_addr_block_ts', table_name='mantle_sepolia_labels')
op.drop_index('ix_mantle_sepolia_labels_addr_block_num', table_name='mantle_sepolia_labels')
op.drop_table('mantle_sepolia_labels')
op.drop_index('uk_mantle_labels_tx_hash_tx_call', table_name='mantle_labels', postgresql_where=sa.text("label='seer' and label_type='tx_call'"))
op.drop_index('uk_mantle_labels_tx_hash_log_idx_evt', table_name='mantle_labels', postgresql_where=sa.text("label='seer' and label_type='event'"))
op.drop_index(op.f('ix_mantle_labels_transaction_hash'), table_name='mantle_labels')
op.drop_index(op.f('ix_mantle_labels_origin_address'), table_name='mantle_labels')
op.drop_index(op.f('ix_mantle_labels_label_type'), table_name='mantle_labels')
op.drop_index(op.f('ix_mantle_labels_label_name'), table_name='mantle_labels')
op.drop_index(op.f('ix_mantle_labels_label'), table_name='mantle_labels')
op.drop_index(op.f('ix_mantle_labels_caller_address'), table_name='mantle_labels')
op.drop_index(op.f('ix_mantle_labels_block_number'), table_name='mantle_labels')
op.drop_index(op.f('ix_mantle_labels_address'), table_name='mantle_labels')
op.drop_index('ix_mantle_labels_addr_block_ts', table_name='mantle_labels')
op.drop_index('ix_mantle_labels_addr_block_num', table_name='mantle_labels')
op.drop_table('mantle_labels')
op.drop_index('uk_g7o_arbitrum_sepolia_labels_tx_hash_tx_call', table_name='game7_orbit_arbitrum_sepolia_labels', postgresql_where=sa.text("label='seer' and label_type='tx_call'"))
op.drop_index('uk_g7o_arbitrum_sepolia_labels_tx_hash_log_idx_evt', table_name='game7_orbit_arbitrum_sepolia_labels', postgresql_where=sa.text("label='seer' and label_type='event'"))
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_labels_transaction_hash'), table_name='game7_orbit_arbitrum_sepolia_labels')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_labels_origin_address'), table_name='game7_orbit_arbitrum_sepolia_labels')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_labels_label_type'), table_name='game7_orbit_arbitrum_sepolia_labels')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_labels_label_name'), table_name='game7_orbit_arbitrum_sepolia_labels')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_labels_label'), table_name='game7_orbit_arbitrum_sepolia_labels')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_labels_caller_address'), table_name='game7_orbit_arbitrum_sepolia_labels')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_labels_block_number'), table_name='game7_orbit_arbitrum_sepolia_labels')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_labels_address'), table_name='game7_orbit_arbitrum_sepolia_labels')
op.drop_index('ix_g7o_arbitrum_sepolia_labels_addr_block_ts', table_name='game7_orbit_arbitrum_sepolia_labels')
op.drop_index('ix_g7o_arbitrum_sepolia_labels_addr_block_num', table_name='game7_orbit_arbitrum_sepolia_labels')
op.drop_table('game7_orbit_arbitrum_sepolia_labels')
# ### end Alembic commands ###

Wyświetl plik

@ -36,6 +36,34 @@ from moonstreamdbv3.models_indexes import (
PolygonTransactionIndex,
PolygonLogIndex,
PolygonReorgs,
XaiBlockIndex,
XaiTransactionIndex,
XaiLogIndex,
XaiReorgs,
XaiSepoliaBlockIndex,
XaiSepoliaTransactionIndex,
XaiSepoliaLogIndex,
XaiSepoliaReorgs,
ArbitrumOneBlockIndex,
ArbitrumOneTransactionIndex,
ArbitrumOneLogIndex,
ArbitrumOneReorgs,
ArbitrumSepoliaBlockIndex,
ArbitrumSepoliaTransactionIndex,
ArbitrumSepoliaLogIndex,
ArbitrumSepoliaReorgs,
Game7OrbitArbitrumSepoliaBlockIndex,
Game7OrbitArbitrumSepoliaTransactionIndex,
Game7OrbitArbitrumSepoliaLogIndex,
Game7OrbitArbitrumSepoliaReorgs,
MantleBlockIndex,
MantleTransactionIndex,
MantleLogIndex,
MantleReorgs,
MantleSepoliaBlockIndex,
MantleSepoliaTransactionIndex,
MantleSepoliaLogIndex,
MantleSepoliaReorgs,
AbiJobs,
)
@ -50,6 +78,34 @@ def include_symbol(tablename, schema):
PolygonTransactionIndex.__tablename__,
PolygonLogIndex.__tablename__,
PolygonReorgs.__tablename__,
XaiBlockIndex.__tablename__,
XaiTransactionIndex.__tablename__,
XaiLogIndex.__tablename__,
XaiReorgs.__tablename__,
XaiSepoliaBlockIndex.__tablename__,
XaiSepoliaTransactionIndex.__tablename__,
XaiSepoliaLogIndex.__tablename__,
XaiSepoliaReorgs.__tablename__,
ArbitrumOneBlockIndex.__tablename__,
ArbitrumOneTransactionIndex.__tablename__,
ArbitrumOneLogIndex.__tablename__,
ArbitrumOneReorgs.__tablename__,
ArbitrumSepoliaBlockIndex.__tablename__,
ArbitrumSepoliaTransactionIndex.__tablename__,
ArbitrumSepoliaLogIndex.__tablename__,
ArbitrumSepoliaReorgs.__tablename__,
Game7OrbitArbitrumSepoliaBlockIndex.__tablename__,
Game7OrbitArbitrumSepoliaTransactionIndex.__tablename__,
Game7OrbitArbitrumSepoliaLogIndex.__tablename__,
Game7OrbitArbitrumSepoliaReorgs.__tablename__,
MantleBlockIndex.__tablename__,
MantleTransactionIndex.__tablename__,
MantleLogIndex.__tablename__,
MantleReorgs.__tablename__,
MantleSepoliaBlockIndex.__tablename__,
MantleSepoliaTransactionIndex.__tablename__,
MantleSepoliaLogIndex.__tablename__,
MantleSepoliaReorgs.__tablename__,
AbiJobs.__tablename__,
}

Wyświetl plik

@ -0,0 +1,597 @@
"""Game7 Orbit, Arbitrum, Xai and Mantle blockchain indexes models
Revision ID: a4ef4f9031e4
Revises: 0ea24314c181
Create Date: 2024-05-29 13:19:42.833716
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = 'a4ef4f9031e4'
down_revision: Union[str, None] = '0ea24314c181'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('arbitrum_one_blocks',
sa.Column('l1_block_number', sa.BigInteger(), nullable=False),
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('block_timestamp', sa.BigInteger(), nullable=False),
sa.Column('parent_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.PrimaryKeyConstraint('block_number', name=op.f('pk_arbitrum_one_blocks'))
)
op.create_index(op.f('ix_arbitrum_one_blocks_block_number'), 'arbitrum_one_blocks', ['block_number'], unique=False)
op.create_index(op.f('ix_arbitrum_one_blocks_block_timestamp'), 'arbitrum_one_blocks', ['block_timestamp'], unique=False)
op.create_table('arbitrum_one_reorgs',
sa.Column('id', sa.UUID(), nullable=False),
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.PrimaryKeyConstraint('id', name=op.f('pk_arbitrum_one_reorgs'))
)
op.create_index(op.f('ix_arbitrum_one_reorgs_block_hash'), 'arbitrum_one_reorgs', ['block_hash'], unique=False)
op.create_index(op.f('ix_arbitrum_one_reorgs_block_number'), 'arbitrum_one_reorgs', ['block_number'], unique=False)
op.create_table('arbitrum_sepolia_blocks',
sa.Column('l1_block_number', sa.BigInteger(), nullable=False),
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('block_timestamp', sa.BigInteger(), nullable=False),
sa.Column('parent_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.PrimaryKeyConstraint('block_number', name=op.f('pk_arbitrum_sepolia_blocks'))
)
op.create_index(op.f('ix_arbitrum_sepolia_blocks_block_number'), 'arbitrum_sepolia_blocks', ['block_number'], unique=False)
op.create_index(op.f('ix_arbitrum_sepolia_blocks_block_timestamp'), 'arbitrum_sepolia_blocks', ['block_timestamp'], unique=False)
op.create_table('arbitrum_sepolia_reorgs',
sa.Column('id', sa.UUID(), nullable=False),
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.PrimaryKeyConstraint('id', name=op.f('pk_arbitrum_sepolia_reorgs'))
)
op.create_index(op.f('ix_arbitrum_sepolia_reorgs_block_hash'), 'arbitrum_sepolia_reorgs', ['block_hash'], unique=False)
op.create_index(op.f('ix_arbitrum_sepolia_reorgs_block_number'), 'arbitrum_sepolia_reorgs', ['block_number'], unique=False)
op.create_table('game7_orbit_arbitrum_sepolia_blocks',
sa.Column('l1_block_number', sa.BigInteger(), nullable=False),
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('block_timestamp', sa.BigInteger(), nullable=False),
sa.Column('parent_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.PrimaryKeyConstraint('block_number', name=op.f('pk_game7_orbit_arbitrum_sepolia_blocks'))
)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_blocks_block_number'), 'game7_orbit_arbitrum_sepolia_blocks', ['block_number'], unique=False)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_blocks_block_timestamp'), 'game7_orbit_arbitrum_sepolia_blocks', ['block_timestamp'], unique=False)
op.create_table('game7_orbit_arbitrum_sepolia_reorgs',
sa.Column('id', sa.UUID(), nullable=False),
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.PrimaryKeyConstraint('id', name=op.f('pk_game7_orbit_arbitrum_sepolia_reorgs'))
)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_reorgs_block_hash'), 'game7_orbit_arbitrum_sepolia_reorgs', ['block_hash'], unique=False)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_reorgs_block_number'), 'game7_orbit_arbitrum_sepolia_reorgs', ['block_number'], unique=False)
op.create_table('mantle_blocks',
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('block_timestamp', sa.BigInteger(), nullable=False),
sa.Column('parent_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.PrimaryKeyConstraint('block_number', name=op.f('pk_mantle_blocks'))
)
op.create_index(op.f('ix_mantle_blocks_block_number'), 'mantle_blocks', ['block_number'], unique=False)
op.create_index(op.f('ix_mantle_blocks_block_timestamp'), 'mantle_blocks', ['block_timestamp'], unique=False)
op.create_table('mantle_reorgs',
sa.Column('id', sa.UUID(), nullable=False),
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.PrimaryKeyConstraint('id', name=op.f('pk_mantle_reorgs'))
)
op.create_index(op.f('ix_mantle_reorgs_block_hash'), 'mantle_reorgs', ['block_hash'], unique=False)
op.create_index(op.f('ix_mantle_reorgs_block_number'), 'mantle_reorgs', ['block_number'], unique=False)
op.create_table('mantle_sepolia_blocks',
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('block_timestamp', sa.BigInteger(), nullable=False),
sa.Column('parent_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.PrimaryKeyConstraint('block_number', name=op.f('pk_mantle_sepolia_blocks'))
)
op.create_index(op.f('ix_mantle_sepolia_blocks_block_number'), 'mantle_sepolia_blocks', ['block_number'], unique=False)
op.create_index(op.f('ix_mantle_sepolia_blocks_block_timestamp'), 'mantle_sepolia_blocks', ['block_timestamp'], unique=False)
op.create_table('mantle_sepolia_reorgs',
sa.Column('id', sa.UUID(), nullable=False),
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.PrimaryKeyConstraint('id', name=op.f('pk_mantle_sepolia_reorgs'))
)
op.create_index(op.f('ix_mantle_sepolia_reorgs_block_hash'), 'mantle_sepolia_reorgs', ['block_hash'], unique=False)
op.create_index(op.f('ix_mantle_sepolia_reorgs_block_number'), 'mantle_sepolia_reorgs', ['block_number'], unique=False)
op.create_table('xai_blocks',
sa.Column('l1_block_number', sa.BigInteger(), nullable=False),
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('block_timestamp', sa.BigInteger(), nullable=False),
sa.Column('parent_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.PrimaryKeyConstraint('block_number', name=op.f('pk_xai_blocks'))
)
op.create_index(op.f('ix_xai_blocks_block_number'), 'xai_blocks', ['block_number'], unique=False)
op.create_index(op.f('ix_xai_blocks_block_timestamp'), 'xai_blocks', ['block_timestamp'], unique=False)
op.create_table('xai_reorgs',
sa.Column('id', sa.UUID(), nullable=False),
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.PrimaryKeyConstraint('id', name=op.f('pk_xai_reorgs'))
)
op.create_index(op.f('ix_xai_reorgs_block_hash'), 'xai_reorgs', ['block_hash'], unique=False)
op.create_index(op.f('ix_xai_reorgs_block_number'), 'xai_reorgs', ['block_number'], unique=False)
op.create_table('xai_sepolia_blocks',
sa.Column('l1_block_number', sa.BigInteger(), nullable=False),
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('block_timestamp', sa.BigInteger(), nullable=False),
sa.Column('parent_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.PrimaryKeyConstraint('block_number', name=op.f('pk_xai_sepolia_blocks'))
)
op.create_index(op.f('ix_xai_sepolia_blocks_block_number'), 'xai_sepolia_blocks', ['block_number'], unique=False)
op.create_index(op.f('ix_xai_sepolia_blocks_block_timestamp'), 'xai_sepolia_blocks', ['block_timestamp'], unique=False)
op.create_table('xai_sepolia_reorgs',
sa.Column('id', sa.UUID(), nullable=False),
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.PrimaryKeyConstraint('id', name=op.f('pk_xai_sepolia_reorgs'))
)
op.create_index(op.f('ix_xai_sepolia_reorgs_block_hash'), 'xai_sepolia_reorgs', ['block_hash'], unique=False)
op.create_index(op.f('ix_xai_sepolia_reorgs_block_number'), 'xai_sepolia_reorgs', ['block_number'], unique=False)
op.create_table('arbitrum_one_transactions',
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('from_address', sa.LargeBinary(length=20), nullable=False),
sa.Column('to_address', sa.LargeBinary(length=20), nullable=False),
sa.Column('selector', sa.VARCHAR(length=256), nullable=True),
sa.Column('type', sa.Integer(), nullable=True),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('index', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.ForeignKeyConstraint(['block_number'], ['arbitrum_one_blocks.block_number'], name=op.f('fk_arbitrum_one_transactions_block_number_arbitrum_one_blocks'), ondelete='CASCADE'),
sa.PrimaryKeyConstraint('hash', name=op.f('pk_arbitrum_one_transactions'))
)
op.create_index(op.f('ix_arbitrum_one_transactions_block_hash'), 'arbitrum_one_transactions', ['block_hash'], unique=False)
op.create_index(op.f('ix_arbitrum_one_transactions_block_number'), 'arbitrum_one_transactions', ['block_number'], unique=False)
op.create_index(op.f('ix_arbitrum_one_transactions_from_address'), 'arbitrum_one_transactions', ['from_address'], unique=False)
op.create_index(op.f('ix_arbitrum_one_transactions_hash'), 'arbitrum_one_transactions', ['hash'], unique=True)
op.create_index(op.f('ix_arbitrum_one_transactions_index'), 'arbitrum_one_transactions', ['index'], unique=False)
op.create_index(op.f('ix_arbitrum_one_transactions_selector'), 'arbitrum_one_transactions', ['selector'], unique=False)
op.create_index(op.f('ix_arbitrum_one_transactions_to_address'), 'arbitrum_one_transactions', ['to_address'], unique=False)
op.create_index(op.f('ix_arbitrum_one_transactions_type'), 'arbitrum_one_transactions', ['type'], unique=False)
op.create_table('arbitrum_sepolia_transactions',
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('from_address', sa.LargeBinary(length=20), nullable=False),
sa.Column('to_address', sa.LargeBinary(length=20), nullable=False),
sa.Column('selector', sa.VARCHAR(length=256), nullable=True),
sa.Column('type', sa.Integer(), nullable=True),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('index', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.ForeignKeyConstraint(['block_number'], ['arbitrum_sepolia_blocks.block_number'], name=op.f('fk_arbitrum_sepolia_transactions_block_number_arbitrum_sepolia_blocks'), ondelete='CASCADE'),
sa.PrimaryKeyConstraint('hash', name=op.f('pk_arbitrum_sepolia_transactions'))
)
op.create_index(op.f('ix_arbitrum_sepolia_transactions_block_hash'), 'arbitrum_sepolia_transactions', ['block_hash'], unique=False)
op.create_index(op.f('ix_arbitrum_sepolia_transactions_block_number'), 'arbitrum_sepolia_transactions', ['block_number'], unique=False)
op.create_index(op.f('ix_arbitrum_sepolia_transactions_from_address'), 'arbitrum_sepolia_transactions', ['from_address'], unique=False)
op.create_index(op.f('ix_arbitrum_sepolia_transactions_hash'), 'arbitrum_sepolia_transactions', ['hash'], unique=True)
op.create_index(op.f('ix_arbitrum_sepolia_transactions_index'), 'arbitrum_sepolia_transactions', ['index'], unique=False)
op.create_index(op.f('ix_arbitrum_sepolia_transactions_selector'), 'arbitrum_sepolia_transactions', ['selector'], unique=False)
op.create_index(op.f('ix_arbitrum_sepolia_transactions_to_address'), 'arbitrum_sepolia_transactions', ['to_address'], unique=False)
op.create_index(op.f('ix_arbitrum_sepolia_transactions_type'), 'arbitrum_sepolia_transactions', ['type'], unique=False)
op.create_table('game7_orbit_arbitrum_sepolia_transactions',
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('from_address', sa.LargeBinary(length=20), nullable=False),
sa.Column('to_address', sa.LargeBinary(length=20), nullable=False),
sa.Column('selector', sa.VARCHAR(length=256), nullable=True),
sa.Column('type', sa.Integer(), nullable=True),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('index', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.ForeignKeyConstraint(['block_number'], ['game7_orbit_arbitrum_sepolia_blocks.block_number'], name=op.f('fk_game7_orbit_arbitrum_sepolia_transactions_block_number_game7_orbit_arbitrum_sepolia_blocks'), ondelete='CASCADE'),
sa.PrimaryKeyConstraint('hash', name=op.f('pk_game7_orbit_arbitrum_sepolia_transactions'))
)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_transactions_block_hash'), 'game7_orbit_arbitrum_sepolia_transactions', ['block_hash'], unique=False)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_transactions_block_number'), 'game7_orbit_arbitrum_sepolia_transactions', ['block_number'], unique=False)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_transactions_from_address'), 'game7_orbit_arbitrum_sepolia_transactions', ['from_address'], unique=False)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_transactions_hash'), 'game7_orbit_arbitrum_sepolia_transactions', ['hash'], unique=True)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_transactions_index'), 'game7_orbit_arbitrum_sepolia_transactions', ['index'], unique=False)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_transactions_selector'), 'game7_orbit_arbitrum_sepolia_transactions', ['selector'], unique=False)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_transactions_to_address'), 'game7_orbit_arbitrum_sepolia_transactions', ['to_address'], unique=False)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_transactions_type'), 'game7_orbit_arbitrum_sepolia_transactions', ['type'], unique=False)
op.create_table('mantle_sepolia_transactions',
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('from_address', sa.LargeBinary(length=20), nullable=False),
sa.Column('to_address', sa.LargeBinary(length=20), nullable=False),
sa.Column('selector', sa.VARCHAR(length=256), nullable=True),
sa.Column('type', sa.Integer(), nullable=True),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('index', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.ForeignKeyConstraint(['block_number'], ['mantle_sepolia_blocks.block_number'], name=op.f('fk_mantle_sepolia_transactions_block_number_mantle_sepolia_blocks'), ondelete='CASCADE'),
sa.PrimaryKeyConstraint('hash', name=op.f('pk_mantle_sepolia_transactions'))
)
op.create_index(op.f('ix_mantle_sepolia_transactions_block_hash'), 'mantle_sepolia_transactions', ['block_hash'], unique=False)
op.create_index(op.f('ix_mantle_sepolia_transactions_block_number'), 'mantle_sepolia_transactions', ['block_number'], unique=False)
op.create_index(op.f('ix_mantle_sepolia_transactions_from_address'), 'mantle_sepolia_transactions', ['from_address'], unique=False)
op.create_index(op.f('ix_mantle_sepolia_transactions_hash'), 'mantle_sepolia_transactions', ['hash'], unique=True)
op.create_index(op.f('ix_mantle_sepolia_transactions_index'), 'mantle_sepolia_transactions', ['index'], unique=False)
op.create_index(op.f('ix_mantle_sepolia_transactions_selector'), 'mantle_sepolia_transactions', ['selector'], unique=False)
op.create_index(op.f('ix_mantle_sepolia_transactions_to_address'), 'mantle_sepolia_transactions', ['to_address'], unique=False)
op.create_index(op.f('ix_mantle_sepolia_transactions_type'), 'mantle_sepolia_transactions', ['type'], unique=False)
op.create_table('mantle_transactions',
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('from_address', sa.LargeBinary(length=20), nullable=False),
sa.Column('to_address', sa.LargeBinary(length=20), nullable=False),
sa.Column('selector', sa.VARCHAR(length=256), nullable=True),
sa.Column('type', sa.Integer(), nullable=True),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('index', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.ForeignKeyConstraint(['block_number'], ['mantle_blocks.block_number'], name=op.f('fk_mantle_transactions_block_number_mantle_blocks'), ondelete='CASCADE'),
sa.PrimaryKeyConstraint('hash', name=op.f('pk_mantle_transactions'))
)
op.create_index(op.f('ix_mantle_transactions_block_hash'), 'mantle_transactions', ['block_hash'], unique=False)
op.create_index(op.f('ix_mantle_transactions_block_number'), 'mantle_transactions', ['block_number'], unique=False)
op.create_index(op.f('ix_mantle_transactions_from_address'), 'mantle_transactions', ['from_address'], unique=False)
op.create_index(op.f('ix_mantle_transactions_hash'), 'mantle_transactions', ['hash'], unique=True)
op.create_index(op.f('ix_mantle_transactions_index'), 'mantle_transactions', ['index'], unique=False)
op.create_index(op.f('ix_mantle_transactions_selector'), 'mantle_transactions', ['selector'], unique=False)
op.create_index(op.f('ix_mantle_transactions_to_address'), 'mantle_transactions', ['to_address'], unique=False)
op.create_index(op.f('ix_mantle_transactions_type'), 'mantle_transactions', ['type'], unique=False)
op.create_table('xai_sepolia_transactions',
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('from_address', sa.LargeBinary(length=20), nullable=False),
sa.Column('to_address', sa.LargeBinary(length=20), nullable=False),
sa.Column('selector', sa.VARCHAR(length=256), nullable=True),
sa.Column('type', sa.Integer(), nullable=True),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('index', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.ForeignKeyConstraint(['block_number'], ['xai_sepolia_blocks.block_number'], name=op.f('fk_xai_sepolia_transactions_block_number_xai_sepolia_blocks'), ondelete='CASCADE'),
sa.PrimaryKeyConstraint('hash', name=op.f('pk_xai_sepolia_transactions'))
)
op.create_index(op.f('ix_xai_sepolia_transactions_block_hash'), 'xai_sepolia_transactions', ['block_hash'], unique=False)
op.create_index(op.f('ix_xai_sepolia_transactions_block_number'), 'xai_sepolia_transactions', ['block_number'], unique=False)
op.create_index(op.f('ix_xai_sepolia_transactions_from_address'), 'xai_sepolia_transactions', ['from_address'], unique=False)
op.create_index(op.f('ix_xai_sepolia_transactions_hash'), 'xai_sepolia_transactions', ['hash'], unique=True)
op.create_index(op.f('ix_xai_sepolia_transactions_index'), 'xai_sepolia_transactions', ['index'], unique=False)
op.create_index(op.f('ix_xai_sepolia_transactions_selector'), 'xai_sepolia_transactions', ['selector'], unique=False)
op.create_index(op.f('ix_xai_sepolia_transactions_to_address'), 'xai_sepolia_transactions', ['to_address'], unique=False)
op.create_index(op.f('ix_xai_sepolia_transactions_type'), 'xai_sepolia_transactions', ['type'], unique=False)
op.create_table('xai_transactions',
sa.Column('block_number', sa.BigInteger(), nullable=False),
sa.Column('hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('from_address', sa.LargeBinary(length=20), nullable=False),
sa.Column('to_address', sa.LargeBinary(length=20), nullable=False),
sa.Column('selector', sa.VARCHAR(length=256), nullable=True),
sa.Column('type', sa.Integer(), nullable=True),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('index', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.ForeignKeyConstraint(['block_number'], ['xai_blocks.block_number'], name=op.f('fk_xai_transactions_block_number_xai_blocks'), ondelete='CASCADE'),
sa.PrimaryKeyConstraint('hash', name=op.f('pk_xai_transactions'))
)
op.create_index(op.f('ix_xai_transactions_block_hash'), 'xai_transactions', ['block_hash'], unique=False)
op.create_index(op.f('ix_xai_transactions_block_number'), 'xai_transactions', ['block_number'], unique=False)
op.create_index(op.f('ix_xai_transactions_from_address'), 'xai_transactions', ['from_address'], unique=False)
op.create_index(op.f('ix_xai_transactions_hash'), 'xai_transactions', ['hash'], unique=True)
op.create_index(op.f('ix_xai_transactions_index'), 'xai_transactions', ['index'], unique=False)
op.create_index(op.f('ix_xai_transactions_selector'), 'xai_transactions', ['selector'], unique=False)
op.create_index(op.f('ix_xai_transactions_to_address'), 'xai_transactions', ['to_address'], unique=False)
op.create_index(op.f('ix_xai_transactions_type'), 'xai_transactions', ['type'], unique=False)
op.create_table('arbitrum_one_logs',
sa.Column('transaction_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('address', sa.LargeBinary(length=20), nullable=False),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('selector', sa.VARCHAR(length=256), nullable=True),
sa.Column('topic1', sa.VARCHAR(length=256), nullable=True),
sa.Column('topic2', sa.VARCHAR(length=256), nullable=True),
sa.Column('log_index', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.ForeignKeyConstraint(['transaction_hash'], ['arbitrum_one_transactions.hash'], name=op.f('fk_arbitrum_one_logs_transaction_hash_arbitrum_one_transactions'), ondelete='CASCADE'),
sa.PrimaryKeyConstraint('transaction_hash', 'log_index', name='pk_arbitrum_one_log_index'),
sa.UniqueConstraint('transaction_hash', 'log_index', name='uq_arbitrum_one_log_idx_tx_hash_log_idx')
)
op.create_index(op.f('ix_arbitrum_one_logs_address'), 'arbitrum_one_logs', ['address'], unique=False)
op.create_index(op.f('ix_arbitrum_one_logs_block_hash'), 'arbitrum_one_logs', ['block_hash'], unique=False)
op.create_index(op.f('ix_arbitrum_one_logs_transaction_hash'), 'arbitrum_one_logs', ['transaction_hash'], unique=False)
op.create_table('arbitrum_sepolia_logs',
sa.Column('transaction_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('address', sa.LargeBinary(length=20), nullable=False),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('selector', sa.VARCHAR(length=256), nullable=True),
sa.Column('topic1', sa.VARCHAR(length=256), nullable=True),
sa.Column('topic2', sa.VARCHAR(length=256), nullable=True),
sa.Column('log_index', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.ForeignKeyConstraint(['transaction_hash'], ['arbitrum_sepolia_transactions.hash'], name=op.f('fk_arbitrum_sepolia_logs_transaction_hash_arbitrum_sepolia_transactions'), ondelete='CASCADE'),
sa.PrimaryKeyConstraint('transaction_hash', 'log_index', name='pk_arbitrum_sepolia_log_index'),
sa.UniqueConstraint('transaction_hash', 'log_index', name='uq_arbitrum_sepolia_log_idx_tx_hash_log_idx')
)
op.create_index(op.f('ix_arbitrum_sepolia_logs_address'), 'arbitrum_sepolia_logs', ['address'], unique=False)
op.create_index(op.f('ix_arbitrum_sepolia_logs_block_hash'), 'arbitrum_sepolia_logs', ['block_hash'], unique=False)
op.create_index(op.f('ix_arbitrum_sepolia_logs_transaction_hash'), 'arbitrum_sepolia_logs', ['transaction_hash'], unique=False)
op.create_table('game7_orbit_arbitrum_sepolia_logs',
sa.Column('transaction_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('address', sa.LargeBinary(length=20), nullable=False),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('selector', sa.VARCHAR(length=256), nullable=True),
sa.Column('topic1', sa.VARCHAR(length=256), nullable=True),
sa.Column('topic2', sa.VARCHAR(length=256), nullable=True),
sa.Column('log_index', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.ForeignKeyConstraint(['transaction_hash'], ['game7_orbit_arbitrum_sepolia_transactions.hash'], name=op.f('fk_game7_orbit_arbitrum_sepolia_logs_transaction_hash_game7_orbit_arbitrum_sepolia_transactions'), ondelete='CASCADE'),
sa.PrimaryKeyConstraint('transaction_hash', 'log_index', name='pk_game7_orbit_arbitrum_sepolia_log_index'),
sa.UniqueConstraint('transaction_hash', 'log_index', name='uq_g7o_arbitrum_sepolia_log_idx_tx_hash_log_idx')
)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_logs_address'), 'game7_orbit_arbitrum_sepolia_logs', ['address'], unique=False)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_logs_block_hash'), 'game7_orbit_arbitrum_sepolia_logs', ['block_hash'], unique=False)
op.create_index(op.f('ix_game7_orbit_arbitrum_sepolia_logs_transaction_hash'), 'game7_orbit_arbitrum_sepolia_logs', ['transaction_hash'], unique=False)
op.create_table('mantle_logs',
sa.Column('transaction_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('address', sa.LargeBinary(length=20), nullable=False),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('selector', sa.VARCHAR(length=256), nullable=True),
sa.Column('topic1', sa.VARCHAR(length=256), nullable=True),
sa.Column('topic2', sa.VARCHAR(length=256), nullable=True),
sa.Column('log_index', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.ForeignKeyConstraint(['transaction_hash'], ['mantle_transactions.hash'], name=op.f('fk_mantle_logs_transaction_hash_mantle_transactions'), ondelete='CASCADE'),
sa.PrimaryKeyConstraint('transaction_hash', 'log_index', name='pk_mantle_log_index'),
sa.UniqueConstraint('transaction_hash', 'log_index', name='uq_mantle_log_index_transaction_hash_log_index')
)
op.create_index('idx_mantle_logs_block_hash_log_index', 'mantle_logs', ['block_hash', 'log_index'], unique=True)
op.create_index(op.f('ix_mantle_logs_address'), 'mantle_logs', ['address'], unique=False)
op.create_index(op.f('ix_mantle_logs_block_hash'), 'mantle_logs', ['block_hash'], unique=False)
op.create_index(op.f('ix_mantle_logs_transaction_hash'), 'mantle_logs', ['transaction_hash'], unique=False)
op.create_table('mantle_sepolia_logs',
sa.Column('transaction_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('address', sa.LargeBinary(length=20), nullable=False),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('selector', sa.VARCHAR(length=256), nullable=True),
sa.Column('topic1', sa.VARCHAR(length=256), nullable=True),
sa.Column('topic2', sa.VARCHAR(length=256), nullable=True),
sa.Column('log_index', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.ForeignKeyConstraint(['transaction_hash'], ['mantle_sepolia_transactions.hash'], name=op.f('fk_mantle_sepolia_logs_transaction_hash_mantle_sepolia_transactions'), ondelete='CASCADE'),
sa.PrimaryKeyConstraint('transaction_hash', 'log_index', name='pk_mantle_sepolia_log_index'),
sa.UniqueConstraint('transaction_hash', 'log_index', name='uq_mantle_sepolia_log_index_transaction_hash_log_index')
)
op.create_index('idx_mantle_sepolia_logs_block_hash_log_index', 'mantle_sepolia_logs', ['block_hash', 'log_index'], unique=True)
op.create_index(op.f('ix_mantle_sepolia_logs_address'), 'mantle_sepolia_logs', ['address'], unique=False)
op.create_index(op.f('ix_mantle_sepolia_logs_block_hash'), 'mantle_sepolia_logs', ['block_hash'], unique=False)
op.create_index(op.f('ix_mantle_sepolia_logs_transaction_hash'), 'mantle_sepolia_logs', ['transaction_hash'], unique=False)
op.create_table('xai_logs',
sa.Column('transaction_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('address', sa.LargeBinary(length=20), nullable=False),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('selector', sa.VARCHAR(length=256), nullable=True),
sa.Column('topic1', sa.VARCHAR(length=256), nullable=True),
sa.Column('topic2', sa.VARCHAR(length=256), nullable=True),
sa.Column('log_index', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.ForeignKeyConstraint(['transaction_hash'], ['xai_transactions.hash'], name=op.f('fk_xai_logs_transaction_hash_xai_transactions'), ondelete='CASCADE'),
sa.PrimaryKeyConstraint('transaction_hash', 'log_index', name='pk_xai_log_index'),
sa.UniqueConstraint('transaction_hash', 'log_index', name='uq_xai_log_idx_tx_hash_log_idx')
)
op.create_index(op.f('ix_xai_logs_address'), 'xai_logs', ['address'], unique=False)
op.create_index(op.f('ix_xai_logs_block_hash'), 'xai_logs', ['block_hash'], unique=False)
op.create_index(op.f('ix_xai_logs_transaction_hash'), 'xai_logs', ['transaction_hash'], unique=False)
op.create_table('xai_sepolia_logs',
sa.Column('transaction_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('block_hash', sa.VARCHAR(length=256), nullable=False),
sa.Column('address', sa.LargeBinary(length=20), nullable=False),
sa.Column('row_id', sa.BigInteger(), nullable=False),
sa.Column('selector', sa.VARCHAR(length=256), nullable=True),
sa.Column('topic1', sa.VARCHAR(length=256), nullable=True),
sa.Column('topic2', sa.VARCHAR(length=256), nullable=True),
sa.Column('log_index', sa.BigInteger(), nullable=False),
sa.Column('path', sa.Text(), nullable=False),
sa.Column('indexed_at', sa.DateTime(timezone=True), server_default=sa.text("TIMEZONE('utc', statement_timestamp())"), nullable=False),
sa.ForeignKeyConstraint(['transaction_hash'], ['xai_sepolia_transactions.hash'], name=op.f('fk_xai_sepolia_logs_transaction_hash_xai_sepolia_transactions'), ondelete='CASCADE'),
sa.PrimaryKeyConstraint('transaction_hash', 'log_index', name='pk_xai_sepolia_log_index'),
sa.UniqueConstraint('transaction_hash', 'log_index', name='uq_xai_sepolia_log_idx_tx_hash_log_idx')
)
op.create_index(op.f('ix_xai_sepolia_logs_address'), 'xai_sepolia_logs', ['address'], unique=False)
op.create_index(op.f('ix_xai_sepolia_logs_block_hash'), 'xai_sepolia_logs', ['block_hash'], unique=False)
op.create_index(op.f('ix_xai_sepolia_logs_transaction_hash'), 'xai_sepolia_logs', ['transaction_hash'], unique=False)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_xai_sepolia_logs_transaction_hash'), table_name='xai_sepolia_logs')
op.drop_index(op.f('ix_xai_sepolia_logs_block_hash'), table_name='xai_sepolia_logs')
op.drop_index(op.f('ix_xai_sepolia_logs_address'), table_name='xai_sepolia_logs')
op.drop_table('xai_sepolia_logs')
op.drop_index(op.f('ix_xai_logs_transaction_hash'), table_name='xai_logs')
op.drop_index(op.f('ix_xai_logs_block_hash'), table_name='xai_logs')
op.drop_index(op.f('ix_xai_logs_address'), table_name='xai_logs')
op.drop_table('xai_logs')
op.drop_index(op.f('ix_mantle_sepolia_logs_transaction_hash'), table_name='mantle_sepolia_logs')
op.drop_index(op.f('ix_mantle_sepolia_logs_block_hash'), table_name='mantle_sepolia_logs')
op.drop_index(op.f('ix_mantle_sepolia_logs_address'), table_name='mantle_sepolia_logs')
op.drop_index('idx_mantle_sepolia_logs_block_hash_log_index', table_name='mantle_sepolia_logs')
op.drop_table('mantle_sepolia_logs')
op.drop_index(op.f('ix_mantle_logs_transaction_hash'), table_name='mantle_logs')
op.drop_index(op.f('ix_mantle_logs_block_hash'), table_name='mantle_logs')
op.drop_index(op.f('ix_mantle_logs_address'), table_name='mantle_logs')
op.drop_index('idx_mantle_logs_block_hash_log_index', table_name='mantle_logs')
op.drop_table('mantle_logs')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_logs_transaction_hash'), table_name='game7_orbit_arbitrum_sepolia_logs')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_logs_block_hash'), table_name='game7_orbit_arbitrum_sepolia_logs')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_logs_address'), table_name='game7_orbit_arbitrum_sepolia_logs')
op.drop_table('game7_orbit_arbitrum_sepolia_logs')
op.drop_index(op.f('ix_arbitrum_sepolia_logs_transaction_hash'), table_name='arbitrum_sepolia_logs')
op.drop_index(op.f('ix_arbitrum_sepolia_logs_block_hash'), table_name='arbitrum_sepolia_logs')
op.drop_index(op.f('ix_arbitrum_sepolia_logs_address'), table_name='arbitrum_sepolia_logs')
op.drop_table('arbitrum_sepolia_logs')
op.drop_index(op.f('ix_arbitrum_one_logs_transaction_hash'), table_name='arbitrum_one_logs')
op.drop_index(op.f('ix_arbitrum_one_logs_block_hash'), table_name='arbitrum_one_logs')
op.drop_index(op.f('ix_arbitrum_one_logs_address'), table_name='arbitrum_one_logs')
op.drop_table('arbitrum_one_logs')
op.drop_index(op.f('ix_xai_transactions_type'), table_name='xai_transactions')
op.drop_index(op.f('ix_xai_transactions_to_address'), table_name='xai_transactions')
op.drop_index(op.f('ix_xai_transactions_selector'), table_name='xai_transactions')
op.drop_index(op.f('ix_xai_transactions_index'), table_name='xai_transactions')
op.drop_index(op.f('ix_xai_transactions_hash'), table_name='xai_transactions')
op.drop_index(op.f('ix_xai_transactions_from_address'), table_name='xai_transactions')
op.drop_index(op.f('ix_xai_transactions_block_number'), table_name='xai_transactions')
op.drop_index(op.f('ix_xai_transactions_block_hash'), table_name='xai_transactions')
op.drop_table('xai_transactions')
op.drop_index(op.f('ix_xai_sepolia_transactions_type'), table_name='xai_sepolia_transactions')
op.drop_index(op.f('ix_xai_sepolia_transactions_to_address'), table_name='xai_sepolia_transactions')
op.drop_index(op.f('ix_xai_sepolia_transactions_selector'), table_name='xai_sepolia_transactions')
op.drop_index(op.f('ix_xai_sepolia_transactions_index'), table_name='xai_sepolia_transactions')
op.drop_index(op.f('ix_xai_sepolia_transactions_hash'), table_name='xai_sepolia_transactions')
op.drop_index(op.f('ix_xai_sepolia_transactions_from_address'), table_name='xai_sepolia_transactions')
op.drop_index(op.f('ix_xai_sepolia_transactions_block_number'), table_name='xai_sepolia_transactions')
op.drop_index(op.f('ix_xai_sepolia_transactions_block_hash'), table_name='xai_sepolia_transactions')
op.drop_table('xai_sepolia_transactions')
op.drop_index(op.f('ix_mantle_transactions_type'), table_name='mantle_transactions')
op.drop_index(op.f('ix_mantle_transactions_to_address'), table_name='mantle_transactions')
op.drop_index(op.f('ix_mantle_transactions_selector'), table_name='mantle_transactions')
op.drop_index(op.f('ix_mantle_transactions_index'), table_name='mantle_transactions')
op.drop_index(op.f('ix_mantle_transactions_hash'), table_name='mantle_transactions')
op.drop_index(op.f('ix_mantle_transactions_from_address'), table_name='mantle_transactions')
op.drop_index(op.f('ix_mantle_transactions_block_number'), table_name='mantle_transactions')
op.drop_index(op.f('ix_mantle_transactions_block_hash'), table_name='mantle_transactions')
op.drop_table('mantle_transactions')
op.drop_index(op.f('ix_mantle_sepolia_transactions_type'), table_name='mantle_sepolia_transactions')
op.drop_index(op.f('ix_mantle_sepolia_transactions_to_address'), table_name='mantle_sepolia_transactions')
op.drop_index(op.f('ix_mantle_sepolia_transactions_selector'), table_name='mantle_sepolia_transactions')
op.drop_index(op.f('ix_mantle_sepolia_transactions_index'), table_name='mantle_sepolia_transactions')
op.drop_index(op.f('ix_mantle_sepolia_transactions_hash'), table_name='mantle_sepolia_transactions')
op.drop_index(op.f('ix_mantle_sepolia_transactions_from_address'), table_name='mantle_sepolia_transactions')
op.drop_index(op.f('ix_mantle_sepolia_transactions_block_number'), table_name='mantle_sepolia_transactions')
op.drop_index(op.f('ix_mantle_sepolia_transactions_block_hash'), table_name='mantle_sepolia_transactions')
op.drop_table('mantle_sepolia_transactions')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_transactions_type'), table_name='game7_orbit_arbitrum_sepolia_transactions')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_transactions_to_address'), table_name='game7_orbit_arbitrum_sepolia_transactions')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_transactions_selector'), table_name='game7_orbit_arbitrum_sepolia_transactions')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_transactions_index'), table_name='game7_orbit_arbitrum_sepolia_transactions')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_transactions_hash'), table_name='game7_orbit_arbitrum_sepolia_transactions')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_transactions_from_address'), table_name='game7_orbit_arbitrum_sepolia_transactions')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_transactions_block_number'), table_name='game7_orbit_arbitrum_sepolia_transactions')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_transactions_block_hash'), table_name='game7_orbit_arbitrum_sepolia_transactions')
op.drop_table('game7_orbit_arbitrum_sepolia_transactions')
op.drop_index(op.f('ix_arbitrum_sepolia_transactions_type'), table_name='arbitrum_sepolia_transactions')
op.drop_index(op.f('ix_arbitrum_sepolia_transactions_to_address'), table_name='arbitrum_sepolia_transactions')
op.drop_index(op.f('ix_arbitrum_sepolia_transactions_selector'), table_name='arbitrum_sepolia_transactions')
op.drop_index(op.f('ix_arbitrum_sepolia_transactions_index'), table_name='arbitrum_sepolia_transactions')
op.drop_index(op.f('ix_arbitrum_sepolia_transactions_hash'), table_name='arbitrum_sepolia_transactions')
op.drop_index(op.f('ix_arbitrum_sepolia_transactions_from_address'), table_name='arbitrum_sepolia_transactions')
op.drop_index(op.f('ix_arbitrum_sepolia_transactions_block_number'), table_name='arbitrum_sepolia_transactions')
op.drop_index(op.f('ix_arbitrum_sepolia_transactions_block_hash'), table_name='arbitrum_sepolia_transactions')
op.drop_table('arbitrum_sepolia_transactions')
op.drop_index(op.f('ix_arbitrum_one_transactions_type'), table_name='arbitrum_one_transactions')
op.drop_index(op.f('ix_arbitrum_one_transactions_to_address'), table_name='arbitrum_one_transactions')
op.drop_index(op.f('ix_arbitrum_one_transactions_selector'), table_name='arbitrum_one_transactions')
op.drop_index(op.f('ix_arbitrum_one_transactions_index'), table_name='arbitrum_one_transactions')
op.drop_index(op.f('ix_arbitrum_one_transactions_hash'), table_name='arbitrum_one_transactions')
op.drop_index(op.f('ix_arbitrum_one_transactions_from_address'), table_name='arbitrum_one_transactions')
op.drop_index(op.f('ix_arbitrum_one_transactions_block_number'), table_name='arbitrum_one_transactions')
op.drop_index(op.f('ix_arbitrum_one_transactions_block_hash'), table_name='arbitrum_one_transactions')
op.drop_table('arbitrum_one_transactions')
op.drop_index(op.f('ix_xai_sepolia_reorgs_block_number'), table_name='xai_sepolia_reorgs')
op.drop_index(op.f('ix_xai_sepolia_reorgs_block_hash'), table_name='xai_sepolia_reorgs')
op.drop_table('xai_sepolia_reorgs')
op.drop_index(op.f('ix_xai_sepolia_blocks_block_timestamp'), table_name='xai_sepolia_blocks')
op.drop_index(op.f('ix_xai_sepolia_blocks_block_number'), table_name='xai_sepolia_blocks')
op.drop_table('xai_sepolia_blocks')
op.drop_index(op.f('ix_xai_reorgs_block_number'), table_name='xai_reorgs')
op.drop_index(op.f('ix_xai_reorgs_block_hash'), table_name='xai_reorgs')
op.drop_table('xai_reorgs')
op.drop_index(op.f('ix_xai_blocks_block_timestamp'), table_name='xai_blocks')
op.drop_index(op.f('ix_xai_blocks_block_number'), table_name='xai_blocks')
op.drop_table('xai_blocks')
op.drop_index(op.f('ix_mantle_sepolia_reorgs_block_number'), table_name='mantle_sepolia_reorgs')
op.drop_index(op.f('ix_mantle_sepolia_reorgs_block_hash'), table_name='mantle_sepolia_reorgs')
op.drop_table('mantle_sepolia_reorgs')
op.drop_index(op.f('ix_mantle_sepolia_blocks_block_timestamp'), table_name='mantle_sepolia_blocks')
op.drop_index(op.f('ix_mantle_sepolia_blocks_block_number'), table_name='mantle_sepolia_blocks')
op.drop_table('mantle_sepolia_blocks')
op.drop_index(op.f('ix_mantle_reorgs_block_number'), table_name='mantle_reorgs')
op.drop_index(op.f('ix_mantle_reorgs_block_hash'), table_name='mantle_reorgs')
op.drop_table('mantle_reorgs')
op.drop_index(op.f('ix_mantle_blocks_block_timestamp'), table_name='mantle_blocks')
op.drop_index(op.f('ix_mantle_blocks_block_number'), table_name='mantle_blocks')
op.drop_table('mantle_blocks')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_reorgs_block_number'), table_name='game7_orbit_arbitrum_sepolia_reorgs')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_reorgs_block_hash'), table_name='game7_orbit_arbitrum_sepolia_reorgs')
op.drop_table('game7_orbit_arbitrum_sepolia_reorgs')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_blocks_block_timestamp'), table_name='game7_orbit_arbitrum_sepolia_blocks')
op.drop_index(op.f('ix_game7_orbit_arbitrum_sepolia_blocks_block_number'), table_name='game7_orbit_arbitrum_sepolia_blocks')
op.drop_table('game7_orbit_arbitrum_sepolia_blocks')
op.drop_index(op.f('ix_arbitrum_sepolia_reorgs_block_number'), table_name='arbitrum_sepolia_reorgs')
op.drop_index(op.f('ix_arbitrum_sepolia_reorgs_block_hash'), table_name='arbitrum_sepolia_reorgs')
op.drop_table('arbitrum_sepolia_reorgs')
op.drop_index(op.f('ix_arbitrum_sepolia_blocks_block_timestamp'), table_name='arbitrum_sepolia_blocks')
op.drop_index(op.f('ix_arbitrum_sepolia_blocks_block_number'), table_name='arbitrum_sepolia_blocks')
op.drop_table('arbitrum_sepolia_blocks')
op.drop_index(op.f('ix_arbitrum_one_reorgs_block_number'), table_name='arbitrum_one_reorgs')
op.drop_index(op.f('ix_arbitrum_one_reorgs_block_hash'), table_name='arbitrum_one_reorgs')
op.drop_table('arbitrum_one_reorgs')
op.drop_index(op.f('ix_arbitrum_one_blocks_block_timestamp'), table_name='arbitrum_one_blocks')
op.drop_index(op.f('ix_arbitrum_one_blocks_block_number'), table_name='arbitrum_one_blocks')
op.drop_table('arbitrum_one_blocks')
# ### end Alembic commands ###

Wyświetl plik

@ -501,6 +501,38 @@ class ArbitrumSepoliaLabel(EvmBasedLabel): # type: ignore
)
class Game7OrbitArbitrumSepoliaLabel(EvmBasedLabel): # type: ignore
__tablename__ = "game7_orbit_arbitrum_sepolia_labels"
__table_args__ = (
Index(
"ix_g7o_arbitrum_sepolia_labels_addr_block_num",
"address",
"block_number",
unique=False,
),
Index(
"ix_g7o_arbitrum_sepolia_labels_addr_block_ts",
"address",
"block_timestamp",
unique=False,
),
Index(
"uk_g7o_arbitrum_sepolia_labels_tx_hash_tx_call",
"transaction_hash",
unique=True,
postgresql_where=text("label='seer' and label_type='tx_call'"),
),
Index(
"uk_g7o_arbitrum_sepolia_labels_tx_hash_log_idx_evt",
"transaction_hash",
"log_index",
unique=True,
postgresql_where=text("label='seer' and label_type='event'"),
),
)
class XaiLabel(EvmBasedLabel): # type: ignore
__tablename__ = "xai_labels"
@ -787,3 +819,67 @@ class StarknetSepoliaLabel(EvmBasedLabel): # type: ignore
postgresql_where=text("label='seer' and label_type='event'"),
),
)
class MantleLabel(EvmBasedLabel): # type: ignore
__tablename__ = "mantle_labels"
__table_args__ = (
Index(
"ix_mantle_labels_addr_block_num",
"address",
"block_number",
unique=False,
),
Index(
"ix_mantle_labels_addr_block_ts",
"address",
"block_timestamp",
unique=False,
),
Index(
"uk_mantle_labels_tx_hash_tx_call",
"transaction_hash",
unique=True,
postgresql_where=text("label='seer' and label_type='tx_call'"),
),
Index(
"uk_mantle_labels_tx_hash_log_idx_evt",
"transaction_hash",
"log_index",
unique=True,
postgresql_where=text("label='seer' and label_type='event'"),
),
)
class MantleSepoliaLabel(EvmBasedLabel): # type: ignore
__tablename__ = "mantle_sepolia_labels"
__table_args__ = (
Index(
"ix_mantle_sepolia_labels_addr_block_num",
"address",
"block_number",
unique=False,
),
Index(
"ix_mantle_sepolia_labels_addr_block_ts",
"address",
"block_timestamp",
unique=False,
),
Index(
"uk_mantle_sepolia_labels_tx_hash_tx_call",
"transaction_hash",
unique=True,
postgresql_where=text("label='seer' and label_type='tx_call'"),
),
Index(
"uk_mantle_sepolia_labels_tx_hash_log_idx_evt",
"transaction_hash",
"log_index",
unique=True,
postgresql_where=text("label='seer' and label_type='event'"),
),
)

Wyświetl plik

@ -193,6 +193,338 @@ class PolygonReorgs(EvmBasedReorgs):
__tablename__ = "polygon_reorgs"
### Xai
class XaiBlockIndex(EvmBasedBlocks):
__tablename__ = "xai_blocks"
l1_block_number = Column(BigInteger, nullable=False)
class XaiTransactionIndex(EvmBasedTransactions):
__tablename__ = "xai_transactions"
block_number = Column(
BigInteger,
ForeignKey("xai_blocks.block_number", ondelete="CASCADE"),
nullable=False,
index=True,
)
class XaiLogIndex(EvmBasedLogs):
__tablename__ = "xai_logs"
__table_args__ = (
UniqueConstraint(
"transaction_hash",
"log_index",
name="uq_xai_log_idx_tx_hash_log_idx",
),
PrimaryKeyConstraint("transaction_hash", "log_index", name="pk_xai_log_index"),
)
transaction_hash = Column(
VARCHAR(256),
ForeignKey("xai_transactions.hash", ondelete="CASCADE"),
nullable=False,
index=True,
)
class XaiReorgs(EvmBasedReorgs):
__tablename__ = "xai_reorgs"
### Xai Sepolia
class XaiSepoliaBlockIndex(EvmBasedBlocks):
__tablename__ = "xai_sepolia_blocks"
l1_block_number = Column(BigInteger, nullable=False)
class XaiSepoliaTransactionIndex(EvmBasedTransactions):
__tablename__ = "xai_sepolia_transactions"
block_number = Column(
BigInteger,
ForeignKey("xai_sepolia_blocks.block_number", ondelete="CASCADE"),
nullable=False,
index=True,
)
class XaiSepoliaLogIndex(EvmBasedLogs):
__tablename__ = "xai_sepolia_logs"
__table_args__ = (
UniqueConstraint(
"transaction_hash",
"log_index",
name="uq_xai_sepolia_log_idx_tx_hash_log_idx",
),
PrimaryKeyConstraint(
"transaction_hash", "log_index", name="pk_xai_sepolia_log_index"
),
)
transaction_hash = Column(
VARCHAR(256),
ForeignKey("xai_sepolia_transactions.hash", ondelete="CASCADE"),
nullable=False,
index=True,
)
class XaiSepoliaReorgs(EvmBasedReorgs):
__tablename__ = "xai_sepolia_reorgs"
### Arbitrum One
class ArbitrumOneBlockIndex(EvmBasedBlocks):
__tablename__ = "arbitrum_one_blocks"
l1_block_number = Column(BigInteger, nullable=False)
class ArbitrumOneTransactionIndex(EvmBasedTransactions):
__tablename__ = "arbitrum_one_transactions"
block_number = Column(
BigInteger,
ForeignKey("arbitrum_one_blocks.block_number", ondelete="CASCADE"),
nullable=False,
index=True,
)
class ArbitrumOneLogIndex(EvmBasedLogs):
__tablename__ = "arbitrum_one_logs"
__table_args__ = (
UniqueConstraint(
"transaction_hash",
"log_index",
name="uq_arbitrum_one_log_idx_tx_hash_log_idx",
),
PrimaryKeyConstraint(
"transaction_hash", "log_index", name="pk_arbitrum_one_log_index"
),
)
transaction_hash = Column(
VARCHAR(256),
ForeignKey("arbitrum_one_transactions.hash", ondelete="CASCADE"),
nullable=False,
index=True,
)
class ArbitrumOneReorgs(EvmBasedReorgs):
__tablename__ = "arbitrum_one_reorgs"
### Arbitrum Sepolia
class ArbitrumSepoliaBlockIndex(EvmBasedBlocks):
__tablename__ = "arbitrum_sepolia_blocks"
l1_block_number = Column(BigInteger, nullable=False)
class ArbitrumSepoliaTransactionIndex(EvmBasedTransactions):
__tablename__ = "arbitrum_sepolia_transactions"
block_number = Column(
BigInteger,
ForeignKey("arbitrum_sepolia_blocks.block_number", ondelete="CASCADE"),
nullable=False,
index=True,
)
class ArbitrumSepoliaLogIndex(EvmBasedLogs):
__tablename__ = "arbitrum_sepolia_logs"
__table_args__ = (
UniqueConstraint(
"transaction_hash",
"log_index",
name="uq_arbitrum_sepolia_log_idx_tx_hash_log_idx",
),
PrimaryKeyConstraint(
"transaction_hash", "log_index", name="pk_arbitrum_sepolia_log_index"
),
)
transaction_hash = Column(
VARCHAR(256),
ForeignKey("arbitrum_sepolia_transactions.hash", ondelete="CASCADE"),
nullable=False,
index=True,
)
class ArbitrumSepoliaReorgs(EvmBasedReorgs):
__tablename__ = "arbitrum_sepolia_reorgs"
### Game7 Orbit Arbitrum Sepolia
class Game7OrbitArbitrumSepoliaBlockIndex(EvmBasedBlocks):
__tablename__ = "game7_orbit_arbitrum_sepolia_blocks"
l1_block_number = Column(BigInteger, nullable=False)
class Game7OrbitArbitrumSepoliaTransactionIndex(EvmBasedTransactions):
__tablename__ = "game7_orbit_arbitrum_sepolia_transactions"
block_number = Column(
BigInteger,
ForeignKey(
"game7_orbit_arbitrum_sepolia_blocks.block_number", ondelete="CASCADE"
),
nullable=False,
index=True,
)
class Game7OrbitArbitrumSepoliaLogIndex(EvmBasedLogs):
__tablename__ = "game7_orbit_arbitrum_sepolia_logs"
__table_args__ = (
UniqueConstraint(
"transaction_hash",
"log_index",
name="uq_g7o_arbitrum_sepolia_log_idx_tx_hash_log_idx",
),
PrimaryKeyConstraint(
"transaction_hash",
"log_index",
name="pk_game7_orbit_arbitrum_sepolia_log_index",
),
)
transaction_hash = Column(
VARCHAR(256),
ForeignKey(
"game7_orbit_arbitrum_sepolia_transactions.hash", ondelete="CASCADE"
),
nullable=False,
index=True,
)
class Game7OrbitArbitrumSepoliaReorgs(EvmBasedReorgs):
__tablename__ = "game7_orbit_arbitrum_sepolia_reorgs"
### Mantle
class MantleBlockIndex(EvmBasedBlocks):
__tablename__ = "mantle_blocks"
class MantleTransactionIndex(EvmBasedTransactions):
__tablename__ = "mantle_transactions"
block_number = Column(
BigInteger,
ForeignKey("mantle_blocks.block_number", ondelete="CASCADE"),
nullable=False,
index=True,
)
class MantleLogIndex(EvmBasedLogs):
__tablename__ = "mantle_logs"
__table_args__ = (
Index(
"idx_mantle_logs_block_hash_log_index",
"block_hash",
"log_index",
unique=True,
),
UniqueConstraint(
"transaction_hash",
"log_index",
name="uq_mantle_log_index_transaction_hash_log_index",
),
PrimaryKeyConstraint(
"transaction_hash", "log_index", name="pk_mantle_log_index"
),
)
transaction_hash = Column(
VARCHAR(256),
ForeignKey("mantle_transactions.hash", ondelete="CASCADE"),
nullable=False,
index=True,
)
class MantleReorgs(EvmBasedReorgs):
__tablename__ = "mantle_reorgs"
### Mantle Sepolia
class MantleSepoliaBlockIndex(EvmBasedBlocks):
__tablename__ = "mantle_sepolia_blocks"
class MantleSepoliaTransactionIndex(EvmBasedTransactions):
__tablename__ = "mantle_sepolia_transactions"
block_number = Column(
BigInteger,
ForeignKey("mantle_sepolia_blocks.block_number", ondelete="CASCADE"),
nullable=False,
index=True,
)
class MantleSepoliaLogIndex(EvmBasedLogs):
__tablename__ = "mantle_sepolia_logs"
__table_args__ = (
Index(
"idx_mantle_sepolia_logs_block_hash_log_index",
"block_hash",
"log_index",
unique=True,
),
UniqueConstraint(
"transaction_hash",
"log_index",
name="uq_mantle_sepolia_log_index_transaction_hash_log_index",
),
PrimaryKeyConstraint(
"transaction_hash", "log_index", name="pk_mantle_sepolia_log_index"
),
)
transaction_hash = Column(
VARCHAR(256),
ForeignKey("mantle_sepolia_transactions.hash", ondelete="CASCADE"),
nullable=False,
index=True,
)
class MantleSepoliaReorgs(EvmBasedReorgs):
__tablename__ = "mantle_sepolia_reorgs"
### ABI Jobs