Skip to content

Commit 0c13d7b

Browse files
fix(docs): update deprecated verifier functions and links (#1158)
2 parents da09aa1 + 3c93c00 commit 0c13d7b

File tree

9 files changed

+19
-19
lines changed

9 files changed

+19
-19
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ In the case of `Web2Json`, `requestBody` is a JSON containing the fields:
8585
### Reference Documentation
8686

8787
- [Web2Json Specification](/fdc/attestation-types/json-api)
88-
- [Verifier Interactive Docs](https://jq-verifier-test.flare.rocks/api-doc#/)
88+
- [Verifier Interactive Docs](https://fdc-verifiers-testnet.flare.network/verifier/web2/api-doc#/)
8989

9090
### Example Values
9191

@@ -325,7 +325,7 @@ contract PrepareAttestationRequest is Script {
325325
The code above differs slightly from the [starter example](https://github.com/flare-foundation/flare-foundry-starter).
326326
But, if we remove the ellipses `...` signifying missing code, we can still run the script.
327327

328-
Because of the `console.log` commands it will produce JSON strings that represent valid requests; we can then pass this to the [interactive verifier](https://jq-verifier-test.flare.rocks/api-doc#) to check the response.
328+
Because of the `console.log` commands it will produce JSON strings that represent valid requests; we can then pass this to the [interactive verifier](https://fdc-verifiers-testnet.flare.network/verifier/web2/api-doc#) to check the response.
329329

330330
We can run the script by calling the following commands in the console.
331331

@@ -349,11 +349,11 @@ We place `using Surl for *;` at the start of our `PostRequest` contract, and the
349349
(, bytes memory data) = url.post(headers, body);
350350
```
351351

352-
We construct the URL by appending to the verifier address `https://jq-verifier-test.flare.rocks` the path `/JsonApi/prepareRequest`.
352+
We construct the URL by appending to the verifier address `https://fdc-verifiers-testnet.flare.network/verifier/web2` the path `/JsonApi/prepareRequest`.
353353
We can do so dynamically with the following code.
354354

355355
```solidity title="scrip/fdcExample/Web2Json.s.sol"
356-
string memory baseUrl = "https://jq-verifier-test.flare.rocks/";
356+
string memory baseUrl = "https://fdc-verifiers-testnet.flare.network/verifier/web2/";
357357
string memory url = string.concat(
358358
baseUrl,
359359
"verifier/",

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/foundry/json-api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ In the case of `JsonApi`, `requestBody` is a JSON containing the fields:
8181
### Reference Documentation
8282

8383
- [JsonApi Specification](/fdc/attestation-types/json-api)
84-
- [Verifier Interactive Docs](https://jq-verifier-test.flare.rocks/api-doc#/)
84+
- [Verifier Interactive Docs](https://fdc-verifiers-testnet.flare.network/verifier/web2/api-doc#/)
8585

8686
### Example Values
8787

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ In the case of `Web2Json`, `requestBody` is a JSON containing the fields:
9191
### Reference Documentation
9292

9393
- [Web2Json Specification](/fdc/attestation-types/web2-json)
94-
- [Verifier Interactive Docs](https://jq-verifier-test.flare.rocks/api-doc#/)
94+
- [Verifier Interactive Docs](https://fdc-verifiers-testnet.flare.network/verifier/web2/api-doc#/)
9595

9696
### Example Values
9797

@@ -155,7 +155,7 @@ function toUtf8HexString(data: string) {
155155
}
156156
```
157157

158-
Because of the `console.log` commands it will produce JSON strings that represent valid requests; we can then pass this to the [interactive verifier](https://jq-verifier-test.flare.rocks/api-doc/) to check the response.
158+
Because of the `console.log` commands it will produce JSON strings that represent valid requests; we can then pass this to the [interactive verifier](https://fdc-verifiers-testnet.flare.network/verifier/web2/api-doc/) to check the response.
159159

160160
The process of posting a request to a verifier server is identical for all attestation types.
161161
It differs only in values used.
@@ -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/fdc/guides/hardhat/json-api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ In the case of `JsonApi`, `requestBody` is a JSON containing the fields:
9191
### Reference Documentation
9292

9393
- [JsonApi Specification](/fdc/attestation-types/json-api)
94-
- [Verifier Interactive Docs](https://jq-verifier-test.flare.rocks/api-doc#/)
94+
- [Verifier Interactive Docs](https://fdc-verifiers-testnet.flare.network/verifier/web2/api-doc#/)
9595

9696
### Example Values
9797

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;

docs/network/0-overview.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -283,18 +283,18 @@ Resources for interacting with Flare's DA Layer and FDC verifiers.
283283
| **FDC Verifier (BTC)** | [`https://fdc-verifiers-mainnet.flare.network/verifier/btc/api-doc`](https://fdc-verifiers-mainnet.flare.network/verifier/btc/api-doc) |
284284
| **FDC Verifier (XRP)** | [`https://fdc-verifiers-mainnet.flare.network/verifier/xrp/api-doc`](https://fdc-verifiers-mainnet.flare.network/verifier/xrp/api-doc) |
285285
| **FDC Verifier (DOGE)** | [`https://fdc-verifiers-mainnet.flare.network/verifier/doge/api-doc`](https://fdc-verifiers-mainnet.flare.network/verifier/doge/api-doc) |
286-
| **FDC Verifier (Web2Json)** | - |
286+
| **FDC Verifier (Web2Json)** | [`https://fdc-verifiers-mainnet.flare.network/verifier/web2/api-doc`](https://fdc-verifiers-mainnet.flare.network/verifier/web2/api-doc) |
287287

288288
</TabItem>
289289
<TabItem value="coston2" label="Flare Testnet Coston2">
290290

291-
| **DA Layer** | [`https://ctn2-data-availability.flare.network/api-doc`](https://ctn2-data-availability.flare.network/api-doc) |
291+
| **DA Layer** | [`https://ctn2-data-availability.flare.network/api-doc`](https://ctn2-data-availability.flare.network/api-doc) |
292292
| :--------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------- |
293293
| **FDC Verifier (EVM)** | [`https://fdc-verifiers-testnet.flare.network/verifier/api-doc`](https://fdc-verifiers-testnet.flare.network/verifier/api-doc) |
294294
| **FDC Verifier (BTC)** | [`https://fdc-verifiers-testnet.flare.network/verifier/btc_testnet4/api-doc`](https://fdc-verifiers-testnet.flare.network/verifier/btc_testnet4/api-doc) |
295295
| **FDC Verifier (XRP)** | [`https://fdc-verifiers-testnet.flare.network/verifier/xrp/api-doc`](https://fdc-verifiers-testnet.flare.network/verifier/xrp/api-doc) |
296296
| **FDC Verifier (DOGE)** | [`https://fdc-verifiers-testnet.flare.network/verifier/doge/api-doc`](https://fdc-verifiers-testnet.flare.network/verifier/doge/api-doc) |
297-
| **FDC Verifier (Web2Json)** | [`https://jq-verifier-test.flare.rocks/`](https://jq-verifier-test.flare.rocks/) |
297+
| **FDC Verifier (Web2Json)** | [`https://fdc-verifiers-testnet.flare.network/verifier/web2/api-doc`](https://fdc-verifiers-testnet.flare.network/verifier/web2/api-doc) |
298298

299299
</TabItem>
300300
<TabItem value="songbird" label="Songbird Canary-Network">
@@ -305,7 +305,7 @@ Resources for interacting with Flare's DA Layer and FDC verifiers.
305305
| **FDC Verifier (BTC)** | [`https://fdc-verifiers-mainnet.flare.network/verifier/btc/api-doc`](https://fdc-verifiers-mainnet.flare.network/verifier/btc/api-doc) |
306306
| **FDC Verifier (XRP)** | [`https://fdc-verifiers-mainnet.flare.network/verifier/xrp/api-doc`](https://fdc-verifiers-mainnet.flare.network/verifier/xrp/api-doc) |
307307
| **FDC Verifier (DOGE)** | [`https://fdc-verifiers-mainnet.flare.network/verifier/doge/api-doc`](https://fdc-verifiers-mainnet.flare.network/verifier/doge/api-doc) |
308-
| **FDC Verifier (Web2Json)** | - |
308+
| **FDC Verifier (Web2Json)** | [`https://fdc-verifiers-mainnet.flare.network/verifier/web2/api-doc`](https://fdc-verifiers-mainnet.flare.network/verifier/web2/api-doc) |
309309

310310
</TabItem>
311311
<TabItem value="coston" label="Songbird Testnet Coston">
@@ -316,7 +316,7 @@ Resources for interacting with Flare's DA Layer and FDC verifiers.
316316
| **FDC Verifier (BTC)** | [`https://fdc-verifiers-testnet.flare.network/verifier/btc_testnet4/api-doc`](https://fdc-verifiers-testnet.flare.network/verifier/btc_testnet4/api-doc) |
317317
| **FDC Verifier (XRP)** | [`https://fdc-verifiers-testnet.flare.network/verifier/xrp/api-doc`](https://fdc-verifiers-testnet.flare.network/verifier/xrp/api-doc) |
318318
| **FDC Verifier (DOGE)** | [`https://fdc-verifiers-testnet.flare.network/verifier/doge/api-doc`](https://fdc-verifiers-testnet.flare.network/verifier/doge/api-doc) |
319-
| **FDC Verifier (Web2Json)** | [`https://jq-verifier-test.flare.rocks/`](https://jq-verifier-test.flare.rocks/) |
319+
| **FDC Verifier (Web2Json)** | [`https://fdc-verifiers-testnet.flare.network/verifier/web2/api-doc`](https://fdc-verifiers-testnet.flare.network/verifier/web2/api-doc) |
320320

321321
</TabItem>
322322
</Tabs>

examples/developer-hub-solidity/PriceVerifierCustomFeed.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ contract PriceVerifierCustomFeed is IICustomFeed {
133133
// 2. FDC Verification (Web2Json)
134134
// Aligned with the Web2Json.sol example's pattern
135135
require(
136-
ContractRegistry.getFdcVerification().verifyJsonApi(_proof),
136+
ContractRegistry.getFdcVerification().verifyWeb2Json(_proof),
137137
"FDC: Invalid Web2Json proof"
138138
);
139139

0 commit comments

Comments
 (0)