Query editor
/**DEV: For Anichess, claiming airdrop includes auto-stake executed by a distributor address,which claimers delegate the stake to. Hence, the distributor address becomes the one transferring$CHECK to the staking contract as a part of the claim transaction.**/with/**AIRDROP CLAIMING -> STAKING CTEs**/-- RAW DATA--claim_and_stakes as (selecttransfers.block_time,transactions."from" as wallet_address,transfers.amount_raw,transfers.amount,transfers.price_usd,transfers.amount_usdfrom tokens.transfers transfersjoin abstract.transactions transactions on transfers.tx_hash = transactions.hashwheretransfers.blockchain = 'abstract'and transfers."from" = {{distributor_address}} -- address which msg.sender delegates claim toand transfers."to" = {{staking_contract}}and transfers.contract_address = {{token_contract}}and cast(transactions.data as varchar) like '%0x563cac28%' -- claim and stake method id),stakes as (selecttransfers.block_time,transfers."from" as wallet_address,transfers.amount_raw,transfers.amount,transfers.price_usd,transfers.amount_usdfrom tokens.transfers transfersjoin abstract.transactions transactions on transfers.tx_hash = transactions.hashwheretransfers.blockchain = 'abstract'and transfers."to" = {{staking_contract}}and transfers.contract_address = {{token_contract}}and cast(transactions.data as varchar) like '%0x2d1e0c02%' -- stake method id),withdrawals as (selecttransfers.block_time,transfers."to" as wallet_address,transfers.amount_raw,transfers.amount,transfers.price_usd,transfers.amount_usdfrom tokens.transfers transfersjoin abstract.transactions transactions on transfers.tx_hash = transactions.hashwheretransfers.blockchain = 'abstract'and transfers."from" = {{staking_contract}}and transfers.contract_address = {{token_contract}}and cast(transactions.data as varchar) like '%0x0968f264%' -- withdrawal method id