Skip to content

Commit

Permalink
docs: update oracle
Browse files Browse the repository at this point in the history
  • Loading branch information
yongenaelf committed Sep 12, 2024
1 parent 1fac1e1 commit 6cceaaa
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/tools/oracle/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_position: 4
title: Oracle
title: Introduction
description: Transfer tamper-proof data from off-chain to on-chain
---

Expand All @@ -22,3 +22,4 @@ The go-to place for developers who want to learn how to build applications using
## 3. What's Next?

You have now understood the basic functions of Oracle. Next, you can choose the appropriate Oracle product based on your scenario to make your DApp contract more secure and efficient.

2 changes: 2 additions & 0 deletions docs/tools/oracle/quick-start/automation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
sidebar_position: 3
---

# Automation

AetherLink Automation allows developers to automate smart contract functions by triggering actions based on specific events or conditions. This reduces the need for manual intervention and ensures contracts execute efficiently and reliably when certain criteria are met.

## 1. Preparation
Expand Down
4 changes: 4 additions & 0 deletions docs/tools/oracle/quick-start/data-feeds/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
sidebar_position: 1
---

# DataFeeds

AetherLink Datafeeds provide decentralized, real-time data from multiple sources, enabling smart contracts to access highly reliable and accurate off-chain information, such as asset prices, for secure decision-making in decentralized applications.
Expand Down
34 changes: 34 additions & 0 deletions docs/tools/oracle/quick-start/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Quick Start

## Requirements

This guide assumes that you have basic knowledge about writing and deploying smart contracts. If you are new to smart contract development, learn how to [Deploy Your First Smart Contract](/quick-start/developers/hello-world-contract/) before you begin.

## Preparation

### Apply Subscription ID

Before initiating a task to the oracle, you need to contact [AetherLink](https://t.me/TheAetherLink) to apply for a subscription number for your task. Later, you can manage the service fee based on this subscription ID. Remember that you only have the right to use your own subscription ID.

### Oracle Address

Below are the oracle contract addresses in different environments:

| ENV | CHAINID | ADDRESS |
| ------- | ------- | ---------------------------------------------------- |
| MainNet | AELF | `BGhrBNTPcLccaxPv6hHJrn4CHHzeMovTsrkhFse5o2nwfvQyG` |
| MainNet | tDVV | `BGhrBNTPcLccaxPv6hHJrn4CHHzeMovTsrkhFse5o2nwfvQyG` |
| TestNet | AELF | `21Fh7yog1B741yioZhNAFbs3byJ97jvBmbGAPPZKZpHHog5aEg` |
| TestNet | tDVW | `21Fh7yog1B741yioZhNAFbs3byJ97jvBmbGAPPZKZpHHog5aEg` |

How to use the oracle contract address. Please reference the picture below in the complete code. You can also dynamically configure it through other configurations.

![Oracle Contract Address](oracle-contract-address.png)

## Next Steps

🚀 Congratulations on completing the preparations for integrating the oracle. We currently support 3 oracle scenarios, and you can navigate to the corresponding page based on your requirements.

1. **Datafeeds**: AetherLink Datafeeds provide decentralized, real-time data from multiple sources, enabling smart contracts to access highly reliable and accurate off-chain information, such as asset prices, for secure decision-making in decentralized applications.
2. **VRF (Verifiable Random Function)**: AetherLink VRF delivers provably fair and verifiable random numbers, ensuring the randomness used in smart contracts is tamper-proof and transparent. This is particularly useful for gaming, lotteries, and any application that requires trusted randomness.
3. **Automation**: AetherLink Automation allows developers to automate smart contract functions by triggering actions based on specific events or conditions. This reduces the need for manual intervention and ensures contracts execute efficiently and reliably when certain criteria are met.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/tools/oracle/quick-start/vrf/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
sidebar_position: 2
---

# VRF

AetherLink VRF delivers provably fair and verifiable random numbers, ensuring the randomness used in smart contracts is tamper-proof and transparent. This is particularly useful for gaming, lotteries, and any application that requires trusted randomness.
Expand Down
15 changes: 13 additions & 2 deletions sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,20 @@ const sidebars: SidebarsConfig = {
},
items: [
{ type: "doc", id: "tools/aelf-playground/index" },
{ type: "link", label: "Wallet", href: "https://portkey.finance/", description: "Integrate your dApp with Portkey wallet" },
{
type: "link",
label: "Wallet",
href: "https://portkey.finance/",
description: "Integrate your dApp with Portkey wallet",
},
{ type: "doc", id: "tools/faucet/index" },
{ type: "doc", id: "tools/oracle/index" },
{
type: "category",
label: "Oracle",
link: { type: "doc", id: "tools/oracle/index" },
customProps: { description: "Oracle is" },
items: [{ type: "autogenerated", dirName: "tools/oracle" }],
},
{
type: "link",
label: "Indexer",
Expand Down

0 comments on commit 6cceaaa

Please sign in to comment.