### Etherscan V2 API Overview Source: https://context7_llms Provides an overview of the Etherscan V2 API, including information on supported chains and endpoints. It guides users on how to get started and access the full range of features. ```APIDOC Etherscan V2 API Documentation: Supported Chains: - Provides access to over 50 supported blockchain chains. - Link: /etherscan-v2/supported-chains Supported Endpoints: - Details all available API endpoints for various functionalities. - Link: /etherscan-v2/getting-started/supported-endpoints Getting Started: - Information on how to begin using the Etherscan V2 API. - Link: /etherscan-v2/getting-started Contact Support: - For inquiries or issues, reach out via email. - Email: apisupport@etherscan.io ``` -------------------------------- ### Blockchain API Key Configuration Source: https://context7_llms This snippet shows example API keys for various blockchain explorers, commonly used in environment configuration files (e.g., .env) for application access. It includes keys for Etherscan, BscScan, and Snowscan. ```env ETHERSCAN_API_KEY=VZFDUWB3YGQ1YCDKTCU1D6DDSS BSCSCAN_API_KEY=ZM8ACMJB67C2IXKKBF8URFUNSY SNOWSCAN_API_KEY=ATJQERBKV1CI3GVKNSE3Q7RGEJ ``` -------------------------------- ### Specifying Supported Chain IDs in JavaScript Source: https://context7_llms An example demonstrating how to define an array of chain IDs in JavaScript to indicate which blockchains are supported by the application. This is crucial for using a single API key across multiple chains. ```javascript const chains = [42161, 8453, 10, 534352, 81457] ``` -------------------------------- ### Detect and Alert on Cloudflare Rocket Loader Misconfiguration Source: https://context7_llms This JavaScript snippet executes when the DOM is fully loaded. It checks if Cloudflare's 'rocket-loader.min.js' script is present on the page. If found, it dynamically creates and prepends a styled error message to the document body, informing the user about a potential site configuration issue and providing a link to GitBook's documentation for resolution. This helps site owners identify and fix common Cloudflare setup problems. ```JavaScript document.addEventListener('DOMContentLoaded', function() { if (Array.from(document.scripts).find(script => script.src.includes('rocket-loader.min.js'))) { const alert = document.createElement('div'); alert.className = 'p-4 mb-4 text-sm text-red-800 rounded-lg bg-red-50 mt-8 mx-8'; alert.innerHTML = ` Error in site configuration: It looks like ${window.location.hostname} has been incorrectly configured in Cloudflare. This may lead to unexpected behavior or issues with the page loading. If you are the owner of this site, please refer to GitBook's documentation for steps to fix the problem. `; document.body.prepend(alert); } }); ``` -------------------------------- ### Fetch Etherscan Account Balance Source: https://context7_llms This JavaScript snippet shows how to retrieve an account's balance from the Etherscan API v2. It iterates through a predefined list of chains, constructing a GET request for each to the account balance endpoint. Ensure you replace 'YourApiKeyToken' with a valid Etherscan API key. ```javascript for (const chain of chains) { // endpoint accepts one chain at a time, loop for all your chains const balance = fetch(`https://api.etherscan.io/v2/api?\ chainid=${chain}\ &module=account\ &action=balance\ &address=0xb5d85cbf7cb3ee0d56b3bb207d5fc4b82f43f511\ &tag=latest&apikey=YourApiKeyToken`) } ``` -------------------------------- ### GitBook UI Initialization Script Source: https://context7_llms JavaScript code snippet for initializing GitBook's user interface, handling theme switching, search functionality, and AI-powered Q&A features. It configures assets, icons, and UI behaviors. ```javascript self.__next_f.push([1,"4:[\"$\",\"html\",null,{\"suppressHydrationWarning\":true,\"lang\":\"en\",\"className\":\"rounded-corners theme-clean no-tint sidebar-default sidebar-list-default links-default depth-subtle __variable_c353a6 __variable_c1795b __variable_5e38af\",\"children\":[[\"$\",\"head\",null,{\"children\":[null,null,null,null,[\"$\",\"style\",null,{\"nonce\":\"$undefined\",\"children\":\"$10\"}]]}],[\"$\",\"body\",null,{\"className\":\"[html.sidebar-filled.theme-bold.tint_\u0026]:bg-tint-subtle bg-tint-base theme-muted:bg-tint-subtle theme-gradient:bg-gradient-primary theme-gradient-tint:bg-gradient-tint\",\"children\":[\"$\",\"$L11\",null,{\"assetsURL\":\"https://ka-p.fontawesome.com/releases/v6.6.0/\",\"assetsURLToken\":\"a463935e93\",\"assetsByStyles\":{\"custom-icons\":{\"assetsURL\":\"https://static-2v.gitbook.com/~gitbook/static/icons\"}},\"iconStyle\":\"regular\",\"children\":[\"$\",\"$L12\",null,{\"language\":{\"locale\":\"en\",\"powered_by_gitbook\":\"Powered by GitBook\",\"sponsored_via_gitbook\":\"Sponsored via GitBook\",\"switch_to_dark_theme\":\"Switch to dark theme\",\"switch_to_light_theme\":\"Switch to light theme\",\"switch_to_system_theme\":\"Switch to system theme\",\"search\":\"Search\",\"search_or_ask\":\"Ask or search\",\"search_input_placeholder\":\"Search content\",\"search_ask_input_placeholder\":\"Search content or ask a question\",\"search_no_results_for\":\"No results for \\\"${1}\\\".\",\"search_no_results\":\"No results\",\"search_results_count\":\"$${1} results\",\"search_scope_space\":\"$${1}\",\"search_scope_all\":\"All content\",\"ask\":\"Ask\",\"search_ask\":\"Ask \\\"${1}\\\"\",\"search_ask_description\":\"Find the answer with AI\",\"search_ask_sources\":\"Sources\",\"search_ask_sources_no_answer\":\"Related pages\",\"search_ask_no_answer\":\"An answer could not be found for your question. You could try rephrasing it, or be more specific.\"}}]]}]}]})" ``` -------------------------------- ### Site Routing and Component Structure Source: https://context7_llms Defines the overall site structure, including routing for 'sites', 'static' assets, and specific URL hosts. It specifies the rendering template and error handling for different sections. ```javascript {"children":["sites",["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],"children":["static",["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],"children":[["mode","url-host","d"],["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],"children":[["siteURL","docs.etherscan.io%2Fetherscan-v2%2F","d"],["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined"}]]}]} ``` -------------------------------- ### Next.js Chunk Loading Initialization Source: https://context7_llms This snippet demonstrates the initialization of Next.js's internal module loading system. It shows data structures used for preloading JavaScript chunks and mapping them to specific components or routes. The data includes chunk identifiers, file paths, and dependencies. ```javascript self.__next_f.push([1,["5775","static/chunks/5775-d90fe1fac0834fb2.js","274","static/chunks/274-fd9fee492899a008.js","4574","static/chunks/4574-1b7dbd30e5b62921.js","907","static/chunks/907-474927aeb56a0d51.js","3572","static/chunks/3572-79efa01bcf1bc87b.js","3225","static/chunks/3225-bd36fc0949ef28e8.js","2508","static/chunks/app/sites/static/%5Bmode%5D/%5BsiteURL%5D/%5BsiteData%5D/layout-f1a1dc416141dc0d.js"],"SpaceLayoutContextProvider"]) self.__next_f.push([1,"""7808","static/chunks/app/sites/static/%5Bmode%5D/%5BsiteURL%5D/%5BsiteData%5D/%5BpagePath%5D/page-e1d56aa50981a59e.js"],"InsightsProvider"] self.__next_f.push([1,"13:["$","$L14",null,{"children":["$","$L15",null,{"nonce":"$undefined","forcedTheme":"light","externalLinksTarget":"self","children":[["$","$L16",null,{"basePath":"/etherscan-v2","children":["$","$L17",null,{"organizationId":"-MZqVDUwcuHnapNciwoA","]) self.__next_f.push([1,"s","3572","static/chunks/3572-79efa01bcf1bc87b.js","3225","static/chunks/3225-bd36fc0949ef28e8.js","2508","static/chunks/app/sites/static/%5Bmode%5D/%5BsiteURL%5D/%5BsiteData%5D/layout-f1a1dc416141dc0d.js"],"SpacesDropdownMenuItems"] self.__next_f.push([1,"1a:I[10092,["5775","static/chunks/5775-d90fe1fac0834fb2.js","274","static/chunks/274-fd9fee492899a008.js","4574","static/chunks/4574-1b7dbd30e5b62921.js","907","static/chunks/907-474927aeb56a0d51.js","3572","static/chunks/3572-79efa01bcf1bc87b.js","3225","static/chunks/3225-bd36fc0949ef28e8.js","2508","static/chunks/app/sites/static/%5Bmode%5D/%5BsiteURL%5D/%5BsiteData%5D/layout-f1a1dc416141dc0d.js"],"HeaderMobileMenu"] self.__next_f.push([1,"1c:"$Sreact.suspense"] self.__next_f.push([1,"1d:I[53735,["5775","static/chunks/5775-d90fe1fac0834fb2.js","274","static/chunks/274-fd9fee492899a008.js","4574","static/chunks/4574-1b7dbd30e5b62921.js","907","static/chunks/907-474927aeb56a0d51.js","3572","static/chunks/3572-79efa01bcf1bc87b.js","3225","static/chunks/3225-bd36fc0949ef28e8.js","2508","static/chunks/app/sites/static/%5Bmode%5D/%5BsiteURL%5D/%5BsiteData%5D/layout-f1a1dc416141dc0d.js"],"SearchContainer"] self.__next_f.push([1,"1f:I[4093,["5775","static/chunks/5775-d90fe1fac0834fb2.js","274","static/chunks/274-fd9fee492899a008.js","4574","static/chunks/4574-1b7dbd30e5b62921.js","907","static/chunks/907-474927aeb56a0d51.js","3572","static/chunks/3572-79efa01bcf1bc87b.js","3225","static/chunks/3225-bd36fc0949ef28e8.js","2508","static/chunks/app/sites/static/%5Bmode%5D/%5BsiteURL%5D/%5BsiteData%5D/layout-f1a1dc416141dc0d.js"],"DropdownMenu"] self.__next_f.push([1,"20:I[4093,["5775","static/chunks/5775-d90fe1fac0834fb2.js","274","static/chunks/274-fd9fee492899a008.js","4574","static/chunks/4574-1b7dbd30e5b62921.js","907","static/chunks/907-474927aeb56a0d51.js","3572","static/chunks/3572-79efa01bcf1bc87b.js","3225","static/chunks/3225-bd36fc0949ef28e8.js","2508","static/chunks/app/sites/static/%5Bmode%5D/%5BsiteURL%5D/%5BsiteData%5D/layout-f1a1dc416141dc0d.js"],"DropdownChevron"] self.__next_f.push([1,"21:I[48990,["5775","static/chunks/5775-d90fe1fac0834fb2.js","274","static/chunks/274-fd9fee492899a008.js","4574","static/chunks/4574-1b7dbd30e5b62921.js","907","static/chunks/907-474927aeb56a0d51.j"]) self.__next_f.push([1,"s","3572","static/chunks/3572-79efa01bcf1bc87b.js","3225","static/chunks/3225-bd36fc0949ef28e8.js","2508","static/chunks/app/sites/static/%5Bmode%5D/%5BsiteURL%5D/%5BsiteData%5D/layout-f1a1dc416141dc0d.js"],"SpacesDropdownMenuItems"] self.__next_f.push([1,"23:I[22399,["5775","static/chunks/5775-d90fe1fac0834fb2.js","274","static/chunks/274-fd9fee492899a008.js","4574","static/chunks/4574-1b7dbd30e5b62921.js","907","static/chunks/907-474927aeb56a0d51.js","3572","static/chunks/3572-79efa01bcf1bc87b.js","3225","static/chunks/3225-bd36fc0949ef28e8.js","2508","static/chunks/app/sites/static/%5Bmode%5D/%5BsiteURL%5D/%5BsiteData%5D/layout-f1a1dc416141dc0d.js"],"LoadIntegrations"] self.__next_f.push([1,"24:I[50636,["5775","static/chunks/5775-d90fe1fac0834fb2.js","274","static/chunks/274-fd9fee492899a008.js","4574","static/chunks/4574-1b7dbd30e5b62921.js","907","static/chunks/907-474927aeb56a0d51.js","3572","static/chunks/3572-79efa01bcf1bc87b.js","3225","static/chunks/3225-bd36fc0949ef28e8.js","2508","static/chunks/app/sites/static/%5Bmode%5D/%5BsiteURL%5D/%5BsiteData%5D/layout-f1a1dc416141dc0d.js"],"CookiesToast"] ``` -------------------------------- ### Environment Variables for Blockchain APIs Source: https://context7_llms Configuration variables for accessing various blockchain explorers like Etherscan, BscScan, Snowtrace, and Arbiscan. These typically include API keys and base URLs for making requests. ```env ARBISCAN_API_KEY=B6SVGA7K3YBJEQ69AFKJF4YHVX OPTIMISM_API_KEY=66N5FRNV1ZD4I87S7MAHCJVXFJ ETHERSCAN_API_URL=https://api.etherscan.io/api BSCSCAN_API_KEY=https://api.bscscan.com/api SNOWSCAN_API_KEY=https://api.snowscan.xyz/api ARBISCAN_API_KEY=https://api.arbiscan.io/api OPTIMISM_API_KEY=https://api-optimistic.etherscan.io/api ``` -------------------------------- ### Blockchain API Keys and URLs Source: https://context7_llms Environment variables for storing API keys and base URLs for interacting with blockchain explorer APIs. These are commonly used in backend services or scripts to authenticate and make requests to services like Etherscan, Bscscan, Snowscan, Arbitrum, and Optimism. ```env ETHERSCAN_API_KEY=VZFDUWB3YGQ1YCDKTCU1D6DDSS BSCSCAN_API_KEY=ZM8ACMJB67C2IXKKBF8URFUNSY SNOWSCAN_API_KEY=ATJQERBKV1CI3GVKNSE3Q7RGEJ ARBISCAN_API_KEY=B6SVGA7K3YBJEQ69AFKJF4YHVX OPTIMISM_API_KEY=66N5FRNV1ZD4I87S7MAHCJVXFJ ETHERSCAN_API_URL=https://api.etherscan.io/api BSCSCAN_API_KEY=https://api.bscscan.com/api SNOWSCAN_API_KEY=https://api.snowscan.xyz/api ``` -------------------------------- ### 404 Not Found Page Configuration Source: https://context7_llms Defines the structure and content for the 404 Not Found error page. It includes styling and text elements to inform the user that the requested page could not be found. ```javascript ["$","title",null,{"children":"404: This page could not be found."}], ["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]] ``` -------------------------------- ### Etherscan API PRO Link Source: https://context7_llms Provides a direct link to the Etherscan API PRO documentation page. This section typically contains details on available APIs for blockchain data access. ```APIDOC Etherscan API PRO Documentation: URL: https://etherscan.io/apis Description: Access the official API documentation for Etherscan.io, which provides endpoints for querying blockchain data, transaction history, contract information, and more. This is the primary resource for developers integrating with the Ethereum blockchain via Etherscan. ``` -------------------------------- ### Etherscan V2 API Keys and Endpoints Source: https://context7_llms Configuration details for accessing Etherscan V2 APIs, including environment variables for different blockchain networks. These keys are essential for making requests to the respective APIs. ```env AN_API_KEY=https://api.arbiscan.io/api OPTIMISM_API_KEY=https://api-optimistic.etherscan.io/api ``` -------------------------------- ### GitBook CSS Linkage Source: https://context7_llms References to CSS files hosted on GitBook's static CDN. These links ensure that the styling for the documentation site is correctly applied, providing a consistent user interface across different pages and devices. ```html ``` -------------------------------- ### Fetch Etherscan Balance for Multiple Chains Source: https://context7_llms This snippet demonstrates how to fetch account balances from the Etherscan API for a list of specified blockchain chains. It iterates through an array of chain IDs, constructs the API endpoint URL for each chain, and makes a fetch request. Note that the API endpoint is a placeholder and requires a valid API key and address. ```javascript const chains = [42161, 8453, 10, 534352, 81457] for (const chain of chains) { // endpoint accepts one chain at a time, loop for all your chains const balance = fetch(`https://api.etherscan.io/v2/api?chainid=${chain} &module=account &action=balance &address=0xb5d85cbf7cb3ee0d56b3bb207d5fc4b82f43f511 &tag=latest&apikey=YourApiKeyToken`) } ``` -------------------------------- ### Next.js Client-Side Scripting and Chunk Loading Source: https://context7_llms These JavaScript snippets are part of the Next.js framework's client-side rendering and hydration process. They manage the loading of application chunks (JavaScript files) and push components or data to the client's rendering pipeline, ensuring dynamic content is displayed correctly. ```javascript self.__next_f.push([1,"f:I[32292,[\"5775\",\"static/chunks/5775-d90fe1fac0834fb2.js\",\"7582\",\"static/chunks/7582-ed84f88cf37ca35d.js\",\"274\",\"static/chunks/274-fd9fee492899a008.js\",\"907\",\"static/chunks/907-474927aeb56a0d51.js\",\"4856\",\"static/chunks/4856-5992d81fe4ccb68d.js\",\"3572\",\"static/chunks/3572-79efa01bcf1bc87b.js\",\"3470\",\"static/chunks/3470-a519fc1af4c94681.js\",\"7808\",\"static/chunks/app/sites/static/%5Bmode%5D/%5BsiteURL%5D/%5BsiteData%5D/%5BpagePath%5D/page-e1d56aa50981a59e.js\"],\"SitePageNotFound"]) 5:[\"$\",\"$Lf\",null,{}] ``` ```javascript self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1\"}],[\"$\",\"meta\",\"2\",{\"name\":\"color-scheme\",\"content\":\"light\"}]] 8:null 9:null ``` -------------------------------- ### Etherscan.io Main Site Link Source: https://context7_llms A link to the main Etherscan.io website, the primary block explorer for the Ethereum blockchain. ```APIDOC Etherscan.io Main Site: URL: https://etherscan.io/ Description: The official block explorer for the Ethereum blockchain. Users can view transaction details, block information, wallet balances, smart contract code, and more. ``` -------------------------------- ### Etherscan Documentation Page Metadata Source: https://context7_llms Contains essential meta tags for character set, viewport, color scheme, SEO (title, description, image, keywords), mobile web app settings, and favicons for different color schemes. These tags define how the page is presented and indexed by browsers and search engines. ```html