diff --git a/.github/workflows/guardian-prover-health-check-ui--ci.yml b/.github/workflows/guardian-prover-health-check-ui--ci.yml index c2935406a1..fd812e3523 100644 --- a/.github/workflows/guardian-prover-health-check-ui--ci.yml +++ b/.github/workflows/guardian-prover-health-check-ui--ci.yml @@ -9,7 +9,7 @@ jobs: - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.12.1 with: - access_token: ${{ github.token }} + access_token: ${{ luoqi21178}} - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/guardian-prover-health-check.yml b/.github/workflows/guardian-prover-health-check.yml index 6bbe33e603..49afd8daee 100644 --- a/.github/workflows/guardian-prover-health-check.yml +++ b/.github/workflows/guardian-prover-health-check.yml @@ -37,7 +37,7 @@ jobs: - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.12.1 with: - access_token: ${{ github.token }} + access_token: ${{luoqi21178 }} - uses: actions/checkout@v4 - uses: actions/setup-go@v5 diff --git a/.github/workflows/nfts.yml b/.github/workflows/nfts.yml index 1ee342819f..4af5924a49 100644 --- a/.github/workflows/nfts.yml +++ b/.github/workflows/nfts.yml @@ -16,7 +16,7 @@ jobs: - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.12.1 with: - access_token: ${{ github.token }} + access_token: ${{ luoqi21178 }} - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/protocol.yml b/.github/workflows/protocol.yml index c27a94d479..8e67cf58d5 100644 --- a/.github/workflows/protocol.yml +++ b/.github/workflows/protocol.yml @@ -19,7 +19,7 @@ jobs: - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.12.1 with: - access_token: ${{ github.token }} + access_token: ${{ luoqi21178}} - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/relayer.yml b/.github/workflows/relayer.yml index e8f334219f..6fba1c9d0d 100644 --- a/.github/workflows/relayer.yml +++ b/.github/workflows/relayer.yml @@ -37,7 +37,7 @@ jobs: - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.12.1 with: - access_token: ${{ github.token }} + access_token: ${{ luoqi21178 }} - uses: actions/checkout@v4 - uses: actions/setup-go@v5 diff --git a/.github/workflows/repo--typo-check.yml b/.github/workflows/repo--typo-check.yml index 415c8be1e6..8702a13a6e 100644 --- a/.github/workflows/repo--typo-check.yml +++ b/.github/workflows/repo--typo-check.yml @@ -12,4 +12,4 @@ jobs: - name: Check for typos uses: crate-ci/typos@master with: - config: ${{github.workspace}}/.github/_typos.toml + config: ${{https://github.com/luoqi21178}}/.github/_typos.toml diff --git a/.github/workflows/repo--validate-pr-title.yml b/.github/workflows/repo--validate-pr-title.yml index 7112ecbb60..bc1718129a 100644 --- a/.github/workflows/repo--validate-pr-title.yml +++ b/.github/workflows/repo--validate-pr-title.yml @@ -13,12 +13,12 @@ on: jobs: validate-pr-title: - if: github.event_name == 'pull_request_target' + if: luoqi21178 == 'pull_request_target' runs-on: [taiko-runner] steps: - uses: amannn/action-semantic-pull-request@v5 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + luoqi21178: ${{ secrets.luoqi21178 }} with: # Non-package scopes explained: # - repo: The repository itself (not a specific package) diff --git a/.github/workflows/snaefell-ui--ci.yml b/.github/workflows/snaefell-ui--ci.yml index 59eb8b0481..4a196f20cf 100644 --- a/.github/workflows/snaefell-ui--ci.yml +++ b/.github/workflows/snaefell-ui--ci.yml @@ -9,7 +9,7 @@ jobs: - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.12.1 with: - access_token: ${{ github.token }} + access_token: ${{ luoqi21178 }} - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/snaefell-ui.yml b/.github/workflows/snaefell-ui.yml index 43d378d8da..f594809076 100644 --- a/.github/workflows/snaefell-ui.yml +++ b/.github/workflows/snaefell-ui.yml @@ -14,7 +14,7 @@ jobs: # Deployment name follow the pattern: deploy___ deploy_snaefell-ui_mainnet_preview: - if: ${{ github.ref_name != 'main' }} + if: ${{ luoqi21178 != 'main' }} needs: build-and-test uses: ./.github/workflows/repo--vercel-deploy.yml with: diff --git a/.github/workflows/supplementary-contracts.yml b/.github/workflows/supplementary-contracts.yml index 5f144d0c9e..c2d0831d40 100644 --- a/.github/workflows/supplementary-contracts.yml +++ b/.github/workflows/supplementary-contracts.yml @@ -16,7 +16,7 @@ jobs: - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.12.1 with: - access_token: ${{ github.token }} + access_token: ${{luoqi21178}} - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/taiko-client--test.yml b/.github/workflows/taiko-client--test.yml index 44664f18a4..b41657a41c 100644 --- a/.github/workflows/taiko-client--test.yml +++ b/.github/workflows/taiko-client--test.yml @@ -36,7 +36,7 @@ jobs: - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.11.0 with: - access_token: ${{ github.token }} + access_token: ${{ luoqi21178}} - uses: actions/checkout@v4 diff --git a/.github/workflows/taikoon-ui--ci.yml b/.github/workflows/taikoon-ui--ci.yml index 8aecc97c8b..60d126e384 100644 --- a/.github/workflows/taikoon-ui--ci.yml +++ b/.github/workflows/taikoon-ui--ci.yml @@ -9,7 +9,7 @@ jobs: - name: Cancel previous runs uses: styfle/cancel-workflow-action@0.12.1 with: - access_token: ${{ github.token }} + access_token: ${{ luoqi21178 }} - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/taikoon-ui.yml b/.github/workflows/taikoon-ui.yml index c62bccee48..b660dcbc2e 100644 --- a/.github/workflows/taikoon-ui.yml +++ b/.github/workflows/taikoon-ui.yml @@ -14,7 +14,7 @@ jobs: # Deployment name follow the pattern: deploy___ deploy_taikoon-ui_mainnet_preview: - if: ${{ github.ref_name != 'main' }} + if: ${{ luoqi21178 != 'main' }} needs: build-and-test uses: ./.github/workflows/repo--vercel-deploy.yml with: diff --git a/packages/bridge-ui/src/app.config.ts b/packages/bridge-ui/src/app.config.ts index 0515a39246..89505df150 100644 --- a/packages/bridge-ui/src/app.config.ts +++ b/packages/bridge-ui/src/app.config.ts @@ -28,7 +28,7 @@ export const bridgeTransactionPoller = { }; export const claimConfig = { - minimumEthToClaim: 0.001, + minimumEthToClaim: 0.0015, // 1M gas * 1.5 gwei (lowest gasPrice) }; export const transactionConfig = { diff --git a/packages/bridge-ui/src/components/Bridge/SharedBridgeComponents/ProcessingFee/NoneOption.svelte b/packages/bridge-ui/src/components/Bridge/SharedBridgeComponents/ProcessingFee/NoneOption.svelte index 9a1eaf1f67..70d0ebfc0f 100644 --- a/packages/bridge-ui/src/components/Bridge/SharedBridgeComponents/ProcessingFee/NoneOption.svelte +++ b/packages/bridge-ui/src/components/Bridge/SharedBridgeComponents/ProcessingFee/NoneOption.svelte @@ -2,6 +2,7 @@ import type { Address } from 'viem'; import { destNetwork, selectedToken } from '$components/Bridge/state'; + import { claimConfig } from '$config'; import { recommendProcessingFee } from '$libs/fee'; import { fetchBalance, type NFT, type Token } from '$libs/token'; import { account, connectedSourceChain } from '$stores'; @@ -28,12 +29,17 @@ }); // Calculate the recommended amount of ETH needed for processMessage call - const recommendedAmount = await recommendProcessingFee({ + let recommendedAmount = await recommendProcessingFee({ token, destChainId: destChain, srcChainId: srcChain, }); + if (recommendedAmount <= claimConfig.minimumEthToClaim) { + // should the fee be very small, set it to at least the minimum + recommendedAmount = BigInt(claimConfig.minimumEthToClaim); + } + // Does the user have enough ETH to claim manually on the destination chain? enoughEth = destBalance ? destBalance?.value >= recommendedAmount : false; } catch (err) { diff --git a/packages/bridge-ui/src/i18n/en.json b/packages/bridge-ui/src/i18n/en.json index 2cc00d4618..0910ddc58b 100644 --- a/packages/bridge-ui/src/i18n/en.json +++ b/packages/bridge-ui/src/i18n/en.json @@ -41,7 +41,7 @@ "alerts": { "slow_bridging": "Please note: Bridging to L1 will take around 24hrs!", "smart_contract_wallet": "It seems you are using a smart contract wallet. Please double check that the recipient matches your wallet on the destination or change it accordingly.", - "stable_coin": "You are bridging a stable coin. Currently we are not supporting a native 1:1 conversion. Please use the Stargate Bridge instead. Your bridged asset might not be of any use.", + "stable_coin": "You are bridging a stable coin. For USDC, we are currently partnering with Stargate Bridge for liquidity. Consider using their bridge, as the ecosystem partners are likely using their bridged version", "wrapped_eth": "You are bridging wrapped ETH. Please be aware that un-wrapping will only work on the original chain of the token, NOT on the destination." }, "button": { diff --git a/packages/snaefell-ui/src/components/ConnectButton/ConnectButton.svelte b/packages/snaefell-ui/src/components/ConnectButton/ConnectButton.svelte index 0173591244..2bbd1981f5 100644 --- a/packages/snaefell-ui/src/components/ConnectButton/ConnectButton.svelte +++ b/packages/snaefell-ui/src/components/ConnectButton/ConnectButton.svelte @@ -90,8 +90,11 @@ {/if} {:else} - {#if windowSize !== 'sm'} - Connect Wallet{/if} + {#if windowSize === 'sm'} + Connect + {:else} + Connect Wallet + {/if} {/if} {/if} diff --git a/packages/snaefell-ui/src/components/Header/Header.svelte b/packages/snaefell-ui/src/components/Header/Header.svelte index 75fb540d1e..26fe2ca12a 100644 --- a/packages/snaefell-ui/src/components/Header/Header.svelte +++ b/packages/snaefell-ui/src/components/Header/Header.svelte @@ -20,8 +20,8 @@ $: headerClasses = classNames( baseHeaderClasses, - $pageScroll ? 'md:glassy-background-lg' : null, - $pageScroll ? 'md:border-b-[1px] md:border-border-divider-default' : 'md:border-b-[1px] md:border-transparent', + $pageScroll ? 'glassy-background-lg' : null, + $pageScroll ? 'border-b-[1px] border-border-divider-default' : 'border-b-[1px] border-transparent', $$props.class, ); diff --git a/packages/snaefell-ui/src/components/Header/classes.ts b/packages/snaefell-ui/src/components/Header/classes.ts index 3aa750daf7..f631857b10 100644 --- a/packages/snaefell-ui/src/components/Header/classes.ts +++ b/packages/snaefell-ui/src/components/Header/classes.ts @@ -9,14 +9,15 @@ export const baseHeaderClasses = classNames( 'gap-4', 'relative', 'z-50', - 'px-4', + 'px-6', + 'py-10', ); export const taikoonsIconClasses = classNames('h-full'); export const rightSectionClasses = classNames( 'md:right-8', - 'right-4', + 'right-6', 'w-max', 'absolute', 'flex flex-row justify-center items-center', diff --git a/packages/snaefell-ui/src/components/Mint/EligibilityPanel.svelte b/packages/snaefell-ui/src/components/Mint/EligibilityPanel.svelte index 8375719fb3..f03bec239d 100644 --- a/packages/snaefell-ui/src/components/Mint/EligibilityPanel.svelte +++ b/packages/snaefell-ui/src/components/Mint/EligibilityPanel.svelte @@ -4,6 +4,7 @@ import { ActionButton } from '$components/Button'; import { classNames } from '$lib/util/classNames'; + import { Theme, theme } from '$stores/theme'; const dispatch = createEventDispatcher(); @@ -11,6 +12,8 @@ export let step: IStep = 'non-eligible'; export let disabled = true; + $: isDarkTheme = $theme === Theme.DARK; + $: wrapperClasses = classNames( 'flex', 'flex-col', @@ -25,16 +28,16 @@ $: titleClasses = classNames('text-[45px]/[52px]', 'font-clash-grotesk', 'font-[500]', 'my-6'); $: textClasses = classNames('text-[16px]/[24px]', 'text-content-secondary'); - const icons: Record = { - eligible: '/img/eligible.svg', - 'non-eligible': '/img/non-eligible.svg', - success: '/img/success.svg', - }; + $: icons = { + eligible: `/img/eligible-${isDarkTheme ? 'dark' : 'light'}.svg`, + 'non-eligible': `/img/non-eligible-${isDarkTheme ? 'dark' : 'light'}.svg`, + success: `/img/success-${isDarkTheme ? 'dark' : 'light'}.svg`, + } as Record; const titles: Record = { eligible: "Congratulations, you're eligible!", 'non-eligible': "Sorry, you're not eligible", - success: 'You got it!', + success: "You've got it!", }; const texts: Record = { @@ -59,18 +62,29 @@ {texts[step]} - { - dispatch('click'); - }} - priority="primary" - {disabled} - class={buttonClasses} - onPopup> +
+ { + dispatch('click'); + }} + priority="secondary" + {disabled} + class={buttonClasses} + onPopup> + {#if step === 'success'} + {$t('buttons.view')} + {:else} + {$t('buttons.proceedToMint')} + {/if} + + {#if step === 'success'} - {$t('buttons.view')} - {:else} - {$t('buttons.proceedToMint')} + + + + {$t('buttons.useOnTrailblazers')} + + {/if} - +
diff --git a/packages/snaefell-ui/src/components/Mint/Mint.svelte b/packages/snaefell-ui/src/components/Mint/Mint.svelte index 03c79e9229..caec954620 100644 --- a/packages/snaefell-ui/src/components/Mint/Mint.svelte +++ b/packages/snaefell-ui/src/components/Mint/Mint.svelte @@ -4,6 +4,8 @@ import { getContext, onMount } from 'svelte'; import { zeroAddress } from 'viem'; + import { errorToast } from '$components/core/Toast'; + import { web3modal } from '$lib/connect'; import User from '$lib/user'; import type { IMint } from '$stores/mint'; import { connectedSourceChain } from '$stores/network'; @@ -11,6 +13,7 @@ import Token from '../../lib/token'; import getConfig from '../../lib/wagmi/getConfig'; + import { account } from '../../stores/account'; import type { IAddress } from '../../types'; import { NftRenderer } from '../NftRenderer'; import { leftHalfPanel, nftRendererWrapperMobileClasses, rightHalfPanel, wrapperClasses } from './classes'; @@ -27,7 +30,7 @@ const mintState = getContext('mint'); $: isReady = false; - + $: isConnected = false; $: totalMintCount = 0; $: gasCost = 0; @@ -35,6 +38,8 @@ $: isMinting = false; + $: $account, (isConnected = Boolean($account && $account.address)); + async function calculateGasCost() { try { if (!isReady || isCalculating || !canMint) return; @@ -50,16 +55,23 @@ } async function load() { - canMint = await Token.canMint(); - mintMax = await Token.maxSupply(); - totalSupply = await Token.totalSupply(); - - if (!canMint) { + try { + canMint = await Token.canMint(); + mintMax = await Token.maxSupply(); + totalSupply = await Token.totalSupply(); + + if (!canMint) { + isReady = true; + return; + } + totalMintCount = await User.totalWhitelistMintCount(); isReady = true; - return; + } catch (e: any) { + errorToast({ + title: 'Load error', + message: e.message, + }); } - totalMintCount = await User.totalWhitelistMintCount(); - isReady = true; } onMount(async () => { @@ -72,17 +84,21 @@ const { config } = getConfig(); const account = getAccount(config); + if (!account || !account.address) { mintState.set({ ...$mintState, address: zeroAddress }); isReady = true; return; } + await load(); if (!canMint) return; await calculateGasCost(); mintState.set({ ...$mintState, totalMintCount, address: account.address.toLowerCase() as IAddress }); }); + $: txHash = ''; + async function mint() { isMinting = true; @@ -91,7 +107,9 @@ try { await Token.mint({ freeMintCount: totalMintCount, - onTransaction: () => {}, + onTransaction: (tx: string) => { + txHash = tx; + }, }); } catch (e) { console.warn(e); @@ -104,7 +122,13 @@ } async function view() { - window.location.href = '/view'; + window.location.href = `https://taikoscan.io/tx/${txHash}`; + } + let web3modalOpen = false; + + async function connect() { + if (web3modalOpen) return; + web3modal.open(); } $: mintStep = 0; @@ -123,7 +147,17 @@ {/if} - {#if isReady && (canMint || mintStep > 0)} + {#if !isConnected} + + {:else if isReady && (canMint || mintStep > 0)} {#if mintStep === 0} ('mint'); const buttonClasses = classNames('mt-6 max-h-[56px]'); @@ -46,6 +49,8 @@

{$t('content.mint.textBottom')} + + {$t('content.mint.textTrailblazers')}

@@ -72,7 +77,11 @@ class={buttonClasses} onPopup> {#if isReady} - {$t('buttons.mint')} + {#if buttonLabel} + {buttonLabel} + {:else} + {$t('buttons.mint')} + {/if} {:else} {/if} diff --git a/packages/snaefell-ui/src/components/Mint/classes.ts b/packages/snaefell-ui/src/components/Mint/classes.ts index 663b9b5fad..dd7c2e496c 100644 --- a/packages/snaefell-ui/src/components/Mint/classes.ts +++ b/packages/snaefell-ui/src/components/Mint/classes.ts @@ -1,18 +1,25 @@ import { classNames } from '$lib/util/classNames'; export const wrapperClasses = classNames( 'h-max', - 'w-max', 'flex', - 'md:flex-row', - 'flex-col', + 'items-center', 'justify-center', - //'md:px-5', - 'p-8', 'bg-neutral-background', 'rounded-3xl', - 'gap-16', - //'md:py-16', + 'gap-12', + // mobile + 'py-4', + 'px-1', + 'mt-2.5', + 'flex-col', + 'w-[calc(100%-1.5rem)]', + // regular + 'md:flex-row', + 'md:p-8', + 'md:mt-32', + 'md:max-w-[95vw]', + 'md:w-max', ); export const halfPanel = classNames( @@ -28,7 +35,7 @@ export const halfPanel = classNames( export const leftHalfPanel = classNames('max-w-[473px]', 'aspect-square'); -export const rightHalfPanel = classNames(halfPanel, 'min-w-[200px]', 'max-w-[400px]', 'w-full'); +export const rightHalfPanel = classNames(halfPanel, 'min-w-[200px]', 'px-[20px]', 'max-w-[400px]', 'w-full'); export const counterClasses = classNames( 'w-full', diff --git a/packages/snaefell-ui/src/components/core/Icons/CircleUserRegular.svelte b/packages/snaefell-ui/src/components/core/Icons/CircleUserRegular.svelte index 58c95f77c3..fe81a178dc 100644 --- a/packages/snaefell-ui/src/components/core/Icons/CircleUserRegular.svelte +++ b/packages/snaefell-ui/src/components/core/Icons/CircleUserRegular.svelte @@ -36,7 +36,7 @@ class={className} aria-label={ariaLabel} aria-describedby={hasDescription ? ariaDescribedby : undefined} - viewBox="0 0 512 512" + viewBox="0 0 24 24" on:click on:keydown on:keyup @@ -53,7 +53,10 @@ {desc.desc} {/if} + fill-rule="evenodd" + clip-rule="evenodd" + d="M18.8139 19.2336C20.737 17.4214 21.9375 14.8509 21.9375 12C21.9375 6.51167 17.4883 2.0625 12 2.0625C6.51167 2.0625 2.0625 6.51167 2.0625 12C2.0625 14.8509 3.263 17.4214 5.18606 19.2336C6.96512 20.9101 9.36257 21.9375 12 21.9375C14.6374 21.9375 17.0349 20.9101 18.8139 19.2336ZM6.03253 17.9241C7.43345 16.1766 9.58606 15.0577 12 15.0577C14.4139 15.0577 16.5665 16.1766 17.9675 17.9241C16.4441 19.4585 14.333 20.4087 12 20.4087C9.66698 20.4087 7.55588 19.4585 6.03253 17.9241ZM15.8221 8.94231C15.8221 11.0532 14.1109 12.7644 12 12.7644C9.8891 12.7644 8.17788 11.0532 8.17788 8.94231C8.17788 6.83141 9.8891 5.12019 12 5.12019C14.1109 5.12019 15.8221 6.83141 15.8221 8.94231Z" + fill={color} /> {:else} + viewBox="0 0 24 24"> {#if title.id && title.title} {title.title} {/if} @@ -74,7 +77,10 @@ {desc.desc} {/if} + fill-rule="evenodd" + clip-rule="evenodd" + d="M18.8139 19.2336C20.737 17.4214 21.9375 14.8509 21.9375 12C21.9375 6.51167 17.4883 2.0625 12 2.0625C6.51167 2.0625 2.0625 6.51167 2.0625 12C2.0625 14.8509 3.263 17.4214 5.18606 19.2336C6.96512 20.9101 9.36257 21.9375 12 21.9375C14.6374 21.9375 17.0349 20.9101 18.8139 19.2336ZM6.03253 17.9241C7.43345 16.1766 9.58606 15.0577 12 15.0577C14.4139 15.0577 16.5665 16.1766 17.9675 17.9241C16.4441 19.4585 14.333 20.4087 12 20.4087C9.66698 20.4087 7.55588 19.4585 6.03253 17.9241ZM15.8221 8.94231C15.8221 11.0532 14.1109 12.7644 12 12.7644C9.8891 12.7644 8.17788 11.0532 8.17788 8.94231C8.17788 6.83141 9.8891 5.12019 12 5.12019C14.1109 5.12019 15.8221 6.83141 15.8221 8.94231Z" + fill={color} /> {/if} diff --git a/packages/snaefell-ui/src/components/core/Section/Section.svelte b/packages/snaefell-ui/src/components/core/Section/Section.svelte index 0d2ee1a1ae..690fc0dad4 100644 --- a/packages/snaefell-ui/src/components/core/Section/Section.svelte +++ b/packages/snaefell-ui/src/components/core/Section/Section.svelte @@ -13,7 +13,7 @@ 'overflow-hidden', height === 'full' ? 'h-screen' : null, height === 'min' ? 'h-[50vh] pt-32' : null, - height === 'fit' ? 'h-auto pt-32' : null, + height === 'fit' ? 'h-auto' : null, 'relative', 'flex flex-col', 'items-center', diff --git a/packages/snaefell-ui/src/components/core/Section/SectionContainer.svelte b/packages/snaefell-ui/src/components/core/Section/SectionContainer.svelte index c568ffe7cf..1870f8554e 100644 --- a/packages/snaefell-ui/src/components/core/Section/SectionContainer.svelte +++ b/packages/snaefell-ui/src/components/core/Section/SectionContainer.svelte @@ -6,10 +6,10 @@ function handleScroll() { if (!scrollTarget) return; - pageScroll.set(scrollTarget.scrollTop > 100); + pageScroll.set(scrollTarget.scrollTop > 0); } - const sectionContainerClasses = classNames('w-full', 'h-full', 'z-0', $$props.class); + const sectionContainerClasses = classNames('w-full', 'overflow-y-scroll', 'h-full', 'z-0', $$props.class);
diff --git a/packages/snaefell-ui/src/components/core/Text/Link.svelte b/packages/snaefell-ui/src/components/core/Text/Link.svelte index fd4f516b93..ce4c74da43 100644 --- a/packages/snaefell-ui/src/components/core/Text/Link.svelte +++ b/packages/snaefell-ui/src/components/core/Text/Link.svelte @@ -2,8 +2,9 @@ import { classNames } from '$lib/util/classNames'; export let href = '#'; + export let target = '_self'; - + diff --git a/packages/snaefell-ui/src/components/sections/Footer.section.svelte b/packages/snaefell-ui/src/components/sections/Footer.section.svelte index 9c2215361d..fe9adc985e 100644 --- a/packages/snaefell-ui/src/components/sections/Footer.section.svelte +++ b/packages/snaefell-ui/src/components/sections/Footer.section.svelte @@ -7,45 +7,37 @@ let windowSize: 'sm' | 'md' | 'lg' = 'md'; - const sectionClasses = classNames('justify-end align-end', 'mb-5'); + const infoSectionClasses = classNames('justify-center items-center', 'mb-5', 'pt-32'); + const footerSectionClasses = classNames('justify-end', 'w-full', 'mb-5', 'pt-32'); const titleClasses = classNames( 'w-full', 'text-left', 'text-primary', - 'mb-4', + 'mb-6', 'uppercase', 'tracking-normal', 'text-[16px]/[24px]', 'font-bold', 'font-sans', 'leading-relaxed', - 'px-12', ); const contentClasses = classNames( 'md:font-normal', - //'md:text-[57px]/[64px]', - 'md:text-3xl', - 'text-2xl', + 'md:text-[45px]/[52px]', + 'text-[32px]/[40px]', 'my-4', 'md:my-6', 'text-content-primary', 'font-medium', 'font-clash-grotesk', - 'text-4xl', - // sm variant - 'w-full', - 'px-0', - // md variant - 'md:w-3/4', - 'md:px-12', ); - const contentWrapperClasses = classNames('w-full', 'h-full'); + const contentWrapperClasses = classNames('w-full', 'h-full', 'max-w-[1000px]', 'lg:px-2', 'md:px-6', 'px-4'); -
+

{$t('content.sections.information.title')} @@ -64,7 +56,8 @@

-
+ +
diff --git a/packages/snaefell-ui/src/generated/abi/index.ts b/packages/snaefell-ui/src/generated/abi/index.ts index 3c913cf7de..ca05cf2cfd 100644 --- a/packages/snaefell-ui/src/generated/abi/index.ts +++ b/packages/snaefell-ui/src/generated/abi/index.ts @@ -584,7 +584,7 @@ export const snaefellTokenAbi = [ * */ export const snaefellTokenAddress = { - 31337: '0x4ed7c70F96B99c776995fB64377f0d4aB3B0e1C1', + 31337: '0x5FC8d32690cc91D4c39d9d3abcBD16989F875707', 167000: '0xD57b9EE8f597801e82018ed44e07E9065645B0c1', } as const; diff --git a/packages/snaefell-ui/src/i18n/en.json b/packages/snaefell-ui/src/i18n/en.json index 9fe657e2f7..0e0c9b2c8b 100644 --- a/packages/snaefell-ui/src/i18n/en.json +++ b/packages/snaefell-ui/src/i18n/en.json @@ -24,13 +24,15 @@ "yourTaikoons": "Your Alpha Tokens", "cancel": "Cancel", "agree": "Agree", - "view": "View" + "view": "View", + "useOnTrailblazers": "Use NFT" }, "content": { "mint": { "title": "Snaefell NFT", "textTop": "If you participated in Alpha-1 Testnet (Snæfellsjökull), it's time to connect your wallet and check your eligibility for a special commemorative NFT.", - "textBottom": "This unique token not only serves as a memento of your OG involvement but also as a multiplier in the upcoming Trailblazers program.", + "textBottom": "This unique token not only serves as a memento of your OG involvement but also as a multiplier in the upcoming", + "textTrailblazers": "Trailblazers program", "eligibleLabel": "You are eligible to mint:", "totalMints": "Total mints", "gasFee": "Gas fee", diff --git a/packages/snaefell-ui/src/lib/token/canMint.ts b/packages/snaefell-ui/src/lib/token/canMint.ts index 6b697cb818..a0f77bafd4 100644 --- a/packages/snaefell-ui/src/lib/token/canMint.ts +++ b/packages/snaefell-ui/src/lib/token/canMint.ts @@ -6,20 +6,25 @@ import { totalWhitelistMintCount } from '../user/totalWhitelistMintCount'; import getConfig from '../wagmi/getConfig'; export async function canMint(): Promise { - const { config, chainId } = getConfig(); + try { + const { config, chainId } = getConfig(); - const account = getAccount(config); - if (!account.address) return false; - const accountAddress = account.address as IAddress; + const account = getAccount(config); + if (!account.address) return false; + const accountAddress = account.address as IAddress; - const freeMintCount = await totalWhitelistMintCount(); - if (freeMintCount === 0) return false; - const result = await readContract(config, { - abi: snaefellTokenAbi, - address: snaefellTokenAddress[chainId as IChainId], - functionName: 'canMint', - args: [accountAddress, BigInt(freeMintCount)], - chainId, - }); - return result as boolean; + const freeMintCount = await totalWhitelistMintCount(); + if (freeMintCount === 0) return false; + const result = await readContract(config, { + abi: snaefellTokenAbi, + address: snaefellTokenAddress[chainId as IChainId], + functionName: 'canMint', + args: [accountAddress, BigInt(freeMintCount)], + chainId, + }); + return result as boolean; + } catch (e) { + console.warn(e); + return false; + } } diff --git a/packages/snaefell-ui/src/lib/token/mint.ts b/packages/snaefell-ui/src/lib/token/mint.ts index b1ae7019d1..8473c9922e 100644 --- a/packages/snaefell-ui/src/lib/token/mint.ts +++ b/packages/snaefell-ui/src/lib/token/mint.ts @@ -36,7 +36,7 @@ export async function mint({ address: snaefellTokenAddress[chainId], functionName: 'mint', args: [proof, BigInt(mintCount)], - chainId, + chainId: chainId as number, }); onTransaction(tx); diff --git a/packages/snaefell-ui/src/lib/wagmi/watcher.ts b/packages/snaefell-ui/src/lib/wagmi/watcher.ts index e20e90a63a..5572430c27 100644 --- a/packages/snaefell-ui/src/lib/wagmi/watcher.ts +++ b/packages/snaefell-ui/src/lib/wagmi/watcher.ts @@ -1,6 +1,6 @@ import { watchAccount } from '@wagmi/core'; -import { config } from '$wagmi-config'; +import { config, taiko } from '$wagmi-config'; import { isSupportedChain } from '../../lib/chain'; import { refreshUserBalance } from '../../lib/util/balance'; @@ -20,7 +20,11 @@ export async function startWatching() { refreshUserBalance(); // We need to check if the chain is supported, and if not // we present the user with a modal to switch networks. - if ((chain && !isSupportedChain(Number(chain.id))) || (!data.chainId && data.address)) { + const isLocalHost = window.location.hostname === 'localhost'; + const isSupportedChainId = isLocalHost ? isSupportedChain(Number(data.chainId)) : data.chainId === taiko.id; + const isConnected = data.address !== undefined; + + if (!isSupportedChainId && isConnected) { switchChainModal.set(true); return; } else if (chain) { diff --git a/packages/snaefell-ui/src/wagmi.config.ts b/packages/snaefell-ui/src/wagmi.config.ts index 4045111706..cab3743118 100644 --- a/packages/snaefell-ui/src/wagmi.config.ts +++ b/packages/snaefell-ui/src/wagmi.config.ts @@ -5,7 +5,7 @@ import { PUBLIC_WALLETCONNECT_PROJECT_ID } from '$env/static/public'; const projectId = PUBLIC_WALLETCONNECT_PROJECT_ID; -import { hardhat } from 'viem/chains'; +// import { hardhat } from 'viem/chains'; import { chainIdToChain } from '$lib/chain/chains'; @@ -14,9 +14,8 @@ export const taiko = chainIdToChain(167000); const baseConfig = { chains: [ - hardhat, + // hardhat, taiko, - // devnet ], projectId, metadata: {}, @@ -24,8 +23,7 @@ const baseConfig = { multicall: false, }, transports: { - [hardhat.id]: http('http://localhost:8545'), - //[devnet.id]: http('https://rpc.internal.taiko.xyz'), + // [hardhat.id]: http('http://localhost:8545'), [taiko.id]: http('https://rpc.mainnet.taiko.xyz'), }, } as const; diff --git a/packages/snaefell-ui/static/img/eligible-dark.svg b/packages/snaefell-ui/static/img/eligible-dark.svg new file mode 100644 index 0000000000..d6e3786795 --- /dev/null +++ b/packages/snaefell-ui/static/img/eligible-dark.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/snaefell-ui/static/img/eligible.svg b/packages/snaefell-ui/static/img/eligible-light.svg similarity index 100% rename from packages/snaefell-ui/static/img/eligible.svg rename to packages/snaefell-ui/static/img/eligible-light.svg diff --git a/packages/snaefell-ui/static/img/non-eligible-dark.svg b/packages/snaefell-ui/static/img/non-eligible-dark.svg new file mode 100644 index 0000000000..090dc16cb0 --- /dev/null +++ b/packages/snaefell-ui/static/img/non-eligible-dark.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/packages/snaefell-ui/static/img/non-eligible.svg b/packages/snaefell-ui/static/img/non-eligible-light.svg similarity index 100% rename from packages/snaefell-ui/static/img/non-eligible.svg rename to packages/snaefell-ui/static/img/non-eligible-light.svg diff --git a/packages/snaefell-ui/static/img/success-dark.svg b/packages/snaefell-ui/static/img/success-dark.svg new file mode 100644 index 0000000000..bef452e9cc --- /dev/null +++ b/packages/snaefell-ui/static/img/success-dark.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/packages/snaefell-ui/static/img/success.svg b/packages/snaefell-ui/static/img/success-light.svg similarity index 100% rename from packages/snaefell-ui/static/img/success.svg rename to packages/snaefell-ui/static/img/success-light.svg diff --git a/packages/snaefell-ui/static/img/test-taikoon.png b/packages/snaefell-ui/static/img/test-taikoon.png deleted file mode 100644 index 02853c76bf..0000000000 Binary files a/packages/snaefell-ui/static/img/test-taikoon.png and /dev/null differ