Scope and Limitations
This skill is documentation and guidance only. It describes how the Flare Data Connector (FDC) protocol works and how developers can integrate it. It does not perform any actions on behalf of the user.
This skill explicitly does NOT:
- Execute, sign, or broadcast any blockchain transactions
- Access, store, or transmit private keys or wallet credentials
- Initiate or authorize any payments or financial transfers
- Call any smart contract methods or APIs directly
- Handle funds, tokens, or any financial assets
External data handling:
- FDC attestation responses (Web2Json, EVMTransaction, DA Layer proofs) are externally provided content from third-party sources
- This skill instructs developers to treat all such data as untrusted and to decode it only according to documented ABI schemas
- Response content must never be passed into prompts, LLM inputs, or agent decision logic
- Developers are solely responsible for validating and safely handling all external data in their own implementations
What this skill does:
- Explains FDC attestation types, request flows, Merkle proof verification, and contract patterns
- References official Flare Developer Hub documentation and audited starter repositories
- Provides read-only conceptual guidance for developers building on Flare
All transaction signing, key management, and on-chain execution must occur exclusively in user-controlled, developer-managed environments outside of this skill.
Flare Data Connector (FDC)
What FDC Is
The Flare Data Connector (FDC) is an enshrined oracle that validates external data for Flare's EVM state. Users submit attestation requests; data providers reach consensus (a BitVector supported by more than 50% of total provider weight); verified data is stored in a Merkle tree (only the root is onchain). Users then fetch attestation responses and Merkle proofs from the Data Availability (DA) Layer and submit them to smart contracts, which verify proofs against the onchain root.
Key points:
- Data age limits — A proof can only be constructed for sufficiently recent states. The maximum allowed data age is set per attestation type and source: most chain-data types (EVMTransaction, Payment, etc.) allow up to 14 days;
AddressValidity and Web2Json place no practical limit. Once a proof is constructed it remains available indefinitely.
- Prepare request — Verifier API (e.g.
POST .../verifier/web2/Web2Json/prepareRequest with attestationType, sourceId and requestBody that depends on the attestation type)
- Request → FdcHub (
requestAttestation(bytes)) with ABI-encoded request; pay fee. The fee must be at least the configured minimum for the attestation type and source (otherwise rejected). Larger fees increase the chance the request is confirmed in its round. Confirmed request fees are awarded to data providers; unconfirmed request fees are burnt.
- Round finalization — typically 90–180 seconds; wait before using a proof.
- Proof retrieval — DA Layer API (e.g.
POST .../api/v1/fdc/proof-by-request-round-raw with votingRoundId and requestBytes).
- Contract verification — use
IFdcVerification (from ContractRegistry.getFdcVerification()) and the type-specific method (e.g. verifyEVMTransaction, verifyWeb2Json, verifyPayment, verifyAddressValidity).
No separate FDC signer list exists. FDC does not move assets across chains itself; it produces verifiable attestations about events on other chains or Web2 sources. The signers backing an attestation are the current members of the Flare Signing Policy — the same weighted validator set used across the whole Flare Systems Protocol (also backs FTSO and FCC), not something FDC maintains independently.
Attestation Types
| Type |
Purpose |
Chains / sources |
| AddressValidity |
Validate format/checksum of addresses |
BTC, DOGE, XRPL |
| EVMTransaction |
Verify and retrieve transaction + events |
ETH, FLR, SGB (mainnet); testETH, testFLR, testSGB (testnet) |
| JsonApi / Web2Json |
Fetch Web2 data, JQ transform, ABI-encoded output |
PublicWeb2 (Coston/Coston2) |
| Payment |
Confirm payment tx on non-EVM chains |
BTC, DOGE, XRP |
| ConfirmedBlockHeightExists |
Verify block existence and confirmations |
— |
| BalanceDecreasingTransaction |
Validate tx that decreases an address balance |
FAssets-oriented |
| ReferencedPaymentNonexistence |
Prove absence of specific payments in interval |
FAssets-oriented |
| XRPPayment |
Confirm an XRPL Payment with XRPL-native fields (r-address, MemoData, DestinationTag) |
XRP, testXRP |
| XRPPaymentNonexistence |
Prove no XRPL Payment matched destination/amount/memo/tag in a ledger range |
XRP, testXRP |
First three are most generally useful; the next three are mainly for FAssets; the XRPL-specific types expose XRPL-native fields (memo data, destination tag) that the chain-agnostic Payment type does not.
User Workflow (Offchain + Onchain)
- Prepare request — Encode attestation in FDC format. Use a verifier service (e.g. Flare testnet verifier or your own) to get
abiEncodedRequest (includes a message integrity code - MIC - and encoded request parameters).
- Submit — Call
FdcHub.requestAttestation(abiEncodedRequest) with value: requestFee.
- Round ID — From block timestamp:
roundId = floor((blockTimestamp - firstVotingRoundStartTs) / votingEpochDurationSeconds) (e.g. 90s). Get firstVotingRoundStartTs from FlareSystemsManager / config.
- Wait for finalization — Use
Relay contract: isFinalized(200, roundId) (200 = FDC protocol ID) or listen for ProtocolMessageRelayed(200, roundId).
- Fetch proof — POST to DA Layer with
votingRoundId and requestBytes (same abiEncodedRequest).
- Submit to contract — Pass
{ merkleProof, data } (decoded response) to your contract; contract calls FdcVerification.verify*() then uses the data.
Contract Pattern (Verification + Business Logic)
- Resolve FdcVerification via
ContractRegistry.getFdcVerification() (or auxiliaryGetIWeb2JsonVerification() for Web2Json when applicable).
- Always verify first, then decode and use data. Example (EVMTransaction):
function processProof(IEVMTransaction.Proof calldata proof) external {
require(ContractRegistry.getFdcVerification().verifyEVMTransaction(proof), "Invalid proof");
// use proof.data.responseBody (blockNumber, timestamp, events, ...)
}
- For Web2Json, decode
proof.data.responseBody.abi_encoded_data with your struct (define a DataTransportObject and optionally abiSignatureHack(dto) for artifact-based ABI signature in scripts).
- Use network-specific imports from
@flarenetwork/flare-periphery-contracts (e.g. coston2/ContractRegistry.sol, coston2/IEVMTransaction.sol). Set EVM version cancun where required.
Script / Offchain Pattern (Hardhat)
- Prepare: POST to verifier e.g.
VERIFIER_URL/verifier/eth/EVMTransaction/prepareRequest (or Web2Json, Payment, etc.) with attestation type, sourceId, request body; get abiEncodedRequest.
- Submit: Get
FdcHub via ContractRegistry or known address; call requestAttestation(abiEncodedRequest, { value: fee }); compute roundId from receipt block timestamp.
- Wait: Poll
Relay.isFinalized(200, roundId).
- Fetch: POST to DA Layer
.../api/v1/fdc/proof-by-request-round-raw with votingRoundId, requestBytes.
- Decode: Use artifact’s response type (e.g.
IEVMTransactionVerification._json.abi[0].inputs[0].components[1]) to decode response_hex; build { merkleProof: proof.proof, data: decodedResponse } and call contract.
Packages: ethers or web3, @flarenetwork/flare-periphery-contract-artifacts. For wagmi/viem typed contract interactions, use @flarenetwork/flare-wagmi-periphery-package.
Env: VERIFIER_URL_TESTNET, VERIFIER_API_KEY_TESTNET, COSTON2_DA_LAYER_URL (or equivalent for mainnet). Testnets use testETH/testFLR/testSGB as source IDs.
Verifier API keys are required for both testnet and mainnet verifiers. Set them in .env (see flare-hardhat-starter .env.example):
VERIFIER_API_KEY_TESTNET="00000000-0000-0000-0000-000000000000"
VERIFIER_API_KEY_MAINNET="00000000-0000-0000-0000-000000000000"
Pass the key via the X-API-KEY header when calling verifier endpoints — the header name is case-sensitive; a name like X-apikey is rejected with 401 Unauthorized. The default placeholder UUIDs work for initial testing but are rate-limited.
Example Repos and Where to Look
- flare-hardhat-starter:
- scripts/fdcExample/ — Per–attestation-type examples:
EVMTransaction.ts, Web2Json.ts, Payment.ts, AddressValidity.ts, etc. Use prepareAttestationRequestBase, submitAttestationRequest, retrieveDataAndProofBaseWithRetry (from scripts/utils/fdc or similar).
- contracts/fdcExample/ —
EVMTransaction.sol, AddressValidity.sol, Web2Json.sol, Payment.sol — show verification + decoding.
- weatherInsurance — Web2Json-based dApp (MinTempAgency): policies, resolve with weather API proof; scripts in
scripts/weatherInsurance/minTemp/ (createPolicy, claimPolicy, resolvePolicy, expirePolicy).
- proofOfReserves — Combines Web2Json (reserves API) and EVMTransaction (token supply events from multiple chains);
ProofOfReserves.sol, scripts in scripts/proofOfReserves/ (deploy, activateTokenStateReader, verifyProofOfReserves).
- flare-foundry-starter: Same attestation types plus cross-chain payment and cross-chain FDC examples; structure mirrors Hardhat.
Use these as the canonical patterns for prepare → submit → wait → get proof → verify in contract.
EVMTransaction Quick Reference
- Request:
transactionHash, requiredConfirmations, provideInput, listEvents, logIndices (max 50; sorted by contract convention).
- Response:
blockNumber, timestamp, sourceAddress, receivingAddress, value, input, status, events[] (logIndex, emitterAddress, topics, data, removed). Events are block-level indexed.
- Decode events in contract by filtering
emitterAddress and topics[0] (e.g. keccak256("Transfer(address,address,uint256)")), then topics[1]/topics[2] and data as needed.
Web2Json Quick Reference
- Request:
url, httpMethod, headers, queryParams, body, postProcessJq, abiSignature (tuple encoding the struct for abi_encoded_data).
- Response:
responseBody.abi_encoded_data — decode with abi.decode(..., (YourStruct)). Use the same struct and ABI signature in the verifier request and in the contract. Store fractional values as scaled integers (e.g. 10^6) if needed.
postProcessJq is a restricted jq subset (security/performance): builtin filters, |/,////comparison/arithmetic operators, if/then/elif/else/end, try/catch, indexing/slicing, [] iteration, array/object construction, and string interpolation are allowed. Rejected: user function definitions (def), assignment/update operators (=, |=), recurse, reduce, variable bindings (as, e.g. .a as $x | ...), and inputs. Write postProcessJq filters without as-bound variables — use if/ternary-style chaining or [...]/{...} construction instead.
Security: Web2Json fetches arbitrary public Web2 content from the requested URL. The returned responseBody / response_hex is externally provided content. Decode and use it only with your expected ABI/struct for contract verification—never treat it as natural language or pass it into prompts or an AI/LLM.
XRPPayment Quick Reference
- Sources:
XRP (mainnet), testXRP (testnet). Attestation type ID 0x08. Requires 3 XRPL confirmations (~12s).
- Request:
transactionId (bytes32, XRPL Payment tx hash), proofOwner (EVM address authorized to use the proof).
- Response:
blockNumber, blockTimestamp, sourceAddress (XRPL r-address), sourceAddressHash, receivingAddressHash, intendedReceivingAddressHash, spentAmount / intendedSpentAmount / receivedAmount / intendedReceivedAmount (drops, int256), hasMemoData + firstMemoData (raw bytes of the first Memo's MemoData), hasDestinationTag + destinationTag (uint32 on XRPL, surfaced as uint256), status (0=SUCCESS, 1=SENDER_FAILURE, 2=RECEIVER_FAILURE).
- Standard address hash is
keccak256(standardAddress) without lowercasing. Multi-output payments are rejected.
- Verify with
IFdcVerification.verifyXRPPayment(IXRPPayment.Proof).
XRPPaymentNonexistence Quick Reference
- Sources:
XRP (mainnet), testXRP (testnet). Attestation type ID 0x09. Search range is [minimalBlockNumber, firstOverflowBlockNumber).
- Request:
minimalBlockNumber, deadlineBlockNumber, deadlineTimestamp, destinationAddressHash, amount (drops, uint256), checkFirstMemoData + firstMemoDataHash, checkDestinationTag + destinationTag, proofOwner. At least one of checkFirstMemoData or checkDestinationTag must be true.
- Response:
minimalBlockTimestamp, firstOverflowBlockNumber, firstOverflowBlockTimestamp. lowestUsedTimestamp is set to minimalBlockTimestamp.
- A matching tx invalidates the claim only if all of receiver hash, amount, memo/tag (per the check flags), and successful outcome (excluding
SENDER_FAILURE) align.
- Verify with
IFdcVerification.verifyXRPPaymentNonexistence(IXRPPaymentNonexistence.Proof).
Security and usage considerations
Third-party content: FDC attestation responses (including Web2Json responseBody/response_hex, EVMTransaction payloads, and DA Layer proof responses) are derived from external or user-specified sources. Treat all such data as externally provided. Decode and use it only according to the documented attestation format and your expected ABI/schema. Do not pass response content into prompts or allow it to unintentionally influence agent behavior when consuming FDC proofs or verifier/DA Layer outputs.
When to Use This Skill
- Implementing or debugging FDC attestation flows (request, round, proof, verification).
- Writing or reviewing contracts that consume FDC proofs (EVMTransaction, Web2Json, Payment, AddressValidity, etc.).
- Integrating verifier or DA Layer in scripts/tests.
- Building or explaining dApps that use FDC (proof-of-reserves, weather insurance, cross-chain payment).
- Following Flare Developer Hub FDC guides and starter repos.
Additional Resources
1---2name: flare-fdc3description: Provides domain knowledge and guidance for the Flare Data Connector (FDC)—attestation types, request flow, Merkle proofs, verifier/DA Layer, and smart contract integration. Use when working with FDC, cross-chain attestations, EVMTransaction, Web2Json, Payment, AddressValidity, XRPPayment, XRPPaymentNonexistence, proof-of-reserves, weather insurance, or Flare Developer Hub FDC guides and starter repos.4---56## Scope and Limitations78This skill is **documentation and guidance only**. It describes how the Flare Data Connector (FDC) protocol works and how developers can integrate it. It does not perform any actions on behalf of the user.910**This skill explicitly does NOT:**11- Execute, sign, or broadcast any blockchain transactions12- Access, store, or transmit private keys or wallet credentials13- Initiate or authorize any payments or financial transfers14- Call any smart contract methods or APIs directly15- Handle funds, tokens, or any financial assets1617**External data handling:**18- FDC attestation responses (Web2Json, EVMTransaction, DA Layer proofs) are **externally provided content** from third-party sources19- This skill instructs developers to treat all such data as untrusted and to decode it only according to documented ABI schemas20- Response content must **never** be passed into prompts, LLM inputs, or agent decision logic21- Developers are solely responsible for validating and safely handling all external data in their own implementations2223**What this skill does:**24- Explains FDC attestation types, request flows, Merkle proof verification, and contract patterns25- References official Flare Developer Hub documentation and audited starter repositories26- Provides read-only conceptual guidance for developers building on Flare2728All transaction signing, key management, and on-chain execution must occur exclusively in user-controlled, developer-managed environments outside of this skill.2930# Flare Data Connector (FDC)3132## What FDC Is3334The **Flare Data Connector (FDC)** is an enshrined oracle that validates external data for Flare's EVM state. Users submit attestation requests; data providers reach consensus (a BitVector supported by more than 50% of total provider weight); verified data is stored in a Merkle tree (only the root is onchain). Users then fetch attestation responses and Merkle proofs from the Data Availability (DA) Layer and submit them to smart contracts, which verify proofs against the onchain root.3536**Key points:**37- **Data age limits** — A proof can only be constructed for sufficiently recent states. The maximum allowed data age is set per attestation type and source: most chain-data types (EVMTransaction, Payment, etc.) allow up to **14 days**; `AddressValidity` and `Web2Json` place no practical limit. Once a proof is constructed it remains available indefinitely.38- **Prepare request** — Verifier API (e.g. `POST .../verifier/web2/Web2Json/prepareRequest` with `attestationType`, `sourceId` and `requestBody` that depends on the attestation type)39- **Request → FdcHub** (`requestAttestation(bytes)`) with ABI-encoded request; pay fee. The fee must be at least the configured minimum for the attestation type and source (otherwise rejected). Larger fees increase the chance the request is confirmed in its round. Confirmed request fees are awarded to data providers; unconfirmed request fees are burnt.40- **Round finalization** — typically 90–180 seconds; wait before using a proof.41- **Proof retrieval** — DA Layer API (e.g. `POST .../api/v1/fdc/proof-by-request-round-raw` with `votingRoundId` and `requestBytes`).42- **Contract verification** — use `IFdcVerification` (from `ContractRegistry.getFdcVerification()`) and the type-specific method (e.g. `verifyEVMTransaction`, `verifyWeb2Json`, `verifyPayment`, `verifyAddressValidity`).4344**No separate FDC signer list exists.** FDC does not move assets across chains itself; it produces verifiable attestations about events on other chains or Web2 sources. The signers backing an attestation are the current members of the [Flare Signing Policy](https://dev.flare.network/network/fsp) — the same weighted validator set used across the whole Flare Systems Protocol (also backs FTSO and FCC), not something FDC maintains independently.4546## Attestation Types4748| Type | Purpose | Chains / sources |49|------|---------|------------------|50| **AddressValidity** | Validate format/checksum of addresses | BTC, DOGE, XRPL |51| **EVMTransaction** | Verify and retrieve transaction + events | ETH, FLR, SGB (mainnet); testETH, testFLR, testSGB (testnet) |52| **JsonApi / Web2Json** | Fetch Web2 data, JQ transform, ABI-encoded output | PublicWeb2 (Coston/Coston2) |53| **Payment** | Confirm payment tx on non-EVM chains | BTC, DOGE, XRP |54| **ConfirmedBlockHeightExists** | Verify block existence and confirmations | — |55| **BalanceDecreasingTransaction** | Validate tx that decreases an address balance | FAssets-oriented |56| **ReferencedPaymentNonexistence** | Prove absence of specific payments in interval | FAssets-oriented |57| **XRPPayment** | Confirm an XRPL Payment with XRPL-native fields (r-address, MemoData, DestinationTag) | XRP, testXRP |58| **XRPPaymentNonexistence** | Prove no XRPL Payment matched destination/amount/memo/tag in a ledger range | XRP, testXRP |5960First three are most generally useful; the next three are mainly for **FAssets**; the XRPL-specific types expose XRPL-native fields (memo data, destination tag) that the chain-agnostic Payment type does not.6162## User Workflow (Offchain + Onchain)63641. **Prepare request** — Encode attestation in FDC format. Use a **verifier service** (e.g. Flare testnet verifier or your own) to get `abiEncodedRequest` (includes a message integrity code - MIC - and encoded request parameters).652. **Submit** — Call `FdcHub.requestAttestation(abiEncodedRequest)` with `value: requestFee`.663. **Round ID** — From block timestamp: `roundId = floor((blockTimestamp - firstVotingRoundStartTs) / votingEpochDurationSeconds)` (e.g. 90s). Get `firstVotingRoundStartTs` from `FlareSystemsManager` / config.674. **Wait for finalization** — Use `Relay` contract: `isFinalized(200, roundId)` (200 = FDC protocol ID) or listen for `ProtocolMessageRelayed(200, roundId)`.685. **Fetch proof** — POST to DA Layer with `votingRoundId` and `requestBytes` (same `abiEncodedRequest`).696. **Submit to contract** — Pass `{ merkleProof, data }` (decoded response) to your contract; contract calls `FdcVerification.verify*()` then uses the data.7071## Contract Pattern (Verification + Business Logic)7273- Resolve **FdcVerification** via `ContractRegistry.getFdcVerification()` (or `auxiliaryGetIWeb2JsonVerification()` for Web2Json when applicable).74- **Always verify first**, then decode and use data. Example (EVMTransaction):7576```solidity77function processProof(IEVMTransaction.Proof calldata proof) external {78 require(ContractRegistry.getFdcVerification().verifyEVMTransaction(proof), "Invalid proof");79 // use proof.data.responseBody (blockNumber, timestamp, events, ...)80}81```8283- For **Web2Json**, decode `proof.data.responseBody.abi_encoded_data` with your struct (define a `DataTransportObject` and optionally `abiSignatureHack(dto)` for artifact-based ABI signature in scripts).84- Use **network-specific imports** from `@flarenetwork/flare-periphery-contracts` (e.g. `coston2/ContractRegistry.sol`, `coston2/IEVMTransaction.sol`). Set EVM version **cancun** where required.8586## Script / Offchain Pattern (Hardhat)8788- **Prepare:** POST to verifier e.g. `VERIFIER_URL/verifier/eth/EVMTransaction/prepareRequest` (or Web2Json, Payment, etc.) with attestation type, sourceId, request body; get `abiEncodedRequest`.89- **Submit:** Get `FdcHub` via `ContractRegistry` or known address; call `requestAttestation(abiEncodedRequest, { value: fee })`; compute `roundId` from receipt block timestamp.90- **Wait:** Poll `Relay.isFinalized(200, roundId)`.91- **Fetch:** POST to DA Layer `.../api/v1/fdc/proof-by-request-round-raw` with `votingRoundId`, `requestBytes`.92- **Decode:** Use artifact’s response type (e.g. `IEVMTransactionVerification._json.abi[0].inputs[0].components[1]`) to decode `response_hex`; build `{ merkleProof: proof.proof, data: decodedResponse }` and call contract.9394**Packages:** `ethers` or `web3`, `@flarenetwork/flare-periphery-contract-artifacts`. For wagmi/viem typed contract interactions, use [`@flarenetwork/flare-wagmi-periphery-package`](https://www.npmjs.com/package/@flarenetwork/flare-wagmi-periphery-package).9596**Env:** `VERIFIER_URL_TESTNET`, `VERIFIER_API_KEY_TESTNET`, `COSTON2_DA_LAYER_URL` (or equivalent for mainnet). Testnets use `testETH`/`testFLR`/`testSGB` as source IDs.9798**Verifier API keys** are required for both testnet and mainnet verifiers. Set them in `.env` (see [flare-hardhat-starter `.env.example`](https://github.com/flare-foundation/flare-hardhat-starter/blob/main/.env.example)):99100```env101VERIFIER_API_KEY_TESTNET="00000000-0000-0000-0000-000000000000"102VERIFIER_API_KEY_MAINNET="00000000-0000-0000-0000-000000000000"103```104105Pass the key via the `X-API-KEY` header when calling verifier endpoints — the header name is case-sensitive; a name like `X-apikey` is rejected with `401 Unauthorized`. The default placeholder UUIDs work for initial testing but are rate-limited.106107## Example Repos and Where to Look108109- **[flare-hardhat-starter](https://github.com/flare-foundation/flare-hardhat-starter):**110 - **scripts/fdcExample/** — Per–attestation-type examples: `EVMTransaction.ts`, `Web2Json.ts`, `Payment.ts`, `AddressValidity.ts`, etc. Use `prepareAttestationRequestBase`, `submitAttestationRequest`, `retrieveDataAndProofBaseWithRetry` (from `scripts/utils/fdc` or similar).111 - **contracts/fdcExample/** — `EVMTransaction.sol`, `AddressValidity.sol`, `Web2Json.sol`, `Payment.sol` — show verification + decoding.112 - **weatherInsurance** — Web2Json-based dApp (MinTempAgency): policies, resolve with weather API proof; scripts in `scripts/weatherInsurance/minTemp/` (createPolicy, claimPolicy, resolvePolicy, expirePolicy).113 - **proofOfReserves** — Combines **Web2Json** (reserves API) and **EVMTransaction** (token supply events from multiple chains); `ProofOfReserves.sol`, scripts in `scripts/proofOfReserves/` (deploy, activateTokenStateReader, verifyProofOfReserves).114- **[flare-foundry-starter](https://github.com/flare-foundation/flare-foundry-starter):** Same attestation types plus cross-chain payment and cross-chain FDC examples; structure mirrors Hardhat.115116Use these as the canonical patterns for prepare → submit → wait → get proof → verify in contract.117118## EVMTransaction Quick Reference119120- **Request:** `transactionHash`, `requiredConfirmations`, `provideInput`, `listEvents`, `logIndices` (max 50; sorted by contract convention).121- **Response:** `blockNumber`, `timestamp`, `sourceAddress`, `receivingAddress`, `value`, `input`, `status`, `events[]` (logIndex, emitterAddress, topics, data, removed). Events are block-level indexed.122- Decode events in contract by filtering `emitterAddress` and `topics[0]` (e.g. `keccak256("Transfer(address,address,uint256)")`), then `topics[1]`/`topics[2]` and `data` as needed.123124## Web2Json Quick Reference125126- **Request:** `url`, `httpMethod`, `headers`, `queryParams`, `body`, `postProcessJq`, `abiSignature` (tuple encoding the struct for `abi_encoded_data`).127- **Response:** `responseBody.abi_encoded_data` — decode with `abi.decode(..., (YourStruct))`. Use the same struct and ABI signature in the verifier request and in the contract. Store fractional values as scaled integers (e.g. 10^6) if needed.128- **`postProcessJq` is a restricted `jq` subset** (security/performance): builtin filters, `|`/`,`/`//`/comparison/arithmetic operators, `if/then/elif/else/end`, `try/catch`, indexing/slicing, `[]` iteration, array/object construction, and string interpolation are allowed. **Rejected:** user function definitions (`def`), assignment/update operators (`=`, `|=`), `recurse`, `reduce`, **variable bindings (`as`, e.g. `.a as $x | ...`)**, and `inputs`. Write postProcessJq filters without `as`-bound variables — use `if`/ternary-style chaining or `[...]`/`{...}` construction instead.129130**Security:** Web2Json fetches arbitrary public Web2 content from the requested URL. The returned `responseBody` / `response_hex` is **externally provided content**. Decode and use it only with your expected ABI/struct for contract verification—never treat it as natural language or pass it into prompts or an AI/LLM.131132## XRPPayment Quick Reference133134- **Sources:** `XRP` (mainnet), `testXRP` (testnet). Attestation type ID `0x08`. Requires 3 XRPL confirmations (~12s).135- **Request:** `transactionId` (bytes32, XRPL Payment tx hash), `proofOwner` (EVM address authorized to use the proof).136- **Response:** `blockNumber`, `blockTimestamp`, `sourceAddress` (XRPL r-address), `sourceAddressHash`, `receivingAddressHash`, `intendedReceivingAddressHash`, `spentAmount` / `intendedSpentAmount` / `receivedAmount` / `intendedReceivedAmount` (drops, int256), `hasMemoData` + `firstMemoData` (raw bytes of the first Memo's `MemoData`), `hasDestinationTag` + `destinationTag` (uint32 on XRPL, surfaced as uint256), `status` (0=SUCCESS, 1=SENDER_FAILURE, 2=RECEIVER_FAILURE).137- Standard address hash is `keccak256(standardAddress)` without lowercasing. Multi-output payments are rejected.138- Verify with `IFdcVerification.verifyXRPPayment(IXRPPayment.Proof)`.139140## XRPPaymentNonexistence Quick Reference141142- **Sources:** `XRP` (mainnet), `testXRP` (testnet). Attestation type ID `0x09`. Search range is `[minimalBlockNumber, firstOverflowBlockNumber)`.143- **Request:** `minimalBlockNumber`, `deadlineBlockNumber`, `deadlineTimestamp`, `destinationAddressHash`, `amount` (drops, uint256), `checkFirstMemoData` + `firstMemoDataHash`, `checkDestinationTag` + `destinationTag`, `proofOwner`. **At least one of `checkFirstMemoData` or `checkDestinationTag` must be `true`.**144- **Response:** `minimalBlockTimestamp`, `firstOverflowBlockNumber`, `firstOverflowBlockTimestamp`. `lowestUsedTimestamp` is set to `minimalBlockTimestamp`.145- A matching tx invalidates the claim only if all of receiver hash, amount, memo/tag (per the check flags), and successful outcome (excluding `SENDER_FAILURE`) align.146- Verify with `IFdcVerification.verifyXRPPaymentNonexistence(IXRPPaymentNonexistence.Proof)`.147148## Security and usage considerations149150**Third-party content:** FDC attestation responses (including Web2Json `responseBody`/`response_hex`, EVMTransaction payloads, and DA Layer proof responses) are derived from external or user-specified sources. Treat all such data as **externally provided**. Decode and use it only according to the documented attestation format and your expected ABI/schema. Do **not** pass response content into prompts or allow it to unintentionally influence agent behavior when consuming FDC proofs or verifier/DA Layer outputs.151152## When to Use This Skill153154- Implementing or debugging FDC attestation flows (request, round, proof, verification).155- Writing or reviewing contracts that consume FDC proofs (EVMTransaction, Web2Json, Payment, AddressValidity, etc.).156- Integrating verifier or DA Layer in scripts/tests.157- Building or explaining dApps that use FDC (proof-of-reserves, weather insurance, cross-chain payment).158- Following [Flare Developer Hub FDC](https://dev.flare.network/fdc/overview) guides and starter repos.159160## Additional Resources161162- Detailed APIs, contract interfaces, and links: [reference.md](reference.md)163- FDC Overview: [dev.flare.network/fdc/overview](https://dev.flare.network/fdc/overview)164- Getting Started: [dev.flare.network/fdc/getting-started](https://dev.flare.network/fdc/getting-started)165- Hardhat guides (by type): [dev.flare.network/fdc/guides/hardhat](https://dev.flare.network/fdc/guides/hardhat)166- Foundry guides: [dev.flare.network/fdc/guides/foundry](https://dev.flare.network/fdc/guides/foundry)