Skip to content

Commit

Permalink
Docs monthly maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
owans committed Oct 24, 2024
1 parent af77674 commit d85c6c9
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 45 deletions.
1 change: 1 addition & 0 deletions docs/01-concepts/powpeg/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Rootstock’s **PowPeg** protocol, has matured from its inception in 2018 as a f
- The PowPeg App is available on [Testnet](https://powpeg.testnet.rootstock.io/) and [Mainnet](https://powpeg.rootstock.io/).
- For general information about the design and architecture, how to perform a peg-in transaction using Ledger and Trezor, Frequently asked questions and advanced operations you can perform on the PowPeg, please refer to the [PowPeg user guide](/resources/guides/powpeg-app/).
- Get information on the signatories and attestion in the [PowPeg HSM Firmware Attestation](/concepts/powpeg/hsm-firmware-attestation) section.
- Read [Introducing Fast Mode: Getting RBTC via the PowPeg, but Faster](https://blog.rootstock.io/noticia/get-rbtc-fast-mode/) to learn about the difference between Native Mode and Fast Modes when using the PowPeg.
:::

## The History of the PowPeg Protocol
Expand Down
60 changes: 39 additions & 21 deletions docs/02-developers/05-smart-contracts/02-hardhat/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,45 @@ This section provides help on some potential issues you may run into and tips on

## Errors

- Error HH8: There's one or more errors in your config file
```shell
% npx hardhat compile
Error HH8: There's one or more errors in your config file:
<Accordion>
<Accordion.Item eventKey="0">
<Accordion.Header as="h3">Error HH8: There's one or more errors in your config file</Accordion.Header>
<Accordion.Body>
```shell
% npx hardhat compile
Error HH8: There's one or more errors in your config file:

* Invalid account: #0 for network: rskMainnet - Expected string, received undefined
* Invalid account: #0 for network: rskTestnet - Expected string, received undefined
* Invalid account: #0 for network: rskMainnet - Expected string, received undefined
* Invalid account: #0 for network: rskTestnet - Expected string, received undefined

To learn more about Hardhat's configuration, please go to https://hardhat.org/config/
To learn more about Hardhat's configuration, please go to https://hardhat.org/config/

For more info go to https://hardhat.org/HH8 or run Hardhat with --show-stack-traces
```
> - FIX 1: Ensure the values in the environment variables matches with the hardhat network configuration `hardhat.config.js` file. For bash, run `source .env` in the root directory for dotenv to enable the environment variables.
- Error: Nothing to Compile
```shell
% npx hardhat compile
Nothing to compile
```
> - FIX 2: Delete artifacts folder and run the `npx hardhat compile` command to generate new artifacts.
- Error: "GET /MyToken.json" Error (404): "Not found"
- Check that contracts were compiled successfully, and artifacts folder was generated.
- Check that all the steps in [interacting with frontend](/developers/smart-contracts/hardhat/interact-with-frontend/) were followed sequentially.
- Error: HH601: Script scripts/deploy.js doesn't exist.
- Ensure that you're running the `npx hardhat run --network hardhat scripts/deploy.js` command from the root directory.
For more info go to https://hardhat.org/HH8 or run Hardhat with --show-stack-traces
```
> - FIX 1: Ensure the values in the environment variables matches with the hardhat network configuration `hardhat.config.js` file. For bash, run `source .env` in the root directory for dotenv to enable the environment variables.
</Accordion.Body>
</Accordion.Item>
<Accordion.Item eventKey="1">
<Accordion.Header as="h3">Error: Nothing to Compile</Accordion.Header>
<Accordion.Body>
```shell
% npx hardhat compile
Nothing to compile
```
> - FIX 2: Delete artifacts folder and run the `npx hardhat compile` command to generate new artifacts.
</Accordion.Body>
</Accordion.Item>
<Accordion.Item eventKey="2">
<Accordion.Header as="h3">Error: "GET /MyToken.json" Error (404): "Not found"</Accordion.Header>
<Accordion.Body>
- Check that contracts were compiled successfully, and artifacts folder was generated.
- Check that all the steps in [interacting with frontend](/developers/smart-contracts/hardhat/interact-with-frontend/) were followed sequentially.
</Accordion.Body>
</Accordion.Item>
<Accordion.Item eventKey="2">
<Accordion.Header as="h3">Error: HH601: Script scripts/deploy.js doesn't exist.</Accordion.Header>
<Accordion.Body>
- Ensure that you're running the `npx hardhat run --network hardhat scripts/deploy.js` command from the root directory.
</Accordion.Body>
</Accordion.Item>
</Accordion>
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,18 @@ tags: [guides, developers, smart contracts, rsk, rootstock, foundry, dApps, ethe
This section provides help on some potential issues you may run into and tips on how to resolve them.

## Errors
- Error Transaction dropped from the mempool or Error Transaction not completed: check the tx-id in the explorer. The tx may have went successful but the error is still in the logs. Here are the [mainnet](https://explorer.rootstock.io/) and [testnet](https://explorer.testnet.rootstock.io/) explorers.
- Error Failed to get EIP-1559 fees: EIP-1559 is not supported or not activated on the Rootstock RPC url. The `--legacy` flag is passed to use legacy transactions instead of `EIP-1559`.

<Accordion>
<Accordion.Item eventKey="0">
<Accordion.Header as="h3">Error: Transaction dropped from the mempool or Error Transaction not completed</Accordion.Header>
<Accordion.Body>
Check the `tx-id` in the explorer. The tx may have went successful but the error is still in the logs. Here are the [mainnet](https://explorer.rootstock.io/) and [testnet](https://explorer.testnet.rootstock.io/) explorers.
</Accordion.Body>
</Accordion.Item>
<Accordion.Item eventKey="1">
<Accordion.Header as="h3">Error Failed to get EIP-1559 fees</Accordion.Header>
<Accordion.Body>
- EIP-1559 is not supported or not activated on the Rootstock RPC url. The `--legacy` flag is passed to use legacy transactions instead of `EIP-1559`.
</Accordion.Body>
</Accordion.Item>
</Accordion>
16 changes: 7 additions & 9 deletions docs/02-developers/07-rpc-api/03-alchemy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ In this guide you will learn:
- How to create an **Alchemy** project to make your first API call.
- View some options to interact with the node RPC with the **Alchemy** sdk and tools.


## Prerequisites

Before you start this guide, make sure you have the following:
Expand All @@ -28,11 +27,11 @@ Before you start this guide, make sure you have the following:
- Developers looking to interact with the Rootstock nodes.

## Features
### Easy Setup:
### Easy Setup
- Create an API key effortlessly to initiate development.
- Make your first API call in minutes.

### API Key Authentication:
### API Key Authentication
- Provides secure authentication for decentralized applications (dApps).
- Limits API requests on a daily or monthly basis.

Expand Down Expand Up @@ -67,7 +66,7 @@ The next screen will display the services available for the Rootstock network, i

![Alchemy - App information](/img/developers/quickstart/5-alchemy.png)

#### Set Up Tab:
#### Set Up Tab
In the `Setup` tab you will see different options for using the rpc node, depending on the ***Method***, ***Language*** and ***SDK*** you need to use for it.

By default, the dashboard shows an example for the `get latest block` call on `Javascript` and `Viem`.
Expand All @@ -90,7 +89,7 @@ console.log(block);

However, you will have different language options available for the rpc call, included `CLI` (command line interface).

#### Language Options:
#### Language Options
- **CLI (Command Line Interface):** No SDK options are available with this choice.
- **JavaScript:** You can choose from ***Viem***, ***Ethers.js***, or ***Fetch*** as your SDK options.
- **TypeScript:** Only the ***Viem*** SDK option is available for selection.
Expand All @@ -108,7 +107,8 @@ curl -X POST https://rootstock-mainnet.g.alchemy.com/v2/<API_KEY>\
"id": 1
}'
```
And the response should be something like this:

And the response should look like this:
```json
{"jsonrpc":"2.0","id":1,"result":{"number":"0x67a9c4","hash":"0xe3d0d2b47eb0a06f04cea614355a6ba10935c62596e188e3d27dcafb7ddc746f","parentHash":"0x140a94c77bc08077133d874405252b4463bcbfe500cc7a9e48f4626cdfd91104","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","logsBloom":"0x00000000000000000000101000000000000080000040000000000000000000000020400000010000000000000000001000002000000000000008800000000000000000000000000000000000000008000000000000000001000000000000000000000000000000000040000000000000000000000000000000000000020000000001000000000081000000000004000000000000000000000000000020000000000000000200100020000000000000000180000000000080001000020000000000000001000000000000000000008000000030000000000000200000100000000000000000000000002004000880000000000400000000000000200010000200"
```
Expand All @@ -126,11 +126,9 @@ In this tab, you will find the Rootstock card, where you can copy the RPC url yo
#### Settings Tab
In this tab you find different configuration options of your app, like advanced config, allow list, JWT keys, or delete your app from the **Alchemy** dashboard.

## Final Comments

## Conclusion
The use of RPC API is an important part of the frontend and backend interaction with the blockchain. Alchemy is a poweful platform which contains a lot of tools that can be used for developers to create their code faster.

## Useful Links

- [Alchemy Dashboard](https://www.alchemy.com/)
- [Rootstock RPC API Service](/developers/smart-contracts/foundry/)
39 changes: 26 additions & 13 deletions docs/04-resources/06-guides/powpeg-app/faqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,36 +68,49 @@ Here, you can find a list of frequently asked questions (FAQs) about the PowPeg
> - ![Read popup info](/img/resources/powpeg/pegin-popup.png)
</Accordion.Body>
</Accordion.Item>
<Accordion.Item eventKey="9">
<Accordion.Header as="h3">10. How long does it take for a native pegout transaction to complete?</Accordion.Header>
<Accordion.Item eventKey="9">
<Accordion.Header as="h3">10. How long does it take for a pegin transaction to complete using the PowPeg (FAST MODE) option?</Accordion.Header>
<Accordion.Body>
> - native pegin needs 34 hours to be completed
> - ![Read popup info](/img/resources/powpeg/pegin-popup.png)
> - Using fast mode, pegin time has been significantly reduced to ~20 mins.
> Note: In Fast Mode, we utilize Liquidity Providers (LPs) to expedite the transfer of funds to end users. These third-party providers can set their own transfer times. This information is displayed on the screen, allowing users to select the LP that offers the most suitable transfer speed for their needs.
</Accordion.Body>
</Accordion.Item>
<Accordion.Item eventKey="10">
<Accordion.Header as="h3">11. What are the min and max for pegin transaction?</Accordion.Header>
<Accordion.Header as="h3">11. How long does it take for a native pegout transaction to complete?</Accordion.Header>
<Accordion.Body>
> - native pegout needs 34 hours to be completed
</Accordion.Body>
</Accordion.Item>
<Accordion.Item eventKey="11">
<Accordion.Header as="h3">12. How long does it take for a pegout transaction to complete using the PowPeg (FAST MODE) option?</Accordion.Header>
<Accordion.Body>
> - Using fast mode, pegout time has been significantly reduced to ~20 mins.
> Note: In Fast Mode, we utilize Liquidity Providers (LPs) to expedite the transfer of funds to end users. These third-party providers can set their own transfer times. This information is displayed on the screen, allowing users to select the LP that offers the most suitable transfer speed for their needs.
</Accordion.Body>
</Accordion.Item>
<Accordion.Item eventKey="12">
<Accordion.Header as="h3">13. What are the min and max for pegin transaction?</Accordion.Header>
<Accordion.Body>
> - The minimum values allowed when creating a peg-in transaction is 0.005 BTC.
> - The maximum values allowed when creating a peg-in transaction is 10 BTC.
</Accordion.Body>
</Accordion.Item>
<Accordion.Item eventKey="11">
<Accordion.Header as="h3">12. What are the min and max for pegout transaction?</Accordion.Header>
<Accordion.Item eventKey="13">
<Accordion.Header as="h3">14. What are the min and max for pegout transaction?</Accordion.Header>
<Accordion.Body>
> - The minimum values allowed when creating a peg-in transaction is 0.004 RBTC.
> - The maximum values allowed when creating a peg-in transaction is 10 RBTC.
> - The minimum values allowed when creating a peg-out transaction is 0.004 RBTC.
> - The maximum values allowed when creating a peg-out transaction is 10 RBTC.
</Accordion.Body>
</Accordion.Item>
<Accordion.Item eventKey="12">
<Accordion.Header as="h3">13.After making a native pegout, to which address will I receive my BTCs?</Accordion.Header>
<Accordion.Item eventKey="14">
<Accordion.Header as="h3">15.After making a native pegout, to which address will I receive my BTCs?</Accordion.Header>
<Accordion.Body>
> - During the pegout process, the destination address of your BTC is derived from your signature, this enables one to know which address will receive the BTCs.
> - See the [Derivation details page](/resources/guides/powpeg-app/pegout/deriving-electrum/)
</Accordion.Body>
</Accordion.Item>
<Accordion.Item eventKey="13">
<Accordion.Header as="h3">14.When using **Trezor** i'm receiving the error **Forbidden key path** ?</Accordion.Header>
<Accordion.Item eventKey="15">
<Accordion.Header as="h3">16.When using **Trezor** i'm receiving the error **Forbidden key path** ?</Accordion.Header>
<Accordion.Body>
> - The latest versions of Trezor Suite have implemented a security rule to disable its use with non-standard key paths. Therefore, the user must explicitly set **Perform Safety Checks** to **PROMPT** option in **Trezor Suite** in order to use the **Trezor wallet** in the PowPeg application.
> - If is not enabled you will receive this error ![Trezor Error Key Path](/img/resources/powpeg/trezor-error.png)
Expand Down
2 changes: 2 additions & 0 deletions docs/04-resources/06-guides/powpeg-app/pegin/ledger.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ Here, we are using the ledger hardware wallet to interact with the PowPeg. Selec

The pop up shown in the image below describes the duration of the peg-in process which requires at least 100 confirmations on the Bitcoin network, this gives an estimate of around 17 hours in total. It also describes the three main steps involved which is; connecting to the hardware wallet, sending a signed transaction to the BTC network until the corresponding RBTC value is made available in the destination wallet and a receipt for this transaction.

> Note: Using fast mode, pegin time has been significantly reduced to ~20 mins.
![Read popup info](/img/resources/powpeg/pegin-popup.png)

> Click the checkbox - “Don’t show again” to turn off this pop-up in the future or close temporarily.
Expand Down
2 changes: 2 additions & 0 deletions docs/04-resources/06-guides/powpeg-app/pegin/trezor.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ In this guide, we will be performing a peg in transaction using the [PowPeg App]

The pop up shown in the image below describes the duration of the peg-in process which requires at least 100 confirmations on the Bitcoin network, this gives an estimate of around 17 hours in total. It also describes the three main steps involved which is; connecting to the hardware wallet, sending a signed transaction to the BTC network until the corresponding RBTC value is made available in the destination wallet and a receipt for this transaction.

> Note: Using fast mode, pegin time has been significantly reduced to ~20 mins.
![Connect Trezor](/img/resources/powpeg/pegin-popup.png)

**Step 1: Connecting to a trezor wallet**
Expand Down

0 comments on commit d85c6c9

Please sign in to comment.