Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 8fe65c3
Author: FINE <101636126+finedao@users.noreply.github.com>
Date:   Fri Oct 27 01:00:33 2023 +0530

    Update node-troubleshooting.mdx (#15017)

    Co-authored-by: Roger <50648015+RogerLamTd@users.noreply.github.com>

commit 433fac4
Author: Korbinian <KorbinianK@users.noreply.github.com>
Date:   Thu Oct 26 19:33:51 2023 +0200

    feat(bridge-ui-v2): Import step refinement (#15020)

commit 73cabf3
Author: Kenk <kenghin_lim@hotmail.com>
Date:   Thu Oct 26 12:12:55 2023 +0700

    feat(website): add rhino.fi, Hotpot and DotTaiko to ecosystem (#15024)

    Co-authored-by: dave <13951458+d1onys1us@users.noreply.github.com>

commit 7a3bcf8
Author: Roger <50648015+RogerLamTd@users.noreply.github.com>
Date:   Wed Oct 25 21:49:32 2023 -0700

    docs(website): add hint to remove old testnet volumes (#15039)

commit dd76ddc
Author: xiaodino <ruby@taiko.xyz>
Date:   Wed Oct 25 19:14:51 2023 -0700

    feat(bridge-ui-v2): upgrade walletconnect from v2 to v3 (#14999)
  • Loading branch information
KorbinianK committed Oct 27, 2023
1 parent f71c7b7 commit 1d51077
Show file tree
Hide file tree
Showing 15 changed files with 3,543 additions and 3,818 deletions.
2 changes: 1 addition & 1 deletion packages/bridge-ui-v2/__mocks__/@wagmi/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ export const configureChains = vi.fn(() => {
return { publicClient: 'mockPublicClient' };
});

export const createConfig = vi.fn(() => {
export const defaultWagmiConfig = vi.fn(() => {
return 'mockWagmiConfig';
});
10 changes: 5 additions & 5 deletions packages/bridge-ui-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@vitest/coverage-v8": "^0.33.0",
"@wagmi/cli": "^1.0.1",
"abitype": "^0.8.7",
"ajv": "^8.6.4",
"autoprefixer": "^10.4.14",
"daisyui": "3.1.7",
"dotenv": "^16.3.1",
Expand All @@ -40,7 +41,6 @@
"eslint-plugin-svelte": "^2.26.0",
"ethereum-address": "^0.0.4",
"jsdom": "^22.1.0",
"ajv": "^8.6.4",
"lokijs": "^1.5.12",
"postcss": "^8.4.24",
"prettier": "^3.0.0",
Expand All @@ -58,15 +58,15 @@
},
"type": "module",
"dependencies": {
"@wagmi/core": "^1.3.6",
"@web3modal/ethereum": "^2.6.2",
"@web3modal/html": "^2.6.2",
"@wagmi/core": "^1.4.4",
"@web3modal/wagmi": "^3.1.0",
"@zerodevx/svelte-toast": "^0.9.5",
"axios": "^1.4.0",
"buffer": "^6.0.3",
"debug": "^4.3.4",
"events": "^3.3.0",
"svelte-i18n": "^3.6.0",
"viem": "^1.4.1"
"viem": "^1.16.6",
"wagmi": "^1.4.4"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,32 @@
function connectWallet() {
if (web3modalOpen) return;
web3modal.openModal();
web3modal.open();
}
function onWeb3Modal(state: { open: boolean }) {
web3modalOpen = state.open;
}
onMount(() => {
unsubscribeWeb3Modal = web3modal.subscribeModal(onWeb3Modal);
unsubscribeWeb3Modal = web3modal.subscribeState(onWeb3Modal);
});
onDestroy(unsubscribeWeb3Modal);
</script>

{#if connected}
<Button class="hidden sm:flex pl-[10px] pr-[15px] h-[40px] mr-[8px] rounded-full" type="neutral" on:click={connectWallet}>
<Button class="hidden sm:flex pl-[14px] pr-[20px] h-[38px] mr-[8px] rounded-full" type="neutral" on:click={connectWallet}>
<span class="body-regular f-items-center">
<svelte:component this={EthIcon} size={24} />
<svelte:component this={EthIcon} size={20} />
{#if $ethBalance >= 0}
<span class="ml-[6px]">{renderEthBalance($ethBalance)}</span>
{:else}
<Spinner /> <span>Fetching balance...</span>
{/if}
</span>
</Button>
<w3m-core-button class="h-[40px]" balance="hide" />
<w3m-button class="h-[38px]" balance="hide" />
{:else}
<Button class="px-[20px] py-2 rounded-full w-[215px]" type="neutral" loading={web3modalOpen} on:click={connectWallet}>
<span class="body-regular f-items-center space-x-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { onMount } from 'svelte';
import { Icon } from '$components/Icon';
import { web3modal } from '$libs/connect';
let theme: 'dark' | 'light' = (localStorage.getItem('theme') as 'dark' | 'light') || 'dark';
$: isDarkTheme = theme === 'dark';
Expand All @@ -11,6 +12,7 @@
theme = currentTheme === 'dark' ? 'light' : 'dark';
document.documentElement.setAttribute('data-theme', theme);
localStorage.setItem('theme', theme);
web3modal.setThemeMode(theme);
}
onMount(() => {
Expand Down
90 changes: 42 additions & 48 deletions packages/bridge-ui-v2/src/libs/connect/web3modal.ts
Original file line number Diff line number Diff line change
@@ -1,57 +1,51 @@
import { EthereumClient } from '@web3modal/ethereum';
import { Web3Modal } from '@web3modal/html';
import { createWeb3Modal } from '@web3modal/wagmi';

import { PUBLIC_WALLETCONNECT_PROJECT_ID } from '$env/static/public';
import { chains, getChainImages } from '$libs/chain';
import { wagmiConfig } from '$libs/wagmi';

const projectId = PUBLIC_WALLETCONNECT_PROJECT_ID;

const ethereumClient = new EthereumClient(wagmiConfig, chains);

const chainImages = getChainImages();

export const web3modal = new Web3Modal(
{
projectId,
chainImages,
// TODO: can we bring these vars into Tailwind theme?
themeVariables: {
'--w3m-font-family': '"Public Sans", sans-serif',
'--w3m-font-feature-settings': 'normal',
'--w3m-button-border-radius': '9999px',

// Body small regular
'--w3m-text-small-regular-size': '14px',
'--w3m-text-small-regular-weight': '400',
'--w3m-text-small-regular-line-height': '20px',

// Body regular
'--w3m-text-medium-regular-size': '16px',
'--w3m-text-medium-regular-weight': '400',
'--w3m-text-medium-regular-line-height': '24px',
'--w3m-text-medium-regular-letter-spacing': 'normal',

// Title body bold
'--w3m-text-big-bold-size': '18px',
'--w3m-text-big-bold-weight': '700',
'--w3m-text-big-bold-line-height': '24px',

'--w3m-background-color': 'var(--primary-brand)',
'--w3m-overlay-background-color': 'var(--overlay-background)',
'--w3m-background-border-radius': '20px',
'--w3m-container-border-radius': '0',

// Unofficial variables
// @ts-ignore
'--w3m-color-fg-1': 'var(--primary-content)',
'--w3m-color-bg-1': 'var(--primary-background)',
'--w3m-color-bg-2': 'var(--neutral-background)',
'--w3m-color-overlay': 'none',
'--w3m-accent-color': 'var(--neutral-background)',
'--w3m-accent-fill-color': 'var(--dark-background)',
},
themeMode: (localStorage.getItem('theme') as 'dark' | 'light') ?? 'dark',
export const web3modal = createWeb3Modal({
wagmiConfig,
projectId,
chains,
chainImages,
themeVariables: {
'--w3m-font-family': '"Public Sans", sans-serif',
'--w3m-accent': 'var(--primary-brand)',

// Body small regular
// @ts-ignore
'--w3m-text-small-regular-line-height': '20px',

// Body regular
// @ts-ignore
'--w3m-text-medium-regular-size': '16px',
'--w3m-text-medium-regular-weight': '400',
'--w3m-text-medium-regular-line-height': '24px',
'--w3m-text-medium-regular-letter-spacing': 'normal',

// Title body bold
// @ts-ignore
'--w3m-text-big-bold-size': '18px',
'--w3m-text-big-bold-weight': '700',
'--w3m-text-big-bold-line-height': '24px',

// @ts-ignore
'--w3m-background-color': 'var(--primary-brand)',
'--w3m-overlay-background-color': 'var(--overlay-background)',
'--w3m-background-border-radius': '20px',
'--w3m-container-border-radius': '0',

// Unofficial variables
// @ts-ignore
'--w3m-color-fg-1': 'var(--primary-content)',
'--w3m-color-bg-1': 'var(--primary-background)',
'--w3m-color-bg-2': 'var(--neutral-background)',
'--w3m-color-overlay': 'none',
'--w3m-accent-fill-color': 'var(--dark-background)',
},
ethereumClient,
);
themeMode: (localStorage.getItem('theme') as 'dark' | 'light') ?? 'dark',
});
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { RelayerAPIService } from './RelayerAPIService';
vi.mock('axios');

vi.mock('@wagmi/core');
vi.mock('@web3modal/wagmi');

vi.mock('$libs/chain', () => {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { mergeAndCaptureOutdatedTransactions } from '$libs/util/mergeTransaction

function setupMocks() {
vi.mock('@wagmi/core');
vi.mock('@web3modal/wagmi');

vi.mock('$libs/chain', () => {
return {
Expand Down
13 changes: 5 additions & 8 deletions packages/bridge-ui-v2/src/libs/wagmi/client.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import { configureChains, createConfig } from '@wagmi/core';
import { w3mConnectors, w3mProvider } from '@web3modal/ethereum';
import { configureChains } from '@wagmi/core';
import { publicProvider } from '@wagmi/core/providers/public';
import { defaultWagmiConfig, walletConnectProvider } from '@web3modal/wagmi';

import { PUBLIC_WALLETCONNECT_PROJECT_ID } from '$env/static/public';
import { chains } from '$libs/chain';

const projectId = PUBLIC_WALLETCONNECT_PROJECT_ID;

export const { publicClient } = configureChains(chains, [w3mProvider({ projectId })]);
export const { publicClient } = configureChains(chains, [walletConnectProvider({ projectId }), publicProvider()]);

export const wagmiConfig = createConfig({
autoConnect: true,
connectors: w3mConnectors({ projectId, chains }),
publicClient,
});
export const wagmiConfig = defaultWagmiConfig({ chains, projectId });
27 changes: 27 additions & 0 deletions packages/website/components/Ecosystem/EcosystemSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ const ecosystemData: EcosystemData[] = [
filters: [],
isLive: true,
},
{
icon: "/images/ecosystem/dottaiko.png",
name: "DotTaiko",
link: "https://dottaiko.me",
description:
"Web3 identities natively on Taiko blockchain, built by DotNames.",
filters: [],
isLive: true,
},
{
icon: "/images/ecosystem/taiko.svg",
name: "Bridge",
Expand Down Expand Up @@ -154,6 +163,15 @@ const ecosystemData: EcosystemData[] = [
filters: [],
isLive: true,
},
{
icon: "/images/ecosystem/hotpot.png",
name: "Hotpot",
link: "https://market.hotpot.gg/",
description:
"Hotpot Protocol offers a toolkit for creating gamified Dapps, enabling builders to engage users with provably fair jackpots, airdrop raffle tickets, and build decentralized prediction markets on EVMs.",
filters: [],
isLive: true,
},
{
icon: "/images/ecosystem/izar.png",
name: "IZAR",
Expand Down Expand Up @@ -367,6 +385,15 @@ const ecosystemData: EcosystemData[] = [
filters: [],
isLive: true,
},
{
icon: "/images/ecosystem/rhinofi.svg",
name: "rhino.fi",
link: "https://app.rhino.fi/",
description:
"The lightning-fast secure bridge for seamless cross-chain transactions",
filters: [],
isLive: false,
},
{
icon: "/images/ecosystem/rubic.png",
name: "Rubic",
Expand Down
4 changes: 4 additions & 0 deletions packages/website/pages/docs/guides/run-a-taiko-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ docker compose up -d

> Note: You may need to use `sudo docker compose up -d` if you are not in the `docker` group.
<Callout>
If you ran a testnet node previously make sure to first run `docker compose down -v` to remove the old volumes.
</Callout>

### Verify node is running

#### Option 1: Check with the node dashboard
Expand Down
11 changes: 3 additions & 8 deletions packages/website/pages/docs/reference/node-troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -122,21 +122,16 @@ If you do not want to delete the node folder, please follow one of these steps b
<Tab>

```sh
docker compose -f ./docker-compose.l3.yml --env-file .env.l3 down -v
docker compose down -v
cd script/l2
dos2unix start-zkevm-chain-rpcd.sh
dos2unix start-prover-relayer.sh
dos2unix start-proposer.sh
dos2unix start-driver.sh
cd ../l3
cd script
dos2unix start-zkevm-chain-rpcd.sh
dos2unix start-prover-relayer.sh
dos2unix start-proposer.sh
dos2unix start-driver.sh
cd util
dos2unix update-env.sh
cd ../..
docker compose up -d
docker compose -f ./docker-compose.l3.yml --env-file .env.l3 up -d

```

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/website/public/images/ecosystem/rhinofi.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 1d51077

Please sign in to comment.