[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis page provides example queries for analyzing blockchain data on Arbitrum using BigQuery.\u003c/p\u003e\n"],["\u003cp\u003ePre-General Availability (Pre-GA) features are subject to specific terms and may have limited support, as outlined in the linked service terms and launch stage descriptions.\u003c/p\u003e\n"],["\u003cp\u003eOne query example details the number of successful retryable messages created between Ethereum and Arbitrum in the last 30 days.\u003c/p\u003e\n"],["\u003cp\u003eAnother query example demonstrates how to track Ethereum withdrawals from Arbitrum, including the remaining dispute period before the transaction is finalized.\u003c/p\u003e\n"],["\u003cp\u003eBoth queries are ready to use in the BigQuery console, with direct links provided for easy access.\u003c/p\u003e\n"]]],[],null,["# Arbitrum example queries\n\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThis page provides Blockchain Analytics query examples for Arbitrum.\n\nSee the [BigQuery documentation](/bigquery/docs/introduction) for\ninstructions on using BigQuery.\n\nNumber of L1 to L2 tickets created in last 30 days\n--------------------------------------------------\n\nThis query shows the number of [retryable messages](https://docs.arbitrum.io/arbos/l1-to-l2-messaging) successfully created between Ethereum and Arbitrum in the last 30 days.\n\nIn the Google Cloud console, go to the **BigQuery** page.\n\n[Go to BigQuery](https://console.cloud.google.com/bigquery?sq=650023896125:ce5c0aec918b46ab9f588659b7c6cae8) \n\n SELECT\n DISTINCT COUNT(topics[OFFSET(1)]) AS num_l1_to_l2_tickets_created\n FROM\n bigquery-public-data.goog_blockchain_arbitrum_one_us.logs\n WHERE\n ARRAY_LENGTH(topics) \u003e 0\n AND\n -- \"TicketCreated\" event emitted via Arbitrum's canonical method for creating L1 to L2 messages.\n topics[OFFSET(0)] = LOWER(\"0x7c793cced5743dc5f531bbe2bfb5a9fa3f40adef29231e6ab165c08a29e3dd89\")\n AND block_timestamp \u003e (CURRENT_TIMESTAMP() - INTERVAL 30 DAY)\n ;\n\nThe following shows an example result:\n\nShow withdrawals to L1 (Ethereum), with remaining dispute period\n----------------------------------------------------------------\n\nThis query shows withdrawals of Eth from Arbitrum to Ethereum using the [official Arbitrum bridge](https://docs.arbitrum.io/for-users/troubleshooting-users#how-long-does-it-take-before-i-receive-my-funds-when-i-initiate-withdrawal-from-arbitrum-chains-one-and-nova), and the remaining estimated dispute period.\n\nIn the Google Cloud console, go to the **BigQuery** page.\n\n[Go to BigQuery](https://console.cloud.google.com/bigquery?sq=650023896125:8143dfca31144a87b80db06ed03b8584) \n\n -- UDF for easier string manipulation.\n CREATE TEMP FUNCTION ParseSubStr(hexStr STRING, startIndex INT64, endIndex INT64)\n RETURNS STRING\n LANGUAGE js\n AS r\"\"\"\n if (hexStr.length \u003c 1) {\n return hexStr;\n }\n return hexStr.substring(startIndex, endIndex);\n \"\"\";\n\n SELECT\n b.block_timestamp as block_timestamp,\n CONCAT(\"https://arbiscan.io/tx/\", transaction_hash) AS arbiscan_txn,\n (t.value.bignumeric_value / 1000000000000000000) AS eth_withdrawn,\n CONCAT(\"0x\", ParseSubStr(t.input, 34, LENGTH(t.input))) AS l1_destination_address,\n CASE WHEN DATETIME_DIFF(CURRENT_TIMESTAMP(), b.block_timestamp, DAY) \u003e= 7 THEN 'True' ELSE 'False' END AS wait_period_over,\n CASE WHEN 7 - DATETIME_DIFF(CURRENT_TIMESTAMP(), b.block_timestamp, DAY) \u003e 0 THEN 7 - DATETIME_DIFF(CURRENT_TIMESTAMP(), b.block_timestamp, DAY) ELSE 0 END AS wait_period_days_left,\n FROM\n bigquery-public-data.goog_blockchain_arbitrum_one_us.transactions AS t\n INNER JOIN\n bigquery-public-data.goog_blockchain_arbitrum_one_us.blocks AS b\n ON\n b.block_hash = t.block_hash\n WHERE\n t.to_address = LOWER(\"0x0000000000000000000000000000000000000064\") -- ArbSys contract.\n AND\n t.input LIKE \"%0x25e16063%\" -- withdrawEth\n ORDER BY\n b.block_timestamp\n DESC;"]]