From 4ac12a47c83e17f78ea27f6b73080d19ee1aad8f Mon Sep 17 00:00:00 2001 From: dave | d1onys1us <13951458+d1onys1us@users.noreply.github.com> Date: Thu, 29 Dec 2022 00:15:15 -0500 Subject: [PATCH] feat(docs): improve docs (#1646) --- .../docs/alpha-1-testnet/configure-wallet.mdx | 8 ++++---- .../docs/alpha-1-testnet/deploy-a-contract.md | 19 ++++++++++++++++--- .../request-eth-from-faucet.md | 8 -------- .../alpha-1-testnet/request-from-faucet.md | 14 ++++++++++++++ .../AddEthereumChainButton/index.tsx | 4 ++-- 5 files changed, 36 insertions(+), 17 deletions(-) delete mode 100644 packages/website/docs/alpha-1-testnet/request-eth-from-faucet.md create mode 100644 packages/website/docs/alpha-1-testnet/request-from-faucet.md diff --git a/packages/website/docs/alpha-1-testnet/configure-wallet.mdx b/packages/website/docs/alpha-1-testnet/configure-wallet.mdx index 3e94507d1a..5cf4205445 100644 --- a/packages/website/docs/alpha-1-testnet/configure-wallet.mdx +++ b/packages/website/docs/alpha-1-testnet/configure-wallet.mdx @@ -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 | | -| Taiko A1 | | +| Network | Add to wallet | +| ----------- | --------------------------------------------------------------- | +| Ethereum A1 | | +| Taiko A1 | | ## Manually add networks diff --git a/packages/website/docs/alpha-1-testnet/deploy-a-contract.md b/packages/website/docs/alpha-1-testnet/deploy-a-contract.md index e4cd356428..fb2b08c217 100644 --- a/packages/website/docs/alpha-1-testnet/deploy-a-contract.md +++ b/packages/website/docs/alpha-1-testnet/deploy-a-contract.md @@ -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 src/Counter.sol:Counter` (replace `` 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 `` with your private key, mentioned in the previous prerequisites section. + ```sh + forge create --legacy --rpc-url https://l2rpc.a1.taiko.xyz --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. diff --git a/packages/website/docs/alpha-1-testnet/request-eth-from-faucet.md b/packages/website/docs/alpha-1-testnet/request-eth-from-faucet.md deleted file mode 100644 index c8aaf33de7..0000000000 --- a/packages/website/docs/alpha-1-testnet/request-eth-from-faucet.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -sidebar_position: 2 ---- - -# 💧 Request ETH from faucet - -- Request ETH from Ethereum A1: https://l1faucet.a1.taiko.xyz/. -- Request ETH from Taiko A1: https://l2faucet.a1.taiko.xyz/. diff --git a/packages/website/docs/alpha-1-testnet/request-from-faucet.md b/packages/website/docs/alpha-1-testnet/request-from-faucet.md new file mode 100644 index 0000000000..8c75a9d98d --- /dev/null +++ b/packages/website/docs/alpha-1-testnet/request-from-faucet.md @@ -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. diff --git a/packages/website/src/components/AddEthereumChainButton/index.tsx b/packages/website/src/components/AddEthereumChainButton/index.tsx index fc16e80300..4ebbddcce9 100644 --- a/packages/website/src/components/AddEthereumChainButton/index.tsx +++ b/packages/website/src/components/AddEthereumChainButton/index.tsx @@ -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", @@ -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",