Skip to content

Commit

Permalink
feat(docs): improve docs (#1646)
Browse files Browse the repository at this point in the history
  • Loading branch information
d1onys1us committed Dec 29, 2022
1 parent d1a4921 commit 4ac12a4
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 17 deletions.
8 changes: 4 additions & 4 deletions packages/website/docs/alpha-1-testnet/configure-wallet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import AddEthereumChainButton from "../../src/components/AddEthereumChainButton"

Use the buttons below to add Ethereum A1 and Taiko A1 to any wallet that supports `wallet_addEthereumChain` (e.g., MetaMask).

| Network | Add to wallet |
| ----------- | ------------------------------------------------------------------ |
| Ethereum A1 | <AddEthereumChainButton buttonText="Add to wallet" chain="l1"/> |
| Taiko A1 | <AddEthereumChainButton buttonText="Add to wallet" chain="l2"/> |
| Network | Add to wallet |
| ----------- | --------------------------------------------------------------- |
| Ethereum A1 | <AddEthereumChainButton buttonText="Add to wallet" chain="l1"/> |
| Taiko A1 | <AddEthereumChainButton buttonText="Add to wallet" chain="l2"/> |

## Manually add networks

Expand Down
19 changes: 16 additions & 3 deletions packages/website/docs/alpha-1-testnet/deploy-a-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,23 @@ sidebar_position: 4

# 🚀 Deploy a contract

We will deploy a smart contract to Taiko A1 using Foundry.
These steps will show you how to deploy a smart contract to Taiko A1 using Foundry. You can find the latest Foundry docs at the Foundry Book: https://book.getfoundry.sh/getting-started/first-steps. This guide uses snippets / examples from there.

1. Follow the Foundry Book to install Foundry and init the default project: https://book.getfoundry.sh/getting-started/first-steps
2. From `~/hello_foundry` run `forge create --legacy --rpc-url https://l2rpc.a1.taiko.xyz --private-key <yourPrivateKey> src/Counter.sol:Counter` (replace `<yourPrivateKey>` with the private key of the account deploying the contract)
## Prerequisites

- Have the private key to an account that has some ETH on Taiko A1. This is to pay the small transaction fee for deploying the contract.

## Steps

1. [Install Foundry](https://book.getfoundry.sh/getting-started/installation)
2. Create a project with Foundry, and `cd` into it:
```sh
forge init hello_foundry && cd hello_foundry
```
3. Deploy the contract from your project, located at `src/Counter.sol`. Replace `<YOUR_PRIVATE_KEY>` with your private key, mentioned in the previous prerequisites section.
```sh
forge create --legacy --rpc-url https://l2rpc.a1.taiko.xyz --private-key <YOUR_PRIVATE_KEY> src/Counter.sol:Counter
```

We are using the `--legacy` flag because EIP-1559 is currently disabled on Taiko. We have plans to re-enable it in the future.

Expand Down

This file was deleted.

14 changes: 14 additions & 0 deletions packages/website/docs/alpha-1-testnet/request-from-faucet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
sidebar_position: 2
---

# 💧 Request from faucet

## Request ETH

- Request ETH from Ethereum A1: https://l1faucet.a1.taiko.xyz/.
- Request ETH from Taiko A1: https://l2faucet.a1.taiko.xyz/.

## Request HORSE

- Select HORSE from the token dropdown on the [bridge](https://bridge.a1.taiko.xyz/) and a faucet button should appear.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async function addEthereumChain(chain: string) {
}
const l1params: AddEthereumChainParameter = {
chainId: "0x7A6A",
chainName: "Taiko Testnet L1",
chainName: "Ethereum A1 (Taiko)",
nativeCurrency: {
name: "ETH",
symbol: "eth",
Expand All @@ -33,7 +33,7 @@ async function addEthereumChain(chain: string) {

const l2params: AddEthereumChainParameter = {
chainId: "0x28C5B",
chainName: "Taiko Testnet",
chainName: "Taiko A1 (Taiko)",
nativeCurrency: {
name: "ETH",
symbol: "eth",
Expand Down

0 comments on commit 4ac12a4

Please sign in to comment.