Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uplift doc pages with admonitions #58

Merged
merged 7 commits into from
Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/EVM/developer-tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ Deploying and interacting with EVM-based smart contracts on Astar is as easy as
1. Configuring (and funding) your Ethereum account on the respective network
2. Adding Astar's networks to your Ethereum client

> 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.
:::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.
:::

## Hardhat

Expand Down
4 changes: 3 additions & 1 deletion docs/EVM/first-contract/network-family.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ Shibuya is the test network of Shiden and is connected to our own Relaychain. So

We, of course, offer a local network to allow you to check your smart contract repeatedly in the local environment. We will let you know how to run the local standalone development network in the following section.

> If you want to know the network details, please check out [this page](../../quickstart/endpoints.md).
:::info
If you want to know the network details, please check out [this page](../../quickstart/endpoints.md).
:::
12 changes: 8 additions & 4 deletions docs/dapp-staking/for-devs/register-dapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ sidebar_position: 2

How to register your dApp in our dApp staking mechanism. First, you have to make sure that you meet the [requirements](https://docs.astar.network/docs/dapp-staking/for-devs/requirements). **dApp staking is for all live projects in our ecosystem.** Just contact a member of [SpaceLabs](https://astar.network/spacelabs/) to be added to our dApp staking portal.

> - To register a dApp, you need to have 100 SDN or 1000 ASTR tokens + gas fee in your developer's wallet.
> - Create/import your developer's wallet in the Polkadot JS extension.
:::info
- To register a dApp, you need to have 100 SDN or 1000 ASTR tokens + gas fee in your developer's wallet.
- Create/import your developer's wallet in the Polkadot JS extension.
:::

## Step 1

Deploy a smart contract in our ecosystem and verify the contract in our explorer. Deploy on Shiden if you want to join Shiden dApp staking, deploy on Astar for joining Astar dApp staking. You have two options for a smart contract:

> - The first option is to use one of your own smart contracts and verify that in our explorer.
> - The second option is only for those who don't deal with smart contracts. Deploy our `helloworld.sol` contract and provide all the information in the header of the contract. [Template contract](https://github.com/AstarNetwork/builders-program/blob/main/hellowold.sol)
:::info
- The first option is to use one of your own smart contracts and verify that in our explorer.
- The second option is only for those who don't deal with smart contracts. Deploy our `helloworld.sol` contract and provide all the information in the header of the contract. [Template contract](https://github.com/AstarNetwork/builders-program/blob/main/hellowold.sol)
:::

## Step 2

Expand Down
4 changes: 3 additions & 1 deletion docs/dapp-staking/for-devs/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ sidebar_position: 1

Are you interested to join dApp staking on Shiden or Astar? Read carefully to see if you meet the requirements:

> Astar is aiming to become a DAO in a couple of years. While moving towards becoming a DAO our dApp staking onboarding also includes passing our council. The process is to create your proposal to join dApp staking also on our [forum](https://forum.astar.network/c/initiatives/dapp-staking-applications/21) after meeting the requirements below.
:::info
Astar is aiming to become a DAO in a couple of years. While moving towards becoming a DAO our dApp staking onboarding also includes passing our council. The process is to create your proposal to join dApp staking also on our [forum](https://forum.astar.network/c/initiatives/dapp-staking-applications/21) after meeting the requirements below.
:::

## Astar Network

Expand Down
10 changes: 6 additions & 4 deletions docs/dapp-staking/for-stakers/staking.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ sidebar_position: 1

Go to our portal: and click on 'Staking'.

> Make sure you are connected to the correct network.
> **Shibuya Network**: testnet
> **Shiden Network**: mainnet on Kusama
> **Astar Network**: mainnet for Polkadot
:::tip
Make sure you are connected to the correct network.
- **Shibuya Network**: testnet
- **Shiden Network**: mainnet on Kusama
- **Astar Network**: mainnet for Polkadot
:::

![1](img/1.png)

Expand Down
4 changes: 3 additions & 1 deletion docs/integrations/dapp-listing/dappradar.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ Astar and Shiden are live on DappRadar, and their homepages are under [Astar Dap

You can [submit your project](https://dappradar.com/dashboard/submit-dapp) to DappRadar by providing background on your project including a short and a full description, website URL, and logo. Only a subset of the fields are required, but you are encouraged to complete as many as possible.

> DappRadar contains user-generated content. You should verify any information with your own research. Astar/Shiden is a permissionless network. Any project can deploy its contracts to Astar/Shiden.
:::caution
DappRadar contains user-generated content. You should verify any information with your own research. Astar/Shiden is a permissionless network. Any project can deploy its contracts to Astar/Shiden.
:::

## Required Content

Expand Down
8 changes: 6 additions & 2 deletions docs/integrations/dapp-listing/defillama.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ SDK adapters always export balance objects, which is a dictionary where all the

If a token balance has an address key, the Defi Llama SDK will manage any raw to real amount conversion for you (so you don't need to worry about ERC20 decimals). If a token balance has a Coingecko ID key, you will need to process the decimals and use a real token amount in the balances object.

> If you export token addresses in your balances object that isn't on CoinGecko, Defi Llama won't be able to fetch prices for the tokens. You can check which addresses are supported by going to the token on CoinGecko and checking the 'Contract' field on the right (pictured above).
:::caution
If you export token addresses in your balances object that isn't on CoinGecko, Defi Llama won't be able to fetch prices for the tokens. You can check which addresses are supported by going to the token on CoinGecko and checking the 'Contract' field on the right (pictured above).
:::

**Line 17 - Adding Data To The Balances Object**

Expand Down Expand Up @@ -143,7 +145,9 @@ module.exports = {

Fetch adapters only allow us to get the TVL at the current time, so it's impossible to fill old values on a protocol's TVL chart or recompute them, thus leading to charts that look jumpy. To solve this we introduced SDK adapters, which allow us to retrieve a protocol's TVL at any point in time.

> Fetch adapters can only be used for projects on non-EVM chains. Where possible, [SDK adapters](https://app.gitbook.com/o/-LgGrgOEDyFYjYWIb1DT/s/-M8GVK5H7hOsGnYqg-7q-872737601/integration/dapp-listing/defillama) are preferred to fetch adapters because on-chain calls are more transparent.
:::caution
Fetch adapters can only be used for projects on non-EVM chains. Where possible, [SDK adapters](https://docs.llama.fi/list-your-project/how-to-write-a-fetch-adapter) are preferred to fetch adapters because on-chain calls are more transparent.
:::

Third-party APIs should be used where possible to reduce bias. If third-party APIs are not available for the data you need, proprietary APIs can be used if they're open source.

Expand Down
16 changes: 12 additions & 4 deletions docs/integrations/indexers/subsquid.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ The `abi` parameter points at the JSON file previously created, and the output p

This command will automatically generate a TypeScript file named `erc721.ts`, under the `src/abi` subfolder, that defines data interfaces to represent output of the EVM events defined in the ABI, as well as a mapping of the functions necessary to decode these events (see the events dictionary in the aforementione file).

> NOTE: The ERC-721 ABI defines the signatures of all events in the contract. The `Transfer` event has three arguments, named: `from`, `to`, and `tokenId`. Their types are, respectively, `address`, `address`, and `uint256`. As such, the actual definition of the `Transfer` event looks like this: `Transfer(address, address, uint256)`.
:::info
The ERC-721 ABI defines the signatures of all events in the contract. The `Transfer` event has three arguments, named: `from`, `to`, and `tokenId`. Their types are, respectively, `address`, `address`, and `uint256`. As such, the actual definition of the `Transfer` event looks like this: `Transfer(address, address, uint256)`.
:::

## Define and Bind Event Handler(s)

Expand Down Expand Up @@ -232,7 +234,9 @@ export async function processTransfer(ctx: EvmLogHandlerContext): Promise<void>

The "handler" function takes in a `Context` of the correct type (`EvmLogHandlerContext`, in this case). The context contains the triggering event and the interface to store data, and is used to extract and process data and save it to the database.

> For the event handler, it is also possible to bind an arrow function to the processor.
:::info
For the event handler, it is also possible to bind an arrow function to the processor.
:::

### Configure Processor and Attach Handler

Expand Down Expand Up @@ -283,7 +287,9 @@ processor.addEvmLogHandler(
processor.run();
```

> The `lookupArchive` function is used to consult the [archive registry](https://github.com/subsquid/archive-registry) and yield the archive address, given a network name. Network names should be in lowercase.
:::info
The `lookupArchive` function is used to consult the [archive registry](https://github.com/subsquid/archive-registry) and yield the archive address, given a network name. Network names should be in lowercase.
:::

## Launch and Set Up the Database

Expand All @@ -295,7 +301,9 @@ docker-compose up -d

![2](img/2.gif)

> The `-d` parameter is optional, it launches the container in `daemon` mode so the terminal will not be blocked and no further output will be visible.
:::info
The `-d` parameter is optional, it launches the container in `daemon` mode so the terminal will not be blocked and no further output will be visible.
:::

Squid projects automatically manage the database connection and schema, via an [ORM abstraction](https://en.wikipedia.org/wiki/Object%E2%80%93relational_mapping).

Expand Down
8 changes: 6 additions & 2 deletions docs/integrations/wallets/astar-safe.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ Build on the Gnosis Safe infrastructure: take advantage of the most modular, fle

To get started, navigate to [Astar Safe].

> The current guide will focus on creating a MultiSig on Astar. Soon, we will add more networks to the list.
:::info
The current guide will focus on creating a MultiSig on Astar. Soon, we will add more networks to the list.
:::

### Connect Metamask

Expand Down Expand Up @@ -101,7 +103,9 @@ Next, open up your MetaMask to initiate a transaction. Send your ASTR tokens to

Now that you have funds in the Safe, you can send funds from the Safe to another account. For this example, you can send **1 ASTR** token to the `Owner 2` address. Hover over **ASTR** in the list of assets, and this time click on **Send**. Fill in all the information and click **Review**. Double check all the information and click on **Submit**.

> MetaMask will pop-up and you'll notice that instead of sending a transaction, you're sending a message. Click **Sign** to sign the message.
:::caution
MetaMask will pop-up and you'll notice that instead of sending a transaction, you're sending a message. Click **Sign** to sign the message.
:::

If you go back to the Safe, under the **Transactions** tab, you should be able to see that there has been a transaction proposal initiated to send 1 ASTR token to Ower 2 address. However, you should also see that only 1 out of 2 confirmations have been received and that 1 more owner is required to confirm the transaction before it gets executed.

Expand Down
6 changes: 3 additions & 3 deletions docs/integrations/wallets/ledger/ledger-evm.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ title: Ledger Astar/Shiden EVM on MetaMask

This guide will show you how to set up Astar EVM and Shiden EVM on your Ledger hardware wallet and how to use it in combination with MetaMask.

> **Note:**
>
> Photos are taken using Nano S Plus device, and the example shows interaction with Astar EVM app, but the process is the same with Nano S and Nano X devices, as well as Shiden EVM app.
:::info
Photos are taken using Nano S Plus device, and the example shows interaction with Astar EVM app, but the process is the same with Nano S and Nano X devices, as well as Shiden EVM app.
:::

## Requirements

Expand Down
6 changes: 3 additions & 3 deletions docs/integrations/wallets/ledger/ledger-native.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Astar “ultralight” app is now available on Ledger hardware wallet devices. T
Please keep in mind ultralight app can only sign transfers, and nothing else. (don’t send EVM assets to that account because you won’t be able to transfer them to native balance for example)
This guide will show you how to set up Astar app on your Ledger hardware wallet and how to use it in combination with polkadot.js browser extension.

> **Note**
>
> Photos are taken using the Nano S Plus device, but the process is the same with Nano S and Nano X devices.
:::info
Photos are taken using the Nano S Plus device, but the process is the same with Nano S and Nano X devices.
:::

## Requirements

Expand Down
12 changes: 7 additions & 5 deletions docs/integrations/wallets/subwallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ You can open the `injectedWeb3` object in your browser's devtools

## How to integrate with your dApp

> Please refer to our example:
>
> - Github Repository <https://github.com/Koniverse/SubConnect>
> - Demo App: <https://connect.subwallet.app/>
> - Video Demo: <https://bit.ly/38QhmfI>
:::info
Please refer to the example:

- Github Repository <https://github.com/Koniverse/SubConnect>
- Demo App: <https://connect.subwallet.app/>
- Video Demo: <https://bit.ly/38QhmfI>
:::

- Check the activation of the extension:
- When a wallet extension is active in a browser it will modify `window.injectedWeb3` by adding its interaction with specifying the name.
Expand Down
4 changes: 2 additions & 2 deletions docs/nodes/archive-node/binary.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ sudo nano /etc/systemd/system/astar.service

## Service parameters

:::note
:::tip
Please make sure to change **${NODE_NAME}**
:::

Expand Down Expand Up @@ -241,6 +241,6 @@ sudo systemctl start astar.service

If you run your collator it not only needs to sync the mainnet chain but also the complete relay chain from Kusama / Polkadot. This can take up to 3-4 days. You can also use a snapshot of Kusama/Polkadot. You can download this [here](https://polkashots.io/) and will save a lot of time.

:::note
:::caution
know what you are doing when using snapshots!
:::
4 changes: 2 additions & 2 deletions docs/nodes/archive-node/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ In this guide, we will start a container for both WS and RPC endpoints. If you w

Launch the docker node in detached mode:

:::note
:::tip
Please make sure to change ${NODE_NAME}
:::

Expand Down Expand Up @@ -185,6 +185,6 @@ Then start a new container by following the instructions under the [Start Docker

If you run your collator it not only needs to sync the **mainnet** chain but also the complete relay chain from **Kusama / Polkadot**. This can take up to 3-4 days. You can also use a snapshot of Kusama/Polkadot. You can download this [here](https://polkashots.io/) and will save a lot of time.

:::note
:::caution
know what you are doing when using snapshots!
:::
2 changes: 1 addition & 1 deletion docs/nodes/archive-node/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ An **archive node** keeps all the past blocks. It plays a vital role on a blockc

**Dapp projects** need to run their own archive node to retrieve blockchain data they use in order not to rely on public infrastructure that will respond slower because of the large amount of users connected.

:::note
:::caution
Be careful of the confusion with a **full node** that has a prunned database: a full node only keeps the past configured number of blocks (256 blocks by default) and uses much less storage space.
:::

Expand Down
20 changes: 14 additions & 6 deletions docs/nodes/archive-node/nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,25 @@ In this guide, we will use Nginx as a server as an example.
## Firewall

Your server will communicate through HTTP ports, you need to enable ports 80 (http) and 443 (https) in your firewall.

:::info
At the end of the configuration, you can close port 80 since only port 443 will be used to access the node.
:::

## Domain name

In this guide, we consider that you already have a **domain name** and you have control over the **DNS**. In this case, you need to add an **A record** with the sub domain you will use and the IP address of your node into you DNS provider console.

> If you don't have a domain name, you will have to generate a self-signed certificate and access your node through the raw ip address of your server.
:::info
If you don't have a domain name, you will have to generate a self-signed certificate and access your node through the raw ip address of your server.
:::

## Installation

> In all the next steps, don't forget to update ${SUB_DOMAIN} with your full sub domain name.
> example: ws.astar.awesomedappproject.io
:::info
In all the next steps, don't forget to update ${SUB_DOMAIN} with your full sub domain name.
Example: ws.astar.awesomedappproject.io
:::

First, install **Nginx** and **Certbot**:

Expand Down Expand Up @@ -121,9 +128,10 @@ server {
}

```

> Note the port 9944 used in proxy_pass in this example, this is the WS port.
> To pass the RPC port, just change it to 9933.
:::info
Note the port 9944 used in proxy_pass in this example, this is the WS port.
To pass the RPC port, just change it to 9933.
:::

Check and restart nginx:

Expand Down
4 changes: 3 additions & 1 deletion docs/user-guides/create-wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ A **descriptive name** is arbitrary and for your use only. It is not stored on t

The **password** will be used to encrypt this account's information. You will need to re-enter it when using the account for any kind of outgoing transaction or when using it to cryptographically sign a message.

> Note that this password does NOT protect your seed phrase. If someone knows the twelve words in your mnemonic seed, they still have control over your account even if they do not know the password.
:::danger
Note that this password does **NOT** protect your seed phrase. If someone knows the twelve words in your mnemonic seed, they still have control over your account even if they do not know the password.
:::

After clicking on "Add the account with the generated seed", your account is created. We recommend also saving your account as json file somewhere safe.

Expand Down
4 changes: 3 additions & 1 deletion docs/user-guides/metamask-to-pjs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ sidebar_position: 6

In this tutorial, we explain how to transfer ASTR/SDN from MetaMask to Polkadot.js. Astar is Ethereum compatible layer1 blockchain. You are able to manage your ASTR/SDN on your MetaMask.

> WARNING - WHEN YOU ARE ON EVM MODE, DO NOT SEND TOKENS FROM METAMASK TO EXCHANGES.
:::danger
**WARNING - When you are on EVM mode, do not send tokens from Metamask to exchanges**.
:::

## Connect The Portal To Metamask

Expand Down
4 changes: 3 additions & 1 deletion docs/wasm/sc-dev/tools/swanky.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ Below is the user documentation for Swanky CLI which is meant to be used hand-in

For the latest version of Swanky CLI docs please checkout [Swanky CLI download page](https://www.npmjs.com/package/@astar-network/swanky-cli) (soon to be available on GitHub) and [Swanky Node Repo GitHub](https://github.com/AstarNetwork/swanky-node).

> Swanky is currently in MVP phase, with soon to be announced and publicly available Beta 1 release.
:::info
Swanky is currently in MVP phase, with soon to be announced and publicly available Beta 1 release.
:::

## Usage

Expand Down
Loading