Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/fdc/2-getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ The request contains three main components:
- `listEvents`: Flags for including transaction input and event logs.
- `logIndices`: Optional log indices (maximum 50 logs per request).

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

### Implementation example

Expand Down
231 changes: 170 additions & 61 deletions docs/fdc/guides/fdc-by-hand.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -190,18 +190,32 @@ The full list of values is available below.
Interactive documentation for all attestation types, and the corresponding
values for the `attestationType` and `sourceId` fields.
</summary>
-
[AddressValidity](https://dev.flare.network/fdc/attestation-types/address-validity)
-
[testBTC](https://fdc-verifiers-testnet.flare.network/verifier/btc_testnet4/api-doc#/)
-
[testXRP](https://fdc-verifiers-testnet.flare.network/verifier/xrp/api-doc#/)
-
[testDOGE](https://fdc-verifiers-testnet.flare.network/verifier/doge/api-doc#/)
- [BTC](https://fdc-verifiers-mainnet.flare.network/verifier/btc/api-doc#/) -
[XRP](https://fdc-verifiers-mainnet.flare.network/verifier/xrp/api-doc#/) -
[DOGE](https://fdc-verifiers-mainnet.flare.network/verifier/doge/api-doc#/) -
[EVMTransaction](https://dev.flare.network/fdc/attestation-types/evm-transaction)
<ul>
<li>
[AddressValidity](https://dev.flare.network/fdc/attestation-types/address-validity)
</li>
<li>
[testBTC](https://fdc-verifiers-testnet.flare.network/verifier/btc_testnet4/api-doc#/)
</li>
<li>
[testXRP](https://fdc-verifiers-testnet.flare.network/verifier/xrp/api-doc#/)
</li>
<li>
[testDOGE](https://fdc-verifiers-testnet.flare.network/verifier/doge/api-doc#/)
</li>
<li>
[BTC](https://fdc-verifiers-mainnet.flare.network/verifier/btc/api-doc#/)
</li>
<li>
[XRP](https://fdc-verifiers-mainnet.flare.network/verifier/xrp/api-doc#/)
</li>
<li>
[DOGE](https://fdc-verifiers-mainnet.flare.network/verifier/doge/api-doc#/)
</li>
<li>
[EVMTransaction](https://dev.flare.network/fdc/attestation-types/evm-transaction)
</li>
</ul>
</details>

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

<details>
<summary>Links to `FdcHub` and `FdcRequestFeeConfigurations` contracts on all Flare chains.</summary>

### FdcHub

- Coston
- [Flare Explorer](https://coston-explorer.flare.network/address/0x1c78A073E3BD2aCa4cc327d55FB0cD4f0549B55b)
- [Flarescan](https://coston.testnet.flarescan.com/address/0x1c78A073E3BD2aCa4cc327d55FB0cD4f0549B55b)
- Coston2
- [Flare Explorer](https://coston2-explorer.flare.network/address/0x48aC463d7975828989331F4De43341627b9c5f1D)
- [Flarescan](https://coston2.testnet.flarescan.com/address/0x48aC463d7975828989331F4De43341627b9c5f1D)
- Songbird
- [Flare Explorer](https://songbird-explorer.flare.network/address/0xCfD4669a505A70c2cE85db8A1c1d14BcDE5a1a06)
- [Flarescan](https://songbird.flarescan.com/address/0xCfD4669a505A70c2cE85db8A1c1d14BcDE5a1a06)
- Flare
- [Flare Explorer](https://flare-explorer.flare.network/address/0xc25c749DC27Efb1864Cb3DADa8845B7687eB2d44)
- [Flarescan](https://flare.flarescan.com/address/0xc25c749DC27Efb1864Cb3DADa8845B7687eB2d44)
<ul>
<li>Coston</li>
<ul>
<li>
[Flare
Explorer](https://coston-explorer.flare.network/address/0x1c78A073E3BD2aCa4cc327d55FB0cD4f0549B55b)
</li>
<li>
[Flarescan](https://coston.testnet.flarescan.com/address/0x1c78A073E3BD2aCa4cc327d55FB0cD4f0549B55b)
</li>
</ul>
<li>Coston2</li>
<ul>
<li>
[Flare
Explorer](https://coston2-explorer.flare.network/address/0x48aC463d7975828989331F4De43341627b9c5f1D)
</li>
<li>
[Flarescan](https://coston2.testnet.flarescan.com/address/0x48aC463d7975828989331F4De43341627b9c5f1D)
</li>
</ul>
<li>Songbird</li>
<ul>
<li>
[Flare
Explorer](https://songbird-explorer.flare.network/address/0xCfD4669a505A70c2cE85db8A1c1d14BcDE5a1a06)
</li>
<li>
[Flarescan](https://songbird.flarescan.com/address/0xCfD4669a505A70c2cE85db8A1c1d14BcDE5a1a06)
</li>
</ul>
<li>Flare</li>
<ul>
<li>
[Flare
Explorer](https://flare-explorer.flare.network/address/0xc25c749DC27Efb1864Cb3DADa8845B7687eB2d44)
</li>
<li>
[Flarescan](https://flare.flarescan.com/address/0xc25c749DC27Efb1864Cb3DADa8845B7687eB2d44)
</li>
</ul>
</ul>

### FdcRequestFeeConfigurations

- Coston
- [Flare Explorer](https://coston-explorer.flare.network/address/0x2bBfb46aC3A71A6725699004B8a8fE4C928E7108)
- [Flarescan](https://coston.testnet.flarescan.com/address/0x2bBfb46aC3A71A6725699004B8a8fE4C928E7108)
- Coston2
- [Flare Explorer](https://coston2-explorer.flare.network/address/0x191a1282Ac700edE65c5B0AaF313BAcC3eA7fC7e)
- [Flarescan](https://coston2.testnet.flarescan.com/address/0x191a1282Ac700edE65c5B0AaF313BAcC3eA7fC7e)
- Songbird
- [Flare Explorer](https://songbird-explorer.flare.network/address/0x8998a3b85350aA4CA5f55cD80ab1f7C9C0ddf02C)
- [Flarescan](https://songbird.flarescan.com/address/0x8998a3b85350aA4CA5f55cD80ab1f7C9C0ddf02C)
- Flare
- [Flare Explorer](https://flare-explorer.flare.network/address/0x259852Ae6d5085bDc0650D3887825f7b76F0c4fe)
- [Flarescan](https://flare.flarescan.com/address/0x259852Ae6d5085bDc0650D3887825f7b76F0c4fe)
<ul>
<li>Coston</li>
<ul>
<li>
[Flare
Explorer](https://coston-explorer.flare.network/address/0x2bBfb46aC3A71A6725699004B8a8fE4C928E7108)
</li>
<li>
[Flarescan](https://coston.testnet.flarescan.com/address/0x2bBfb46aC3A71A6725699004B8a8fE4C928E7108)
</li>
</ul>
<li>Coston2</li>
<ul>
<li>
[Flare
Explorer](https://coston2-explorer.flare.network/address/0x191a1282Ac700edE65c5B0AaF313BAcC3eA7fC7e)
</li>
<li>
[Flarescan](https://coston2.testnet.flarescan.com/address/0x191a1282Ac700edE65c5B0AaF313BAcC3eA7fC7e)
</li>
</ul>
<li>Songbird</li>
<ul>
<li>
[Flare
Explorer](https://songbird-explorer.flare.network/address/0x8998a3b85350aA4CA5f55cD80ab1f7C9C0ddf02C)
</li>
<li>
[Flarescan](https://songbird.flarescan.com/address/0x8998a3b85350aA4CA5f55cD80ab1f7C9C0ddf02C)
</li>
</ul>
<li>Flare</li>
<ul>
<li>
[Flare
Explorer](https://flare-explorer.flare.network/address/0x259852Ae6d5085bDc0650D3887825f7b76F0c4fe)
</li>
<li>
[Flarescan](https://flare.flarescan.com/address/0x259852Ae6d5085bDc0650D3887825f7b76F0c4fe)
</li>
</ul>
</ul>

</details>

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

<details>
<summary>Links to all System Explorers</summary>
[Coston](https://coston-systems-explorer.flare.rocks/finalizations) -
[Coston2](https://coston2-systems-explorer.flare.rocks/finalizations) -
[Songbird](https://songbird-systems-explorer.flare.rocks/finalizations) -
[Flare](https://flare-systems-explorer.flare.rocks/finalizations)
<ul>
<li>[Coston](https://coston-systems-explorer.flare.rocks/finalizations)</li>
<li>
[Coston2](https://coston2-systems-explorer.flare.rocks/finalizations)
</li>
<li>
[Songbird](https://songbird-systems-explorer.flare.rocks/finalizations)
</li>
<li>[Flare](https://flare-systems-explorer.flare.rocks/finalizations)</li>
</ul>
</details>

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

<details>
<summary>Links to all Data Availability Clients</summary>
[Coston](https://ctn-data-availability.flare.network/api-doc#/) -
[Coston2](https://ctn2-data-availability.flare.network/api-doc#/) -
[Songbird](https://sgb-data-availability.flare.network/api-doc#/) -
[Flare](https://flr-data-availability.flare.network/api-doc#/)
<ul>
<li>[Coston](https://ctn-data-availability.flare.network/api-doc#/)</li>
<li>[Coston2](https://ctn2-data-availability.flare.network/api-doc#/)</li>
<li>[Songbird](https://sgb-data-availability.flare.network/api-doc#/)</li>
<li>[Flare](https://flr-data-availability.flare.network/api-doc#/)</li>
</ul>
</details>

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

<details>
<summary>Links to `FdcVerification` contract on all Flare chains.</summary>-
Coston - [Flare
Explorer](https://coston-explorer.flare.network/address/0x57a2db68fb40f6C61342FF4beF283AE185eA8E51)
-
[Flarescan](https://coston.testnet.flarescan.com/address/0x57a2db68fb40f6C61342FF4beF283AE185eA8E51)
- Coston2 - [Flare
Explorer](https://coston2-explorer.flare.network/address/0x075bf301fF07C4920e5261f93a0609640F53487D)
-
[Flarescan](https://coston2.testnet.flarescan.com/address/0x075bf301fF07C4920e5261f93a0609640F53487D)
- Songbird - [Flare
Explorer](https://songbird-explorer.flare.network/address/0xd283afC5A67E2d4Bc700b5B640328Bda22450621)
-
[Flarescan](https://songbird.flarescan.com/address/0xd283afC5A67E2d4Bc700b5B640328Bda22450621)
- Flare - [Flare
Explorer](https://flare-explorer.flare.network/address/0x9394c7A36b3Da8de1b4F27cdD0a554dA4Fa7132d)
-
[Flarescan](https://flare.flarescan.com/address/0x9394c7A36b3Da8de1b4F27cdD0a554dA4Fa7132d)
<summary>Links to `FdcVerification` contract on all Flare chains.</summary>
<ul>
<li>Coston</li>
<ul>
<li>
[Flare
Explorer](https://coston-explorer.flare.network/address/0x57a2db68fb40f6C61342FF4beF283AE185eA8E51)
</li>
<li>
[Flarescan](https://coston.testnet.flarescan.com/address/0x57a2db68fb40f6C61342FF4beF283AE185eA8E51)
</li>
</ul>
<li>Coston2 </li>
<ul>
<li>
[Flare
Explorer](https://coston2-explorer.flare.network/address/0x075bf301fF07C4920e5261f93a0609640F53487D)
</li>
<li>
[Flarescan](https://coston2.testnet.flarescan.com/address/0x075bf301fF07C4920e5261f93a0609640F53487D)
</li>
</ul>
<li>Songbird </li>
<ul>
<li>
[Flare
Explorer](https://songbird-explorer.flare.network/address/0xd283afC5A67E2d4Bc700b5B640328Bda22450621)
</li>
<li>
[Flarescan](https://songbird.flarescan.com/address/0xd283afC5A67E2d4Bc700b5B640328Bda22450621)
</li>
</ul>
<li>Flare </li>
<ul>
<li>
[Flare
Explorer](https://flare-explorer.flare.network/address/0x9394c7A36b3Da8de1b4F27cdD0a554dA4Fa7132d)
</li>
<li>
[Flarescan](https://flare.flarescan.com/address/0x9394c7A36b3Da8de1b4F27cdD0a554dA4Fa7132d)
</li>
</ul>
</ul>
</details>
12 changes: 6 additions & 6 deletions docs/fdc/guides/foundry/address-validity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ For `AddressValidity`, `requestBody` contains a single field:
### Reference Documentation

- [AddressValidity Specification](/fdc/attestation-types/address-validity)
- [Verifier Interactive Docs](https://fdc-verifiers-testnet.flare.network/verifier/btc/api-doc#/AddressValidity/BTCAddressValidityVerifierController_prepareRequest)
- [Verifier Interactive Docs](https://fdc-verifiers-testnet.flare.network/verifier/btc_testnet4/api-doc#/AddressValidity/BTCAddressValidityVerifierController_prepareRequest)
- 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).

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

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

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

Expand All @@ -267,7 +267,7 @@ source .env
```

```bash
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
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
```

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

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

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

```bash
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
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

```

Expand Down Expand Up @@ -822,6 +822,6 @@ We run this script with the console command:

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

```
10 changes: 5 additions & 5 deletions docs/fdc/guides/foundry/evm-transaction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ If you are accessing a different chain, replace the `baseSourceName` with an app
The code above differs slightly from the [starter example](https://github.com/flare-foundation/flare-foundry-starter).
But, if we remove the ellipses `...` signifying missing code, we can still run the script.

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

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

Expand All @@ -288,7 +288,7 @@ source .env
```

```bash
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
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
```

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

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

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

```bash
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
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
```

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

```bash
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
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

```
Loading