kopia lustrzana https://github.com/bugout-dev/moonstream
Merge branch 'main' into add-v3-subscriptions
commit
707ab3addd
|
@ -265,7 +265,7 @@ def add_events_to_session(
|
||||||
"block_timestamp": label_event.block_timestamp,
|
"block_timestamp": label_event.block_timestamp,
|
||||||
"caller_address": None,
|
"caller_address": None,
|
||||||
"origin_address": None,
|
"origin_address": None,
|
||||||
"address": label_event.address,
|
"address": bytes.fromhex(label_event.address[2:]),
|
||||||
"label_name": label_event.label_name,
|
"label_name": label_event.label_name,
|
||||||
"label_type": "event",
|
"label_type": "event",
|
||||||
"label_data": label_event.label_data,
|
"label_data": label_event.label_data,
|
||||||
|
@ -345,7 +345,7 @@ def add_function_calls_to_session(
|
||||||
for function_call in function_calls:
|
for function_call in function_calls:
|
||||||
|
|
||||||
label_function_call = _function_call_to_label(
|
label_function_call = _function_call_to_label(
|
||||||
blockchain_type, function_call, db_version
|
blockchain_type, function_call, db_version, label_name
|
||||||
)
|
)
|
||||||
|
|
||||||
record = {
|
record = {
|
||||||
|
@ -355,9 +355,9 @@ def add_function_calls_to_session(
|
||||||
"block_number": label_function_call.block_number,
|
"block_number": label_function_call.block_number,
|
||||||
"block_hash": label_function_call.block_hash,
|
"block_hash": label_function_call.block_hash,
|
||||||
"block_timestamp": label_function_call.block_timestamp,
|
"block_timestamp": label_function_call.block_timestamp,
|
||||||
"caller_address": label_function_call.caller_address,
|
"caller_address": bytes.fromhex(label_function_call.caller_address[2:]),
|
||||||
"origin_address": label_function_call.caller_address,
|
"origin_address": bytes.fromhex(label_function_call.caller_address[2:]),
|
||||||
"address": label_function_call.address,
|
"address": bytes.fromhex(label_function_call.address[2:]),
|
||||||
"label_name": label_function_call.label_name,
|
"label_name": label_function_call.label_name,
|
||||||
"label_type": "tx_call",
|
"label_type": "tx_call",
|
||||||
"label_data": label_function_call.label_data,
|
"label_data": label_function_call.label_data,
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
Moonstream crawlers version.
|
Moonstream crawlers version.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
MOONCRAWL_VERSION = "0.4.9"
|
MOONCRAWL_VERSION = "0.4.10"
|
||||||
|
|
|
@ -38,7 +38,7 @@ setup(
|
||||||
"chardet",
|
"chardet",
|
||||||
"fastapi",
|
"fastapi",
|
||||||
"moonstreamdb>=0.4.5",
|
"moonstreamdb>=0.4.5",
|
||||||
"moonstreamdb-v3>=0.0.11",
|
"moonstreamdb-v3>=0.0.13",
|
||||||
"moonstream-types>=0.0.4",
|
"moonstream-types>=0.0.4",
|
||||||
"moonstream>=0.1.1",
|
"moonstream>=0.1.1",
|
||||||
"moonworm[moonstream]>=0.9.2",
|
"moonworm[moonstream]>=0.9.2",
|
||||||
|
|
|
@ -0,0 +1,749 @@
|
||||||
|
"""Bytea address in labels
|
||||||
|
|
||||||
|
Revision ID: 2e90b758090c
|
||||||
|
Revises: 792ca9c4722c
|
||||||
|
Create Date: 2024-07-15 17:38:36.529835
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
from typing import Sequence, Union
|
||||||
|
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision: str = "2e90b758090c"
|
||||||
|
down_revision: Union[str, None] = "9ca39b11e12a"
|
||||||
|
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.execute(
|
||||||
|
"ALTER TABLE amoy_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE amoy_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE amoy_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE arbitrum_nova_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE arbitrum_nova_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE arbitrum_nova_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE arbitrum_one_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE arbitrum_one_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE arbitrum_one_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE arbitrum_sepolia_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE arbitrum_sepolia_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE arbitrum_sepolia_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE avalanche_fuji_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE avalanche_fuji_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE avalanche_fuji_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE avalanche_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE avalanche_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE avalanche_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE base_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE base_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE base_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE blast_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE blast_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE blast_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE blast_sepolia_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE blast_sepolia_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE blast_sepolia_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE ethereum_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE ethereum_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE ethereum_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE game7_orbit_arbitrum_sepolia_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE game7_orbit_arbitrum_sepolia_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE game7_orbit_arbitrum_sepolia_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE mantle_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE mantle_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE mantle_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE mantle_sepolia_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE mantle_sepolia_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE mantle_sepolia_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE mumbai_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE mumbai_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE mumbai_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE polygon_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE polygon_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE polygon_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE proofofplay_apex_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE proofofplay_apex_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE proofofplay_apex_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE sepolia_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE sepolia_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE sepolia_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE starknet_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE starknet_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE starknet_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE starknet_sepolia_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE starknet_sepolia_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE starknet_sepolia_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE xai_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE xai_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE xai_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE xai_sepolia_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE xai_sepolia_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE xai_sepolia_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE xdai_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE xdai_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE xdai_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE zksync_era_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE zksync_era_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE zksync_era_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE zksync_era_sepolia_labels ALTER COLUMN caller_address TYPE bytea USING caller_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE zksync_era_sepolia_labels ALTER COLUMN origin_address TYPE bytea USING origin_address::bytea"
|
||||||
|
)
|
||||||
|
op.execute(
|
||||||
|
"ALTER TABLE zksync_era_sepolia_labels ALTER COLUMN address TYPE bytea USING address::bytea"
|
||||||
|
)
|
||||||
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade() -> None:
|
||||||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.alter_column(
|
||||||
|
"zksync_era_sepolia_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"zksync_era_sepolia_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"zksync_era_sepolia_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"zksync_era_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"zksync_era_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"zksync_era_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"xdai_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"xdai_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"xdai_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"xai_sepolia_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"xai_sepolia_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"xai_sepolia_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"xai_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"xai_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"xai_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"starknet_sepolia_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"starknet_sepolia_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"starknet_sepolia_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"starknet_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"starknet_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"starknet_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"sepolia_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"sepolia_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"sepolia_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"proofofplay_apex_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"proofofplay_apex_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"proofofplay_apex_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"polygon_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"polygon_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"polygon_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"mumbai_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"mumbai_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"mumbai_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"mantle_sepolia_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"mantle_sepolia_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"mantle_sepolia_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"mantle_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"mantle_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"mantle_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"game7_orbit_arbitrum_sepolia_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"game7_orbit_arbitrum_sepolia_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"game7_orbit_arbitrum_sepolia_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"ethereum_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"ethereum_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"ethereum_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"blast_sepolia_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"blast_sepolia_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"blast_sepolia_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"blast_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"blast_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"blast_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"base_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"base_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"base_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"avalanche_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"avalanche_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"avalanche_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"avalanche_fuji_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"avalanche_fuji_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"avalanche_fuji_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"arbitrum_sepolia_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"arbitrum_sepolia_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"arbitrum_sepolia_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"arbitrum_one_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"arbitrum_one_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"arbitrum_one_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"arbitrum_nova_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"arbitrum_nova_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"arbitrum_nova_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"amoy_labels",
|
||||||
|
"address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"amoy_labels",
|
||||||
|
"origin_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
op.alter_column(
|
||||||
|
"amoy_labels",
|
||||||
|
"caller_address",
|
||||||
|
existing_type=sa.LargeBinary(),
|
||||||
|
type_=sa.VARCHAR(length=64),
|
||||||
|
existing_nullable=True,
|
||||||
|
)
|
||||||
|
# ### end Alembic commands ###
|
|
@ -26,6 +26,7 @@ from sqlalchemy import (
|
||||||
Integer,
|
Integer,
|
||||||
MetaData,
|
MetaData,
|
||||||
Text,
|
Text,
|
||||||
|
LargeBinary,
|
||||||
)
|
)
|
||||||
from sqlalchemy.dialects.postgresql import JSONB, UUID
|
from sqlalchemy.dialects.postgresql import JSONB, UUID
|
||||||
from sqlalchemy.ext.compiler import compiles
|
from sqlalchemy.ext.compiler import compiles
|
||||||
|
@ -93,18 +94,19 @@ class EvmBasedLabel(Base): # type: ignore
|
||||||
block_timestamp = Column(BigInteger, nullable=False)
|
block_timestamp = Column(BigInteger, nullable=False)
|
||||||
|
|
||||||
caller_address = Column(
|
caller_address = Column(
|
||||||
VARCHAR(64),
|
LargeBinary,
|
||||||
nullable=True,
|
nullable=True,
|
||||||
index=True,
|
index=True,
|
||||||
)
|
)
|
||||||
origin_address = Column(
|
origin_address = Column(
|
||||||
VARCHAR(64),
|
LargeBinary,
|
||||||
nullable=True,
|
nullable=True,
|
||||||
index=True,
|
index=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
address = Column(
|
address = Column(
|
||||||
VARCHAR(64),
|
LargeBinary,
|
||||||
nullable=True,
|
nullable=False,
|
||||||
index=True,
|
index=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue