-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(website): update website with alpha-3 docs (#13723)
Co-authored-by: Kenk <[email protected]>
- Loading branch information
Showing
40 changed files
with
1,630 additions
and
339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/website/pages/docs/concepts/bridging/the-taiko-bridge-dapp.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
The bridge is a set of smart contracts and a frontend web app that allow you to send testnet ETH and ERC-20 tokens between Sepolia and Taiko. This bridge is just one possible implementation built on top of Taiko's core protocol, specifically the signal service which anybody can use to build bridges. You can try the bridge [here](https://bridge.a2.taiko.xyz). | ||
The bridge is a set of smart contracts and a frontend web app that allow you to send testnet ETH and ERC-20 tokens between Sepolia and Taiko. This bridge is just one possible implementation built on top of Taiko's core protocol, specifically the signal service which anybody can use to build bridges. You can try the bridge [here](https://bridge.test.taiko.xyz). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Guides | ||
|
||
You can leave feedback [here](https://forms.gle/RZsweAPy5RhQSP6j7) and ask any questions on the [Taiko Discord](https://discord.gg/taikoxyz)! | ||
|
||
- 💻 [Configure your wallet](/docs/guides/configure-your-wallet) | ||
- 🎈 [Receive tokens](/docs/guides/receive-tokens) | ||
- 🌉 [Use the bridge](/docs/guides/use-the-bridge){/* - 🔄 [Swap tokens](/docs/guides/swap-tokens) */} | ||
- 🌐 [Run a node](/docs/guides/run-a-node) | ||
- 📤 [Enable a proposer](/docs/guides/enable-a-proposer) | ||
- ✅ [Enable a prover](/docs/guides/enable-a-prover) | ||
- 🚀 [Deploy a contract](/docs/guides/deploy-a-contract) | ||
- 📜 [Verify a contract](/docs/guides/verify-a-contract) | ||
- 🛠️ [Build a dapp](/docs/guides/build-a-dapp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"configure-your-wallet": { | ||
"title": "💻 Configure your wallet" | ||
}, | ||
"receive-tokens": { | ||
"title": "🎈 Receive tokens" | ||
}, | ||
"use-the-bridge": { | ||
"title": "🌉 Use the bridge" | ||
}, | ||
"swap-tokens": { | ||
"title": "🔄 Swap tokens", | ||
"display": "hidden" | ||
}, | ||
"run-a-node": { | ||
"title": "🌐 Run a node" | ||
}, | ||
"enable-a-proposer": { | ||
"title": "📤 Enable a proposer" | ||
}, | ||
"enable-a-prover": { | ||
"title": "✅ Enable a prover" | ||
}, | ||
"deploy-a-contract": { | ||
"title": "🚀 Deploy a contract" | ||
}, | ||
"verify-a-contract": { | ||
"title": "📜 Verify a contract" | ||
}, | ||
"build-a-dapp": { | ||
"title": "🛠️ Build a dapp" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Build a dapp | ||
|
||
## Overview | ||
|
||
This guide will help you build a dapp on Taiko in one click! | ||
|
||
## Prerequisites | ||
|
||
- A curiosity to learn and build 🙃. | ||
|
||
## Steps | ||
1. Visit the [dapp-slaps starter template](https://github.com/d1onys1us/dapp-slaps) to create an Ethereum dapp in one click. |
31 changes: 31 additions & 0 deletions
31
packages/website/pages/docs/guides/configure-your-wallet.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Steps } from "nextra-theme-docs"; | ||
|
||
# Configure your wallet | ||
|
||
## Overview | ||
|
||
This guide help you connect your wallet to Taiko (Alpha-3 testnet). There are two networks to configure your wallet with: Ethereum (Sepolia testnet) and Taiko (Alpha-3 testnet). | ||
|
||
## Prerequisites | ||
|
||
- You have a wallet installed and ready to use. Some examples are MetaMask and Frame. Please use a hot wallet (not a hardware wallet) for this guide, preferably a throwaway wallet. | ||
|
||
## Steps | ||
|
||
<Steps> | ||
### Visit chainlist | ||
Visit [https://chainlist.org/](https://chainlist.org/) and check the box for "Include Testnets". | ||
|
||
### Add the Sepolia testnet | ||
Search for "Sepolia", and click the "Add Chain" button. | ||
|
||
### Add the Taiko testnet | ||
Search for "Taiko", and click the "Add Chain" button for Taiko (Alpha-3 testnet). | ||
|
||
### Add tokens to your wallet | ||
Use your wallet (e.g., Metamask) to [import the tokens](https://support.ledger.com/hc/en-us/articles/6375103346077-Add-custom-tokens-to-MetaMask?docs=true) with [this configuration](https://gist.githubusercontent.com/d1onys1us/8f8824daed0882b1094296f824fae53c/raw/15204c4a4927a7f48a78c195323ce0d573d6b7c0/taiko_tokens.json) (HORSE, BLL, and TTKO). | ||
</Steps> | ||
|
||
## Troubleshooting | ||
### The add chain buttons did not work | ||
Try to manually add the network to your wallet using the [RPC configuration](/docs/reference/rpc-configuration). |
101 changes: 101 additions & 0 deletions
101
packages/website/pages/docs/guides/deploy-a-contract.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
import { Callout, Steps, Tab, Tabs } from "nextra-theme-docs"; | ||
|
||
# Deploy a contract | ||
|
||
## Overview | ||
|
||
This guide will help you deploy a smart contract to Taiko using Foundry or Hardhat. | ||
|
||
## Prerequisites | ||
|
||
- You have [Foundry](https://book.getfoundry.sh/getting-started/installation) or [Hardhat](https://hardhat.org/hardhat-runner/docs/getting-started#quick-start) installed. | ||
- You have testnet ETH on Taiko (to pay the transaction fee for deploying the contract). | ||
- You can [request Sepolia ETH](/docs/guides/receive-tokens#receive-sepolia-eth) 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 to the account with testnet ETH on Taiko. | ||
|
||
### Additional Remix prerequisites | ||
- You have [configured your wallet](/docs/guides/configure-your-wallet) to connect to Taiko. | ||
|
||
## Steps | ||
|
||
<Tabs items={["Foundry", "Hardhat", "Remix"]} defaultIndex="0"> | ||
<Tab> | ||
<Steps> | ||
### Create a project with Foundry | ||
```sh | ||
forge init hello_foundry && cd hello_foundry | ||
``` | ||
|
||
### 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. | ||
<Callout type="warning"> | ||
Use a throwaway wallet to be safe. Don't reveal the private key of a wallet with significant value! | ||
</Callout> | ||
|
||
```sh | ||
forge create --rpc-url https://rpc.test.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.test.taiko.xyz) and verify that the contract was deployed. | ||
</Steps> | ||
</Tab> | ||
<Tab> | ||
<Steps> | ||
### Create a project with Hardhat | ||
```sh | ||
npx hardhat | ||
``` | ||
|
||
### Add Taiko to your Hardhat config | ||
<Callout type="warning"> | ||
For the `accounts` array, you will need to enter the private key of the account you are deploying the contract with. It is **not recommended** to hardcode the private key like this (an environment variable would be better, but is still risky). | ||
|
||
Use a throwaway wallet to be safe. Don't reveal the private key of a wallet with significant value! | ||
</Callout> | ||
|
||
```ts {6-13} filename=hardhat.config.ts | ||
import { HardhatUserConfig } from "hardhat/config"; | ||
import "@nomicfoundation/hardhat-toolbox"; | ||
|
||
const config: HardhatUserConfig = { | ||
solidity: "0.8.18", | ||
networks: { | ||
taiko: { | ||
url: "http://rpc.test.taiko.xyz", | ||
accounts: [ | ||
"0xf214f2b2cd398c806f84e317254e0f0b801d0643303237d97a22a48e01628897", | ||
], | ||
}, | ||
}, | ||
}; | ||
|
||
export default config; | ||
``` | ||
|
||
### Deploy your contract on Taiko | ||
```sh | ||
npx hardhat run --network taiko scripts/deploy.ts | ||
``` | ||
|
||
### View your contract | ||
Paste the address from the output into the [Taiko block explorer](https://explorer.test.taiko.xyz) and verify that the contract was deployed. | ||
</Steps> | ||
</Tab> | ||
<Tab> | ||
<Steps> | ||
### Visit Remix and connect your wallet to Taiko | ||
Visit [remix.ethereum.org](https://remix.ethereum.org) and connect your wallet to Taiko. | ||
|
||
### Select a smart contract | ||
![select a smart contract](/images/guides/deploy-remix/select.png) | ||
|
||
### Compile your smart contract | ||
![compile your smart contract](/images/guides/deploy-remix/compile.png) | ||
|
||
|
||
### Deploy your smart contract | ||
![deploy your smart contract](/images/guides/deploy-remix/deploy.png) | ||
</Steps> | ||
</Tab> | ||
</Tabs> |
Oops, something went wrong.