Skip to content

Commit bd0bd3d

Browse files
committed
Dev tools: API3 doc
- Fix images and admonitions
1 parent 7d0a89d commit bd0bd3d

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

docs/tools/oracles/api3.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
[API3](https://api3.org/) is a collaborative project to deliver traditional API services to smart contract platforms in a decentralized and trust-minimized way. It is governed by a decentralized autonomous organization (DAO), namely the [API3 DAO](https://api3.org/dao).
88

9-
:::info The API3 DAO
10-
Read more about how The API3 DAO works. [Click here](https://docs.api3.org/explore/dao-members/)
11-
:::
9+
!!! info "The API3 DAO"
10+
Read more about how The API3 DAO works. [Click here](https://docs.api3.org/explore/dao-members/)
11+
1212

1313
## Airnode
1414

@@ -17,7 +17,8 @@ Developers can use [Airnode](https://docs.api3.org/explore/airnode/what-is-airno
1717
An on-chain smart contract makes a request in the [RRP (Request Response Protocol)](https://docs.api3.org/reference/airnode/latest/concepts/) contract (`AirnodeRrpV0.sol`) that adds the request to the event logs. The Airnode then accesses the event logs, fetches the API data and performs a callback to the requester with the requested data.
1818

1919
<!-- ![API3 Remix deploy](/img/tools/api3/airnode1.png) -->
20-
<img src="/img/tools/api3/airnode1.png" width="600"/>
20+
21+
![airnode1](../../img/tools/oracles/api3/airnode1.png)
2122

2223
## Requesting off-chain data by calling an Airnode
2324

@@ -28,8 +29,9 @@ The requester calling an Airnode primarily focuses on two tasks:
2829
- Make the request
2930
- Accept and decode the response
3031

31-
<img src="/img/tools/api3/airnode2.png" width="600"/>
32-
<br></br>
32+
<center>
33+
![airnode2](../../img/tools/oracles/api3/airnode2.png){width=70%}
34+
</center>
3335

3436
**Here is an example of a basic requester contract to request data from an Airnode:**
3537

@@ -96,9 +98,9 @@ contract Requester is RrpRequesterV0, Ownable {
9698

9799
The `_rrpAddress` is the main `airnodeRrpAddress`. The RRP Contracts have already been deployed on-chain. You can check the address for all supported chains [here](https://docs.api3.org/reference/airnode/latest/). You can also try [deploying it using Remix](https://remix.ethereum.org/#url=https://github.com/api3-ecosystem/remix-contracts/blob/master/contracts/RequesterWithWithdrawal.sol&optimize=false&runs=200&evmVersion=null&version=soljson-v0.8.9+commit.e5eed63a.js)
98100

99-
| Contract | Addresses |
100-
|:------------------------:|:------------------------------------------------:|
101-
| AirnodeRrpV0 | `0xa0AD79D995DdeeB18a14eAef56A549A04e3Aa1Bd` |
101+
| Contract | Addresses |
102+
| :----------: | :------------------------------------------: |
103+
| AirnodeRrpV0 | `0xa0AD79D995DdeeB18a14eAef56A549A04e3Aa1Bd` |
102104

103105

104106
### Request parameters
@@ -117,9 +119,9 @@ The callback to the Requester contains two parameters:
117119
- [**`requestId`**](https://docs.api3.org/reference/airnode/latest/concepts/request.html#requestid): First acquired when making the request and passed here as a reference to identify the request for which the response is intended.
118120
- **`data`**: In case of a successful response, this is the requested data which has been encoded and contains a timestamp in addition to other response data. Decode it using the `decode()` function from the `abi` object.
119121

120-
:::info Note !
121-
Sponsors should not fund a `sponsorWallet` with more then they can trust the Airnode with, as the Airnode controls the private key to the `sponsorWallet`. The deployer of such Airnode undertakes no custody obligations, and the risk of loss or misuse of any excess funds sent to the `sponsorWallet` remains with the sponsor.
122-
:::
122+
!!! info "Note"
123+
Sponsors should not fund a `sponsorWallet` with more then they can trust the Airnode with, as the Airnode controls the private key to the `sponsorWallet`. The deployer of such Airnode undertakes no custody obligations, and the risk of loss or misuse of any excess funds sent to the `sponsorWallet` remains with the sponsor.
124+
123125

124126
[Try deploying it on Remix!](https://remix.ethereum.org/#url=https://github.com/api3-ecosystem/remix-contracts/blob/master/contracts/RequesterWithWithdrawal.sol&optimize=false&runs=200&evmVersion=null&version=soljson-v0.8.9+commit.e5eed63a.js)
125127

@@ -136,7 +138,7 @@ Apart from relying on deviation threshold and heartbeat configuration updates, u
136138

137139
The [API3 Market](https://market.api3.org/polygon) enables users to connect to a dAPI and access the associated data feed services.
138140

139-
<img src="/img/tools/api3/dapi-main.png"/>
141+
![dapi-main](../../img/tools/oracles/api3/dapi-main.png)
140142

141143
[*To learn more about how dAPIs work, click here*](https://docs.api3.org/explore/dapis/what-are-dapis.html)
142144

@@ -157,27 +159,26 @@ The current supported configurations for dAPIs are:
157159
| 1% | 24 hours |
158160
| 5% | 24 hours |
159161

160-
<img src="/img/tools/api3/dapi-1.png"/>
162+
![dapi-1](../../img/tools/oracles/api3/dapi-1.png)
161163

162164
#### Activating your dAPI
163165

164-
:::note
165-
Note
166-
167-
If a dAPI is already activated, make sure to check the expiration date and update parameters. You can update the parameters and extend the subscription by purchasing a new configuration.
168-
:::
166+
!!! note "Note"
167+
If a dAPI is already activated, make sure to check the expiration date and update parameters. You can update the parameters and extend the subscription by purchasing a new configuration.
169168

170169
After selecting the dAPI and the configuration, you will be presented with an option to purchase the dAPI and activate it. Make sure to check the time and amount of the subscription. If everything looks good, click on Purchase.
171170

172-
<img src="/img/tools/api3/dapi-2.png"/>
171+
<center>
172+
![dapi-2](../../img/tools/oracles/api3/dapi-2.png){width=65%}
173+
</center>
173174

174175
You can then connect your wallet and confirm the transaction. Once it's confirmed, you will be able to see the updated configuration for the dAPI.
175176

176177
#### Getting the proxy address
177178

178179
Once you are done configuring and activating the dAPI, you can now integrate it. To do so, click on the **Integrate** button on the dAPI details page.
179180

180-
<img src="/img/tools/api3/dapi-5.png"/>
181+
![dapi-5](../../img/tools/oracles/api3/dapi-5.png)
181182

182183
You can now see the deployed proxy contract address. You can now use this to read from the configured dAPI.
183184

@@ -379,7 +380,7 @@ You can try QRNG on the Polygon and Polygon zkEVM for free. Check out the all th
379380

380381
[Click here to read more about API3 QRNG](https://docs.api3.org/explore/qrng/)
381382

382-
## Additional Resources
383+
## Additional resources
383384

384385
Here are some additional developer resources
385386

0 commit comments

Comments
 (0)