Skip to content

Commit

Permalink
zkEVM updates (#475)
Browse files Browse the repository at this point in the history
* add SubQuery docs; Astar zkEVM bridge

* misc zkEVM updates

* zkEVM updates; kaizen
  • Loading branch information
meganskye committed Oct 20, 2023
1 parent 6470e74 commit a327657
Show file tree
Hide file tree
Showing 12 changed files with 136 additions and 56 deletions.
File renamed without changes
2 changes: 1 addition & 1 deletion docs/build/EVM/developer-tooling/thirdweb.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Alternatively, you can deploy a prebuilt contract for NFTs, tokens, or marketpla

1. Go to the thirdweb Explore page: https://thirdweb.com/explore

![thirdweb Explore page](/img/thirdweb-explore.png)
![thirdweb Explore page](./img/thirdweb-explore.png)

2. Choose the type of contract you want to deploy from the available options: NFTs, tokens, marketplace, and more.
3. Follow the on-screen prompts to configure and deploy your contract.
Expand Down
35 changes: 12 additions & 23 deletions docs/build/index.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,26 @@
import build from '/docs/build/img/build.png'

# Build on Astar
![Documentation of all the resources builders need in order to start testing, deploying and interacting with smart contracts on the Astar network](/docs/build/img/build.png)

<div style={{textAlign: 'center'}}>
<img src={build} caption="Documentation of all the resources builders need in order to start testing, deploying and interacting with smart contracts on the Astar network" style={{width: 1200}} />
</div>

## Why build on Astar?

Astar Network is the most flexible smart contract platform in the Polkadot ecosystem, featuring both Wasm and EVM environments, and multichain-native interoperability powered by Polkadot XCM and our unique Cross-Virtual Machine (XVM). Astar provides access to the Polkadot ecosystem through its parachain slot, and asset bridges and general message passing protocols provide routes to other major blockchains, including [Ethereum](https://cbridge.celer.network/#/transfer), [BSC](https://cbridge.celer.network/#/transfer), Cosmos, Polygon, and more.
Astar is an interoperable blockchain platform for the Polkadot and Ethereum ecosystems supporting both Wasm and EVM smart contracts. Astar provides native access to Polkadot and Ethereum through its parachain slot and Layer 2 scaling solution, while also offering bridges to other major blockchain ecosystems.

The shared security of Polkadot, coupled with Astar XVM, allows developers to design smart contracts in ways they never have before, and by building on a platform conducive to interoperability and fostering cooperation across multiple blockchains, complex synergies can be formed, leading to realization of truly innovative solutions that can't be replicated in other environments.
## Build2Earn
Astar network's innovative Build2Earn program allows developers to earn a basic income while they build out their products and communities. Users are able to support projects by staking on them, which adds to the passive income developers earn and forms the basis of an *unstoppable grant*. Build2Earn encourages projects to stand out and provide value directly to end-users. See the [dApp staking section](/docs/build/dapp-staking/) for more information.

## Wasm smart contracts
Wasm smart contracts empower developers, and bridge the gap between blockchain and traditional software development, allowing them to build complex dApps with tools and languages they already know. Wasm provides direct access to the runtime in a number of ways, so developers can build dApps that aren't possible on the Ethereum Virtual Machine. Any programming language that compiles to Wasm may eventually be supported, making Astar network a secure and versatile environment for deployment of highly-optimized smart contracts. See the [Wasm chapter](/docs/build/wasm) for more information.
See the [Wasm chapter](/docs/build/wasm) for more information.

## EVM smart contracts
Solidity developers will feel right at home building on Astar EVM, as it provides an equivalent environment, and simultaneously allows them to fragment smart contracts and offload logic selectively to the Wasm Virtual Machine for applications that have different operating requirements. See the [EVM chapter](/docs/build/evm) for more information.

## Build2Earn
Astar network's innovative Build2Earn program allows developers to earn a basic income while they build out their products and communities. Users are able to support projects by staking on them, which adds to the passive income developers earn. Build2Earn encourages projects to stand out, and provide value directly to the end-users. See the [dApp staking section](/docs/build/dapp-staking/) for more information.

## XVM - The cross virtual machine
The Cross Virtual Machine allows developers to call smart contracts from one VM to another (e.g. Wasm to EVM), and `XVM`, the innovative protocol that makes creation of these hybrid cross-VM dApps possible, is *only* available on Astar network.

## Secured by Polkadot
The Polkadot Relay Chain provides the best security for Layer 1 blockchains in the industry, and facilitates creation of true multi-chain smart contracts able to communicate trustlessly with one another across chains.

## Cross chain connectivity
Astar network is connected to the Relay Chain and a variety of other parachains in the Polkadot ecosystem through the message transport system, XCMP, using vertical channels (VMP + DMP) to the Relay Chain, and parachain-parachain communication operating horizontally, referred to as HRMP channels.

## Powered by Substrate
Astar is built with Substrate, a framework for building custom blockchain solutions more intuitively using the Rust programming language. Substrate's modular architecture makes it easy for developers to utilize only the components they need to support their networks and decentralized applications such as consensus, smart contracts, and storage, and reduces the need to focus on low-level implementation details.

Some benefits of using Subtrate to build blockchain networks include: forkless upgrades, cross-language compatibility using WebAssemby, deterministic finality that is light client-friendly, and seamless integration with other blockchains.
Solidity developers will feel right at home building on Astar in both the Polkadot and Ethereum ecosystems. See the [EVM](/docs/build/evm) or [zkEVM](/docs/build/zkEVM) sections for more information.

Polkadot itself is reliant on the Substrate framework, and use of which is similarly fundamental for blockchains such as Astar network that wish to easily interface with the Polkadot network directly, without the need for intermediaries.
## Secured by Polkadot and Ethereum
Polkadot and Ethereum networks provide some of the best security guarantees in the web3 industry.

```mdx-code-block
import DocCardList from '@theme/DocCardList';
Expand Down
2 changes: 1 addition & 1 deletion docs/build/integrations/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Integrations

Here you will find some common services available to developers building dApps on Astar/Shiden, including sample configurations, and guides for many important elements of our infrastructure, including:
Here you will find some common services available to developers building dApps on Astar Network, including sample configurations, and guides for many important elements of our infrastructure. For zkEVM-specific integrations please visit [this section](/docs/build/zkEVM/integrations).

```mdx-code-block
import DocCardList from '@theme/DocCardList';
Expand Down
16 changes: 8 additions & 8 deletions docs/build/integrations/oracles/acurast.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@ sidebar_position: 1

Through Acurast developers can arbitrarly fetch data from public or permissioned APIs for the "Oracle" use case such as price feeds for DeFi platforms through a decentralized execution layer of off-chain workers. These [Processors](https://docs.acurast.com/acurast-processors), hosted by individuals, provide the resources of their Trusted Execution Environment that can be utilized to run computation yielding a verifiable output directly on chain. Developers can use the [Acurast Console](https://console.acurast.com/) to create new request and to get access to these interoperability resources.

Acurast supports Astar's **WASM** and **EVM** environments. Contract Examples address can be found below:
Acurast supports Astar's **Wasm** and **EVM** environments. Contract Examples address can be found below:

### Astar Destination Example

WASM Smart Contract: b2o6ENagNWAxQT9f9yHFxfVMSpJA7kK6ouMhNN6veKXi3jw
Wasm Smart Contract: b2o6ENagNWAxQT9f9yHFxfVMSpJA7kK6ouMhNN6veKXi3jw

### Shiden Destination

WASM Smart Contract: 0xDA7a001b254CD22e46d3eAB04d937489c93174C3
Wasm Smart Contract: 0xDA7a001b254CD22e46d3eAB04d937489c93174C3

## Obtain Data with Acurast on WASM and EVM
## Obtain Data with Acurast on Wasm and EVM

### How to Get Started

1. Deploy one of the example contracts to WASM or EVM
1. Deploy one of the example contracts to Wasm or EVM
1. Define your script detailing where to fetch data, computation etc.
1. Create a Job on the [Acurast Console](https://console.acurast.com/)
1. Processors will fulfill verifiable outputs in your defined interval to your contract

### WASM Example
### Wasm Example

The following example shows simple WASM smart contracts implemented with [ink!](https://use.ink/).
The following example shows simple Wasm smart contracts implemented with [ink!](https://use.ink/).

Keep in mind that you can do much more with Acurast and get access to all interoperability modules besides these examples.

Expand Down Expand Up @@ -100,7 +100,7 @@ contract PriceFeed {

### Script

This example script shows how a "Price Feeds" is fetched from Binance and pushed to a WASM smart contract. You can view and test the your script on the Acurast Console.
This example script shows how a "Price Feeds" is fetched from Binance and pushed to a Wasm smart contract. You can view and test the your script on the Acurast Console.

```js
const callIndex = "0x4606"; // the call index for the 'call' extrinsic.
Expand Down
63 changes: 63 additions & 0 deletions docs/build/zkEVM/integrations/bridges-relays/astar-bridge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: Astar Bridge
---

import bridge1 from '/docs/build/zkEVM/img/astar-bridge-zKatana-Shibuya1.jpg'
import bridge2 from '/docs/build/zkEVM/img/astar-bridge-zKatana-Shibuya2.jpg'
import bridge3 from '/docs/build/zkEVM/img/astar-bridge-zKatana-Shibuya3.jpg'
import bridge4 from '/docs/build/zkEVM/img/astar-bridge-zKatana-Shibuya4.jpg'
import network from '/docs/build/zkEVM/img/zKatana-network1.jpg'
import network1 from '/docs/build/zkEVM/img/add_zkEVM_network1.jpg'
import network2 from '/docs/build/zkEVM/img/add_zkEVM_network2.jpg'
import walletselect from '/docs/build/zkEVM/img/wallet-select.jpg'

## Overview

Astar bridge is a canonical Layer 1 &rarr; Layer 2 bridge connecting Sepolia and Astar zKatana testnets that is trustless at the protocol level. This means that if the infrastructure on Layer 2 powering Astar zkEVM is somehow compromised or goes offline, the assets and data integrity on Layer 1 are still provided by Ethereum, and anyone can spin up a (zkNode) Prover to recompute the transaction data. This is currently the safest option for bridging assets to the zkEVM as it does not inherit any additional counterparty risk compared to using 3rd party asset bridges.

## How to bridge ETH to the zkEVM using Astar Portal

1. Visit the [Astar Portal](https://portal.astar.network) and connect MetaMask.


<div style={{textAlign: 'center'}}>
<img src={walletselect} style={{width: 400}} />
</div>


2. Use the network selector and switch to zKatana network, or allow MetaMask to switch to zKatana network for you.


<div style={{textAlign: 'center'}}>
<img src={network} style={{width: 400}} />
</div>


3. Click on the Bridge tab on the left-hand side. Ensure Sepolia is selected as Bridge source, and zKatana is selected as destination. After you have entered the amount of ETH to transfer, press the Confirm button.


<div style={{textAlign: 'center'}}>
<img src={bridge2} style={{width: 1000}} />
</div>


4. Sign the MetaMask transaction.


<div style={{textAlign: 'center'}}>
<img src={bridge3} caption="Confirming" style={{width: 1000}} />
</div>

:::note
Once the transaction shows as confirmed on the MetaMask Activity tab, it will take approximately 5-10 minutes for the Astar Portal and MetaMask to update your balance on the zKatana network side.
:::

<div style={{textAlign: 'center'}}>
<img src={bridge4} caption="Confirmed" style={{width: 1000}} />
</div>


You should now see the bridged ETH within MetaMask for use on Astar zkEVM. Visit the [smart contracts section](/docs/build/zkEVM/smart-contracts/) to start building!



4 changes: 1 addition & 3 deletions docs/build/zkEVM/integrations/indexers/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Indexers
:::info
Coming soon...
:::

## Overview

Here you will find all the information required to use indexers on Astar zkEVM.
15 changes: 15 additions & 0 deletions docs/build/zkEVM/integrations/indexers/subquery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# SubQuery

## What is SubQuery?

SubQuery is an open-source and universal blockchain data indexer for developers that provides fast, flexible, reliable, and decentralised APIs to power leading multi-chain apps. Our goal is to save developers time and money by eliminating the need of building their own indexing solution and instead, fully focus on developing their applications.

SubQuery's superior indexing capabilities support Astar smart contracts all out of the box. (In reality a Docker container!) Starter projects are provided allowing developers to get up and running and index blockchain data in minutes.

Another one of SubQuery's competitive advantages is the ability to aggregate data not only within a chain but across blockchains all within a single project. This allows the creation of feature-rich dashboard analytics or multi-chain block scanners.

Other advantages include superior performance with multiple RPC endpoint configurations, multi-worker capabilities and a configurable caching architecture. To find out more, visit our documentation.

## SubQuery for Astar zkEVM

Please visit the quickstart guide [here](https://academy.subquery.network/quickstart/quickstart_chains/astar-zkatana.html) or reference their existing documentation made for Astar [here.](/docs/build/integrations/indexers/subquery.md)
7 changes: 3 additions & 4 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ sidebar_position: 1

# Getting Started

Astar is the largest smart contract platform in the Polkadot ecosystem, supporting both Wasm and EVM. While providing native access to the Polkadot ecosystem through it's parachain slot, Astar also has bridges into other major ecosystems, including [Ethereum][cbridge], [BSC][cbridge], Cosmos, Polygon, and more. Through the #Build2Earn program, Astar offers a basic income to dApp developers, and direct funding to projects through an *unstoppable grants* program.
Astar is an interoperable blockchain platform for Polkadot and Ethereum ecosystems supporting both Wasm and EVM smart contracts. Astar provides native access to Polkadot and Ethereum through its parachain slot and Layer 2 scaling solution, while also offering bridges into other major blockchain ecosystems. Through the #Build2Earn program, Astar offers a basic income to dApp developers, and direct funding to projects through an *unstoppable grants* program.

## Overview of Docs

- [**Build**](/docs/build) - Provides the resources you need to start building, testing, deploying, and interacting with smart contracts on Astar network.
- [**EVM**](/docs/build/evm) - Dives deeper into the EVM on Astar and explains how EVM smart contracts can interact with non-EVM modules and the Wasm virtual machine through [precompiles](https://docs.astar.network/docs/build/EVM/precompiles/).
- [**Wasm**](/docs/build/wasm) - Provides an overview of the [Wasm stack](https://docs.astar.network/docs/build/wasm/smart-contract-wasm) on Astar, [Wasm contract frameworks](/docs/build/wasm/dsls), and [Swanky Suite](/docs/build/wasm/swanky-suite/).
- [**zkEVM**](/docs/build/zkEVM) - Contains everything developers need to know to start building on Astar's Layer 2 scaling solution for Ethereum.
- [**Nodes**](/docs/build/nodes) - Explains how to run full nodes, collators, indexers, and everything else related to infrastructure.
- [**XCM**](/docs/learn/interoperability/xcm) - Explains how XCM is used in Astar and also how developers can use it to interact with the rest of the Polkadot network.
- [**Integrations**](/docs/build/integrations/) - Provides relevant information about the wallets, indexers, and oracles that are integrated with the network.
- [**Docs Integration Request**](https://github.com/AstarNetwork/astar-docs/blob/main/docs-integration-request.md) - Provides information about how to make a documentation integration request.

[cbridge]: https://cbridge.celer.network/#/transfer
- [**Docs Integration Request**](https://github.com/AstarNetwork/astar-docs/blob/main/docs-integration-request.md) - Provides information about how to make a documentation integration request for this repository.
4 changes: 4 additions & 0 deletions docs/use/evm-guides/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "EVM Guides",
"position": 3
}
4 changes: 2 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const katex = require('rehype-katex');
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Astar Docs',
tagline: 'Your one-stop shop for everything Astar',
tagline: 'A comprehensive library of useful information about Astar Network',
url: 'https://docs.astar.network',
baseUrl: '/',
onBrokenLinks: 'throw',
Expand Down Expand Up @@ -140,7 +140,7 @@ const config = {
items: [
{
label: 'Blog',
to: 'https://medium.com/astar-network',
to: 'https://astar.network/blog',
},
{
label: 'GitHub',
Expand Down
40 changes: 26 additions & 14 deletions src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,39 @@ type FeatureItem = {

const FeatureList: FeatureItem[] = [

{
title: <Translate>Learn About Astar Network</Translate>,
link: '/docs/learn',
iconClass: 'docs',
description: (
<>
<Translate>
Explains our foundations and provides comprehensive insights into the inner workings of Astar network.
</Translate>
</>
),
},
{
title: <Translate>Build</Translate>,
link: '/docs/build/',
iconClass: 'wrench',
description: (
<>
<Translate>
Find all the resources you need in order to start testing, deploying,
and interacting with smart contracts on the network.
Find all the resources you need to start testing, deploying,
and interacting with smart contracts on Astar networks.
</Translate>
</>
),
},
{
title: <Translate>Build on Astar zkEVM</Translate>,
link: '/docs/build/zkEVM',
iconClass: 'evm',
description: (
<>
<Translate>
Jump right into building on Astar zkEVM the Layer 2 scaling solution for Ethereum, powered by Polygon CDK.
</Translate>
</>
),
Expand Down Expand Up @@ -64,18 +88,6 @@ const FeatureList: FeatureItem[] = [
</>
),
},
{
title: <Translate>Learn About Astar zkEVM</Translate>,
link: '/docs/learn/zkEVM',
iconClass: 'node',
description: (
<>
<Translate>
Explains the zkEVM, FAQs, and how to interact with Astar's scalability solution for Ethereum, powered by Polygon CDK.
</Translate>
</>
),
},
{
title: <Translate>Integrate Toolings</Translate>,
link: '/docs/build/integrations/',
Expand Down

0 comments on commit a327657

Please sign in to comment.