Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #8 from AstarNetwork/content-updates
Browse files Browse the repository at this point in the history
Content updates
  • Loading branch information
meganskye authored Jun 13, 2024
2 parents 8b179a1 + f00a7f8 commit 2b0a7b0
Show file tree
Hide file tree
Showing 111 changed files with 123 additions and 259 deletions.
2 changes: 1 addition & 1 deletion docs/about/integrate-with-astar/add-to-portal.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 5
---

# Add assets to Astar Portal
# Add Assets to Astar Portal

Once a channel is opened between parachains and assets have been registered, developers can create a PR on [Astar Portal](https://github.com/AstarNetwork/astar-apps) Github, to have their assets added. Here’s what you need to know about the integration of the XCM assets into Astar Portal.

Expand Down
2 changes: 1 addition & 1 deletion docs/about/integrate-with-astar/multilocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ You can use these `MultiLocation` values to add Astar native assets to a paracha
`{ parents: 1, interior: X3(Parachain(2006/7), PalletInstance(36), GeneralIndex(*asset_id*) }`

- Please note that these assets can be created by any user.
- Asset metadata (if available) can be found on-chain, by consulting the asset owner, or in our [official asset list](/docs/build/build-on-layer-1/smart-contracts/building-cross-chain-contracts/xcm/asset-list.md).
- Asset metadata (if available) can be found on-chain, by consulting the asset owner, or in our [official asset list](/docs/build/build-on-layer-1/smart-contracts/building-cross-chain-contracts/asset-list.md).
2 changes: 1 addition & 1 deletion docs/about/products/dapp-staking/dapp-staking-protocol.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_position: 1
title: dApp Staking v3 Technical Overview
title: dApp Staking Technical Overview
---

## Introduction
Expand Down
8 changes: 5 additions & 3 deletions docs/about/products/dapp-staking/for-devs/create-promotion.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ sidebar_position: 4

import Figure from '/src/components/figure'

# Create a promotion card on top page
# Create a Promotion Card

If you have a campaign or new product you would like to share in the community, this will help you spread the news. It will create a card which will be shown on the top of the dApp Staking page as well as the Portal asset page.
If you have a campaign or new product you would like to share in the community, this will help you spread the news. Following this procedure will create a card shown on the top of the dApp Staking page, as well as the Portal asset page.

You can create a PR once a month, at most.
:::note
Promotion cards may only be updated or changed **once a month**.
:::

<Figure src={require('/docs/use/how-to-guides/layer-1/dapp-staking/for-devs/img/Promotion_card_3.png').default} width="90%" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 3

import Figure from "/src/components/figure"

# Manage dApp & claim rewards
# Manage dApp & Claim Rewards

As a dApp owner, a new panel will appear in the Asset page of the Astar portal: **Your Project** ;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 2

import Figure from "/src/components/figure"

# Manage dApp Staking & claim rewards
# Manage dApp Staking & Claim Rewards

Once you have staked, a new panel named **Staking** will appear in the [Assets Page](https://portal.astar.network/astar/assets).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 3

import Figure from "/src/components/figure"

# Move staked tokens between dApps
# Move Staked Tokens Between dApps

Once your tokens have been staked on a dApp, you always have the option of reconsidering your decisions and moving them to another dApp.

Expand Down
4 changes: 0 additions & 4 deletions docs/build/build-on-layer-1/category.json

This file was deleted.

2 changes: 1 addition & 1 deletion docs/build/build-on-layer-1/environment/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Build Environment",
"label": "Environment",
"position": 2
}
5 changes: 5 additions & 0 deletions docs/build/build-on-layer-1/environment/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Environment
position: 2
---

import Figure from "/src/components/figure"

# Set up the Development Environment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ For all steps, encoded call data will be provided to simplify the process for th
After completing the previous steps, cross-chain SDN and SBY wrappers are configured as payable and sufficient assets.
The following steps will explain how to execute a cross-chain remote call. `Alice` will send an instruction from `Shiden` to execute `System::remark_with_event` on `Shibuya`.

`Alice` isn't able to directly control `Alice` on the destination chain, instead a new account will be derived. More information can be found [INSERT LINK TO GUIDE] (/docs/build/build-on-layer-1/smart-contracts/buildiing-cross-chain-contracts/xcm/building-with-xcm/xc-remote-transact.md#derived-remote-accounts).
`Alice` isn't able to directly control `Alice` on the destination chain, instead a new account will be derived. More information can be found [INSERT LINK TO GUIDE] (/docs/build/build-on-layer-1/smart-contracts/buildiing-cross-chain-contracts/building-with-xcm/xc-remote-transact.md#derived-remote-accounts).

1. Calculate `Alice's` derived account on `Shibuya` when sending instructions from `Shiden`.
```
Expand Down
1 change: 1 addition & 0 deletions docs/build/build-on-layer-1/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Build on Astar Substrate
position: 1
---

import Figure from '/src/components/figure'
Expand Down
4 changes: 2 additions & 2 deletions docs/build/build-on-layer-1/integrations/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Integrate Toolings",
"position": 9
"label": "Integration",
"position": 4
}
4 changes: 4 additions & 0 deletions docs/build/build-on-layer-1/integrations/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
position: 4
---

# Integrations

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/build-on-layer-2/integrations/index.md).
Expand Down
4 changes: 4 additions & 0 deletions docs/build/build-on-layer-1/introduction/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
position: 1
---

import Figure from '/src/components/figure'

# Introduction
Expand Down
4 changes: 2 additions & 2 deletions docs/build/build-on-layer-1/nodes/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Run A Node",
"position": 9
"label": "Run a Node",
"position": 3
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 4
---

# 4. Building Your Collator
# Building Your Collator

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 6
---

# 6. Configuration
# Configuration

:::tip
There is a lot of copy/paste in this section, but it is highly recommended that you try to understand each step. Please use our official discord for support.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 1
---

# 1. Create Your Environment
# Create Your Environment

## Overview

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 8
---

# 8. Launch Services
# Launch Services

## Launch Services

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 5
---

# 5. Node Monitoring
# Node Monitoring

## Installation of Node Monitoring

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 2
---

# 2. Secure SSH Connection
# Secure SSH Connection

**SSH access** is the most standard attack vector for an online server. An incredible number of robots and hackers scan the default port 22 and gain access, with basic and elaborated credentials.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 7
---

# 7. Services
# Services

## Systemd

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 3
---

# 3. SSH Tunneling
# SSH Tunneling

# SSH Tunneling

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sidebar_position: 9
---

# 9. Run Monitor Dashboard
# Run Monitor Dashboard

## Run Grafana dashboard

Expand Down
4 changes: 4 additions & 0 deletions docs/build/build-on-layer-1/nodes/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
position: 3
---

# Node Operators

**Node SDK** is broken down into the following pages:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
sidebar_position: 4
---
# Your Own RPC Server
# Self-Hosted RPC Server

For EVM developers and projects, it is not an unreasonable expectation that they should have their own managed EVM endpoints. Relying on public endpoints can introduce additional risk due to centralizaion or improper maintenance, and make them single points of failure.

Expand Down
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] (/docs/build/build-on-layer-1/smart-contracts/building-cross-chain-contracts/xcm/building-with-xcm/create-xc20-assets). [INSERT LINK]
For XC20 overview see the following [page] (/docs/build/build-on-layer-1/smart-contracts/building-cross-chain-contracts/building-with-xcm/create-xc20-assets). [INSERT LINK]

# See also

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Transfer native token
# Transfer Native Token

Let's use `transfer_multiasset` to:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Smart Contracts",
"position": 1
"position": 5
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ contract XcBurrito is Xc20Plus, ERC20Wrapper, BURRITO{

## Procedure
### 1. Create an XC20 asset
Follow the documentation on how to [Create XC20 Assets](/docs/build/build-on-layer-1/smart-contracts/building-cross-chain-contracts/xcm/building-with-xcm/create-xc20-assets.md).
Follow the documentation on how to [Create XC20 Assets](/docs/build/build-on-layer-1/smart-contracts/building-cross-chain-contracts/building-with-xcm/create-xc20-assets.md).

### 2. Deploy the xcBurrito.sol smart contract
To deploy the XcBurrito contract you will need 2 input parameters
- Burrito ERC20 token address (H160)
- **XC20** asset address (H160)
- Follow the instructions about how to [Calculate an XC20 Address](/docs/build/build-on-layer-1/smart-contracts/building-cross-chain-contracts/xcm/building-with-xcm/create-xc20-assets.md#calculate-xc20-precompile-address). For example, if the asset_id is 17 (=0x11), the resulting EVM address will be `0xffffffff00000000000000000000000000000011`
- Follow the instructions about how to [Calculate an XC20 Address](/docs/build/build-on-layer-1/smart-contracts/building-cross-chain-contracts/building-with-xcm/create-xc20-assets.md#calculate-xc20-precompile-address). For example, if the asset_id is 17 (=0x11), the resulting EVM address will be `0xffffffff00000000000000000000000000000011`

### 3. Transfer XC Asset Ownership to the xcBurrito Smart Contract
To allow the **xcBurrito** contract to be able to mint/burn you need to call the `setTeam()` extrinsic on pallet-assets, and configure the `issuer` and `admin` to be **xcBurrito**. This will allow the contract to issue wrapped **XC20** assets, but since the EVM contract has 24 bytes (H160), we will need to transform the EVM address to ss58 format before we can call the extrinsic.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ XC20s can interact through an ERC20 interface, so have the additional benefit of

First, let’s approach this at a high level, and move on to a more technical example for dApps.

Let’s say we want to transfer some KSM token from Kusama to `0xd2C6929A72e466213D1c2Df8359194784650A50e`. From the Kusama side of things, the payload for sending the KSM tokens will be similar to the ones we used in the previous [section](/docs/build/build-on-layer-1/smart-contracts/building-cross-chain-contracts/xcm/building-with-xcm/native-transactions.md).
Let’s say we want to transfer some KSM token from Kusama to `0xd2C6929A72e466213D1c2Df8359194784650A50e`. From the Kusama side of things, the payload for sending the KSM tokens will be similar to the ones we used in the previous [section](/docs/build/build-on-layer-1/smart-contracts/building-cross-chain-contracts/building-with-xcm/native-transactions.md).
However, the `Beneficiary` address `AccountId` will be a mapped ss58 address of the recipient’s EVM address, as that is the only address format that XCM will accept. You can read [this article](https://medium.com/astar-network/using-astar-network-account-between-substrate-and-evm-656643df22a0) about how to create the mapped address. To keep things short, the address mappings are:

- **H160**: `0xd2C6929A72e466213D1c2Df8359194784650A50e`
- **ss58**: `YPRZVFHaRvXdnbAQsXcgqiJokpoHNkUXzR6XTBBJQKHtorT` (with prefix 5 for Shiden/Astar)
- **Public key**: `0x6c65500b73e2cec702f06dcd5299b31e4d0b6cf7728937b7d5edac79611292f2`

To obtain the asset address on the EVM, we will need to retrieve its asset `Id`. In our case, we will be using KSM, which has the asset `Id` `340282366920938463463374607431768211455`. Now we will need to convert the `Id` to hex, and append it to `0xffffffff`. In this example, the resulting address is `0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF`, which we can now use directly within Solidity smart contracts, or MetaMask. More info in previous [section](/docs/build/build-on-layer-1/smart-contracts/building-cross-chain-contracts/xcm/building-with-xcm/send-xc20-evm.md#step-1-obtain-the-ss58-native-address-mapped-to-your-evm-address)
To obtain the asset address on the EVM, we will need to retrieve its asset `Id`. In our case, we will be using KSM, which has the asset `Id` `340282366920938463463374607431768211455`. Now we will need to convert the `Id` to hex, and append it to `0xffffffff`. In this example, the resulting address is `0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF`, which we can now use directly within Solidity smart contracts, or MetaMask. More info in previous [section](/docs/build/build-on-layer-1/smart-contracts/building-cross-chain-contracts/building-with-xcm/send-xc20-evm.md#step-1-obtain-the-ss58-native-address-mapped-to-your-evm-address)

## Import Assets on MetaMask

Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 2b0a7b0

Please sign in to comment.