Arioinstructions
    Updated 2025-03-21
    select
    -- distinct block_timestamp,
    -- tx_id,
    distinct regexp_replace(f_logs.value, '^Program log: Instruction: ') as label_action
    from
    solana.core.fact_events
    inner join solana.core.fact_transactions using(tx_id, block_timestamp, succeeded, block_id)
    , lateral flatten (input => fact_transactions.log_messages) f_logs
    where
    succeeded
    and fact_events.program_id = 'pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA'
    and fact_transactions.log_messages [f_logs.index -1] = 'Program pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA invoke [1]'
    and BLOCK_TIMESTAMP :: date >= '2025-03-20'
    -- and BLOCK_TIMESTAMP :: date < '2023-10-01'
    -- and label_action not in ('UpdateCollection', 'UpdateStats', 'UpdateFloor', 'AdminSyncLiquidity')



    select fact_transactions.*
    from solana.core.fact_events
    inner join solana.core.fact_transactions using(tx_id, block_timestamp, succeeded, block_id)
    , lateral flatten (input => fact_transactions.log_messages) f_logs
    where
    succeeded
    and fact_events.program_id = 'pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA'
    and fact_transactions.log_messages [f_logs.index -1] = 'Program pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA invoke [1]'
    and BLOCK_TIMESTAMP :: date >= '2025-03-20'
    and regexp_replace(f_logs.value, '^Program log: Instruction: ') = 'CreatePool'
    limit 10
    Last run: 21 days ago
    LABEL_ACTION
    1
    CreatePool
    2
    Buy
    3
    Deposit
    4
    Sell
    5
    Withdraw
    5
    58B
    36s