Query editor
WITH ASSUMPTION AS (SELECT220000 AS base_verify_cost, -- using roughly experienced 22000027 AS eth_gas_price,200 AS matic_gas_price,5 AS op_gas_price),ETH_PRICE AS (SELECT2000 AS eth_usd),MATIC_PRICE AS (SELECT1 AS matic_usd),--DATE_TRUNC('month', call_block_time) as mon,--DATE_TRUNC('month', call_block_time)/* gas limit before entering the verifier.sol: 645,661 *//* gas limit after: 277,993*//* total spending: 367668 *//* source: https://etherscan.io/tx/0xb84fc66d11b8bb08c443015b384a5840a6a6cb013d9fe7204fd18e62dd801a9a/advanced#internal */TORNADO_CASH AS (SELECTDATE_TRUNC('month', block_time) as mon,'TRONADO_CASH' AS name,COUNT(*) AS verify_call,ROUND(TRY_CAST(COUNT(*) * 367668 * eth_gas_price * eth_usd AS DECIMAL(38, 10)) / 1000000000.0,4) AS costFROM ethereum.transactionsCROSS JOIN ETH_PRICECROSS JOIN MATIC_PRICECROSS JOIN ASSUMPTIONWHERE(to = 0x12d66f87a04a9e220743712ce6d9bb1b5616b8fcOR to = 0x47ce0c6ed5b0ce3d3a51fdb1c52dc66a7c3c2936OR to = 0x910cbd523d972eb0a6f4cae4618ad62622b39dbfOR to = 0xa160cdab225685da1d56aa342ad8841c3b53f291)AND successAND BYTEARRAY_SUBSTRING(data, 1, 4) = 0x21a0adb6 /* withdraw */AND block_number > 9116966GROUP BYeth_gas_price,base_verify_cost,eth_usd,DATE_TRUNC('month', block_time))SELECT * FROM TORNADO_CASH