Query editor
-- ======================================-- CORRECTED ECO ROUTES TRANSACTION DIAGNOSTIC-- Purpose: Use raw amounts like the working volume query (no decimal division)-- ======================================WITH specific_eco_transactions AS (SELECT 0x08e9d04f9d50842817e2296adde401987e17abb7deca912e563dcef34ed5d973 AS tx_hash, 'Base_1000_USDC' AS tx_typeUNION ALLSELECT 0xf1931564c38291d325b1972bbba4d245e35e031d4c3adf71bfc8fdac3eebfef7, 'Arbitrum_0.001_USDC'UNION ALLSELECT 0xc949879693d2d7677b2c74664f13122494286bbba02895ffb05929465ea8fd6b, 'Optimism_0.001_USDC'UNION ALLSELECT 0x127a17d05cf7138871dccb7a419c93624763caf1c4da580559700098c3256033, 'Optimism_Tiny_Amount'),-- Get token amounts using the SAME logic as the working volume querytoken_amounts AS (SELECTtt.tx_hash,tt.blockchain,tt.amount AS raw_amount_units, -- Keep raw amount like working querytt.amount AS bridged_amount_usd, -- Use raw amount as USD (like working query)tt.contract_address,CASEWHEN tt.contract_address = 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 THEN 'USDC-BASE'WHEN tt.contract_address = 0xaf88d065e77c8cC2239327C5EDb3A432268e5831 THEN 'USDC-ARB'WHEN tt.contract_address = 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85 THEN 'USDC-OP'ELSE 'OTHER'END AS token_symbolFROM tokens.transfers ttWHERE tt.tx_hash IN (0x08e9d04f9d50842817e2296adde401987e17abb7deca912e563dcef34ed5d973,0xf1931564c38291d325b1972bbba4d245e35e031d4c3adf71bfc8fdac3eebfef7,0xc949879693d2d7677b2c74664f13122494286bbba02895ffb05929465ea8fd6b,0x127a17d05cf7138871dccb7a419c93624763caf1c4da580559700098c3256033)AND tt."to" = 0x99bc55Df1eb02dB64fF20fE457c996b2D53bFf7E -- V1 contractAND tt.contract_address IN (0x833589fcd6edb6e08f4c7c32d4f71b54bda02913, -- USDC Base0xaf88d065e77c8cC2239327C5EDb3A432268e5831, -- USDC Arbitrum0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85 -- USDC Optimism)),-- Get Hyperlane gas feeseth_price AS (SELECT price as eth_priceFROM prices.usdWHERE contract_address = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2AND blockchain = 'ethereum'ORDER BY minute DESCLIMIT 1),hyperlane_fees AS (-- Base chain feesSELECThgp.evt_tx_hash AS tx_hash,'base' AS origin_chain,hgp.payment / POWER(10, 18) * ep.eth_price AS gas_fee_usdFROM hyperlane_v3_base.InterchainGasPaymaster_evt_GasPayment hgpCROSS JOIN eth_price epWHERE hgp.evt_tx_hash IN (0x08e9d04f9d50842817e2296adde401987e17abb7deca912e563dcef34ed5d973,