Query editor
WITH-- -------------------------------------------------------------- 1. launches: id -> launched token-- ------------------------------------------------------------launches AS (SELECTcontract_address AS launchpad,varbinary_to_uint256(topic1) AS launch_id,varbinary_substring(topic2, 13, 20) AS tokenFROM robinhood.logsWHERE topic0 = keccak(to_utf8('LaunchCreated(uint256,address,address,bool)'))),-- -------------------------------------------------------------- 2. every successful bond / graduation pool-- ------------------------------------------------------------graduations AS (SELECTl.contract_address AS launchpad,varbinary_to_uint256(l.topic1) AS launch_id,-- indexed assetvarbinary_substring(l.topic2, 13, 20) AS quote_token,-- first non-indexed word = poolvarbinary_substring(l.data, 13, 20) AS pool,l.block_number AS graduation_block,l.block_time AS graduation_time,l.tx_index AS graduation_tx_index,l.index AS graduation_log_index,-- sortable exact EVM positionCAST(l.block_number AS BIGINT) * 10000000000+ CAST(l.tx_index AS BIGINT) * 100000+ CAST(l.index AS BIGINT) AS graduation_orderFROM robinhood.logs lWHERE l.topic0 = keccak(to_utf8('LegBonded(uint256,address,address,uint256,uint256)'))),g AS (SELECTgr.*,la.tokenFROM graduations grJOIN launches laON la.launchpad = gr.launchpadAND la.launch_id = gr.launch_id),