Skip to content

Commit

Permalink
update guides and add verify contract guide
Browse files Browse the repository at this point in the history
  • Loading branch information
dionysuzx committed May 12, 2023
1 parent d496ae8 commit d0d68b5
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 21 deletions.
6 changes: 5 additions & 1 deletion packages/website/pages/docs/guides/build-a-dapp.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
This guide will help you build a dapp on Taiko (Askja testnet)! The starter dapp highlights an important feature of Taiko: sending secure cross-chain messages between Taiko and Ethereum. Read more about cross-chain messaging [here](/docs/concepts/bridging/cross-chain-messaging).
### Overview

This guide will help you build a dapp on Taiko (Askja testnet)!

The starter dapp also highlights an important feature of Taiko: sending secure cross-chain messages between Taiko and Ethereum. Read more about cross-chain messaging [here](/docs/concepts/bridging/cross-chain-messaging).

## Prerequisites

Expand Down
2 changes: 2 additions & 0 deletions packages/website/pages/docs/guides/configure-your-wallet.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import AddEthereumChainButton from "../../../components/AddEthereumChainButton";
import { Steps } from "nextra-theme-docs";

## Overview

This guide help you connect your wallet to Taiko (Askja testnet). There are two networks to configure your wallet with: **Ethereum (Sepolia testnet)** and **Taiko (Askja testnet)**.

## Prerequisites
Expand Down
18 changes: 8 additions & 10 deletions packages/website/pages/docs/guides/deploy-a-contract.mdx
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
import { Callout, Steps } from "nextra-theme-docs";

<Callout type="warning" emoji="⚠️">
Make sure you are using a test / throwaway wallet, to be safe. Don't ever reveal the private key of your main wallet!
To be safe, make sure you're using a throwaway wallet. Don't reveal the private key of a wallet with significant value!
</Callout>

This guide will help you deploy a smart contract to Taiko (Askja testnet) using Foundry.
## Overview

This guide will help you deploy a smart contract to Taiko using Foundry.

## Prerequisites

- [Foundry](https://book.getfoundry.sh/getting-started/installation) is installed.
- You have the private key handy to an account that has testnet ETH on Taiko (to pay the transaction fee for deploying the contract).
- [Retrieve private key with MetaMask](https://support.metamask.io/hc/en-us/articles/360015289632-How-to-export-an-account-s-private-key#:~:text=On%20the%20account%20page%2C%20click,click%20%E2%80%9CConfirm%E2%80%9D%20to%20proceed.).
- [Generate wallet keys with OpenSSL](https://gist.github.com/miguelmota/3793b160992b4ea0b616497b8e5aee2f).
- [Generate wallet keys with ethereumjs-wallet](https://piyopiyo.medium.com/how-to-generate-ethereum-private-key-and-address-in-local-offline-environment-90294308593c).
- Have some testnet ETH on Taiko:
- First, [request Sepolia ETH](/docs/guides/receive-tokens) from the faucet.
- Then, [use the bridge](/docs/guides/use-the-bridge) to send the testnet ETH to Taiko.
- You have some testnet ETH on Taiko (to pay the transaction fee for deploying the contract).
- You can [request Sepolia ETH](/docs/guides/receive-tokens) from the faucet and then [use the bridge](/docs/guides/use-the-bridge) to send the testnet ETH to Taiko.
- You have the private key ready to the account with testnet ETH on Taiko.

## Steps

Expand All @@ -25,7 +23,7 @@ This guide will help you deploy a smart contract to Taiko (Askja testnet) using
forge init hello_foundry && cd hello_foundry
```

### Deploy the contract
### Deploy your contract
Deploy the contract located at `src/Counter.sol`. Replace `YOUR_PRIVATE_KEY` below with your private key which has some testnet ETH on Taiko.
```sh
forge create --rpc-url https://rpc.a2.taiko.xyz --private-key YOUR_PRIVATE_KEY src/Counter.sol:Counter
Expand Down
3 changes: 3 additions & 0 deletions packages/website/pages/docs/guides/enable-a-prover.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import { Callout, Steps } from "nextra-theme-docs";
Meaning, if you do not have a powerful prover, the primary purpose of running a prover is to help test out and provide community feedback on running the node software. Keep in mind this will have a cost in electricity on your computer, and if you are not proving blocks, it's unlikely you will receive a reward to offset that electricity cost.
</Callout>

## Overview

This guide will help you enable your node as a prover.

## Prerequisites
- Must have some ETH on Sepolia (see [receive tokens](/docs/guides/receive-tokens)).
Expand Down
2 changes: 2 additions & 0 deletions packages/website/pages/docs/guides/receive-tokens.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Callout, Steps } from "nextra-theme-docs";
The HORSE token and BLL token are both dummy test tokens that are used for testing the bridge and swap.
</Callout>

## Overview

This guide will help you receive testnet tokens from the faucet(s).

## Prerequisites
Expand Down
2 changes: 2 additions & 0 deletions packages/website/pages/docs/guides/run-a-node.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Callout, Steps, Tab, Tabs } from "nextra-theme-docs";

## Overview

This guide will walk you through the process of operating a Taiko node via [simple-taiko-node](https://github.com/taikoxyz/simple-taiko-node). You will be able to:

- Run a Taiko node easily from the command line on Windows, Mac, and Linux.
Expand Down
2 changes: 2 additions & 0 deletions packages/website/pages/docs/guides/swap-tokens.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Callout, Steps } from "nextra-theme-docs";
The HORSE token and BLL token are both dummy test tokens that are used for testing the bridge and swap.
</Callout>

## Overview

This guide will help you interact with Swap, which is a fork of Uniswap v2 which Taiko has deployed only for testing purposes.

## Prerequisites
Expand Down
7 changes: 5 additions & 2 deletions packages/website/pages/docs/guides/use-the-bridge.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { Callout, Steps } from "nextra-theme-docs";

<Callout type="info" emoji="ℹ️">
The HORSE token and BLL token are both dummy test tokens that are used for testing the bridge and swap.
</Callout>

<Callout type="warning" emoji="⚠️">
The BLL token should succeed when **minting** from the faucet, and when **sending the bridge message** to Sepolia or Taiko. However, it will fail about 50% of the time when **claiming** on Sepolia—this is intentionally done so we can test the error handling.
</Callout>

## Overview

This guide will help you use the bridge to send tokens between Sepolia and Taiko (Askja testnet). You can read more about how bridging works [here](/docs/concepts/bridging/cross-chain-messaging).

> The HORSE token and BLL token are both dummy test tokens that are used for testing the bridge and swap.
## Prerequisites

- A wallet with some testnet ETH on Sepolia and/or Taiko (you can [receive tokens here](/docs/guides/receive-tokens)).
Expand Down
14 changes: 6 additions & 8 deletions packages/website/pages/docs/guides/verify-a-contract.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## Overview

This guide will help get your contract verified on Taiko!

## Prerequisites
Expand All @@ -6,14 +8,10 @@ This guide will help get your contract verified on Taiko!

## Steps
### Foundry
```sh
forge verify-contract 0x851356ae760d987E095750cCeb3bC6014560891C src/Counter.sol:Counter --chain-id 167001 --verifier-url https://l2explorer.internal.taiko.xyz/api --verifier blockscout
```

forge verify-contract 0x851356ae760d987E095750cCeb3bC6014560891C src/Counter.sol:Counter --chain-id 167001 --verifier-url https://explorer.a3.taiko.xyz --verifier blockscout

### Using blockscout web UI
1. Use the older nightly version of Forge with `foundryup --version nightly-94777647f6ea5d34572a1b15c9b57e35b8c77b41` (see why [here](https://github.com/foundry-rs/foundry/issues/4909)).
2. Run `forge verify-contract <contract-address> <contract-file>:<contract-name> --chain-id 167001 --verifier-url https://l2explorer.internal.taiko.xyz/api --verifier blockscout` to verify your contract.

### Using hardhat
### Hardhat

### Using sourcify
TODO

0 comments on commit d0d68b5

Please sign in to comment.