Skip to content

Commit

Permalink
feat(website): alpha-5 docs (#14725)
Browse files Browse the repository at this point in the history
Co-authored-by: Marcus Wentz <52706599+MarcusWentz@users.noreply.github.com>
Co-authored-by: Kenk <kenghin_lim@hotmail.com>
  • Loading branch information
3 people authored and KorbinianK committed Sep 28, 2023
1 parent c25098e commit 960fd66
Show file tree
Hide file tree
Showing 21 changed files with 4,150 additions and 4,543 deletions.
8 changes: 7 additions & 1 deletion packages/website/components/Button/AddTokensButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import {
SEPOLIA_ADD_ETHEREUM_CHAIN,
SEPOLIA_ADD_TOKENS,
SEPOLIA_CONFIG,
JOLNIR_ADD_ETHEREUM_CHAIN,
JOLNIR_ADD_TOKENS,
JOLNIR_CONFIG,
} from "../../domain/chain";
Expand All @@ -15,7 +17,11 @@ type ConnectButtonProps = {

const chainMap = {
Sepolia: SEPOLIA_CONFIG.chainId.hex,
Jolnir: JOLNIR_CONFIG.chainId.hex,
};

const configMap = {
Sepolia: SEPOLIA_ADD_ETHEREUM_CHAIN,
Jolnir: JOLNIR_ADD_ETHEREUM_CHAIN,
};

const tokenConfigMap = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
SEPOLIA_CONFIG,
TAIKO_CONFIG,
TAIKO_ADD_ETHEREUM_CHAIN,
} from "../../domain/chain";

import { switchOrAddChain } from "../../utils/switchOrAddChain";
Expand Down Expand Up @@ -30,6 +31,12 @@ async function ConnectToMetamask(network: ConnectButtonProps["network"]) {
return;
}

let params: any;
if (network === SEPOLIA_CONFIG.names.shortName) {
params = [{ chainId: chainMap[network] }];
} else {
params = [TAIKO_ADD_ETHEREUM_CHAIN];
}
try {
await switchOrAddChain(network);
} catch (error) {
Expand Down
1 change: 1 addition & 0 deletions packages/website/domain/chain/baseTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ interface Alpha5RollupContracts {
erc20Contracts: {
bridgedTaikoToken: ERC20Contract;
bridgedHorseToken: ERC20Contract;
bridgedBullToken: ERC20Contract;
};
}

Expand Down
11 changes: 11 additions & 0 deletions packages/website/domain/chain/jolnir/addTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ export const JOLNIR_ADD_TTKOJ: AddTokenParameter = {
"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,
Expand All @@ -23,5 +33,6 @@ export const JOLNIR_ADD_HORSE: AddTokenParameter = {

export const JOLNIR_ADD_TOKENS = [
JOLNIR_ADD_TTKOJ,
JOLNIR_ADD_BLL,
JOLNIR_ADD_HORSE,
];
77 changes: 17 additions & 60 deletions packages/website/domain/chain/jolnir/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,72 +31,71 @@ export const JOLNIR_CONFIG = {
taikoL2: {
name: "TaikoL2",
address: {
proxy: "0x1000777700000000000000000000000000000001",
impl: "0x1c7a1688604a79616826993A1AC27e802cC8b17D",
impl: "0x1000777700000000000000000000000000000001",
},
},
etherVault: {
name: "EtherVault",
address: {
proxy: "0x1000777700000000000000000000000000000003",
impl: "0x0000777700000000000000000000000000000003",
impl: "0x1000777700000000000000000000000000000003",
},
},
erc20Vault: {
name: "ERC20Vault",
address: {
proxy: "0x1000777700000000000000000000000000000002",
impl: "0x0000777700000000000000000000000000000002",
impl: "0x1000777700000000000000000000000000000002",
},
},
erc721Vault: {
name: "ERC721Vault",
address: {
proxy: "0x1000777700000000000000000000000000000008",
impl: "0x0000777700000000000000000000000000000008",
impl: "0x1000777700000000000000000000000000000008",
},
},
erc1155Vault: {
name: "ERC1155Vault",
address: {
proxy: "0x1000777700000000000000000000000000000009",
impl: "0x0000777700000000000000000000000000000009",
impl: "0x1000777700000000000000000000000000000009",
},
},
bridge: {
name: "Bridge",
address: {
proxy: "0x1000777700000000000000000000000000000004",
impl: "0x0000777700000000000000000000000000000004",
impl: "0x1000777700000000000000000000000000000004",
},
},
signalService: {
name: "SignalService",
address: {
proxy: "0x1000777700000000000000000000000000000007",
impl: "0x0000777700000000000000000000000000000007",
impl: "0x1000777700000000000000000000000000000007",
},
},
// Bridged ERC-20 contracts
erc20Contracts: {
bridgedTaikoToken: {
name: "Bridged Taiko Token Jolnir",
address: {
proxy: "0xe705498492D0aE94CA9365D395D2C6924F24F445",
impl: "0x29E2e05dcE30299A90Fd212F6c680692BF7f1dC5",
impl: "0xe705498492D0aE94CA9365D395D2C6924F24F445",
},
decimals: 18,
symbol: "TTKOj",
},
bridgedHorseToken: {
name: "Bridged Horse Token",
address: {
proxy: "0x9833DcA11f178dbaF2b88da42557DA2970534430",
impl: "0x5B9F2597FF055bfC304F1276048AB65fFde8FbEA",
impl: "0x9833DcA11f178dbaF2b88da42557DA2970534430",
},
decimals: 18,
symbol: "HORSE",
},
bridgedBullToken: {
name: "Bridged Bull Token",
address: {
impl: "0xc02D1fE3aA2134D2d7561e99f0A699C5Ca7B44ED",
},
decimals: 18,
symbol: "BLL",
},
},
},
otherContracts: {
Expand All @@ -112,47 +111,5 @@ export const JOLNIR_CONFIG = {
impl: "0xTODO(docs)",
},
},
weth: {
name: "WETH",
address: {
impl: "0xf86E3b4cde65c0cd59580Ee3F8dd34343E23ea5B",
},
},
v3CoreFactoryAddress: {
name: "Uniswap V3 Core Factory",
address: {
impl: "0xae2C46ddb314B9Ba743C6dEE4878F151881333D9",
},
},
multicallAddress: {
name: "Multicall",
address: {
impl: "0xC4d03e4055381525F9d7B545f87AC6F7c114218D",
},
},
tickLensAddress: {
name: "TickLens",
address: {
impl: "0xaF23C54A651A548Eb17B9aF1Fd5b33a224579769",
},
},
nonfungiblePositionManagerAddress: {
name: "NonfungiblePositionManager",
address: {
impl: "0x0b89d0FB71B81D0C04f3F71c47bbBd128896DA6b",
},
},
v3MigratorAddress: {
name: "Uniswap V3 Migrator",
address: {
impl: "0xA4ACE40E895C11977a57FbCE154F2790f1C18892",
},
},
swapRouter02Address: {
name: "SwapRouter02",
address: {
impl: "0x73B721608Ec729cE60c8a2746Ea3dcdd36a4EA10",
},
},
},
} as const satisfies TaikoL2Alpha5;
8 changes: 8 additions & 0 deletions packages/website/domain/chain/sepolia/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ export const SEPOLIA_CONFIG = {
impl: "0xe9f36Ec3F1B8056A67a2B542551D248D511aA7d6",
},
},
bullToken: {
name: "Bull Token",
symbol: "BLL",
decimals: 18,
address: {
impl: "0x0505f8EA58319b96bd7FffCec82d29AcC78Fb57e",
},
},
},
},
otherContracts: {},
Expand Down
Loading

0 comments on commit 960fd66

Please sign in to comment.