Skip to content

Commit 836d1ed

Browse files
fix(docs): replace verifyJsonApi with verifyWeb2Json
1 parent da09aa1 commit 836d1ed

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

docs/fdc/guides/foundry/06-weather-insurance.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ The `IWeb2Json.Proof` is validated as demonstrated in the [Web2Json guide](/fdc/
285285

286286
```solidity title="src/weatherInsurance/MinTempAgency.sol"
287287
function isWeb2JsonProofValid(IWeb2Json.Proof calldata _proof) private view returns (bool) {
288-
return FdcVerification.verifyJsonApi(_proof);
288+
return FdcVerification.verifyWeb2Json(_proof);
289289
}
290290
```
291291

docs/fdc/guides/hardhat/04-web2-json.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ contract StarWarsCharacterList {
746746
) private view returns (bool) {
747747
// Inline the check for now until we have an official contract deployed
748748
return
749-
ContractRegistry.getFdcVerification().verifyJsonApi(
749+
ContractRegistry.getFdcVerification().verifyWeb2Json(
750750
_proof
751751
);
752752
}

docs/fdc/guides/hardhat/06-weather-insurance.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ The `IWeb2Json.Proof` is validated as demonstrated in the [Web2Json guide](/fdc/
291291

292292
```solidity title="contracts/weatherInsurance/MinTempAgency.sol"
293293
function isWeb2JsonProofValid(IWeb2Json.Proof calldata _proof) private view returns (bool) {
294-
return ContractRegistry.getFdcVerification().verifyJsonApi(_proof);
294+
return ContractRegistry.getFdcVerification().verifyWeb2Json(_proof);
295295
}
296296
```
297297

docs/ftso/guides/create-custom-feed.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ It then exposes this price through the `IICustomFeed` interface.
9999
It accepts a proof from the FDC and performs a series of checks before updating the `latestVerifiedPrice`.
100100
1. **Parses the API URL** from the proof to ensure the data is from the expected source.
101101

102-
2. **Verifies the proof's authenticity** by calling the FDC's onchain `verifyJsonApi` function.
102+
2. **Verifies the proof's authenticity** by calling the FDC's onchain `verifyWeb2Json` function.
103103

104104
3. **Decodes the price data** from the proof's response body.
105105

@@ -109,7 +109,7 @@ It then exposes this price through the `IICustomFeed` interface.
109109

110110
```solidity
111111
function verifyPrice(IWeb2Json.Proof calldata _proof) external {
112-
require(ContractRegistry.getFdcVerification().verifyJsonApi(_proof), "FDC: Invalid Web2Json proof");
112+
require(ContractRegistry.getFdcVerification().verifyWeb2Json(_proof), "FDC: Invalid Web2Json proof");
113113
114114
PriceData memory newPriceData = abi.decode(_proof.data.responseBody.abiEncodedData, (PriceData));
115115
latestVerifiedPrice = newPriceData.price;

0 commit comments

Comments
 (0)