Skip to content

Commit

Permalink
initial reshufle
Browse files Browse the repository at this point in the history
evm shuffle

fix broken links

burn.md fix

moved Intergation Tooling section back to Root due to Megan's changes

fix relative links

more links broken

more broken links

this is an empty commit

test link

remaning buid_environment

removed underscore in folder name

removing funny links

liiinks

remove md from link

new changes by Megan

ready for review

preliminary edits to introduction and build environment sections

Temporary disable of translations (i18n) so the site can be build

Fix a typo. Added nav bar shortcut.

added banners

use user guide for account creation

add RPC info

Merged two ink! environment pages (#264)

updated links (#265)
  • Loading branch information
Maar-io committed Feb 13, 2023
1 parent e7ade9e commit e1d5792
Show file tree
Hide file tree
Showing 269 changed files with 625 additions and 403 deletions.
4 changes: 0 additions & 4 deletions docs/EVM/_category_.json

This file was deleted.

23 changes: 0 additions & 23 deletions docs/EVM/first-contract/network-family.md

This file was deleted.

4 changes: 4 additions & 0 deletions docs/build/EVM/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "EVM Smart contracts",
"position": 4
}
6 changes: 3 additions & 3 deletions docs/EVM/astarbase.md → docs/build/EVM/astarbase.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 4
sidebar_position: 9
---

# AstarBase
Expand All @@ -8,7 +8,7 @@ A few important facts about the Astar ecosystem:

- The majority of crowdloan participants used their Polkadot native addresses (ss58 format), and also make up the majority of dApp staking participants.
- Although Astar has built a Wasm smart contract platform, most dApps still use the Ethereum Virtual Machine (EVM) and address format (H160), native to MetaMask accounts.
- DApp staking, which simultaneaously provides a basic income for developers, and staking mechanism for users, is a system which both dApp developers and users benefit from.
- DApp staking, which simultaneously provides a basic income for developers, and staking mechanism for users, is a system which both dApp developers and users benefit from.

AstarBase aims to:

Expand Down Expand Up @@ -135,4 +135,4 @@ There is no absolute protection against bots, but at the very least, their activ

## ECDSA Address Registration

Besides the ss58 address scheme, [ECDSA](https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm) addresses are also supported.
Besides the ss58 address scheme, [ECDSA](https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm) addresses are also supported.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 2
---

# Developer Tooling
Expand All @@ -10,7 +10,7 @@ Deploying and interacting with EVM-based smart contracts on Astar is as easy as
2. Adding Astar networks to your Ethereum client.

:::caution
For Astar and Shiden applications, we *highly* recommend [running your own network node](../nodes/index.md) and not relying on our RPC endpoints. This further decentralizes the network, and puts you in control of your uptime requirements.
For Astar and Shiden applications, we *highly* recommend [running your own network node](../../nodes/index.md) and not relying on our RPC endpoints. This further decentralizes the network, and puts you in control of your uptime requirements.
:::

## Hardhat
Expand Down Expand Up @@ -150,4 +150,4 @@ astar-collator --chain=shiden --enable-evm-rpc --unsafe-rpc-external --unsafe-ws

The launch string above will start an Astar Collator on Shiden network, open up an HTTP endpoint on port `9933`, and a WS endpoint on port `9944`.

We also recommend paying attention to the `--ws-max-connections` parameter. By default this value is relatively small, so it may be beneficial to increase it to a few thousand.
We also recommend paying attention to the `--ws-max-connections` parameter. By default this value is relatively small, so it may be beneficial to increase it to a few thousand.
4 changes: 2 additions & 2 deletions docs/EVM/evm_debug_api.md → docs/build/EVM/evm_debug_api.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 7
sidebar_position: 10
---

# Debug EVM Transactions
Expand Down Expand Up @@ -82,4 +82,4 @@ curl http://127.0.0.1:9933 -H "Content-Type:application/json;charset=utf-8" -d \
}'
```

The node responds with the trace information corresponding to the filter.
The node responds with the trace information corresponding to the filter.
8 changes: 2 additions & 6 deletions docs/EVM/faq.md → docs/build/EVM/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,11 @@ ASTR (Astar Network)

### How do I connect to Astar networks, RPCs, Network name, Chain ID?

You can visit [this page](../quickstart/endpoints.md).
You can visit [this page](/docs/build/environment/endpoints.md).

### How can I get test tokens (SBY)?

Use [our faucet](../quickstart/faucet.md).

### Is there a block explorer?

You can visit [this page](../quickstart/explorers.md).
Use [our faucet](/docs/build/environment/faucet.md).

### Is it possible to import Substrate (Polkadot) addresses to Metamask?

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Your journey is almost finished. At last, you will deploy a smart contract on Sh

## Obtain SBY token from the Faucet

To deploy a contract on Shibuya, you will need to obtain some SBY tokens from the Faucet, which is explained on the [the faucet page](../../quickstart/faucet.md).
To deploy a contract on Shibuya, you will need to obtain some SBY tokens from the Faucet, which is explained on [the faucet page](/docs/build/environment/faucet.md).

Once successful, you will see some SBY tokens available within MetaMask, if not, double-check to ensure Shibuya is selected as your current network.

Expand All @@ -26,4 +26,4 @@ The last step will be to deploy a smart contract on Shiden, again using the same

## Next Step

Congratulations! You are now a dApp developer on Astar/Shiden network 😎 To better make use of and expand on your new skills as a smart contract developer, we recommend you dive further into our official documentation and builders guides, and join our Discord to share ideas with other developers or get technical support.
Congratulations! You are now a dApp developer on Astar/Shiden network 😎 To better make use of and expand on your new skills as a smart contract developer, we recommend diving further into our official documentation and builders guides, and joining our Discord to share ideas with other developers, or to receive technical support.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ This tutorial should take about 30 minutes, after which you will officially be a

1. Learn about Shiden and Shibuya.
2. Run an Astar collator as a local standalone node.
* Please check Build Environment chapter
3. Configure MetaMask.
4. Deploy a smart contract on your local network.
5. Obtain some test tokens from the faucet.
Expand Down
File renamed without changes.
12 changes: 12 additions & 0 deletions docs/build/EVM/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EVM Smart Contracts
![banner](../assets/gradient2.jpg)

All Astar networks support EVM smart contracts except Swanky node.


```mdx-code-block
import DocCardList from '@theme/DocCardList';
import {useCurrentSidebarCategory} from '@docusaurus/theme-common';
<DocCardList items={useCurrentSidebarCategory().items}/>
```
4 changes: 4 additions & 0 deletions docs/build/EVM/infra/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Contract Environment",
"position": 6
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 1
---

# Block explorers
Expand Down
6 changes: 2 additions & 4 deletions docs/EVM/index.md → docs/build/EVM/infra/index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# EVM

Solidity smart contracts can be deployed on Astar and Shiden networks.
# Contract Environment

```mdx-code-block
import DocCardList from '@theme/DocCardList';
import {useCurrentSidebarCategory} from '@docusaurus/theme-common';
<DocCardList items={useCurrentSidebarCategory().items}/>
```
```
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Blockscout is the primary block explorer for Astar EVM.

## Why should I verify my smart contract on Blockscout

Verifying a smart contract on Blockscourt makes the contract source code becomes publicly available and verifiable, which creates transparency and trust in the community.
Verifying a smart contract on Blockscout makes the contract source code becomes publicly available and verifiable, which creates transparency and trust in the community.
Also, contract verification on Blockscout is mandatory for dApps to be eligible for dApp Staking and earn the basic income from the network.

---
Expand All @@ -32,7 +32,7 @@ Due to compiler constraints, contracts **with OpenZeppelin-related source contra
In this section, we will go through the process of verifying a smart contract **without OpenZeppelin-related source contracts.**
In the previous guide, we went through the process of using Remix IDE to deploy a smart contract on Astar EVM. Let's start from there:

[How to use Remix IDE to deploy an on-chain storage contract on Astar EVM | Astar Docs](https://docs.astar.network/docs/builder-guides/Use%20Astar%20Features/How%20to%20use%20Remix%20IDE%20to%20deploy%20an%20on-chain%20storage)
[How to use Remix IDE to deploy an on-chain storage contract on Astar EVM | Astar Docs](/docs/build/builder-guides/astar_features/use_remix.md)

Copy the deployed contract address under the `Deployed Contracts` section

Expand Down Expand Up @@ -77,8 +77,3 @@ I have already deployed an ERC20 token contract using OpenZepplin library import
- Paste the copied flattened source code from **Flattener** into the `Enter the Solidity Contract Code`` field and click ``Verify & Publis`.
![Untitled](img-verification-cookbook/Untitled%208.png)

---

## Reference

- [Astar Documentation](https://docs.blockscout.com/for-users/verifying-a-smart-contract)
4 changes: 4 additions & 0 deletions docs/build/EVM/interact/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Interact",
"position": 4
}
5 changes: 5 additions & 0 deletions docs/build/EVM/interact/interact.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Interact with Smart Contract

## Wallets

## Astar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Precompiles",
"position": 2
"position": 5
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The Frontier EVM used on Astar network provides several useful precompiled contr

| Precompile | Address |
| -------- | -------- |
| [DappsStaking](dapp-staking.md) | 0x0000000000000000000000000000000000005001 |
| [DappsStaking](staking.md) | 0x0000000000000000000000000000000000005001 |
| [Sr25519](sr25519.md) | 0x0000000000000000000000000000000000005002 |
| [SubstrateEcdsa](substrate-ecdsa.md) | 0x0000000000000000000000000000000000005003 |
| [XCM](xcm.md) | 0x0000000000000000000000000000000000005004 |
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

XC20 standard, created by the Moonbeam team, ensures compatibility between the EVM and Substrate framework that powers Polkadot via precompiles — special built-in smart contracts made to look like ERC20s. Calling functions on an XC20 invokes underlying Substrate functionality, which could be instructions to move tokens to another chain, or send them to another local address. This compatibility layer connects the world of EVM and smart contracts to advanced Substrate-based interoperability scenarios.

For XC20 overview [see the following page](../../xcm/building-with-xcm/create-xc20-assets.md).
For XC20 overview [see the following page](../../../xcm/building-with-xcm/create-xc20-assets.md).

# See also

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ The XCM Precompile provides the following functions to handle specific XCM opera

| Function | Description |
| -------- | -------- |
| [`assets_withdraw`](../../xcm/building-with-xcm/xc-assets-withdraw) | Withdraw previously transferred assets |
| [`assets_reserve_transfer`](../../xcm/building-with-xcm/xc-reserve-transfer) | Transfer assets to a remote chain |
| [`remote_transact`](../../xcm/building-with-xcm/xc-remote-transact) | Execute a transaction on a remote chain |
| [`assets_withdraw`](/docs/xcm/building-with-xcm/xc-assets-withdraw) | Withdraw previously transferred assets |
| [`assets_reserve_transfer`](/docs/xcm/building-with-xcm/xc-reserve-transfer) | Transfer assets to a remote chain |
| [`remote_transact`](/docs/xcm/building-with-xcm/xc-remote-transact) | Execute a transaction on a remote chain |
File renamed without changes.
4 changes: 4 additions & 0 deletions docs/build/Introduction/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Introduction",
"position": 1
}
10 changes: 10 additions & 0 deletions docs/build/Introduction/address_format.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
sidebar_position: 6
---

# Address Format

The address format used in Substrate-based chains like Astar is ss58. Ss58 is a modification of Base-58-check from Bitcoin, with some minor modifications. Notably, the format contains an address type prefix that identifies an address as belonging to a specific network. Astar Network is special in the Polkadot ecosystem because it's the only parachain that supports EVM and Wasm smart contracts. Two distint and different virtual machines necessitates the use two kinds of addresses:

1. An Astar Native address or ss58 address, which uses 256 bits.
2. An Astar EVM or H160 address, which starts with 0x, and uses 160 bits.
51 changes: 51 additions & 0 deletions docs/build/Introduction/astar_family.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
sidebar_position: 5
---

# Astar Network Family
Prior to commencing development, it's important to understand the Astar Network family, and choose an appropriate network based on what you would like to do. Currently, there are a number of networks available, including the Local network which runs exclusively within your development environment. All networks support Substrate and EVM RPCs.

![Astar networks](img/networks.png)

## Local Networks
### Local Node
You can clone the Astar repository and run the local node provided, or download the precompiled binary and run it, instead. Both methods are described in the [Build Environment](../environment) section.

### Swanky Node
Swanky Node is a Substrate based blockchain configured to enable the smart contract module `pallet-contracts`, and other features that assist local development of Wasm smart contracts.
For more information about Swanky Node, check out the [Swanky Suite](../wasm/swanky) section.

### Zombienet
With Zombienet users can download arbitrary Relay Chain and parachain binaries (or use images) to setup a configurable local test network. Users will have access to all privileged actions on the Relay Chain and parachains, which simplifies testing. For more information about Zombienet, check out the [Build Environment](../environment/zombienet-testing) chapter.

## Testnets
### Shibuya
Shibuya has nearly the same chain specifications as Shiden & Astar, and provides an ideal environment for developers to test and debug, prior to launching their dApp on mainnet.
Shibuya is running as a parachain of the Tokio Relay Chain, which is managed internally by the Astar team, and supports Shibuya, only, as test parachain.

The Shibuya native token symbol is SBY.

To obtain test tokens from the faucet, please visit the Astar Portal and connect to Shibuya. If for any reason the faucet is empty, please contact the Astar team on Discord.

### Rocstar
Rococo is a test Relay Chain used by the Polkadot & Kusama communities. Astar team has deployed a parachain to it called Rocstar, which is mainly used for cross-chain integrations with other teams in the ecosystem. To obtain test tokens for Rocstar, please contact Astar team on Discord.

The Rocstar native token symbol is ROC.

## Mainnets
Astar has two mainnets, like most parachains in the Polkadot ecosystem. One on Kusama Relay Chain, and the other on Polkadot Relay chain.

### Shiden
Shiden is a parachain connected to the Kusama Relay Chain, and used to deploy and test new releases of Astar runtime in a live production (canary) environment. Shiden is not considered a testnet since SDN has its own tokenomics and value, but is used to validate and stabilize new software releases and upgrades for Astar Network.

The Shiden native token symbol is SDN.

### Astar
By now you may have already guessed that Astar network is a parachain on Polkadot Relay chain.

The Astar native token symbol is ASTR.

## Questions and Assignments:
1. Using the account you created in previous chapters, visit to Astar portal, connect to Shibuya testnet and claim some tokens from the faucet. You will need them later to deploy contracts on Shibuya.
2. Are you able to deduce how to transfer SDN tokens to Astar, and swap them for ASTR tokens?
3. Is there a market for buying and selling SBY tokens?
10 changes: 10 additions & 0 deletions docs/build/Introduction/create_account.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
sidebar_position: 3
---

# Create Account
If you never created a native Astar account, please follow the instructions in [User Guide](/docs/user-guides/create-wallet/#create-account).

If you are building EVM smart contracts you will need Metamask. Watch this short video to learn how.

<iframe width="560" height="315" src="https://www.youtube.com/embed/9YHmmcQI6VQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
Binary file added docs/build/Introduction/img/6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/build/Introduction/img/7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/build/Introduction/img/8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/build/Introduction/img/9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added docs/build/Introduction/img/switch_astar.png
12 changes: 12 additions & 0 deletions docs/build/Introduction/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Introduction
![banner](../assets/gradient4.jpg)
To make use of this documentation effectively, you should possess a general understanding of programming basics. The programming languages used throughout are mainly Rust, Solidity, and JavaScript, for which previous knowledge is not necessary, but would be highly beneficial. In conjunction with improving your understanding of the material contained within these guides, we recommend additionally that you review supplemental material covering these languages, in order to improve your overall understanding of the topics, and practical code examples provided.

### Do I need blockchain knowledge to follow this documentation?
Your blockchain knowledge will be useful but if you are reading this that means you are on the right track.

### I'm Dotsama builder, do I need this?
If you are already a builder on Polkadot/Kusama ecosystem you can most likely skip Introduction chapter. But it is recommended that you read about available Networks.

### Do I need to be a developer to understand Introduction chapter?
To use this introduction chapter you do not need any programming skills, and it will be useful later when you step into more advanced topics.
Loading

0 comments on commit e1d5792

Please sign in to comment.