Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISC - Update network info - Requested updates #1561

Merged
merged 37 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4da7c08
added IOTA EVM to networks-endpoints.mdx
lucas-tortora Mar 25, 2024
2879e0b
remove networks warning
lucas-tortora Mar 25, 2024
a3c0e1e
changed Public Testnet To EVM Testnet
lucas-tortora Mar 25, 2024
c23cfcc
changed IOTA EVM to IotaEVM
lucas-tortora Mar 25, 2024
2df12ee
changed IOTA EVM to IotaEVM
lucas-tortora Mar 25, 2024
19834cc
Merge branch 'main' into ISC/updateNetworkInfo
Dr-Electron Apr 28, 2024
e234ba9
Update network info
Dr-Electron Apr 28, 2024
dda80d2
Fix info
Dr-Electron Apr 28, 2024
6966983
Fix links
Dr-Electron Apr 28, 2024
eaddd60
Merge branch 'main' into ISC/updateNetworkInfo
Dr-Electron Apr 30, 2024
172a25d
Format
Dr-Electron May 8, 2024
c5df220
Merge branch 'main' into ISC/updateNetworkInfo
Dr-Electron May 13, 2024
de27bbc
Update sidebar
Dr-Electron May 13, 2024
dc5e599
Format
Dr-Electron May 13, 2024
e3e795f
made oracles page IOTA centric
lucas-tortora May 14, 2024
5509a5f
added Blast API info to networks-endpoints.mdx
lucas-tortora May 16, 2024
717c8c9
Added Goldsky to the subgraphs article
lucas-tortora May 20, 2024
ce58105
updated sidebars.ts
lucas-tortora May 20, 2024
46b30a5
added all available tools to tools.mdx
lucas-tortora May 22, 2024
573000f
added partial for _oracles_contract_data.md
lucas-tortora May 22, 2024
8cf8aea
fix header
lucas-tortora May 22, 2024
b1fb8a9
Refactor Blast endpoint section (#1568)
Dr-Electron May 24, 2024
c7e8b59
Merge branch 'main' into ISC/updateNetworkInfoRequestedUpdates
Dr-Electron May 24, 2024
68702c1
Merge branch 'main' into ISC/updateNetworkInfo
Dr-Electron May 24, 2024
2c0f5f9
Merge branch 'ISC/updateNetworkInfo' into ISC/updateNetworkInfoReques…
Dr-Electron May 24, 2024
f6b9b4a
Format
Dr-Electron May 24, 2024
709a63f
Merge branch 'main' into ISC/updateNetworkInfo
Dr-Electron May 26, 2024
abad7e1
Update access guide
Dr-Electron May 26, 2024
d9ea68b
Merge branch 'ISC/updateNetworkInfo' into ISC/updateNetworkInfoReques…
Dr-Electron May 26, 2024
d067fcb
Merge branch 'isc-update' into ISC/updateNetworkInfoRequestedUpdates
lucas-tortora May 27, 2024
19a5d49
Make blast API row conditional
Dr-Electron May 27, 2024
a1aa916
Use markdown table and single partial
Dr-Electron May 27, 2024
3065b2a
Render arrow
Dr-Electron May 27, 2024
5188d7a
Apply suggestions from code review
lucas-tortora May 27, 2024
f07006c
addressing comments from @Dr-Electron
lucas-tortora May 27, 2024
453fe30
addressing comments from @Dr-Electron
lucas-tortora May 28, 2024
84c31ba
added more links to the supra and pyth docs
lucas-tortora May 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions docs/build/_partials/_oracles_contract_data.md
lucas-tortora marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { AddToMetaMaskButton } from '@theme/AddToMetaMaskButton';
import { Networks } from '@theme/constant';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs groupId='network'>
<TabItem value='iota' label='IOTA EVM'>

| Contract Type | Contract Address |
|:----------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| Pyth contract | [https://explorer.evm.iota.org/address/0x8D254a21b3C86D32F7179855531CE99164721933](https://explorer.evm.iota.org/address/0x8D254a21b3C86D32F7179855531CE99164721933) |
| Supra Pull Contract | [https://explorer.evm.iota.org/address/0x2FA6DbFe4291136Cf272E1A3294362b6651e8517](https://explorer.evm.iota.org/address/0x2FA6DbFe4291136Cf272E1A3294362b6651e8517) |
| Supra Storage Contract | [https://explorer.evm.iota.org/address/0xD02cc7a670047b6b012556A88e275c685d25e0c9](https://explorer.evm.iota.org/address/0xD02cc7a670047b6b012556A88e275c685d25e0c9) |
| Supra Push Contract | [https://explorer.evm.iota.org/address/0xD02cc7a670047b6b012556A88e275c685d25e0c9](https://explorer.evm.iota.org/address/0xD02cc7a670047b6b012556A88e275c685d25e0c9) |

</TabItem>
<TabItem value='shimmer' label='ShimmerEVM'>

| Contract Type | Contract Address |
|:----------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| Pyth contract | [https://explorer.evm.shimmer.network/address/0x290f23E4a034Db5237edCb5aA2D94Acb4DD19fD2](https://explorer.evm.shimmer.network/address/0x290f23E4a034Db5237edCb5aA2D94Acb4DD19fD2) |
| Supra Pull Contract | [https://explorer.evm.shimmer.network/address/0xe41444462709484272F54371F3f53bBF900Ec49E](https://explorer.evm.shimmer.network/address/0xe41444462709484272F54371F3f53bBF900Ec49E) |
| Supra Storage Contract | [https://explorer.evm.shimmer.network/address/0x3E5E89d14576cE9f20a8347aA682517fe65B4ACB](https://explorer.evm.shimmer.network/address/0x3E5E89d14576cE9f20a8347aA682517fe65B4ACB) |
| Supra Push Contract | [https://explorer.evm.shimmer.network/address/0x3df842b27c997cEc63160E79CB4398c82645A1c3](https://explorer.evm.shimmer.network/address/0x3df842b27c997cEc63160E79CB4398c82645A1c3) |
lucas-tortora marked this conversation as resolved.
Show resolved Hide resolved
lucas-tortora marked this conversation as resolved.
Show resolved Hide resolved

</TabItem>
</Tabs>

:::tip Oracle Documentation

You can find detailed documentation on the Oracles in their official documentation:

* [Pyth Oracle Docs](https://docs.pyth.network/price-feeds/contract-addresses/evm)
* [Supra Pull Docs](https://gb-docs.supraoracles.com/docs/data-feeds/pull-model/networks)
* [Supra Push Docs](https://gb-docs.supraoracles.com/docs/data-feeds/decentralized/networks)

:::
42 changes: 42 additions & 0 deletions docs/build/getting-started/blastAPI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
description: Blast API is a decentralized platform providing scalable node infrastructure for accessing blockchain data, supporting multiple networks including IOTA EVM.
keywords:
- IOTA EVM
- blockchain API
- decentralized
- node infrastructure
- tools
- Blast api
- archive node
image: /img/logo/WASP_logo_dark.png
---

# 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>
24 changes: 20 additions & 4 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,24 @@ module.exports = {
},
],
},
{
label: 'Blast API',
type: 'doc',
id: 'blastAPI',
},
{
label: 'Oracles',
type: 'doc',
id: 'oracles',
},
{
label: 'Subgraphs',
type: 'doc',
id: 'subgraphs',
},
{
type: 'category',
label: 'Shimmer',
label: 'ShimmerEVM',
collapsed: true,
link: {
type: 'generated-index',
Expand All @@ -93,7 +108,7 @@ module.exports = {
},
{
type: 'category',
label: 'Shimmer Testnet',
label: 'ShimmerEVM Testnet',
collapsed: true,
link: {
type: 'generated-index',
Expand Down Expand Up @@ -127,6 +142,7 @@ module.exports = {
},
],
},

{
label: 'Explorer',
type: 'link',
Expand Down
106 changes: 106 additions & 0 deletions docs/build/getting-started/subgraphs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
description: 'Learn about the role of subgraphs in smart contracts and 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 Run a Local Graph Node

You can use [Nakama's Graph Node GitHub repository](https://github.com/nakamaio/graph-node) to run your own Graph Node.

:::

:::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/).

:::
lucas-tortora marked this conversation as resolved.
Show resolved Hide resolved

Loading