Skip to content

Commit 35e59ac

Browse files
fix(docs): fix small issues with guides (#745)
2 parents 9ad795c + 2bf1739 commit 35e59ac

File tree

15 files changed

+239
-127
lines changed

15 files changed

+239
-127
lines changed

docs/fdc/2-getting-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ The request contains three main components:
132132
- `listEvents`: Flags for including transaction input and event logs.
133133
- `logIndices`: Optional log indices (maximum 50 logs per request).
134134

135-
For full details, see the EVMTransaction](/fdc/attestation-types/evm-transaction) type specification.
135+
For full details, see the [EVMTransaction](/fdc/attestation-types/evm-transaction) type specification.
136136

137137
### Implementation example
138138

docs/fdc/guides/fdc-by-hand.mdx

Lines changed: 170 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -190,18 +190,32 @@ The full list of values is available below.
190190
Interactive documentation for all attestation types, and the corresponding
191191
values for the `attestationType` and `sourceId` fields.
192192
</summary>
193-
-
194-
[AddressValidity](https://dev.flare.network/fdc/attestation-types/address-validity)
195-
-
196-
[testBTC](https://fdc-verifiers-testnet.flare.network/verifier/btc_testnet4/api-doc#/)
197-
-
198-
[testXRP](https://fdc-verifiers-testnet.flare.network/verifier/xrp/api-doc#/)
199-
-
200-
[testDOGE](https://fdc-verifiers-testnet.flare.network/verifier/doge/api-doc#/)
201-
- [BTC](https://fdc-verifiers-mainnet.flare.network/verifier/btc/api-doc#/) -
202-
[XRP](https://fdc-verifiers-mainnet.flare.network/verifier/xrp/api-doc#/) -
203-
[DOGE](https://fdc-verifiers-mainnet.flare.network/verifier/doge/api-doc#/) -
204-
[EVMTransaction](https://dev.flare.network/fdc/attestation-types/evm-transaction)
193+
<ul>
194+
<li>
195+
[AddressValidity](https://dev.flare.network/fdc/attestation-types/address-validity)
196+
</li>
197+
<li>
198+
[testBTC](https://fdc-verifiers-testnet.flare.network/verifier/btc_testnet4/api-doc#/)
199+
</li>
200+
<li>
201+
[testXRP](https://fdc-verifiers-testnet.flare.network/verifier/xrp/api-doc#/)
202+
</li>
203+
<li>
204+
[testDOGE](https://fdc-verifiers-testnet.flare.network/verifier/doge/api-doc#/)
205+
</li>
206+
<li>
207+
[BTC](https://fdc-verifiers-mainnet.flare.network/verifier/btc/api-doc#/)
208+
</li>
209+
<li>
210+
[XRP](https://fdc-verifiers-mainnet.flare.network/verifier/xrp/api-doc#/)
211+
</li>
212+
<li>
213+
[DOGE](https://fdc-verifiers-mainnet.flare.network/verifier/doge/api-doc#/)
214+
</li>
215+
<li>
216+
[EVMTransaction](https://dev.flare.network/fdc/attestation-types/evm-transaction)
217+
</li>
218+
</ul>
205219
</details>
206220

207221
Input the appropriate value into the encoder bellow.
@@ -246,35 +260,96 @@ We should remember its block number for later.
246260

247261
<details>
248262
<summary>Links to `FdcHub` and `FdcRequestFeeConfigurations` contracts on all Flare chains.</summary>
263+
249264
### FdcHub
250265

251-
- Coston
252-
- [Flare Explorer](https://coston-explorer.flare.network/address/0x1c78A073E3BD2aCa4cc327d55FB0cD4f0549B55b)
253-
- [Flarescan](https://coston.testnet.flarescan.com/address/0x1c78A073E3BD2aCa4cc327d55FB0cD4f0549B55b)
254-
- Coston2
255-
- [Flare Explorer](https://coston2-explorer.flare.network/address/0x48aC463d7975828989331F4De43341627b9c5f1D)
256-
- [Flarescan](https://coston2.testnet.flarescan.com/address/0x48aC463d7975828989331F4De43341627b9c5f1D)
257-
- Songbird
258-
- [Flare Explorer](https://songbird-explorer.flare.network/address/0xCfD4669a505A70c2cE85db8A1c1d14BcDE5a1a06)
259-
- [Flarescan](https://songbird.flarescan.com/address/0xCfD4669a505A70c2cE85db8A1c1d14BcDE5a1a06)
260-
- Flare
261-
- [Flare Explorer](https://flare-explorer.flare.network/address/0xc25c749DC27Efb1864Cb3DADa8845B7687eB2d44)
262-
- [Flarescan](https://flare.flarescan.com/address/0xc25c749DC27Efb1864Cb3DADa8845B7687eB2d44)
266+
<ul>
267+
<li>Coston</li>
268+
<ul>
269+
<li>
270+
[Flare
271+
Explorer](https://coston-explorer.flare.network/address/0x1c78A073E3BD2aCa4cc327d55FB0cD4f0549B55b)
272+
</li>
273+
<li>
274+
[Flarescan](https://coston.testnet.flarescan.com/address/0x1c78A073E3BD2aCa4cc327d55FB0cD4f0549B55b)
275+
</li>
276+
</ul>
277+
<li>Coston2</li>
278+
<ul>
279+
<li>
280+
[Flare
281+
Explorer](https://coston2-explorer.flare.network/address/0x48aC463d7975828989331F4De43341627b9c5f1D)
282+
</li>
283+
<li>
284+
[Flarescan](https://coston2.testnet.flarescan.com/address/0x48aC463d7975828989331F4De43341627b9c5f1D)
285+
</li>
286+
</ul>
287+
<li>Songbird</li>
288+
<ul>
289+
<li>
290+
[Flare
291+
Explorer](https://songbird-explorer.flare.network/address/0xCfD4669a505A70c2cE85db8A1c1d14BcDE5a1a06)
292+
</li>
293+
<li>
294+
[Flarescan](https://songbird.flarescan.com/address/0xCfD4669a505A70c2cE85db8A1c1d14BcDE5a1a06)
295+
</li>
296+
</ul>
297+
<li>Flare</li>
298+
<ul>
299+
<li>
300+
[Flare
301+
Explorer](https://flare-explorer.flare.network/address/0xc25c749DC27Efb1864Cb3DADa8845B7687eB2d44)
302+
</li>
303+
<li>
304+
[Flarescan](https://flare.flarescan.com/address/0xc25c749DC27Efb1864Cb3DADa8845B7687eB2d44)
305+
</li>
306+
</ul>
307+
</ul>
263308

264309
### FdcRequestFeeConfigurations
265310

266-
- Coston
267-
- [Flare Explorer](https://coston-explorer.flare.network/address/0x2bBfb46aC3A71A6725699004B8a8fE4C928E7108)
268-
- [Flarescan](https://coston.testnet.flarescan.com/address/0x2bBfb46aC3A71A6725699004B8a8fE4C928E7108)
269-
- Coston2
270-
- [Flare Explorer](https://coston2-explorer.flare.network/address/0x191a1282Ac700edE65c5B0AaF313BAcC3eA7fC7e)
271-
- [Flarescan](https://coston2.testnet.flarescan.com/address/0x191a1282Ac700edE65c5B0AaF313BAcC3eA7fC7e)
272-
- Songbird
273-
- [Flare Explorer](https://songbird-explorer.flare.network/address/0x8998a3b85350aA4CA5f55cD80ab1f7C9C0ddf02C)
274-
- [Flarescan](https://songbird.flarescan.com/address/0x8998a3b85350aA4CA5f55cD80ab1f7C9C0ddf02C)
275-
- Flare
276-
- [Flare Explorer](https://flare-explorer.flare.network/address/0x259852Ae6d5085bDc0650D3887825f7b76F0c4fe)
277-
- [Flarescan](https://flare.flarescan.com/address/0x259852Ae6d5085bDc0650D3887825f7b76F0c4fe)
311+
<ul>
312+
<li>Coston</li>
313+
<ul>
314+
<li>
315+
[Flare
316+
Explorer](https://coston-explorer.flare.network/address/0x2bBfb46aC3A71A6725699004B8a8fE4C928E7108)
317+
</li>
318+
<li>
319+
[Flarescan](https://coston.testnet.flarescan.com/address/0x2bBfb46aC3A71A6725699004B8a8fE4C928E7108)
320+
</li>
321+
</ul>
322+
<li>Coston2</li>
323+
<ul>
324+
<li>
325+
[Flare
326+
Explorer](https://coston2-explorer.flare.network/address/0x191a1282Ac700edE65c5B0AaF313BAcC3eA7fC7e)
327+
</li>
328+
<li>
329+
[Flarescan](https://coston2.testnet.flarescan.com/address/0x191a1282Ac700edE65c5B0AaF313BAcC3eA7fC7e)
330+
</li>
331+
</ul>
332+
<li>Songbird</li>
333+
<ul>
334+
<li>
335+
[Flare
336+
Explorer](https://songbird-explorer.flare.network/address/0x8998a3b85350aA4CA5f55cD80ab1f7C9C0ddf02C)
337+
</li>
338+
<li>
339+
[Flarescan](https://songbird.flarescan.com/address/0x8998a3b85350aA4CA5f55cD80ab1f7C9C0ddf02C)
340+
</li>
341+
</ul>
342+
<li>Flare</li>
343+
<ul>
344+
<li>
345+
[Flare
346+
Explorer](https://flare-explorer.flare.network/address/0x259852Ae6d5085bDc0650D3887825f7b76F0c4fe)
347+
</li>
348+
<li>
349+
[Flarescan](https://flare.flarescan.com/address/0x259852Ae6d5085bDc0650D3887825f7b76F0c4fe)
350+
</li>
351+
</ul>
352+
</ul>
278353

279354
</details>
280355

@@ -306,10 +381,16 @@ When the round has been finalized, its ID will appear on the list.
306381

307382
<details>
308383
<summary>Links to all System Explorers</summary>
309-
[Coston](https://coston-systems-explorer.flare.rocks/finalizations) -
310-
[Coston2](https://coston2-systems-explorer.flare.rocks/finalizations) -
311-
[Songbird](https://songbird-systems-explorer.flare.rocks/finalizations) -
312-
[Flare](https://flare-systems-explorer.flare.rocks/finalizations)
384+
<ul>
385+
<li>[Coston](https://coston-systems-explorer.flare.rocks/finalizations)</li>
386+
<li>
387+
[Coston2](https://coston2-systems-explorer.flare.rocks/finalizations)
388+
</li>
389+
<li>
390+
[Songbird](https://songbird-systems-explorer.flare.rocks/finalizations)
391+
</li>
392+
<li>[Flare](https://flare-systems-explorer.flare.rocks/finalizations)</li>
393+
</ul>
313394
</details>
314395

315396
## Preparing the proof request
@@ -422,10 +503,12 @@ The output of the `curl` command is then:
422503

423504
<details>
424505
<summary>Links to all Data Availability Clients</summary>
425-
[Coston](https://ctn-data-availability.flare.network/api-doc#/) -
426-
[Coston2](https://ctn2-data-availability.flare.network/api-doc#/) -
427-
[Songbird](https://sgb-data-availability.flare.network/api-doc#/) -
428-
[Flare](https://flr-data-availability.flare.network/api-doc#/)
506+
<ul>
507+
<li>[Coston](https://ctn-data-availability.flare.network/api-doc#/)</li>
508+
<li>[Coston2](https://ctn2-data-availability.flare.network/api-doc#/)</li>
509+
<li>[Songbird](https://sgb-data-availability.flare.network/api-doc#/)</li>
510+
<li>[Flare](https://flr-data-availability.flare.network/api-doc#/)</li>
511+
</ul>
429512
</details>
430513

431514
## Verifying the data
@@ -445,21 +528,47 @@ We input the above `Response body` data as parameters to the `verifyAddressValid
445528
When we `Read` the function, we get back `true`, which means that the proof is valid.
446529

447530
<details>
448-
<summary>Links to `FdcVerification` contract on all Flare chains.</summary>-
449-
Coston - [Flare
450-
Explorer](https://coston-explorer.flare.network/address/0x57a2db68fb40f6C61342FF4beF283AE185eA8E51)
451-
-
452-
[Flarescan](https://coston.testnet.flarescan.com/address/0x57a2db68fb40f6C61342FF4beF283AE185eA8E51)
453-
- Coston2 - [Flare
454-
Explorer](https://coston2-explorer.flare.network/address/0x075bf301fF07C4920e5261f93a0609640F53487D)
455-
-
456-
[Flarescan](https://coston2.testnet.flarescan.com/address/0x075bf301fF07C4920e5261f93a0609640F53487D)
457-
- Songbird - [Flare
458-
Explorer](https://songbird-explorer.flare.network/address/0xd283afC5A67E2d4Bc700b5B640328Bda22450621)
459-
-
460-
[Flarescan](https://songbird.flarescan.com/address/0xd283afC5A67E2d4Bc700b5B640328Bda22450621)
461-
- Flare - [Flare
462-
Explorer](https://flare-explorer.flare.network/address/0x9394c7A36b3Da8de1b4F27cdD0a554dA4Fa7132d)
463-
-
464-
[Flarescan](https://flare.flarescan.com/address/0x9394c7A36b3Da8de1b4F27cdD0a554dA4Fa7132d)
531+
<summary>Links to `FdcVerification` contract on all Flare chains.</summary>
532+
<ul>
533+
<li>Coston</li>
534+
<ul>
535+
<li>
536+
[Flare
537+
Explorer](https://coston-explorer.flare.network/address/0x57a2db68fb40f6C61342FF4beF283AE185eA8E51)
538+
</li>
539+
<li>
540+
[Flarescan](https://coston.testnet.flarescan.com/address/0x57a2db68fb40f6C61342FF4beF283AE185eA8E51)
541+
</li>
542+
</ul>
543+
<li>Coston2 </li>
544+
<ul>
545+
<li>
546+
[Flare
547+
Explorer](https://coston2-explorer.flare.network/address/0x075bf301fF07C4920e5261f93a0609640F53487D)
548+
</li>
549+
<li>
550+
[Flarescan](https://coston2.testnet.flarescan.com/address/0x075bf301fF07C4920e5261f93a0609640F53487D)
551+
</li>
552+
</ul>
553+
<li>Songbird </li>
554+
<ul>
555+
<li>
556+
[Flare
557+
Explorer](https://songbird-explorer.flare.network/address/0xd283afC5A67E2d4Bc700b5B640328Bda22450621)
558+
</li>
559+
<li>
560+
[Flarescan](https://songbird.flarescan.com/address/0xd283afC5A67E2d4Bc700b5B640328Bda22450621)
561+
</li>
562+
</ul>
563+
<li>Flare </li>
564+
<ul>
565+
<li>
566+
[Flare
567+
Explorer](https://flare-explorer.flare.network/address/0x9394c7A36b3Da8de1b4F27cdD0a554dA4Fa7132d)
568+
</li>
569+
<li>
570+
[Flarescan](https://flare.flarescan.com/address/0x9394c7A36b3Da8de1b4F27cdD0a554dA4Fa7132d)
571+
</li>
572+
</ul>
573+
</ul>
465574
</details>

docs/fdc/guides/foundry/address-validity.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ For `AddressValidity`, `requestBody` contains a single field:
7575
### Reference Documentation
7676

7777
- [AddressValidity Specification](/fdc/attestation-types/address-validity)
78-
- [Verifier Interactive Docs](https://fdc-verifiers-testnet.flare.network/verifier/btc/api-doc#/AddressValidity/BTCAddressValidityVerifierController_prepareRequest)
78+
- [Verifier Interactive Docs](https://fdc-verifiers-testnet.flare.network/verifier/btc_testnet4/api-doc#/AddressValidity/BTCAddressValidityVerifierController_prepareRequest)
7979
- API available for [DOGE](https://fdc-verifiers-testnet.flare.network/verifier/doge/api-doc#/AddressValidity/BTCAddressValidityVerifierController_prepareRequest) and [XRP](https://fdc-verifiers-testnet.flare.network/verifier/xrp/api-doc#/AddressValidity/BTCAddressValidityVerifierController_prepareRequest).
8080

8181
### Example Values
@@ -258,7 +258,7 @@ If you are accessing a different chain, replace the `baseSourceName` with an app
258258
The code above differs slightly from the [starter example](https://github.com/flare-foundation/flare-foundry-starter).
259259
But, if we remove the ellipses `...` signifying missing code, we can still run the script.
260260

261-
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/btc/api-doc#/AddressValidity/BTCAddressValidityVerifierController_prepareRequest) to check what the response is.
261+
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/btc_testnet4/api-doc#/AddressValidity/BTCAddressValidityVerifierController_prepareRequest) to check what the response is.
262262

263263
We can run the script by calling the following commands in the console.
264264

@@ -267,7 +267,7 @@ source .env
267267
```
268268

269269
```bash
270-
forge script script/fdcExample/AddressValidity.s.sol:PostRequest --private-key $PRIVATE_KEY --rpc-url $COSTON2_RPC_URL --etherscan-api-key $FLARE_API_KEY --broadcast --ffi
270+
forge script script/fdcExample/AddressValidity.s.sol:PostRequest --private-key $PRIVATE_KEY --rpc-url $COSTON2_RPC_URL --etherscan-api-key $FLARE_RPC_API_KEY --broadcast --ffi
271271
```
272272

273273
The prerequisite for this is that the `.env` file is not missing the `PRIVATE KEY` and `COSTON2_RPC_URL` values.
@@ -283,7 +283,7 @@ We place `using Surl for *;` at the start of our `PostRequest` contract, and the
283283
(, bytes memory data) = url.post(headers, body);
284284
```
285285

286-
We construct the URL by appending to the verifier address `https://fdc-verifiers-testnet.flare.network/` the path `verifier/btc/AddressValidity/prepareRequest`.
286+
We construct the URL by appending to the verifier address `https://fdc-verifiers-testnet.flare.network/` the path `verifier/btc_testnet4/AddressValidity/prepareRequest`.
287287
We can do so dynamically with the following code.
288288

289289
```solidity title="scrip/fdcExample/AddressValidity.s.sol"
@@ -785,7 +785,7 @@ contract DeployContract is Script {
785785
We run the above script with the following console command.
786786

787787
```bash
788-
forge script script/fdcExample/AddressValidity.s.sol:Deploy --private-key $PRIVATE_KEY --rpc-url $COSTON2_RPC_URL --etherscan-api-key $FLARE_API_KEY --broadcast --ffi
788+
forge script script/fdcExample/AddressValidity.s.sol:Deploy --private-key $PRIVATE_KEY --rpc-url $COSTON2_RPC_URL --etherscan-api-key $FLARE_RPC_API_KEY --broadcast --ffi
789789

790790
```
791791

@@ -822,6 +822,6 @@ We run this script with the console command:
822822

823823
```bash
824824
forge script script/fdcExample/
825-
AddressValidity.s.sol:InteractWithContract --private-key $PRIVATE_KEY --rpc-url $COSTON2_RPC_URL --etherscan-api-key $FLARE_API_KEY --broadcast --ffi
825+
AddressValidity.s.sol:InteractWithContract --private-key $PRIVATE_KEY --rpc-url $COSTON2_RPC_URL --etherscan-api-key $FLARE_RPC_API_KEY --broadcast --ffi
826826

827827
```

docs/fdc/guides/foundry/evm-transaction.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ If you are accessing a different chain, replace the `baseSourceName` with an app
279279
The code above differs slightly from the [starter example](https://github.com/flare-foundation/flare-foundry-starter).
280280
But, if we remove the ellipses `...` signifying missing code, we can still run the script.
281281

282-
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/btc/api-doc#/EVMTransaction/BTCEVMTransactionVerifierController_prepareRequest) to check what the response will be.
282+
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/eth/EVMTransaction/prepareRequest) to check what the response will be.
283283

284284
We can run the script by calling the following commands in the console.
285285

@@ -288,7 +288,7 @@ source .env
288288
```
289289

290290
```bash
291-
forge script script/fdcExample/EVMTransaction.s.sol:PrepareAttestationRequest --private-key $PRIVATE_KEY --rpc-url $COSTON2_RPC_URL --etherscan-api-key $FLARE_API_KEY --broadcast --ffi
291+
forge script script/fdcExample/EVMTransaction.s.sol:PrepareAttestationRequest --private-key $PRIVATE_KEY --rpc-url $COSTON2_RPC_URL --etherscan-api-key $FLARE_RPC_API_KEY --broadcast --ffi
292292
```
293293

294294
The prerequisite for this is that the `.env` file is not missing the `PRIVATE KEY` and `COSTON2_RPC_URL` values.
@@ -304,7 +304,7 @@ We place `using Surl for *;` at the start of our `PostRequest` contract, and the
304304
(, bytes memory data) = url.post(headers, body);
305305
```
306306

307-
We construct the URL by appending to the verifier address `https://fdc-verifiers-testnet.flare.network/` the path `verifier/btc/EVMTransaction/prepareRequest`.
307+
We construct the URL by appending to the verifier address `https://fdc-verifiers-testnet.flare.network/` the path `/verifier/eth/EVMTransaction/prepareRequest`.
308308
We can do so dynamically with the following code.
309309

310310
```solidity title="scrip/fdcExample/EVMTransaction.s.sol"
@@ -1004,7 +1004,7 @@ contract DeployContract is Script {
10041004
We deploy the contract with the following console command.
10051005

10061006
```bash
1007-
forge script script/fdcExample/EVMTransaction.s.sol:DeployContract --private-key $PRIVATE_KEY --rpc-url $COSTON2_RPC_URL --etherscan-api-key $FLARE_API_KEY --broadcast --verify --ffi
1007+
forge script script/fdcExample/EVMTransaction.s.sol:DeployContract --private-key $PRIVATE_KEY --rpc-url $COSTON2_RPC_URL --etherscan-api-key $FLARE_RPC_API_KEY --broadcast --verify --ffi
10081008
```
10091009

10101010
Lastly, we define a script that interacts with the above contract.
@@ -1047,6 +1047,6 @@ contract InteractWithContract is Script {
10471047
We run this script with the console command:
10481048

10491049
```bash
1050-
forge script script/fdcExample/EVMTransaction.s.sol:InteractWithContract --private-key $PRIVATE_KEY --rpc-url $COSTON2_RPC_URL --etherscan-api-key $FLARE_API_KEY --broadcast --ffi
1050+
forge script script/fdcExample/EVMTransaction.s.sol:InteractWithContract --private-key $PRIVATE_KEY --rpc-url $COSTON2_RPC_URL --etherscan-api-key $FLARE_RPC_API_KEY --broadcast --ffi
10511051

10521052
```

0 commit comments

Comments
 (0)