Skip to content

Commit

Permalink
Merge branch 'ISC/updateNetworkInfoRequestedUpdates' into docs/evm/to…
Browse files Browse the repository at this point in the history
…oling
  • Loading branch information
Dr-Electron committed May 24, 2024
2 parents 4d2ca7c + c7e8b59 commit e588aa8
Show file tree
Hide file tree
Showing 33 changed files with 2,038 additions and 205 deletions.
18 changes: 18 additions & 0 deletions docs/build/_partials/_oracles_contract_data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<table>
<tr>
<th>Pyth contract</th>
<td><a href="https://explorer.evm.iota.org/address/0x8D254a21b3C86D32F7179855531CE99164721933">https://explorer.evm.iota.org/address/0x8D254a21b3C86D32F7179855531CE99164721933</a></td>
</tr>
<tr>
<th>Supra Pull Contract</th>
<td><a href="https://explorer.evm.iota.org/address/0x2FA6DbFe4291136Cf272E1A3294362b6651e8517">https://explorer.evm.iota.org/address/0x2FA6DbFe4291136Cf272E1A3294362b6651e8517</a></td>
</tr>
<tr>
<th>Supra Storage Contract</th>
<td><a href="https://explorer.evm.iota.org/address/0xD02cc7a670047b6b012556A88e275c685d25e0c9">https://explorer.evm.iota.org/address/0xD02cc7a670047b6b012556A88e275c685d25e0c9</a></td>
</tr>
<tr>
<th>Supra Pull Contract</th>
<td><a href="https://explorer.evm.iota.org/address/0xD02cc7a670047b6b012556A88e275c685d25e0c9">https://explorer.evm.iota.org/address/0xD02cc7a670047b6b012556A88e275c685d25e0c9</a></td>
</tr>
</table>
6 changes: 6 additions & 0 deletions docs/build/apis/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ const categories = [
collapsed: true,
items: './docs/core/v2/sidebar',
},
{
type: 'category',
label: 'V3',
collapsed: true,
items: './docs/core/v3/sidebar',
},
],
},
{
Expand Down
29 changes: 29 additions & 0 deletions docs/build/getting-started/blastAPI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Blast API

[Blast API](https://blastapi.io/) is a decentralized platform that provides reliable and scalable node infrastructure
for accessing blockchain data. It supports multiple blockchain networks, offering seamless integration and
high-performance API endpoints for cross-chain decentralized applications (dApps).

## Enhanced Performance and Reliability

Blast API uses a decentralized network of third-party node providers, that ensure high availability and fast response
times. This architecture provides resilient infrastructure services crucial for dApps requiring real-time data access.

## Multi-Blockchain Support

Besides IOTA EVM, Blast API supports a wide range of blockchain networks, allowing access to multiple blockchains
through a single unified platform, therefore simplifying the development process and expanding the potential use cases
for dApps.

## Archival Nodes

Blast API includes archival nodes, which store all historical transaction data from the blockchain’s
genesis block to the present. This allows developers to query and retrieve past information, which is essential for
applications needing access to comprehensive blockchain histories.


:::tip Blast API Endpoints

You can find a full list of Blast API endpoints in the [Networks & Endpoints section](networks-endpoints.mdx).

:::
2 changes: 1 addition & 1 deletion docs/build/getting-started/networks-endpoints.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ tags:
import { AddToMetaMaskButton } from '@theme/AddToMetaMaskButton';
import { Networks } from '@theme/constant';
import NetworkInfo from '@theme/NetworkInfo';
import { ChainId } from '@theme/ChainId';

# Networks & Endpoints

Expand Down Expand Up @@ -76,6 +75,7 @@ This network is subject to occasional resets (no data retention) which are usual
<AddToMetaMaskButton {...Networks['iota_testnet']} />

<NetworkInfo.Evm {...Networks['iota_testnet']}/>

#### Additional Info

<NetworkInfo.EvmCustom {...Networks['iota_testnet']}/>
Expand Down
49 changes: 31 additions & 18 deletions docs/build/getting-started/oracles.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ image: /img/logo/WASP_logo_dark.png
tags:
- Blockchain Oracles
- Smart Contracts
- IOTA EVM
- Shimmer EVM
- Pyth Network
- Supra Oracles
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import OraclesContractData from '../_partials/_oracles_contract_data.md'


# Introduction to Oracles in Blockchain

Expand Down Expand Up @@ -36,52 +41,56 @@ multiple data points to validate the information's accuracy. This process ensure
contracts is relevant and timely, maintaining the integrity and deterministic nature of the blockchain
operations.

## Oracles on Shimmer EVM
## Oracles on IOTA EVM

### Supra
### Pyth

Supra Oracles validate and report prices derived from up to 21 data sources with Byzantine Fault Tolerant algorithms
for a wide array of assets and commodities using its own Distributed Oracle Agreement (DORA) to provide data for crypto
prices, forex, equities, and even Web3 data from other blockchains. Its feed gets updated from a minimum of 3 to 8 sources; if a data pair fails to meet this criterion, it gets deprecated to ensure data reliability.
The Pyth Network delivers real-time financial market data across multiple blockchains and can be used in off-chain applications.
Pyth gets contributions from over 90 publishers, including several exchanges. It offers comprehensive and accurate price
feeds for asset classes such as US equities, commodities, and cryptocurrencies. Its price feeds get updates
multiple times per second, ensuring they are current and reliable.

:::tip

You can learn more about Supra Oracles in their [official documentation](https://supraoracles.com/docs/overview).
You can learn more about Pyth Oracles in their [official documentation](https://docs.pyth.network/documentation).

:::

### Pyth
### Supra

The Pyth Network delivers real-time financial market data across multiple blockchains and can be used in off-chain applications.
Pyth gets contributions from over 90 publishers, including several exchanges. It offers comprehensive and accurate price
feeds for asset classes such as US equities, commodities, and cryptocurrencies. Its price feeds get updates
multiple times per second, ensuring they are current and reliable.
Supra Oracles validate and report prices derived from up to 21 data sources with Byzantine Fault Tolerant algorithms
for a wide array of assets and commodities using its own Distributed Oracle Agreement (DORA) to provide data for crypto
prices, forex, equities, and even Web3 data from other blockchains. Its feed gets updated from a minimum of 3 to 8 sources; if a data pair fails to meet this criterion, it gets deprecated to ensure data reliability.

:::tip

You can learn more about Pyth Oracles in their [official documentation](https://docs.pyth.network/documentation).
You can learn more about Supra Oracles in their [official documentation](https://supraoracles.com/docs/overview).

:::

<OraclesContractData/>

#### Example Code

You can use the following example code to get data from Pyth Oracles in Shimmer EVM:
<Tabs groupId="language" queryString>
<TabItem value="Pyth" label="Pyth">

You can use the following example code to get data from Pyth Oracles in IOTA EVM:

```typescript
import {ethers} from "ethers";
import fetch from "node-fetch";

// Provider
const providerURL = "https://json-rpc.evm.shimmer.network"
const providerURL = "https://json-rpc.evm.iota.network"
const provider = new ethers.JsonRpcProvider(providerURL);

// Pyth Oracle contract on ShimmerEVM Mainnet
const contractAddress = '0xA2aa501b19aff244D90cc15a4Cf739D2725B5729';
// Pyth Oracle contract on IOTA EVM Mainnet
const contractAddress = '0x8D254a21b3C86D32F7179855531CE99164721933';

// Add Price Feed Ids obtained from https://pyth.network/developers/price-feed-ids#pyth-evm-stable
const priceFeedIds = [
//SMR/USD
//IOTA/USD
'0xaf5b9ac426ae79591fde6816bc3f043b5e06d5e442f52112f76249320df22449',
//BTC/USD
'0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43'
Expand Down Expand Up @@ -120,4 +129,8 @@ async function main() {
}
}

main();
main();
```

</TabItem>
</Tabs>
49 changes: 30 additions & 19 deletions docs/build/getting-started/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
items: [
{
type: 'category',
label: 'IOTA',
label: 'IOTA EVM',
collapsed: false,
link: {
type: 'generated-index',
Expand All @@ -49,7 +49,7 @@ module.exports = {
},
{
type: 'category',
label: 'IOTA Testnet',
label: 'IOTA EVM Testnet',
collapsed: false,
link: {
type: 'generated-index',
Expand All @@ -69,9 +69,34 @@ module.exports = {
},
],
},
{
label: 'Blast API',
type: 'doc',
id: 'blastAPI',
},
{
label: 'Oracles',
type: 'doc',
id: 'oracles',
},
{
label: 'Subgraphs',
type: 'doc',
id: 'subgraphs',
},
{
label: 'IOTA Safe Wallet',
type: 'doc',
id: 'safe',
},
{
label: 'Multicall',
type: 'doc',
id: 'multicall',
},
{
type: 'category',
label: 'Shimmer',
label: 'ShimmerEVM',
collapsed: true,
link: {
type: 'generated-index',
Expand All @@ -93,7 +118,7 @@ module.exports = {
},
{
type: 'category',
label: 'Shimmer Testnet',
label: 'ShimmerEVM Testnet',
collapsed: true,
link: {
type: 'generated-index',
Expand All @@ -113,21 +138,6 @@ module.exports = {
},
],
},
{
label: 'Oracles for IOTA EVM and ShimmerEVM',
type: 'doc',
id: 'oracles',
},
{
label: 'IOTA Safe Wallet',
type: 'doc',
id: 'safe',
},
{
label: 'Multicall',
type: 'doc',
id: 'multicall',
},
{
type: 'link',
label: 'WASP CLI',
Expand All @@ -137,6 +147,7 @@ module.exports = {
},
],
},

{
label: 'Explorer',
type: 'link',
Expand Down
100 changes: 100 additions & 0 deletions docs/build/getting-started/subgraphs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
description: 'Learn about the role of in subgraphs in smart, how they can provide indexed blockchain data to your smart contracts.'
image: /img/logo/WASP_logo_dark.png
tags:
- Blockchain subgraphs
- Smart Contracts
- Shimmer EVM
- IOTA EVM
---

# Subgraphs

:::info tl;dr;

Subgraphs provide a streamlined way for developers to access blockchain data relevant to their applications,
significantly enhancing developer efficiency and user experience.

:::

Subgraphs collect and organize blockchain data by application needs, making it readily accessible for developers. Unlike
blockchains that store data without application context, subgraphs allow you to quickly retrieve information pertinent
to your application and simplify real-time data access, facilitating the creation of
dynamic user interfaces and interactions in your applications.

## Subgraph Components and Operations

Subgraphs are built on [GraphQL](https://graphql.org/) APIs, enabling you to query on-chain transaction data
efficiently.
This feature is particularly useful for developers working with complex smart contracts requiring detailed frontend
interfaces. For instance, querying transactions within a specific liquidity pool becomes straightforward with subgraphs.
By defining a schema and indexing event data, you can utilize the generated GraphQL API for effective data querying.

### Subgraph Manifest

The manifest details the smart contracts your subgraph indexes, the events it tracks, and how event data is mapped to
queryable entities. This foundational document ensures your subgraph accurately reflects the blockchain data your
application needs.

### Subgraph Schema

The schema organizes your subgraph data, defining entities like pools in DeFi applications, and their attributes. It is
crucial for structuring your data to support efficient queries.

### Subgraph Mappings

Mappings process incoming blockchain events, specified in your [manifest](#subgraph-manifest), and store them
according to your [schema](#subgraph-schema).
These [AssemblyScript](https://www.assemblyscript.org/) codes are essential for translating raw blockchain data into a
format your application can easily query.

## Popular Use Cases for Subgraphs

Subgraphs have found widespread adoption in various blockchain applications, from DeFi to NFTs and DAOs, due to their
ability to index and query data effectively.

* **Custom Smart Contract Indexing**: Ideal for developers needing to index data for unique smart contracts, especially
those creating frontend interfaces.
* **Decentralized Finance (DeFi)**: Subgraphs provide real-time data on token prices, liquidity, and more, enhancing
DeFi
applications.
* **Non-fungible Tokens (NFTs)**: They allow for efficient querying of NFT ownership, transaction history, and off-chain
data.
* **Decentralized Autonomous Organizations (DAOs)**: Subgraphs facilitate on-chain decision-making and data analysis for
DAOs.
* **Gaming**: They support real-time data access, improving gameplay and in-game transactions.

## Benefits of Using Subgraphs

Subgraphs offer a developer-friendly approach to blockchain data indexing, compatible with various blockchains and
enhancing application security and resilience.

* **Ease of Use**: With familiar tools like AssemblyScript and GraphQL, subgraphs are accessible to developers,
simplifying
the backend data management.
* **Cross-Blockchain Compatibility**: They work across multiple EVM-compatible networks, allowing applications to
operate
seamlessly on different blockchains.
* **Security and Decentralization**: Opting for decentralized querying with subgraphs can reduce reliance on single data
sources, increasing application robustness.

## Subgraph Providers

### Goldsky

[Goldsky](https://goldsky.com/products/subgraphs) [supports IOTA EVM](https://docs.goldsky.com/chains/supported-networks).
You can use their public API endpoints to access subgraph data.

:::tip Blast API Archival Nodes

You can use the convenient Blast API on IOTA EVM to access [archival nodes](blastAPI.md#archival-nodes).

:::

:::tip Wasp Access Nodes

You can find more information on how to connect to an access node in the
[#nodesharing channel](https://discordapp.com/channels/397872799483428865/398600007378272256) on the [IOTA Discord](https://discord.iota.org/).

:::

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<table>
<tr>
<th>Pyth contract</th>
<td><a href="https://explorer.evm.iota.org/address/0x8D254a21b3C86D32F7179855531CE99164721933">https://explorer.evm.iota.org/address/0x8D254a21b3C86D32F7179855531CE99164721933</a></td>
</tr>
<tr>
<th>Supra Pull Contract</th>
<td><a href="https://explorer.evm.iota.org/address/0x2FA6DbFe4291136Cf272E1A3294362b6651e8517">https://explorer.evm.iota.org/address/0x2FA6DbFe4291136Cf272E1A3294362b6651e8517</a></td>
</tr>
<tr>
<th>Supra Storage Contract</th>
<td><a href="https://explorer.evm.iota.org/address/0xD02cc7a670047b6b012556A88e275c685d25e0c9">https://explorer.evm.iota.org/address/0xD02cc7a670047b6b012556A88e275c685d25e0c9</a></td>
</tr>
<tr>
<th>Supra Pull Contract</th>
<td><a href="https://explorer.evm.iota.org/address/0xD02cc7a670047b6b012556A88e275c685d25e0c9">https://explorer.evm.iota.org/address/0xD02cc7a670047b6b012556A88e275c685d25e0c9</a></td>
</tr>
</table>
Loading

0 comments on commit e588aa8

Please sign in to comment.