Skip to content

Commit 50b1a4e

Browse files
committed
Update documentation
1 parent 0a4393b commit 50b1a4e

File tree

5 files changed

+23
-7
lines changed

5 files changed

+23
-7
lines changed
Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
11
```ts
22
export interface AbiStore {
3+
/**
4+
* Set of resolver strategies grouped by chain id and a `default` bucket.
5+
*/
36
readonly strategies: Record<ChainOrDefault, readonly ContractAbiResolverStrategy[]>
4-
readonly set: (key: AbiParams, value: ContractAbiResult) => Effect.Effect<void, never>
7+
/**
8+
* Persist a resolved ABI or a terminal state for a lookup key.
9+
*/
10+
readonly set: (key: AbiParams, value: CacheContractABIParam) => Effect.Effect<void, never>
11+
/**
12+
* Fetch all cached ABIs for the lookup key. Implementations may return multiple entries.
13+
*/
514
readonly get: (arg: AbiParams) => Effect.Effect<ContractAbiResult, never>
15+
/** Optional batched variant of `get` for performance. */
616
readonly getMany?: (arg: Array<AbiParams>) => Effect.Effect<Array<ContractAbiResult>, never>
17+
/** Optional helper for marking an existing cached ABI as invalid or changing its status. */
18+
readonly updateStatus?: (
19+
id: string | number,
20+
status: 'success' | 'invalid' | 'not-found',
21+
) => Effect.Effect<void, never>
722
}
823
```

apps/docs/src/content/components/vanilla-abi-store-interface.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
export interface VanillaAbiStore {
33
strategies?: readonly ContractAbiResolverStrategy[]
44
get: (key: AbiParams) => Promise<ContractAbiResult>
5-
set: (key: AbiParams, val: ContractAbiResult) => Promise<void>
5+
set: (key: AbiParams, val: ContractABI) => Promise<void>
66
}
77
```

apps/docs/src/content/docs/reference/data-loaders.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'
1010
Data Loaders are mechanisms for retrieving the necessary ABI and Contract Metadata for transaction decoding. They are responsible for:
1111

1212
- 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
1516

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.
1718

1819
## ABI Strategies
1920

apps/docs/src/content/docs/reference/data-store.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The full interface of ABI store is:
6767

6868
<EffectABI />
6969

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.
7171

7272
```typescript
7373
interface AbiParams {

apps/docs/src/content/docs/welcome/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The Transaction Decoder package transforms raw transactions, including calldata,
2626

2727
See the Decoded Transaction section in our [playground](https://loop-decoder-web.vercel.app/) for transaction examples.
2828

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 metadata and 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.
3030

3131
### Transaction Interpreter
3232

0 commit comments

Comments
 (0)