Skip to content

Commit

Permalink
docs(website): add alerts for hackathon network config (#13601)
Browse files Browse the repository at this point in the history
  • Loading branch information
dionysuzx authored Apr 15, 2023
1 parent 1a6b5c2 commit 7e2de09
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 25 deletions.
7 changes: 7 additions & 0 deletions packages/website/pages/docs/guides/build-a-dapp.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import { Callout } from "nextra-theme-docs";

<Callout>
Please use the [ETHTokyo network
config](/docs/reference/ethglobal-tokyo-reference.mdx) for the hackathon!
</Callout>

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

## Prerequisites
Expand Down
7 changes: 6 additions & 1 deletion packages/website/pages/docs/guides/configure-your-wallet.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import AddEthereumChainButton from "../../../components/AddEthereumChainButton";
import { Steps } from "nextra-theme-docs";
import { Steps, Callout } from "nextra-theme-docs";

<Callout>
Please use the [ETHTokyo network
config](/docs/reference/ethglobal-tokyo-reference.mdx) for the hackathon!
</Callout>

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)**.

Expand Down
34 changes: 20 additions & 14 deletions packages/website/pages/docs/guides/deploy-a-contract.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { Callout, Steps } from "nextra-theme-docs";

<Callout>
Please use the [ETHTokyo network
config](/docs/reference/ethglobal-tokyo-reference.mdx) for the hackathon!
</Callout>

<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!
Make sure you are using a test / throwaway wallet, to be safe. Don't ever
reveal the private key of your main wallet!
</Callout>

This guide will help you deploy a smart contract to Taiko (Askja testnet) using Foundry.
Expand All @@ -10,12 +16,12 @@ This guide will help you deploy a smart contract to Taiko (Askja testnet) using

- [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).
- [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.
- 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.

## Steps

Expand All @@ -25,13 +31,13 @@ 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 the contract located at `src/Counter.sol`. Replace `YOUR_PRIVATE_KEY` below with your private key which has some testnet ETH on Taiko.
> Note: The `--legacy` flag is needed because EIP-1559 is currently disabled on Taiko—it will be re-enabled in the future.
```sh
forge create --legacy --rpc-url https://rpc.a2.taiko.xyz --private-key YOUR_PRIVATE_KEY src/Counter.sol:Counter
```
### Deploy the 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.
> Note: The `--legacy` flag is needed because EIP-1559 is currently disabled on Taiko—it will be re-enabled in the future.
```sh
forge create --legacy --rpc-url https://rpc.a2.taiko.xyz --private-key YOUR_PRIVATE_KEY src/Counter.sol:Counter
```

### View your contract
Paste the address from the output into the [Taiko block explorer](https://explorer.a2.taiko.xyz) and verify that the contract was deployed.
### View your contract
Paste the address from the output into the [Taiko block explorer](https://explorer.a2.taiko.xyz) and verify that the contract was deployed.
</Steps>
10 changes: 6 additions & 4 deletions packages/website/pages/docs/guides/enable-a-prover.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import { Callout, Steps } from "nextra-theme-docs";

<Callout>
Please use the [ETHTokyo network
config](/docs/reference/ethglobal-tokyo-reference.mdx) for the hackathon!
</Callout>
<Callout>
Only the first prover can get the reward, and others will be rejected by the protocol smart contract. This means the fastest prover will be able to prove the block and earn the reward, **if you have just the minimum hardware outlined in the prerequisited below, running a single prover, it's unlikely you will be able to prove any blocks (because you will be competing against other high-performance provers)**.

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>


## Prerequisites
- Must have some ETH on Sepolia (see [receive tokens](/docs/guides/receive-tokens)).
- Should have at least 8/16 core CPU and 32GB of RAM. (**note: see warning above**)


## Steps

<Steps>
Expand All @@ -22,8 +24,8 @@ Set the following environment variables to enable your node as a prover:

### Verify prover logs
Verify you have some prover logs:
- `💰 Your block proof was accepted` means you are the first prover and receive the reward.
- `✅ Valid block proven` just means a proposed block was successfully proved on TaikoL1 (by anyone).
- `💰 Your block proof was accepted` means you are the first prover and receive the reward.
- `✅ Valid block proven` just means a proposed block was successfully proved on TaikoL1 (by anyone).
</Steps>

## Troubleshooting
Expand Down
8 changes: 7 additions & 1 deletion packages/website/pages/docs/guides/receive-tokens.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { Callout, Steps } from "nextra-theme-docs";

<Callout>
Please use the [ETHTokyo network
config](/docs/reference/ethglobal-tokyo-reference.mdx) for the hackathon!
</Callout>

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

This guide will help you receive testnet tokens from the faucet(s).
Expand Down
5 changes: 5 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,10 @@
import { Callout, Steps, Tab, Tabs } from "nextra-theme-docs";

<Callout>
Please use the [ETHTokyo network
config](/docs/reference/ethglobal-tokyo-reference.mdx) for the hackathon!
</Callout>

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
8 changes: 7 additions & 1 deletion packages/website/pages/docs/guides/swap-tokens.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { Callout, Steps } from "nextra-theme-docs";

<Callout>
Please use the [ETHTokyo network
config](/docs/reference/ethglobal-tokyo-reference.mdx) for the hackathon!
</Callout>

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

This guide will help you interact with Swap, which is a fork of Uniswap v2 which Taiko has deployed only for testing purposes.
Expand Down
11 changes: 9 additions & 2 deletions packages/website/pages/docs/guides/use-the-bridge.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import { Callout, Steps } from "nextra-theme-docs";

<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>
Please use the [ETHTokyo network
config](/docs/reference/ethglobal-tokyo-reference.mdx) for the hackathon!
</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>

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

Expand Down
4 changes: 2 additions & 2 deletions packages/website/theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export default {
key: "banner",
text: (
<a
href="https://mirror.xyz/labs.taiko.eth/A6G6TNN-CXDAhl42k_bNHg_20fyGcT0xH-LBBSOPNzU"
href="https://taiko.xyz/docs/reference/ethglobal-tokyo-reference"
target="_blank"
>
🌋 Askja testnet is here! Learn more
📌 Please use the <u>ETHTokyo network config</u> for the hackathon
</a>
),
},
Expand Down

0 comments on commit 7e2de09

Please sign in to comment.