Query editor
-- https://dune.com/queries/3713806-- deployed contract address: https://docs.ora.io/doc/oao-onchain-ai-oracle/reference-- example txn: -- https://etherscan.io/tx/0x0c4d93053145164ed209e3e4d9375ec36935194b375d0e008a5e86e97b18adfewith request_ml_events as (selecttx_hash, block_number-- , varbinary_substring(topic1,1+12,20) as account, varbinary_to_uint256(topic2) as requestId, varbinary_to_uint256(varbinary_substring(data,1,32)) as modelId, varbinary_substring(data,1+2*32+12,20) as callbackContract -- 目前来看和topic1 account相同from {{blockchain}}.logswhere block_time >= date '{{start_day}}'and block_time < current_date -- avoid incomplete dateand contract_address = 0x0A0f4321214BB6C7811dD8a71cF587bdaF03f0A0 -- OAO Proxyand topic0 = 0x849aa5adc3bf6a75cb08afbf31d88d1528c274e5d84e3d4355d23d8e9ebd649b -- AICallbackRequest), transactions as (selecthash, block_time, block_number, "from", cast(value as double)/1e18 as eth_costfrom {{blockchain}}.transactions txnwhere block_time >= date '{{start_day}}' -- limit time range to speed queryand block_time < current_date -- avoid incomplete dateand success)select'{{blockchain}}' as blockchain, e.tx_hash, txn.block_time, txn."from" as caller, txn.eth_cost, e.requestId, e.modelId, e.callbackContract as calling_appfrom transactions txninner join request_ml_events eon txn.hash = e.tx_hashand txn.block_number = e.block_numberwhere txn."from" not in (-- contract creators0xf5aeB5A4B35be7Af7dBfDb765F99bCF479c917BD, 0x4Ca146039C567a8CbfDe83c23a515B587d9Be469)