Query editor
withpositions_without_token_id as (select-- block_time as evt_block_time--address sender, index_topic_1 address owner, index_topic_2 int24 tickLower, index_topic_3 int24 tickUpper, uint128 amount, uint256 amount0, uint256 amount1-- contract_address as pool-- , bytearray_substring(topic1, 13) as ownerbytearray_to_integer(bytearray_substring(topic2, 29)) as tick_lower, bytearray_to_integer(bytearray_substring(topic3, 29)) as tick_upper, tx_hash, index-- , bytearray_substring(data, 13, 20) as sender-- , bytearray_to_int256(bytearray_substring(data, 33, 16)) as amount-- , bytearray_to_uint256(bytearray_substring(data, 33 + 16, 32)) as amount0-- , bytearray_to_uint256(bytearray_substring(data, 33 + 16 + 32, 32)) as amount1-- ,*from ethereum.logswhereblock_number >= 12369621 -- frax-fpi pool creation blockand contract_address = 0xd2a9F2B88d6DF8830522D624db491445362a2797and topic0 = 0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde),nft_mint_events as (select * from uniswap_v3_ethereum.NonfungibleTokenPositionManager_evt_Transferwhere"from" = 0x0000000000000000000000000000000000000000and evt_block_number >= 14484746and evt_tx_hash in (select tx_hash from positions_without_token_id)),inits as (select-- contract_address as poolblock_time, block_number, tx_index, index, tx_hash-- uint160 sqrtPriceX96, int24 tick, bytearray_to_int256(bytearray_substring(data, 1, 32)) as sqrt_price_x96-- , bytearray_to_integer(bytearray_substring(data, 33 + 28, 4)) as tickfrom ethereum.logswhere block_number >= 14484746and contract_address = 0xd2a9F2B88d6DF8830522D624db491445362a2797and topic0 = 0x98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95),swaps as (selectblock_time, block_number, tx_index, index, tx_hash-- index_topic_1 address sender, index_topic_2 address recipient, int256 amount0, int256 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick-- , bytearray_substring(topic1, 13) as sender-- , bytearray_substring(topic2, 13) as recipient-- , bytearray_to_int256(bytearray_substring(data, 1, 32)) as amount0