hessTotal III
    Updated 2025-04-05
    with stake_tx as ( select DISTINCT tx_id
    from sei.core.fact_msg_attributes
    where msg_type in ('wasm-staked','wasm-unstaked')
    and attribute_value = 'sei1cujl8ujhc36lp7sr98x30u0aeqtjlj68kll5rqqr9dke5xvn2ltquzhysl'
    and attribute_key = 'token_address'
    and block_timestamp::date >= '2024-04-15'
    and tx_id in (select tx_id from sei.core.fact_msg_attributes
    where block_timestamp::date >= '2024-04-15'
    and attribute_value = 'sei1k20knz5qc0twatcs3t0tap32klaxprnwtc0f0npj8wd8x2a55vrs269a6f'
    and attribute_key = '_contract_address'))
    ,
    owner as ( select block_timestamp,
    a.tx_id,
    attribute_value as owner,
    msg_group
    from sei.core.fact_msg_attributes a join stake_tx b on a.tx_id = b.tx_id
    where msg_type in ('wasm-staked','wasm-unstaked')
    and block_timestamp::date >= '2024-04-15'
    and ATTRIBUTE_KEY = 'owner'
    and tx_succeeded = 'TRUE')
    ,
    token_id_staked as ( select a.block_timestamp,
    a.tx_id,
    owner,
    a.msg_group,
    attribute_value as token_id
    from sei.core.fact_msg_attributes a join owner b on a.tx_id = b.tx_id and a.msg_group = b.msg_group
    where msg_type = 'wasm-staked'
    and a.block_timestamp::date >= '2024-04-15'
    and ATTRIBUTE_KEY = 'token_id')
    ,
    token_id_unstaked as ( select a.block_timestamp,
    a.tx_id,
    owner,
    a.msg_group,
    attribute_value as token_id
    Last run: 18 days ago
    TYPE
    TX
    USER
    NFT
    1
    Stake203611163152
    2
    Unstake11725621499
    2
    52B
    160s