Skip to content

Commit

Permalink
Update Dev3 SDK tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
thedriftofwords committed Sep 30, 2023
1 parent 68bc74a commit e6fe82f
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/content/quickstarts/dev3-chainlink-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,32 @@ Once the SDK is initialized, you can start consuming different feeds as outlined
1. The output should be similar to: `40104190000000000`. Compare this to the [AAVE / ETH price feed](https://data.chain.link/ethereum/mainnet/crypto-eth/aave-eth), which returns `Ξ0.04010419` at the time of writing.
</Fragment>
<Fragment slot="panel.2">
Add the following code to your JavaScript or TypeScript file:
1. Add the following code to your JavaScript or TypeScript file:
```ts
// Azuki floor price
ethSDK.getFromOracle(ethSDK.feeds.AZUKI_FLOOR_ETH).then((res) => {
ethSDK.getFromOracle(ethSDK.feeds.COINBASE_AZUKI_FLOOR_PRICE_ETH).then((res) => {
console.log(res.answer.toString());
});
```
1. Run your file. For example:
```sh
node index.js
```
1. The output should be similar to: `3480450640000000000`. Compare this to the [Azuki floor price feed](https://data.chain.link/ethereum/mainnet/nft-floor-prices/coinbase-azuki-floor-price-eth), which returns `Ξ3.4805` at the time of writing.
</Fragment>
<Fragment slot="panel.3">
Add the following code to your JavaScript or TypeScript file:
1. Add the following code to your JavaScript or TypeScript file:
```ts
// EURS reserves
ethSDK.getFromOracle(ethSDK.feeds.EURS_RESERVES).then((res) => {
// eFIL reserves
ethSDK.getFromOracle(ethSDK.feeds.EFIL_POR).then((res) => {
console.log(res.answer.toString());
});
```
1. Run your file. For example:
```sh
node index.js
```
1. The output should be similar to: `126365967984000000000000`. Compare this to the [eFIL reserves price feed](https://data.chain.link/ethereum/mainnet/reserves/efil-por), which returns `126,366` at the time of writing.
</Fragment>
</TabsContent>

Expand Down

0 comments on commit e6fe82f

Please sign in to comment.