Skip to content

Commit

Permalink
Restore last known good and rollup updates to PR#429 (#430)
Browse files Browse the repository at this point in the history
* revert to last know good;  rollup successive updates to PR#429

* revert to last know good;  rollup successive updates to PR#429

* rollup PR#427

* Update interact_with_xc20.md

* Revert "Merge branch 'main' into megan_fixMain"

This reverts commit 4028f2d, reversing
changes made to ea32275.

* Update manage-xc20-with-metamask.md

* Update faq.md
  • Loading branch information
meganskye authored Aug 28, 2023
1 parent fce948a commit 9b5ceae
Show file tree
Hide file tree
Showing 80 changed files with 715 additions and 419 deletions.
2 changes: 1 addition & 1 deletion docs/build/EVM/evm-debug-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Spinning up a debug or tracing node is similar to running a full node. However,

:::info

EVM tracing node installation manual available on this page (INSERT_LINK).
EVM tracing node installation manual available on [this page](/docs/build/nodes/evm-tracing-node).

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/build/EVM/precompiles/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The Frontier EVM used on Astar network provides several useful precompiled contr
| [Batch](batch.md) | 0x0000000000000000000000000000000000005006 |
| [assets-erc20](xc20.md) | ASSET_PRECOMPILE_ADDRESS_PREFIX |

The interface descriptions for these precompiles can be found in the `precompiles` folder: [Astar repo](https://github.com/AstarNetwork/Astar).
The interface descriptions for these precompiles can be found in the `precompiles` folder: [Astar repo](https://github.com/AstarNetwork/Astar/).
The Addresses can be checked in the [Astar repo](https://github.com/AstarNetwork/Astar/tree/master/runtime) for each runtime in `precompile.rs` files.

# Usage Example
Expand Down
2 changes: 1 addition & 1 deletion docs/build/EVM/precompiles/xc20.md
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 (INSERT_LINK).
For XC20 overview see the following [page](/docs/learn/interoperability/xcm/building-with-xcm/create-xc20-assets).

# See also

Expand Down
6 changes: 3 additions & 3 deletions docs/build/EVM/precompiles/xcm.md
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` (INSERT_LINK) | Withdraw previously transferred assets |
| `assets_reserve_transfer` (INSERT_LINK) | Transfer assets to a remote chain |
| `remote_transact` (INSERT_LINK) | Execute a transaction on a remote chain |
| `assets_withdraw` (/docs/learn/interoperability/xcm/building-with-xcm/xc-assets-withdraw) | Withdraw previously transferred assets |
| `assets_reserve_transfer` (/docs/learn/interoperability/xcm/building-with-xcm/xc-reserve-transfer/) | Transfer assets to a remote chain |
| `remote_transact` (/docs/learn/interoperability/xcm/building-with-xcm/xc-remote-transact/) | Execute a transaction on a remote chain |
2 changes: 1 addition & 1 deletion docs/build/Introduction/create_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sidebar_position: 3
---

# Create Account
If you never created a native Astar account, please follow the instructions in User Guide (INSERT_LINK).
If you never created a native Astar account, please follow the instructions in the [User Guide](/docs/use/Manage%20wallets/create-wallet).

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ In order to confirm receiving the asset on EVM, we need to add the specific asse
- Convert the `asset ID` from hexadecimal to decimal
- Add the prefix of `0xffffffff`
- for example, our Cookbook Token, CKT, has `asset ID` of `229`. Following the step above, we will have the converted address of `0xffffffff000000000000000000000000000000E5`.
- More information can be found in the following guide: Send XC20 Assets to EVM (INSERT_LINK)
- More information can be found in the following guide: [Send XC20 Assets to EVM](/docs/build/builder-guides/leverage_parachains/interact_with_xc20.md#send-the-asset-to-evm)

![Untitled](mintable-xc20-cookbook/Untitled%207.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/build/environment/endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The free endpoints below are dedicated to end users, they can be used to interac
<b>They limit the rate of API calls</b>, so they are not suitable for high demand, such as a dApp UI constantly scraping blockchain data or an indexer.
:::
:::tip
To meet the demands of a production dApp you can run an archive node (INSERT_LINK) **or** get your own API key from one of our infra partners (INSERT_LINK).
To meet the demands of a production dApp you can run an [archive node](/docs/build/nodes/archive-node/) **or** get your own API key from one of our [infrastructure partners](/docs/build/integrations/node-providers).
:::

<Tabs>
Expand Down
2 changes: 1 addition & 1 deletion docs/build/environment/zombienet-testing.md
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 here (INSERT_LINK).
`Alice` isn't able to directly control `Alice` on the destination chain, instead a new account will be derived. More information can be found [here](/docs/learn/interoperability/xcm/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
4 changes: 2 additions & 2 deletions docs/build/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ The shared security of Polkadot, coupled with Astar XVM, allows developers to de
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.

## 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.
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 (INSERT_LINK) section for more information.
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.
Expand Down
2 changes: 1 addition & 1 deletion docs/build/integrations/indexers/subsquid.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 1

# Subsquid

[Subsquid](https://subsquid.io) is an indexing framework supporting both Substrate (INSERT_LINK) and EVM (INSERT_LINK)-based chains. It is [extremely flexible and offers high syncing speeds](https://docs.subsquid.io/migrate/subsquid-vs-thegraph/). Subsquid comes with a set of code generation tools that make ready-to-use, customizable indexer projects ("squids") out of contracts' ABIs. WASM/ink! and EVM/Solidity contracts are supported. Once scraped, the contract data can be served over a GraphQL API or stored as a dataset.
[Subsquid](https://subsquid.io) is an indexing framework supporting both [Substrate](/docs/build/wasm) and [EVM](/docs/build/EVM)-based chains. It is extremely flexible and offers [high syncing speeds](https://docs.subsquid.io/migrate/subsquid-vs-thegraph/). Subsquid comes with a set of code generation tools that make ready-to-use, customizable indexer projects ("squids") out of contracts' ABIs. WASM/ink! and EVM/Solidity contracts are supported. Once scraped, the contract data can be served over a GraphQL API or stored as a dataset.

Squids can run either locally or in a Subsquid-provided a cloud service called Aquarium. The service has and will always have a free tier. For more demanding applications it offers a premium subscription.

Expand Down
2 changes: 1 addition & 1 deletion docs/build/integrations/indexers/thegraph.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In this guide, we will demonstrate how to run an Astar node for getting more ins

## Running a Graph Node

After successfully running an [RPC node](https://docs.astar.network/docs/nodes/archive-node/), the Graph node will need to be installed and configured to connect to a separate computer. If you are running a self-signed RPC node, you will need to set up an extra environment variable for allowance.
After successfully running an [RPC node](https://docs.astar.network/docs/build/nodes/archive-node/), the Graph node will need to be installed and configured to connect to a separate computer. If you are running a self-signed RPC node, you will need to set up an extra environment variable for allowance.

The first step is to clone the [Graph Node repository](https://github.com/graphprotocol/graph-node/):

Expand Down
5 changes: 3 additions & 2 deletions docs/build/integrations/node-providers/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Node Providers

The free endpoints mentioned in the [Build Environment section](/docs/build/environment/endpoints.md) are rate limited and designed for end users to be able to interact with dApps, or deploy/call smart contracts. They are not suitable for usage by dApp UIs that scrape blockchain data continuously, or indexers (like the Graph).
The free endpoints mentioned in the [Build Environment section](/docs/build/environment/endpoints) are rate limited and designed for end users to be able to interact with dApps, or deploy/call smart contracts. They are not suitable for usage by dApp UIs that scrape blockchain data continuously, or indexers (like the Graph).


If you are an active developer you should consider creating your own endpoint, and it is mandatory to do so for production deployments. Refer to how run an archive node (INSERT_LINK) for more information, or obtain an API key from one of our infrastructure providers, listed below:
If you are an active developer you should consider creating your own endpoint, and it is mandatory to do so for production deployments. Refer to how run an [archive node](/docs/nodes
/archive-node/) for more information, or obtain an API key from one of our infrastructure providers, listed below:


```mdx-code-block
Expand Down
76 changes: 76 additions & 0 deletions docs/build/integrations/oracles/dia-wasm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# DIA Wasm Oracle
## Introduction
DIA has a dedicated Wasm-based oracle. It can be universally deployed on any chain that supports substrate Wasm environment.

## Prerequisites
Make sure the version of ink you are on is v3.0.1.

## Getting started
To access values from DIA wasm oracles you need to copy the diadata directory to your contract so that you can access DIA structs, that contain the oracle data.

### Contract Integration
In your contract, create storage with DiaDataref, this is used to access values from the oracle.

```
#[ink(storage)]
pub struct OracleExample {
diadata: DiadataRef,
....
....
}
```

This struct can be used to access data from pub functions from the oracle contract.

### Link the contract with an Oracle
To instantiate a contract's access to the oracle you need to pass the DIA oracle address, either using the constructor or by creating a separate write function to update with the value of oracle at a later stage.

Here is an example using a constructor:

```
#[ink(constructor)]
pub fn new(
oracle_address: AccountId,
) -> Self {
let diadata: DiadataRef = ink_env::call::FromAccountId::from_account_id(oracle_address);
Self {
diadata
}
}
```

Here, `oracle_address` refers to the DIA oracle address of a deployed oracle contract.

### Access the value
Next, to access an oracle value you can simple call the get() function:

```
pub fn get(&self ) -> diadata::ValueTime {
return self.diadata.get(String::from("ETH"));
}
```

This returns the ETH price value time given by the oracle.

### Config changes

Make sure you add diadata/std in you config:

```
std = [
"ink_metadata/std",
"ink_env/std",
"ink_storage/std",
"ink_primitives/std",
"scale/std",
"scale-info/std",
"diadata/std",
]
```

## Addresses
**Astar Wasm Smart Contract**: [XmVR4FbKWLYQgyHVxkFiBYScVo662WgSCoS84uZZPWNrtRT](https://shiden.subscan.io/account/XmVR4FbKWLYQgyHVxkFiBYScVo662WgSCoS84uZZPWNrtRT)
**Shibuya Wasm Smart Contract**: [X5NLwAUYX7FwVk25a8JwaXtuVJQsW87GQcKxYoF3aLyu8Pz](https://shibuya.subscan.io/account/X5NLwAUYX7FwVk25a8JwaXtuVJQsW87GQcKxYoF3aLyu8Pz)

## Learn more
See the entire oracle code and instructions on how to run and oracle service by yourself in [our github repo](https://github.com/diadata-org/dia-wasm-oracle).
2 changes: 1 addition & 1 deletion docs/build/integrations/wallets/ledger/ledger-native.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Ledger NanoS users should install the Astar XL version of the app, shown in the
<img src={ledger8} style={{width: 600}} />
</div>

For detailed information about dApp staking or how to stake on the EVM side of Astar Portal using a Ledger device, please refer to the Astar documentation (INSERT_LINK) or [Ledger EVM staking guide](./ledger-evm.md)
For detailed information about dApp staking or how to stake on the EVM side of Astar Portal using a Ledger device, please refer to the [Astar official documentation](/docs/build/dapp-staking/for-stakers/) or [Ledger EVM staking guide](./ledger-evm.md)

:::tip
If you receive a **Ledger error: Failed to execute 'claimInterface' on 'USBDevice': Unable to claim interface** message during the dApp staking claim process, ensure you are performing the operation using a Chromium-based browser such as Chrome or Brave, and the Ledger device connection method is WebHID, as outlined in the previous step.
Expand Down
8 changes: 4 additions & 4 deletions docs/build/nodes/archive-node/binary.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@ curl -H "Content-Type: application/json" --data '{ "jsonrpc":"2.0", "method":"sy

## Next steps

For any usage, wait for the chain to be fully sync by checking the node log (INSERT_LINK).
For any usage, wait for the chain to be fully sync by checking the [node log](/docs/build/nodes/archive-node/binary#get-node-logs).

It all depends on what you plan to do with your archive node.

- In most cases, you will want to access node from outside. In this case, nginx server (INSERT_LINK) is the recommended option.
- In most cases, you will want to access node from outside. In this case, [nginx server](/docs/build/nodes/archive-node/nginx) is the recommended option.
- If you run your dApp on the same server as the node, then you can access it directly with the `localhost` address. This setup is recommended for testing purpose only.
- If you run the node locally for testing purpose, you can switch the network in [Polkadot.js portal](https://polkadot.js.org/apps) and explore the chain:

Expand All @@ -214,7 +214,7 @@ To access data from indexers (e.g. The Graph) or Oracles (e.g. Chainlink), you n

### Upgrade node

When an upgrade is necessary, node operators are be notified in our Discord (INSERT_LINK) and Element (INSERT_LINK) group.
When an upgrade is necessary, node operators are be notified in our Discord and Element group.

Download the [latest release](https://github.com/AstarNetwork/Astar/releases/latest) from Github

Expand Down Expand Up @@ -243,5 +243,5 @@ sudo systemctl start astar.service

### Snapshot

Please refer to the **snapshot page** (INSERT_LINK).
Please refer to the [**snapshot page**](/docs/build/nodes/snapshots).
:::
10 changes: 5 additions & 5 deletions docs/build/nodes/archive-node/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ curl -H "Content-Type: application/json" --data '{ "jsonrpc":"2.0", "method":"sy

## Next steps

In any case, wait for the chain to be fully synchronized by checking the node log (INSERT_LINK).
In any case, wait for the chain to be fully synchronized by checking the [node log](/docs/build/nodes/archive-node/binary#get-node-logs).

How the archive node will be used will largely determine what steps to follow next:
- If accessing the node publicly, running an nginx server (INSERT_LINK) is the recommended option.
- If accessing the node publicly, running an [nginx server](/docs/build/nodes/archive-node/nginx) is the recommended option.
- If the dApp is running on the same server as the node, then it can be accessed directly with the `localhost` address. This setup is recommended for testing purposes only.
- If running the node locally for testing purposes, switch networks in [Polkadot.js portal](https://polkadot.js.org/apps) to explore the chain:

Expand Down Expand Up @@ -151,7 +151,7 @@ To access data from indexers (like The Graph) or Oracles (like Chainlink), add t

## Upgrade node

When a node upgrade is necessary, node operators are notified with instructions in the [Astar Dev Announcement Telegram](https://t.me/+cL4tGZiFAsJhMGJk), Astar Discord (INSERT_LINK), and [Astar Node Upgrade Element channel](https://matrix.to/#/#shiden-runtime-ann:matrix.org). Join and follow any of these channels to receive news about node updates and node upgrades.
When a node upgrade is necessary, node operators are notified with instructions in the [Astar Dev Announcement Telegram](https://t.me/+cL4tGZiFAsJhMGJk), [Astar Discord](https://discord.gg/Z3nC9U4), and [Astar Node Upgrade Element channel](https://matrix.to/#/#shiden-runtime-ann:matrix.org). Join and follow any of these channels to receive news about node updates and node upgrades.

To upgrade to the latest node version, stop and remove the actual container:

Expand All @@ -177,9 +177,9 @@ sudo rm -R /var/lib/astar/*

where `CHAIN` is `astar`, `shiden`, or `shibuya`.

Then start a new container by following the instructions under the Start Docker node (INSERT_LINK) section.
Then start a new container by following the instructions under the [Start Docker node](/docs/build/nodes/archive-node/docker#start-docker-node) section.

### Snapshot

Please refer to **snapshot page** (INSERT_LINK).
Please refer to [**snapshot page**](/docs/build/nodes/snapshots/).
:::
7 changes: 4 additions & 3 deletions docs/build/nodes/archive-node/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import TabItem from '@theme/TabItem';
## Overview

An **archive node** stores the history of past blocks. Most of times, an archive node is used as **RPC endpoint**.
RPC plays a vital role on our network: it connects users and dApps to the blockchain through WebSocket and HTTP endpoints. For example, our public endpoints (INSERT_LINK) run archive nodes for anyone to quickly connect to Astar chains.
RPC plays a vital role on our network: it connects users and dApps to the blockchain through WebSocket and HTTP endpoints. For example, our [public endpoints](/docs/build/environment
/endpoints) run archive nodes for anyone to quickly connect to Astar chains.

**DApp projects** need to run their own RPC node as archive to the retrieve necessary blockchain data and not to rely on public infrastructure. Public endpoints respond slower because of the large amount of users connected and are rate limited.

Expand Down Expand Up @@ -82,6 +83,6 @@ For all types of nodes, ports `30333` and `30334` need to be opened for incoming

There are 2 different ways to run an Astar node:

Using Binary (INSERT_LINK) - run the node from binary file and set it up as systemd service
Using [Binary](/docs/build/nodes/archive-node/binary) - run the node from binary file and set it up as systemd service

Using Docker (INSERT_LINK) - run the node within a Docker container
Using [Docker](/docs/build/nodes/archive-node/docker) - run the node within a Docker container
Loading

0 comments on commit 9b5ceae

Please sign in to comment.