You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add ability to try the decoder over multiple ABIs (#239)
* Change store API and add migrations
* Refactor abi loader to handle multiple abi in decoding
* Update documentation
* Update migrations
* Strategy executor returns abi with strategy id
* Add default ABIs as fallback
* Use strict decode to ensure params
---------
Co-authored-by: Anastasia Rodionova <[email protected]>
BREAKING! This version changes the public API for ABI store. If you use built in stores evrything should work out of the box. When using SQL store ensure that migrations complete on start. Additionally the AbiLoader will now also return an array of ABIs when accessing the cached data. These changes allows us to run over multiple ABIs when decoding a transaction, instead of failing when the cached ABI is wrong.
Data Loaders are mechanisms for retrieving the necessary ABI and Contract Metadata for transaction decoding. They are responsible for:
11
11
12
12
- Resolving ABIs and Contract Metadata using specified strategies and third-party APIs
13
-
- Automatically batching requests when processing logs and traces in parallel
14
-
- Caching request results in the [Data Store](/reference/data-store)
13
+
- Automatically batching requests and deduplicating identical lookups during parallel log/trace processing
14
+
- Caching results and negative lookups in the [Data Store](/reference/data-store)
15
+
- Applying rate limits, circuit breaking, and adaptive concurrency via a shared request pool
15
16
16
-
Loop Decoder implements optimizations to minimize API requests to third-party services. For example, when a contract’s ABI is resolved via Etherscan, it is cached in the store. If the ABI is requested again, the store provides the cached version, avoiding redundant API calls.
17
+
Loop Decoder implements optimizations to minimize API requests to third-party services. For example, when a contract’s ABI is resolved via Etherscan, it is cached in the store. If the ABI is requested again, the store provides the cached version, avoiding redundant API calls. When a source returns no result, a `not-found` entry can be stored to skip repeated attempts temporarily.
Copy file name to clipboardExpand all lines: apps/docs/src/content/docs/reference/data-store.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ The full interface of ABI store is:
67
67
68
68
<EffectABI />
69
69
70
-
ABI Store Interface requires 2 methods: `set` and `get` to store and retrieve the ABI of a contract. Optionally, you can provide a batch get method `getMany`for further optimization. Because our API supports ABI fragments, the get method will receive both the contract address and the fragment signature.
70
+
ABI Store Interface requires `set` and `get` to store and retrieve ABIs. Optionally, you can provide a batch get method `getMany`and an `updateStatus` helper used by the decoder to mark ABIs invalid after failed decode attempts. Because our API supports ABI fragments, the get method will receive both the contract address and the fragment signature.
Copy file name to clipboardExpand all lines: apps/docs/src/content/docs/welcome/overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ The Transaction Decoder package transforms raw transactions, including calldata,
26
26
27
27
See the Decoded Transaction section in our [playground](https://loop-decoder-web.vercel.app/) for transaction examples.
28
28
29
-
The minimal configuration for the Transaction Decoder requires an RPC URL, ABIs, and contract metadata stores, which can be in-memory (see the [Data Store](/reference/data-store/) section). We also provide data loaders for popular APIs like Etherscan (see the full list in the [ABI Strategies](/reference/data-loaders/) section). These loaders request contract metadataand cache it in your specified store. The decoder supports RPCs with both Debug (Geth tracers) and Trace (OpenEthereum/Parity and Erigon tracers) APIs.
29
+
The minimal configuration for the Transaction Decoder requires an RPC URL, ABIs, and contract metadata stores, which can be in-memory (see the [Data Store](/reference/data-store/) section). We also provide data loaders for popular APIs like Etherscan (see the full list in the [ABI Strategies](/reference/data-loaders/) section). These loaders fetch ABIs/metadata, cache results and negative lookups in your store, and avoid querying sources previously marked invalid for a key. The decoder supports RPCs with both Debug (Geth tracers) and Trace (OpenEthereum/Parity and Erigon tracers) APIs.
0 commit comments