Skip to content

Commit c02267b

Browse files
committed
Replaces AggregatorV3Interface with AggregatorV2V3Interface in README
1 parent 2d17d48 commit c02267b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ Being documented, easily usable, and officially recommended by Api3, they offer
1414
Data Feed Proxy Combinators provide modular and composable smart contracts for on-chain data feed adaptation. They typically take the address(es) of underlying feed(s) and operational parameters (like scaling factors) in their constructors. Key contract implementations include:
1515

1616
- **`InverseApi3ReaderProxyV1`**: Takes an underlying `IApi3ReaderProxy` (e.g., ETH/USD). Its `read()` method returns the inverse of the underlying feed's value (e.g., `1 / (ETH/USD value)` to represent USD/ETH), exposing an `IApi3ReaderProxy` interface.
17-
- **`ScaledApi3FeedProxyV1`**: Reads from an underlying `IApi3ReaderProxy`, scales its value to a specified number of decimal places, and exposes the Chainlink `AggregatorV3Interface` (and `AggregatorV2V3Interface`). This makes an Api3 data feed, with adjusted precision, consumable by systems expecting a Chainlink-compatible interface with arbitrary decimals.
17+
- **`ScaledApi3FeedProxyV1`**: Reads from an underlying `IApi3ReaderProxy`, scales its value to a specified number of decimal places, and exposes the Chainlink `AggregatorV2V3Interface`. This makes an Api3 data feed, with adjusted precision, consumable by systems expecting a Chainlink-compatible interface with arbitrary decimals.
1818
- **`ProductApi3ReaderProxyV1`**: Takes two underlying `IApi3ReaderProxy` instances. Its `read()` method returns the product of their values, implementing the `IApi3ReaderProxy` interface.
1919
- **`NormalizedApi3ReaderProxyV1`**: Reads from an external data feed implementing the Chainlink-compatible `AggregatorV2V3Interface` and exposes the standard Api3 `IApi3ReaderProxy` interface. This allows dApps expecting an Api3 feed to consume data from other sources, useful for migration.
2020

21-
These combinators either consume and expose the Api3 `IApi3ReaderProxy` interface or act as adapters to/from other interfaces like Chainlink's `AggregatorV3Interface`. This facilitates integration within the Api3 ecosystem or when bridging with other oracle systems. The output of one combinator can often serve as input for another, enabling complex data transformation pipelines.
21+
These combinators either consume and expose the Api3 `IApi3ReaderProxy` interface or act as adapters to/from other interfaces like Chainlink's `AggregatorV2V3Interface`. This facilitates integration within the Api3 ecosystem or when bridging with other oracle systems. The output of one combinator can often serve as input for another, enabling complex data transformation pipelines.
2222

2323
## Deployment Guide
2424

@@ -105,7 +105,7 @@ The `NETWORK` variable should be set to a chain name as defined by `@api3/contra
105105
- **`NormalizedApi3ReaderProxyV1`**:
106106

107107
- `NETWORK`: Target network name.
108-
- `FEED`: Address of the external data feed (e.g., a Chainlink `AggregatorV3Interface` compatible feed).
108+
- `FEED`: Address of the external data feed (e.g., a Chainlink `AggregatorV2V3Interface` compatible feed).
109109
- Example:
110110
```bash
111111
NETWORK=polygon-mainnet FEED=0xExternalFeedAddress pnpm deploy:NormalizedApi3ReaderProxyV1
@@ -142,7 +142,7 @@ If verification fails during the deployment (e.g., due to network latency or an
142142

143143
### 4. Combining Contracts (Advanced Usage)
144144

145-
The true power of these combinators is realized when they are chained together. The deployed address of one combinator contract can serve as an input (a constructor argument, typically an `IApi3ReaderProxy` or `AggregatorV3Interface` address) for another. This allows you to build sophisticated data transformation pipelines tailored to your dApp's specific needs.
145+
The true power of these combinators is realized when they are chained together. The deployed address of one combinator contract can serve as an input (a constructor argument, typically an `IApi3ReaderProxy` or `AggregatorV2V3Interface` address) for another. This allows you to build sophisticated data transformation pipelines tailored to your dApp's specific needs.
146146
147147
Below are some common scenarios illustrating how you can combine these proxies:
148148
@@ -159,7 +159,7 @@ Imagine your dApp requires a USD/ETH price feed with 8 decimal places, but the a
159159
2. **Deploy `ScaledApi3FeedProxyV1`**:
160160
- Input `PROXY`: Address of `InverseProxy_ETHUSD` (from step 1).
161161
- Input `DECIMALS`: `8`.
162-
- Output: An `AggregatorV3Interface` contract that reads USD/ETH scaled to 8 decimals.
162+
- Output: An `AggregatorV2V3Interface` contract that reads USD/ETH scaled to 8 decimals.
163163
- Example command: `NETWORK=your_network PROXY=0xAddressOfInverseProxyEthUsd DECIMALS=8 pnpm deploy:ScaledApi3FeedProxyV1`
164164
165165
**Scenario 2: Creating a Cross-Currency Pair (e.g., BTC/ETH) and Adapting its Interface**
@@ -180,15 +180,15 @@ Suppose your dApp needs a BTC/ETH price feed, and you have access to BTC/USD and
180180
3. **Deploy `ScaledApi3FeedProxyV1` (Optional, for interface adaptation and scaling)**:
181181
- Input `PROXY`: Address of `ProductProxy_BTCETH` (from step 2).
182182
- Input `DECIMALS`: Desired decimals (e.g., `8` or `18`).
183-
- Output: An `AggregatorV3Interface` contract providing the BTC/ETH price, compatible with systems expecting a Chainlink feed.
183+
- Output: An `AggregatorV2V3Interface` contract providing the BTC/ETH price, compatible with systems expecting a Chainlink feed.
184184
185185
**Scenario 3: Normalizing an External Feed and Then Inverting It**
186186
187187
Your dApp wants to use an external (e.g., Chainlink) EUR/USD feed but requires it as USD/EUR and prefers to interact with it via the API3 `IApi3ReaderProxy` interface.
188188
189189
1. **Deploy `NormalizedApi3ReaderProxyV1`**:
190190
191-
- Input `FEED`: Address of the external EUR/USD `AggregatorV3Interface` feed.
191+
- Input `FEED`: Address of the external EUR/USD `AggregatorV2V3Interface` feed.
192192
- Output: An `IApi3ReaderProxy` contract (`NormalizedProxy_EURUSD`) that reads EUR/USD.
193193
194194
2. **Deploy `InverseApi3ReaderProxyV1`**:

0 commit comments

Comments
 (0)