Skip to content

Commit 7ba9d56

Browse files
authored
Merge branch 'master' into decoding-fix
2 parents 4401b7b + 2d1655e commit 7ba9d56

File tree

24 files changed

+540
-159
lines changed

24 files changed

+540
-159
lines changed

docs/api/FAQ/functionality.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The API does support Query Parameters!
2828

2929
For Dune Queries that include Parameters, you can pass parameter data as part of the [Execute Query ID endpoint](../../api/api-reference/execute-queries/execute-query-id.md)!
3030

31-
Learn more about [building Dune Queries with Parameters here](../../app/query-editor/query-window.md#parameters).
31+
Learn more about [building Dune Queries with Parameters here](../../app/query-editor/parameters.md).
3232

3333
And learn how to pass parameter data using [cURL here](../../api/api-reference/execute-queries/execute-query-id.md#curl-with-parameters) and with [Python here](../../api/quick-start/api-py.md#parameterized-queries).
3434

docs/api/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The API does support Query Parameters!
2525

2626
For Dune Queries that include Parameters, you can pass parameter data as part of the [Execute Query ID endpoint](api-reference/execute-queries/execute-query-id.md)!
2727

28-
Learn more about [building Dune Queries with Parameters here](../app/query-editor/query-window.md#parameters).
28+
Learn more about [building Dune Queries with Parameters here](../app/query-editor/parameters.md).
2929

3030
And learn how to pass parameter data using [cURL here](api-reference/execute-queries/execute-query-id.md#curl-with-parameters) and with [Python here](quick-start/api-py.md#parameterized-queries).
3131

docs/app/decoding-contracts.md

Lines changed: 85 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,88 @@ Unfortunately, Dune only has access to contract data in circumstances that the c
100100
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.
101101
</details>
102102

103-
<details>
104-
<summary> **My submission got rejected, why?** </summary>
105-
<br>
106-
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.
107-
</details>
103+
#### How do I submit contract information manually?
104+
105+
!!! note
106+
If the contract being manually submitted is a Proxy contract, we recommend you to move on to the next section.
107+
108+
Although we try to fetch contract information such as the ABI, sometimes this information might not be available through our sources.
109+
110+
In those instances, you will need to manually input the contract's name and its ABI.
111+
112+
If the contract has been verified by the chain's block explorer, you should be able to find this information there.
113+
114+
#### How do I submit a Proxy contract?
115+
116+
In order to properly decode transactions towards contracts that fit the [Proxy pattern](https://blog.openzeppelin.com/proxy-patterns/), Dune needs to map the Proxy contract's address with the implementation contract's ABI.
117+
118+
We avoid monitoring the implementation contract's address because its logic is accessed in transactions via the [`DelegateCall` function](https://medium.com/coinmonks/delegatecall-calling-another-contract-function-in-solidity-b579f804178c).
119+
120+
If we did monitor the implementation contract's address directly, we would miss out on any event logs in its logic since these are actually fired by the caller (the Proxy in this case) when calling a function through `DelegateCall`.
121+
122+
!!! warning
123+
When submitting Proxy-patterned contracts to Dune, you should input the Proxy contract's address and, if you have it, the Implementation contract's ABI. If the Proxy has a new implementation upgraded that you wish to decode, use the same project name + contract name and select <b>'NO'</b> for several instances!
124+
125+
![new proxy implementation submission](images/decoding-contracts/proxy_new_implementation.png)
126+
127+
When you submit the Proxy contract's address, we'll attempt to fetch the proxy's contract name and the implementation address it's pointing towards to source the Implementation contract's ABI.
128+
129+
If we can't find the Implementation contract's ABI, you'll need to find it using the relevant chain's blockchain explorer and input it manually.
130+
131+
132+
#### How do I re-submit a contract?
133+
134+
Dune assumes each address in the blockchain can map to at most 1 contract. For this reason, submitting a contract with an address that already exists in `[blockchain].contracts` will override it for Decoding purposes.
135+
136+
This has a couple potential dangerous side effects:
137+
138+
- If the project or contract name has changed, we will generate new tables for all of the contract's methods and events. In turn, previous tables will stop updating, data will be fragmented, and Queries will stop working.
139+
- If the ABI has changed in a way that modifies an existing table's parameters, Queries that depend on such table might break or become inaccurate.
140+
141+
If you attempt to submit a contract that already exists, we'll first present a warning note and ask you to confirm you want to proceed:
142+
143+
![new contract resubmission warning](images/decoding-contracts/new-contract-resubmission-warning.png)
144+
145+
Then, at the bottom of the Details page, we'll ask you to explain why you're resubmitting the contract so we can assess whether it's worth overriding the contract's data:
146+
147+
![new contract resubmission reason](images/decoding-contracts/new-contract-resubmission-reason.png)
148+
149+
If we believe the risk of accepting a re-submission is higher than the added value, we'll reject your resubmission.
150+
151+
If you think we're wrong (we're only human!), feel free to reach out in our [#decoding Discord channel](https://discord.com/channels/757637422384283659/850326962152538122) and we'll discuss it further with you!
152+
153+
#### How do I submit Diamond Proxy contracts?
154+
155+
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**.
156+
157+
#### My submission got rejected, why?
158+
159+
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.
160+
161+
Enter the contract that you wish to decode and hit enter to run
162+
163+
![check if contract is decoded](images/decoding-contracts/check_decoding_input_address.png)
164+
165+
Viewing results
166+
167+
![query results to determine whether contract is decoded](images/decoding-contracts/check_decoding_result_output.png)
168+
169+
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.
170+
171+
172+
In the interest of data quality, we reject duplicative, incorrect or low quality submissions. To avoid rejection, be sure to submit accurate contract information! 🙏
173+
174+
#### Why am I missing historical data for my contract?
175+
176+
It may take <b>up to six hours</b> 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).
177+
178+
#### Alternative solution while waiting for contracts to be decoded
179+
180+
Need some data urgently but the contract have yet to be fully decoded? You can refer to these following queries that utilizes the logs table to get the events!
181+
182+
- [Querying Synthetix's PerpsTracking Event](https://dune.com/queries/2743182){:target="_blank"}
183+
- [Querying USDT's AddedBlackList Event](https://dune.com/queries/3250843){:target="_blank"}
184+
185+
#### For all other questions:
186+
187+
Head over to the [#decoding Discord channel](https://discord.com/channels/757637422384283659/850326962152538122) and we'll be happy to help!
12.6 KB
Loading
6.03 KB
Loading
20.9 KB
Loading

docs/app/query-editor/.pages

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
nav:
22
- index.md
33
- query-window.md
4+
- parameters.md
45
- query-scheduler.md
56
- data-explorer.md
67
- version-history.md
15.8 KB
Loading
43.8 KB
Loading
19.9 KB
Loading

0 commit comments

Comments
 (0)