Skip to content

Commit b1dd4d2

Browse files
authored
feat(docs): add Foundry guides for Payment and JsonApi (#568)
2 parents 89129bd + dd7a6e7 commit b1dd4d2

File tree

3 files changed

+1645
-0
lines changed

3 files changed

+1645
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: JsonApi
3+
description: An attestation request that fetches data from the given url and then edits the information with a jq transformation.
4+
keywords: [fdc, oracle, flare-data-connector, flare-network]
5+
sidebar_position: 1
6+
---
7+
8+
An attestation request that fetches data from the given url and then edits the information with a jq transformation.
9+
10+
## Supported sources
11+
12+
- `WEB2`
13+
- test networks: `testWEB2`
14+
15+
## Request
16+
17+
| Field | Solidity type | Description |
18+
| --------------- | ------------- | -------------------------------------------------------- |
19+
| `url` | `string` | URL of the data source. |
20+
| `postprocessJq` | `string` | JQ filter to postprocess the json received from the url. |
21+
| `abi_signature` | `string` | ABI signature of struct for encoding. |
22+
23+
## Response
24+
25+
| Field | Solidity type | Description |
26+
| ------------------ | ------------- | ----------------- |
27+
| `abi_encoded_data` | `bytes` | ABI encoded data. |
28+
29+
## Lowest Used Timestamp
30+
31+
For `lowestUsedTimestamp`, `0xffffffffffffffff` ($2^{64}-1$ in hex) is used.
32+
33+
## Verification process
34+
35+
Query the URL with GET method.
36+
If the query is unsuccessful or does not return a json, reject the request.
37+
38+
Apply the jq filter specified in the request to the received json.
39+
40+
ABI encode the filtered json with the abi_signature provided in the request and return it as abi_encoded_data.
41+
42+
`LowestUsedTimestamp` is unlimited.

0 commit comments

Comments
 (0)