Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(website): alpha-5 docs #14725

Merged
merged 33 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d0c29c7
init docs
dionysuzx Sep 15, 2023
7a3f03a
update configs
dionysuzx Sep 15, 2023
35a1268
lockfile
dionysuzx Sep 15, 2023
6fd9434
convert all build on taiko guides
dionysuzx Sep 15, 2023
2ff2f7e
add jolnir contract addresses
dionysuzx Sep 18, 2023
aa3f33b
bump
dionysuzx Sep 18, 2023
6b6cb96
fix add tokens and add network
dionysuzx Sep 18, 2023
742a8c1
fixup
dionysuzx Sep 18, 2023
1dbce5a
Merge branch 'main' into alpha-5-docs
dionysuzx Sep 18, 2023
af1cbfa
update node running
dionysuzx Sep 18, 2023
ec4f05b
update node running
dionysuzx Sep 18, 2023
b47d745
fix contract addresses
dionysuzx Sep 18, 2023
8dee06d
fix config
dionysuzx Sep 18, 2023
70d145a
update rpc configuration
dionysuzx Sep 18, 2023
ee7dfe3
update enable a prover
dionysuzx Sep 19, 2023
d621222
docs(website): Prover market (#14669)
MarcusWentz Sep 19, 2023
aac422d
remove some A4 docs (#14712)
2manslkh Sep 19, 2023
c3be0cf
update prover
dionysuzx Sep 19, 2023
a8f1c33
update proposer/prover
dionysuzx Sep 19, 2023
7aa8002
add video guides (#14717)
2manslkh Sep 19, 2023
737655c
fix conflict
dionysuzx Sep 19, 2023
4d7d316
fix conflict
dionysuzx Sep 19, 2023
362805f
add contract documentation
dionysuzx Sep 19, 2023
fa44acf
remove redirects and regroup guides
dionysuzx Sep 19, 2023
39269fe
refactor index
dionysuzx Sep 19, 2023
ff78832
update remaining links
dionysuzx Sep 19, 2023
aa46310
update prover market page
dionysuzx Sep 19, 2023
1811a2b
update google form
dionysuzx Sep 19, 2023
055c853
bold
dionysuzx Sep 19, 2023
d74dba9
fix conflict
dionysuzx Sep 19, 2023
fbe1563
fixup proposing
dionysuzx Sep 19, 2023
8fa2486
fix link
dionysuzx Sep 19, 2023
488a590
Trigger build
dionysuzx Sep 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions packages/website/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
.next
node_modules
# temporarily ignoring auto-generated contract documentation until
# we can separate L2/L3 contracts
contract-documentation
24 changes: 8 additions & 16 deletions packages/website/components/Button/AddTokensButton.tsx
Original file line number Diff line number Diff line change
@@ -1,40 +1,32 @@
import {
ELDFELL_ADD_ETHEREUM_CHAIN,
ELDFELL_ADD_TOKENS,
ELDFELL_CONFIG,
GRIMSVOTN_ADD_ETHEREUM_CHAIN,
GRIMSVOTN_ADD_TOKENS,
GRIMSVOTN_CONFIG,
SEPOLIA_ADD_ETHEREUM_CHAIN,
SEPOLIA_ADD_TOKENS,
SEPOLIA_CONFIG,
JOLNIR_ADD_ETHEREUM_CHAIN,
JOLNIR_ADD_TOKENS,
JOLNIR_CONFIG,
} from "../../domain/chain";

import { ethereumRequest } from "../../utils/ethereumRequest";

type ConnectButtonProps = {
network:
| typeof SEPOLIA_CONFIG.names.shortName
| typeof ELDFELL_CONFIG.names.shortName
| typeof GRIMSVOTN_CONFIG.names.shortName;
| typeof SEPOLIA_CONFIG.names.shortName
| typeof JOLNIR_CONFIG.names.shortName;
};

const chainMap = {
Eldfell: ELDFELL_CONFIG.chainId.hex, // 167005
Grimsvotn: GRIMSVOTN_CONFIG.chainId.hex, // 167005
Sepolia: SEPOLIA_CONFIG.chainId.hex, // 11155111
Sepolia: SEPOLIA_CONFIG.chainId.hex,
};

const configMap = {
Eldfell: ELDFELL_ADD_ETHEREUM_CHAIN,
Grimsvotn: GRIMSVOTN_ADD_ETHEREUM_CHAIN,
Sepolia: SEPOLIA_ADD_ETHEREUM_CHAIN,
Jolnir: JOLNIR_ADD_ETHEREUM_CHAIN,
};

const tokenConfigMap = {
Grimsvotn: GRIMSVOTN_ADD_TOKENS,
Sepolia: SEPOLIA_ADD_TOKENS,
Eldfell: ELDFELL_ADD_TOKENS,
Jolnir: JOLNIR_ADD_TOKENS,
};

interface AddTokensButtonProps {
Expand Down
24 changes: 8 additions & 16 deletions packages/website/components/Button/ConnectToMetamaskButton.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
import {
ELDFELL_ADD_ETHEREUM_CHAIN,
ELDFELL_CONFIG,
GRIMSVOTN_ADD_ETHEREUM_CHAIN,
GRIMSVOTN_CONFIG,
SEPOLIA_CONFIG,
TAIKO_CONFIG,
TAIKO_ADD_ETHEREUM_CHAIN,
} from "../../domain/chain";

import { ethereumRequest } from "../../utils/ethereumRequest";

type ConnectButtonProps = {
network:
| typeof SEPOLIA_CONFIG.names.shortName
| typeof ELDFELL_CONFIG.names.shortName
| typeof GRIMSVOTN_CONFIG.names.shortName;
| typeof SEPOLIA_CONFIG.names.shortName
| typeof TAIKO_CONFIG.names.shortName;
};

const chainMap = {
Eldfell: ELDFELL_CONFIG.chainId.hex, // 167005
Grimsvotn: GRIMSVOTN_CONFIG.chainId.hex, // 167005
Sepolia: SEPOLIA_CONFIG.chainId.hex, // 11155111
Sepolia: SEPOLIA_CONFIG.chainId.hex,
Jolnir: TAIKO_CONFIG.chainId.hex,
};

async function ConnectToMetamask(network: ConnectButtonProps["network"]) {
Expand All @@ -37,11 +33,7 @@ async function ConnectToMetamask(network: ConnectButtonProps["network"]) {
if (network === SEPOLIA_CONFIG.names.shortName) {
params = [{ chainId: chainMap[network] }];
} else {
params = [
network === ELDFELL_CONFIG.names.shortName
? ELDFELL_ADD_ETHEREUM_CHAIN
: GRIMSVOTN_ADD_ETHEREUM_CHAIN,
];
params = [TAIKO_ADD_ETHEREUM_CHAIN];
}
try {
await ethereumRequest(
Expand All @@ -53,7 +45,7 @@ async function ConnectToMetamask(network: ConnectButtonProps["network"]) {
} catch (error) {
alert(
"Failed to add the network with wallet_addEthereumChain request. Add the network with https://chainlist.org/ or do it manually. Error log: " +
error.message
error.message
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/website/components/Ecosystem/EcosystemSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const ecosystemData: EcosystemData[] = [
{
icon: "/images/ecosystem/taiko.svg",
name: "Bridge",
link: "https://bridge.test.taiko.xyz",
link: "https://bridge.jolnir.taiko.xyz",
description: "Bridge is a dapp that lets you bridge tokens with Taiko.",
filters: [],
isLive: true,
Expand Down Expand Up @@ -351,7 +351,7 @@ const ecosystemData: EcosystemData[] = [
{
icon: "/images/ecosystem/taiko.svg",
name: "Swap",
link: "https://swap.test.taiko.xyz",
link: "https://swap.jolnir.taiko.xyz",
description: "Swap is a dapp that lets you swap tokens on Taiko.",
filters: [],
isLive: true,
Expand Down
7 changes: 4 additions & 3 deletions packages/website/components/Home/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function Footer() {
className="hover:underline"
target={"_blank"}
>
Brand kit
Media kit
</a>
</li>
</ul>
Expand All @@ -58,10 +58,11 @@ export function Footer() {
</li>
<li className="mb-4">
<a
href="/docs/resources/integration-guide"
href="https://status.taiko.xyz"
className="hover:underline"
target={"_blank"}
>
Integration manual
Status
</a>
</li>
</ul>
Expand Down
8 changes: 4 additions & 4 deletions packages/website/components/Home/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ export function Hero() {
<div className="relative z-10 w-3/4 pt-16 pb-20 text-left lg:py-48">
<div className="pl-[max(env(safe-area-inset-left),1.5rem)]">
<h1 className="font-grotesk text-4xl md:text-5xl tracking-tight text-neutral-900 dark:text-neutral-100">
A <span className="text-[#e81899]">Type 1</span> ZK-EVM
A <span className="text-[#e81899]">based</span> rollup
</h1>
<p className="font-groteskmedium mt-3 text-lg text-neutral-600 sm:text-xl md:mt-5 dark:text-neutral-100">
Decentralized, Ethereum-equivalent ZK-Rollup.
Decentralized, Ethereum-equivalent (Type 1) ZK-EVM.
</p>
<div className="mt-10 flex flex-col sm:flex-row md:justify-left">
<div className="inline-flex mb-4 sm:mb-0 sm:mr-4">
Expand All @@ -59,10 +59,10 @@ export function Hero() {
</div>
<div className="inline-flex">
<a
href="/docs/guides/run-a-node"
href="/docs/guides/run-a-taiko-node"
className="inline-flex items-center rounded-md border-2 border-[#e81899] bg-transparent px-5 py-2.5 text-base font-semibold text-[#e81899] hover:border-[#d1168a] hover:text-[#d1168a] hover:no-underline w-auto"
>
Run a node
Run a Taiko node
</a>
</div>
</div>
Expand Down
44 changes: 43 additions & 1 deletion packages/website/domain/chain/baseTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ interface AddTokenParameter {
image: string;
}


// Taiko network types
interface BasedContracts {
addressManager: Contract;
Expand All @@ -79,6 +78,22 @@ interface BasedContracts {
};
}

interface Alpha5BasedContracts {
addressManager: Contract;
taikoL1: Contract;
erc20Vault: Contract;
erc721Vault: Contract;
erc1155Vault: Contract;
bridge: Contract;
signalService: Contract;
proofVerifier: Contract;
erc20Contracts?: {
taikoToken?: ERC20Contract;
horseToken?: ERC20Contract;
bullToken?: ERC20Contract;
};
}

interface RollupContracts {
taikoL2: Contract;
tokenVault: Contract;
Expand All @@ -92,6 +107,21 @@ interface RollupContracts {
};
}

interface Alpha5RollupContracts {
taikoL2: Contract;
etherVault: Contract;
erc20Vault: Contract;
erc721Vault: Contract;
erc1155Vault: Contract;
bridge: Contract;
signalService: Contract;
erc20Contracts: {
bridgedTaikoToken: ERC20Contract;
bridgedHorseToken: ERC20Contract;
bridgedBullToken: ERC20Contract;
};
}

interface OtherContracts {
deterministicDeploymentProxy?: Contract;
erc4337Entrypoint?: Contract;
Expand All @@ -112,15 +142,27 @@ interface TaikoL2Alpha3 extends Network {
otherContracts: OtherContracts;
}

interface TaikoL1Alpha5 extends Network {
basedContracts: Alpha5BasedContracts;
otherContracts: OtherContracts;
}

interface TaikoL2Alpha5 extends Network {
rollupContracts: Alpha5RollupContracts;
otherContracts: OtherContracts;
}

type TaikoL2Alpha4 = TaikoL2Alpha3;

export type {
AddEthereumChainParameter,
AddTokenParameter,
TaikoL1Alpha3,
TaikoL1Alpha4,
TaikoL1Alpha5,
TaikoL2Alpha3,
TaikoL2Alpha4,
TaikoL2Alpha5,
BasedContracts,
RollupContracts,
OtherContracts,
Expand Down
14 changes: 12 additions & 2 deletions packages/website/domain/chain/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
// export base configs
import { JOLNIR_CONFIG } from "./jolnir/config";
import { JOLNIR_ADD_ETHEREUM_CHAIN } from "./jolnir/addEthereumChain";
import { JOLNIR_ADD_TOKENS } from "./jolnir/addTokens";

export { SEPOLIA_CONFIG } from "./sepolia/config";
export { GRIMSVOTN_CONFIG } from "./grimsvotn/config";
export { ELDFELL_CONFIG } from "./eldfell/config";
export { JOLNIR_CONFIG } from "./jolnir/config";

// export add ethereum chain configs
export { SEPOLIA_ADD_ETHEREUM_CHAIN } from "./sepolia/addEthereumChain";
export { GRIMSVOTN_ADD_ETHEREUM_CHAIN } from "./grimsvotn/addEthereumChain";
export { ELDFELL_ADD_ETHEREUM_CHAIN } from "./eldfell/addEthereumChain";
export { JOLNIR_ADD_ETHEREUM_CHAIN } from "./jolnir/addEthereumChain";

export { SEPOLIA_ADD_TOKENS } from "./sepolia/addTokens";
export { GRIMSVOTN_ADD_TOKENS } from "./grimsvotn/addTokens";
export { ELDFELL_ADD_TOKENS } from "./eldfell/addTokens";
export { JOLNIR_ADD_TOKENS } from "./jolnir/addTokens";

// alias abstract taiko config to a concrete config
export const TAIKO_CONFIG = JOLNIR_CONFIG;
export const TAIKO_ADD_ETHEREUM_CHAIN = JOLNIR_ADD_ETHEREUM_CHAIN;
export const TAIKO_ADD_TOKENS = JOLNIR_ADD_TOKENS;
11 changes: 11 additions & 0 deletions packages/website/domain/chain/jolnir/addEthereumChain.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { JOLNIR_CONFIG } from "./config";
import { AddEthereumChainParameter } from "../baseTypes";

export const JOLNIR_ADD_ETHEREUM_CHAIN: AddEthereumChainParameter = {
chainId: JOLNIR_CONFIG.chainId.hex,
chainName: JOLNIR_CONFIG.names.mediumName,
nativeCurrency: JOLNIR_CONFIG.nativeCurrency,
rpcUrls: [JOLNIR_CONFIG.rpc.https],
blockExplorerUrls: [JOLNIR_CONFIG.blockExplorer.url],
iconUrls: [],
};
38 changes: 38 additions & 0 deletions packages/website/domain/chain/jolnir/addTokens.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { AddTokenParameter } from "../baseTypes";
import { JOLNIR_CONFIG } from "./config";

export const JOLNIR_ADD_TTKOJ: AddTokenParameter = {
address:
JOLNIR_CONFIG.rollupContracts.erc20Contracts.bridgedTaikoToken.address.impl,
symbol: JOLNIR_CONFIG.rollupContracts.erc20Contracts.bridgedTaikoToken.symbol,
decimals:
JOLNIR_CONFIG.rollupContracts.erc20Contracts.bridgedTaikoToken.decimals,
image:
"https://raw.githubusercontent.com/taikoxyz/taiko-mono/main/packages/branding/testnet-token-images/ttko.svg",
};

export const JOLNIR_ADD_BLL: AddTokenParameter = {
address:
JOLNIR_CONFIG.rollupContracts.erc20Contracts.bridgedBullToken.address.impl,
symbol: JOLNIR_CONFIG.rollupContracts.erc20Contracts.bridgedBullToken.symbol,
decimals:
JOLNIR_CONFIG.rollupContracts.erc20Contracts.bridgedBullToken.decimals,
image:
"https://raw.githubusercontent.com/taikoxyz/taiko-mono/main/packages/branding/testnet-token-images/bull.svg",
};

export const JOLNIR_ADD_HORSE: AddTokenParameter = {
address:
JOLNIR_CONFIG.rollupContracts.erc20Contracts.bridgedHorseToken.address.impl,
symbol: JOLNIR_CONFIG.rollupContracts.erc20Contracts.bridgedHorseToken.symbol,
decimals:
JOLNIR_CONFIG.rollupContracts.erc20Contracts.bridgedHorseToken.decimals,
image:
"https://raw.githubusercontent.com/taikoxyz/taiko-mono/main/packages/branding/testnet-token-images/horse.svg",
};

export const JOLNIR_ADD_TOKENS = [
JOLNIR_ADD_TTKOJ,
JOLNIR_ADD_BLL,
JOLNIR_ADD_HORSE,
];
Loading