diff --git a/web-app/decoding/decoding-contracts.mdx b/web-app/decoding/decoding-contracts.mdx index 4de0f79c..94ca1330 100644 --- a/web-app/decoding/decoding-contracts.mdx +++ b/web-app/decoding/decoding-contracts.mdx @@ -5,7 +5,7 @@ description: Instead of working with the logs and traces in their raw states, on **Dune's extensive catalog of decoded smart contracts are driven by our Wizards. Our decoding process empowers our community to submit the data and build the tables that they'd like to query on Dune!** -But what does decoding mean? Blockchain transaction data starts as bytecode, a low level programming language that can be read by machines. Using the ABI (Application Binary Interface) that is specific to each contract, we translate that bytecode into query-able data tables. +But what does decoding mean? Blockchain transaction data starts as bytecode, a low-level programming language that can be read by machines. Using the ABI (Application Binary Interface) that is specific to each contract, we translate that bytecode into query-able data tables. Unfortunately, Dune only has access to contract data in circumstances that the contract performed an event that left a trace. Our recommendation is to check out the {blockchain}.traces table to see what information is available for a particular contract. - Alternatively, some contracts are upgradeable (ie., the smart contract code can be modified). In this case we may not have all of the ABIs. ABIs can be checked in the ABI column of the {blockchain}.contracts tables. A contract can always be resubmitted with missing ABIs so we can update our data. + Alternatively, some contracts are upgradeable (i.e., the smart contract code can be modified). In this case we may not have all of the ABIs. ABIs can be checked in the ABI column of the {blockchain}.contracts tables. A contract can always be resubmitted with missing ABIs so we can update our data. - If the contract being manually submitted is a Proxy contract, we recommend you to move on to the next section. + If the contract being manually submitted is a Proxy contract, we recommend you move on to the next section. Although we try to fetch contract information such as the ABI, sometimes this information might not be available through our sources. @@ -65,9 +65,9 @@ In order to properly decode transactions for contracts that fit the [Proxy patte Similar to vanilla Proxy contracts, [EIP-2535](https://eips.ethereum.org/EIPS/eip-2535) contracts can be supported by passing in the address of the Diamond Proxy as well as **a single ABI representing the totality of all the facets interfaces**. - The most common reason that your submission got rejected is because it has already been decoded! You can make use of [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2) to check whether the contract have been decoded. + The most common reason that your submission got rejected is because it has already been decoded! You can make use of [this dashboard](https://dune.com/dune/is-my-contract-decoded-yet-v2) to check whether the contract has been decoded. - **Enter the contract that you wish to decode and hit enter to run:** + **Enter the contract that you wish to decode and hit Enter to run:** ![check if contract is decoded](/web-app/images/decoding-contracts/check_decoding_input_address.png) @@ -77,14 +77,14 @@ In order to properly decode transactions for contracts that fit the [Proxy patte If you see results after running the query, that means the contract is already decoded! You'll be able to find the decoded tables under 'Decoded Projects' in the data explorer. - In the interest of data quality, we reject duplicative, incorrect or low quality submissions. To avoid rejection, be sure to submit accurate contract information! Submissions can be rejected for a number of reasons, including not following the naming conventions, not providing clear data at submission, etc. The particular reason for a contract submission being rejected can be found in account settings under "Contracts" by hovering the mouse over the "Rejected" status. + In the interest of data quality, we reject duplicative, incorrect, or low-quality submissions. To avoid rejection, be sure to submit accurate contract information! Submissions can be rejected for a number of reasons, including not following the naming conventions, not providing clear data at submission, etc. The particular reason for a contract submission being rejected can be found in account settings under "Contracts" by hovering the mouse over the "Rejected" status. It may take up to six hours from the time of contract approval for the contract to be fully decoded along with its historical data. If you still can't see the data after this period, please reach out to us through our [#decoding Discord channel](https://discord.com/channels/757637422384283659/850326962152538122). - Need some data urgently but the contract have yet to be fully decoded? You can refer to these queries that utilizes the logs table to get the events: + Need some data urgently but the contract has yet to be fully decoded? You can refer to these queries that utilize the logs table to get the events: - [Querying Synthetix's PerpsTracking Event](https://dune.com/queries/2743182) - [Querying USDT's AddedBlackList Event](https://dune.com/queries/3250843) diff --git a/web-app/decoding/multichain-decoding.mdx b/web-app/decoding/multichain-decoding.mdx index 74bfef43..7824c6ab 100644 --- a/web-app/decoding/multichain-decoding.mdx +++ b/web-app/decoding/multichain-decoding.mdx @@ -23,7 +23,7 @@ Here are a few examples showing how you can use multichain decoded table views t FROM ( SELECT --this event is emitted on sale set updates too so we take distinct - distinct + DISTINCT l.blockchain , l.collection as nft_address , l.erc20zAddress as erc20_address @@ -53,7 +53,7 @@ Here are a few examples showing how you can use multichain decoded table views t FROM ( SELECT --this event is emitted on sale set updates too so we take distinct - distinct + DISTINCT l.blockchain , l.collection as nft_address , l.erc20zAddress as erc20_address @@ -103,15 +103,15 @@ Here are a few examples showing how you can use multichain decoded table views t ```sql - select chain, date_trunc('day', call_block_time) AS block_date, count(*) as cnt - from gnosis_safe_multichain.Safe_v1_4_1_call_execTransaction - group by 1, 2 + SELECT chain, date_trunc('day', call_block_time) AS block_date, count(*) as cnt + FROM gnosis_safe_multichain.Safe_v1_4_1_call_execTransaction + GROUP BY 1, 2 ``` ```sql - select chain, date_trunc('day', call_block_time) AS block_date, count(*) as cnt - from ( + SELECT chain, date_trunc('day', call_block_time) AS block_date, count(*) as cnt + FROM ( SELECT 'arbitrum' AS chain, call_block_time FROM gnosis_safe_arbitrum.Safe_v1_4_1_call_execTransaction @@ -165,7 +165,7 @@ Here are a few examples showing how you can use multichain decoded table views t SELECT 'polygon' AS chain, call_block_time FROM gnosis_safe_polygon.Safe_v1_4_1_call_execTransaction ) - group by 1,2 + GROUP BY 1, 2 ``` diff --git a/web-app/decoding/short-guide-contract-submission.mdx b/web-app/decoding/short-guide-contract-submission.mdx index e59fa2ff..fb77b9d6 100644 --- a/web-app/decoding/short-guide-contract-submission.mdx +++ b/web-app/decoding/short-guide-contract-submission.mdx @@ -21,7 +21,7 @@ Batch submission bypasses UI safeguards, so make sure all flags are accurate, th Follow [this Google Sheet template](https://docs.google.com/spreadsheets/d/1yxJqlmSE2yYgXgSIXcPRr5xxP9ck9JZB8_sGOITtYEM/edit?gid=0#gid=0) for exact format, and refer to [Dune’s documentation](./decoding-contracts) for guidance on fields like: -- **`has_multiple_instances`** is flag for for [dynamic contracts](./decoding-contracts#are-there-several-instances-of-this-contract-dynamic-contract) +- **`has_multiple_instances`** is flag for [dynamic contracts](./decoding-contracts#are-there-several-instances-of-this-contract-dynamic-contract) - **`is_created_by_factory`** is flag for [factory contracts](./decoding-contracts#is-it-created-by-a-factory-contract-factory-contract) ## Submission Strategy @@ -39,7 +39,7 @@ If using a proxy pattern, submit the **implementation contract's ABI**. These contracts typically don’t need submission, as Dune already covers standard approvals and transfers. Submit only if custom events are needed. ### DEX Contracts -Look for below sets of contracts: +Look for the following sets of contracts: - **Factory Contract**: should emit pool creation events. - **Pair/Pool Contract**: should emit swap events. @@ -75,15 +75,15 @@ For an overview of how decoding works and submission instructions, watch this vi ### Batch Submit via CSV through Backend -In the event that you are collecting dozens protocol contracts, and would like to batch submit contracts via a CSV. Please work with use (via the Slack or TG channel we have) with a correctly formatted CSV and batch submit contracts for decodoing. +In the event that you are collecting dozens of protocol contracts, and would like to batch submit contracts via a CSV, please work with us (via the Slack or TG channel we have) with a correctly formatted CSV and batch submit contracts for decoding. -This is the less recommended route to go because for this to work, one needs to be super sure about the advanced flags are correctly marked and the ABI is correct and formatted well and the naming of the protocol and contract conforms with our standard. Submitting with UI has the benefit of the UI having many safe guard and checks and hint, and doing a manaul backedn batch submission means you will lose that guidance and sometimes result in longer debugging /turn around time. So use this option at you caution. +This is the less recommended route to go because for this to work, one needs to be super sure that the advanced flags are correctly marked and the ABI is correct and formatted well and the naming of the protocol and contract conforms with our standard. Submitting with UI has the benefit of the UI having many safeguards and checks and hints, and doing a manual backend batch submission means you will lose that guidance and sometimes result in longer debugging/turnaround time. So use this option at your caution. For multiple contracts, submit in bulk using [this Google Sheet template](https://docs.google.com/spreadsheets/d/1yxJqlmSE2yYgXgSIXcPRr5xxP9ck9JZB8_sGOITtYEM/edit?gid=0#gid=0). Be sure to: - Follow the format precisely. - Provide the ABI directly -- Refer to [Dune’s documentation](https://docs.dune.com/web-app/decoding/decoding-contracts) if you’re unsure about fields like `has_multiple_instances` or `is_created_by_factory`. `has_multiple_instances` coresponds to dynamic contract and `is_created_by_factory` corresponds to factory contract in Dune's decoding pipeline. +- Refer to [Dune's documentation](https://docs.dune.com/web-app/decoding/decoding-contracts) if you're unsure about fields like `has_multiple_instances` or `is_created_by_factory`. `has_multiple_instances` corresponds to dynamic contract and `is_created_by_factory` corresponds to factory contract in Dune's decoding pipeline. ## Submission Strategy @@ -100,11 +100,11 @@ For multiple contracts, submit in bulk using [this Google Sheet template](https: Generally, these don’t need submission unless you want custom events beyond approvals and transfers, which are already covered. ### DEX Contracts -Look for below sets of contracts: +Look for the following sets of contracts: - **Factory Contract** which should emit pool creation events, also useful for dex.trades spellbook creation -- **Pair/Pool Contract** which shoud emit swap events, also useful for dex.trades spellbook creation +- **Pair/Pool Contract** which should emit swap events, also useful for dex.trades spellbook creation -And ofc if you want to also decode other contracts for routers or position manager, please also submit those contracts. +And of course if you want to also decode other contracts for routers or position manager, please also submit those contracts. ### NFT Marketplace Contracts Look for the main marketplace contract with events like: @@ -133,7 +133,7 @@ If you are a chain, engage with the top protocols on your chain to submit their If you are a protocol, talk to your devs or data analyst to see which protocol contracts contain the main logic so you can track relevant events and functions calls. If you want to do a batch submission, follow the format of this google sheet exactly https://docs.google.com/spreadsheets/d/1yxJqlmSE2yYgXgSIXcPRr5xxP9ck9JZB8_sGOITtYEM/edit?gid=0#gid=0 -Please note you must give the ABI properly and not just proide a ULR link. +Please note you must give the ABI properly and not just provide a URL link. Also, for questions on what "has_multiple_instances" and "is_created_by_factory" means, please visit this page (link). has_multiple_instances correspond to https://docs.dune.com/web-app/decoding/decoding-contracts#are-there-several-instances-of-this-contract-dynamic-contract and is_created_by_factory corresponds to https://docs.dune.com/web-app/decoding/decoding-contracts#is-it-created-by-a-factory-contract-factory-contract. Please also note if your contract is a proxy contract, you MUST submit the implementation contract's ABI. Please also note that our current automatic pipeline is not able to handle dynamic proxy pattern or other more exotic contract patterns. diff --git a/web-app/dune-ai.mdx b/web-app/dune-ai.mdx index 6ea215dd..1f2f8209 100644 --- a/web-app/dune-ai.mdx +++ b/web-app/dune-ai.mdx @@ -7,9 +7,9 @@ description: Wand is a beta suite of tools for writing SQL queries with the help ### Wand Create -The Wand Create feature allows you to automatically generate SQL queries from natural language questions. It utilizes a suite of Dune-specific few-shot examples and automatically fetches table schemas to include in the prompt. (You must to explicitly include the relevant tables in your natural language question to include table schemas.) +The Wand Create feature allows you to automatically generate SQL queries from natural language questions. It utilizes a suite of Dune-specific few-shot examples and automatically fetches table schemas to include in the prompt. (You must explicitly include the relevant tables in your natural language question to include table schemas.) -This feature simplifies the process of writing getting started writing a SQL query, especially for users who may not be familiar with the database structure. Your mileage may vary depending on the complexity of your question and how well the underlying tables are suited to answering it. We recommend using this feature as a starting point and then refining the query using the Wand Edit feature. +This feature simplifies the process of getting started writing a SQL query, especially for users who may not be familiar with the database structure. Your mileage may vary depending on the complexity of your question and how well the underlying tables are suited to answering it. We recommend using this feature as a starting point and then refining the query using the Wand Edit feature. You can find this feature in the query page below the query editor. @@ -215,7 +215,7 @@ LEFT JOIN daily_mints dm ON et.dt = dm.dt ``` ## Wand Debug -The Wand Debug feature helps fix SQL queries that have syntax errors. When an executed query encounters a syntax error, the Fix Query button should appear in the results/visualization panel. Clicking this button collect your query and the error message and send it to the Wand Debug feature. The Wand Debug feature will then attempt to fix the query and return the fixed query to you. If the Wand Debug feature is unable to fix the query, it will return the updated query with message indicating it is not fully debugged. The query submitted for debugging will be saved in your query history, so you can also recover it. +The Wand Debug feature helps fix SQL queries that have syntax errors. When an executed query encounters a syntax error, the Fix Query button should appear in the results/visualization panel. Clicking this button collects your query and the error message and sends it to the Wand Debug feature. The Wand Debug feature will then attempt to fix the query and return the fixed query to you. If the Wand Debug feature is unable to fix the query, it will return the updated query with a message indicating it is not fully debugged. The query submitted for debugging will be saved in your query history, so you can also recover it. You can find this feature in the results/visualization panel if you've executed a query that failed on a syntax error. diff --git a/web-app/embeds.mdx b/web-app/embeds.mdx index f9bc814b..3b146b15 100644 --- a/web-app/embeds.mdx +++ b/web-app/embeds.mdx @@ -9,7 +9,7 @@ To save you from having to take screenshots that might not look so great but wil You can generate embed links by clicking on any query title and selecting the embed function in the top right corner. -The embed button works as a standalone link and as a way to embed your live graphs into websites/web-app/s. If a Query has no Visualizations, the link will be to the Query Results table. If you have multiple Visualizations, the link will be for whichever Visualization you've selected when you clicked the Embed button. +The embed button works as a standalone link and as a way to embed your live graphs into websites/web apps. If a Query has no Visualizations, the link will be to the Query Results table. If you have multiple Visualizations, the link will be for whichever Visualization you've selected when you clicked the Embed button. ![generating an embed link](/web-app/images/embed-link.gif) @@ -39,7 +39,7 @@ You can use Dune's embed links to add live Visualizations to any web page using Here is a code snippet example: ```html -` + ``` A great showcase for this is the [cryptoart.io](https://cryptoart.io/data) website. @@ -49,7 +49,7 @@ Dune Visualizations can easily be embedded into articles on mirror.xyz. Simply g ```html -https://dune.com/embeds/208941/391702/34ee3319-1cac-40e1-a08d-160bd93693cc?display=iframe` +https://dune.com/embeds/208941/391702/34ee3319-1cac-40e1-a08d-160bd93693cc?display=iframe ``` ### Known Issues @@ -67,7 +67,7 @@ The embed link you generate won't include the necessary parameters yet, even if We are working on automating this, but for now you'll need to manually prefix the parameter link with the parameters: -`link?[name_of_parameter_1]=[xxxx]&?[name_of_parameter_2]=[yyyy]&[...]` +`link?[name_of_parameter_1]=[xxxx]&[name_of_parameter_2]=[yyyy]&[...]` Here is a working example: ``` diff --git a/web-app/overview.mdx b/web-app/overview.mdx index b78ead3a..9e8a45d7 100644 --- a/web-app/overview.mdx +++ b/web-app/overview.mdx @@ -32,7 +32,7 @@ Explore the multitude of features within the Dune Web App that streamline your j Spread your findings and dashboards with the community or stakeholders seamlessly. - + Quickly locate the data you need with our powerful search capabilities. diff --git a/web-app/query-editor/data-explorer.mdx b/web-app/query-editor/data-explorer.mdx index 2697051e..dc7b7726 100644 --- a/web-app/query-editor/data-explorer.mdx +++ b/web-app/query-editor/data-explorer.mdx @@ -49,7 +49,7 @@ Here is a simple example of how to use the Data Explorer to find the data you ne You can also search for specific tables in the Data Explorer. 1. Choose the "decoded projects" category. -2. Type the projects name in the search bar. +2. Type the project's name in the search bar. 3. Choose the project you want to explore. 4. Type the smart contract name in the search bar. 5. Choose the smart contract you want to explore. diff --git a/web-app/query-editor/index.mdx b/web-app/query-editor/index.mdx index 54430876..fb5bc5ee 100644 --- a/web-app/query-editor/index.mdx +++ b/web-app/query-editor/index.mdx @@ -11,7 +11,7 @@ description: Learn more about how Dune's Query Editor works here! iconType="duotone" href="/web-app/query-editor/query-window" > - The Query Editor is where you work your Dune by inputting SQL code and + The Query Editor is where you work on Dune by inputting SQL code and running it.