Phala testnet
Astar testnet

Graph API Oracle

This dApp demonstrates the ability of an ink! smart contract on Astar Network and a Phat Contract on Phala Network to interact with each other using Phat Offchain Rollup.

In this example we display values from Astar dApp Staking, stored in a SubQuery index

Lucky

Stake: 5,559,440.9399 ASTR
Nb Staker: 189
Updated: 2024/02/19 - 19:43:06

Counter.ink

Stake: 83,053.7295 ASTR
Nb Staker: 9
Updated: 2024/02/04 - 18:15:30

SkyLab Corporation

Stake: 34,428,682.9460 ASTR
Nb Staker: 106
Updated: 2024/01/10 - 20:00:54

I am xAlice

Stake: 2,230,211.6867 ASTR
Nb Staker: 26
Updated: 2024/01/10 - 20:05:06

apeXchimpz

Stake: 20,424,584.8441 ASTR
Nb Staker: 297
Updated: 2024/01/16 - 21:51:42

Age Of Chronos

Stake: 7,236,984.6382 ASTR
Nb Staker: 47
Updated: 2024/01/10 - 20:04:42

Scenario described here is the communication between Ink! Smart Contract on Astar Network and Ink! Phat Contract on Phala Network:

  • The Phat Contract GraphApiOracle (on Phala Network) queries the data from a graph api (subsquid, subquery or graph) and pushes the data into the Smart Contract GraphApiConsumer (on Astar Network)
  • The Smart Contract GraphApiConsumer (on Astar Network) verifies the data and saves them to be displayed in the UI

The Phat Contract and Ink! Smart Contract have been built with the Phat Offchain Rollup. The full documentation of this SDK can be found here: https://github.com/Phala-Network/phat-offchain-rollup

The team

Also know as "Team Lucky", Guigou and Arno are both passionated by web3 and have a strong desire to explore the all the possibilities offered by decentralized applications. you can find them in a lot of different places among the paraverse...

They have developed the Lucky dApp (https://lucky.substrate.fi), a no-loss lottery built on top of dApp Staking on Astar Network.

GuigouApplication architect

GuiGou is application architect in Web 2 and works more and more in web3. As a technical ambassador for Astar and ambassador for Phala, he promotes the ink! smart contracts via some tutorials (https://polkaverse.com/11143) and replies about the technical questions on ink! smart contracts via Astar's discord.

ArnoSoftware engineer

Arno is a software engineer and web developer. He is ambassador for Polkadot, Phala Network and Talisman Sentinel. his desire to build decentralized applications and his thirst for knowledge about web3 led him to travel many roads on the way to Dotsama, and to upgrade his skills with web3 development