From 032d09920361de46364c31f3cd45cedee555b71c Mon Sep 17 00:00:00 2001 From: Roberto Lucas Date: Mon, 5 Aug 2024 18:59:07 -0600 Subject: [PATCH] chore: release landing v1.0 (#302) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: add @types/uuid * chore: add @types/uuid * fix(app-lib): tsconfig pkg extends * fix: missing encoding dep * feat: sitemap (#290) * feat: add sitemap * fix: error handling * fix: move common types * fix: update base url in sitemap * Update apps/webapp/app/(routes)/[lang]/blog/[category]/sitemap.ts Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * Update apps/webapp/app/(routes)/[lang]/wallet/sitemap.ts Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * Update apps/webapp/app/(routes)/[lang]/whitepaper/sitemap.ts Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * fix: build error * fix: remove unnecessary async declarative * vendor: add @types/uuid * fix: remove console log for debug * fix: add 'async' to all sitemaps * fix: make ProjectPageParams extends CommonPageParams --------- Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * fix(webapp): UI/UX tweaks and upts from final v1 landing designs (#291) * (webapp)fix:FAQ border radi + muted color * (webapp)fix:newsletter spacing * (webapp)fix:participate spacing and font family * (webapp)fix:header spacing + bitlauncher logo size * (webapp)fix:blog section 4 per row + purple link + gap * (webapp)fix:hero-card spacing * (webapp)fix:auction-card spaces * (webapp)fix:Upcoming grid gap * (webapp)fix:article card - text-left * (webapp)fix:media-card text-start * (webapp)fix:media-section purple link + space * (webapp)fix:participate gap + section font and padding * (webapp)fix:footer links padding + other spacing fix * (webapp)fix:upcoming background circle * (webapp)fix:footer margin-10 * (webapp)fix:upcoming bg shape * (webapp)-andler-changes-request * (webapp)-debug-toggle navigation icon * (webapp)-create-mobile-navigation-context * (webapp)-create-mobile-navigation-context * (webapp)-fix navigation bug - add key * (webapp)-Andler-changes * (webapp)-responsive - upcoming * (webapp)-fix-responsive-whychooseUs * (webapp)-fix-responsive-participate * (webapp)-fix-responsive-media * (webapp)-fix-responsive-articles * (webapp)-responsive-project-header+info+sharebtn * (webapp)-feat-about-base * (webapp)-feat-about-landing-complete * (webapp)-feat-security-updated * (webapp)-fix-steps-padding * fix typo * fix bgHeader type * fix bgHeader type * impr(webapp): layout tweaks * impr(webapp): info pages img asset + css class * fix: bun.lockb --------- Co-authored-by: Roberto Lucas * feat: multichain indexer ( part 1 ) (#293) * chore: update app-contracts * feat: multichain indexer * feat: prod chains * feat: presale wallet * feat: blpl token * feat: blpl token * chore: update bunlock * feat: blpl token * feat: presale evm contribs * feat: blpl token * wip: presale indexer * chore(indexer): fix dockerfile * feat: presale transaction indexing (#296) * feat: report transaction id * feat: save deposits data * feat: save deposits data * feat: read presale transactions * chore: disable view all * feat: update presale deposits ui * feat: display amount raised and contributors * chore: environment chains and tokens * fix(webapp): desktop padding (#297) * feat: multichain presale deposits (#298) * chore: environment chains and tokens * fix: chain switch * fix: chain switch * feat: update nav links (#299) * chore: environment chains and tokens * feat: update nav links * chore: renable swaps service, index token from latest block * feat(webapp): wallet ui updates (#300) * fix: wagmi config * feat(webapp): presale contribution report * feat: realtime presale data * feat: realtime presale data * feat: update dropdown menu * feat(supabase): update schema and types * chore: debug presale token issuance * feat: show issuance trx link on table --------- Co-authored-by: Gabo Esquivel Co-authored-by: Nathanael Liu Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com> --- apps/indexer/.env-sample | 1 + apps/indexer/Dockerfile | 1 - apps/indexer/package.json | 6 +- apps/indexer/src/index.ts | 6 +- .../lib/{evm-client.ts => issuer-client.ts} | 22 +- apps/indexer/src/lib/supabase-client.ts | 14 ++ apps/indexer/src/lib/utils.ts | 8 +- .../src/modules/auction/auction-indexer.ts | 12 +- .../src/modules/auction/easyauction.ts | 9 +- .../src/modules/presale/eos-contributions.ts | 6 +- .../src/modules/presale/evm-contributions.ts | 74 +++--- apps/indexer/src/modules/presale/index.ts | 3 +- .../src/modules/presale/presale-issuer.ts | 8 +- .../src/modules/swaps/eos-transfers.ts | 2 +- .../src/modules/swaps/evm-transfers.ts | 8 +- apps/indexer/src/routes/healthcheck.ts | 2 +- .../20240805231931_remote_schema.sql | 7 + apps/supabase/package.json | 2 +- apps/supabase/src/supa.schemas.ts | 3 + apps/supabase/src/supa.types.ts | 3 + apps/webapp/.env.development | 2 +- apps/webapp/.gitignore | 2 + .../[lang]/[project]/auction/page.tsx | 8 +- .../[lang]/[project]/auction/sitemap.ts | 16 ++ .../app/(routes)/[lang]/[project]/layout.tsx | 9 +- .../app/(routes)/[lang]/[project]/page.tsx | 8 +- .../[lang]/[project]/presale/page.tsx | 8 +- .../[lang]/[project]/presale/sitemap.ts | 16 ++ .../app/(routes)/[lang]/[project]/sitemap.ts | 16 ++ .../[lang]/about/about-bitlauncher/page.tsx | 49 ++++ .../[lang]/about/ai-startups/sitemap.ts | 13 + .../[lang]/about/bitcash-app/sitemap.ts | 13 + .../[lang]/about/communities/sitemap.ts | 13 + .../[lang]/about/daos-dboard/sitemap.ts | 13 + .../[lang]/about/investors/sitemap.ts | 13 + .../[lang]/about/referrals/sitemap.ts | 13 + .../[lang]/blog/[category]/[slug]/page.tsx | 2 +- .../[lang]/blog/[category]/[slug]/sitemap.ts | 23 ++ .../(routes)/[lang]/blog/[category]/page.tsx | 2 +- .../[lang]/blog/[category]/sitemap.ts | 23 ++ .../app/(routes)/[lang]/blog/sitemap.ts | 13 + .../[lang]/in/early-access/sitemap.ts | 13 + apps/webapp/app/(routes)/[lang]/layout.tsx | 15 +- .../[lang]/learn/batch-auctions/sitemap.ts | 13 + .../[lang]/learn/developers/sitemap.ts | 13 + .../(routes)/[lang]/learn/media/sitemap.ts | 13 + .../(routes)/[lang]/learn/security/page.tsx | 9 +- .../(routes)/[lang]/learn/security/sitemap.ts | 13 + .../[lang]/learn/tokenization/sitemap.ts | 13 + .../(routes)/[lang]/legal/privacy/sitemap.ts | 13 + .../(routes)/[lang]/legal/terms/sitemap.ts | 13 + apps/webapp/app/(routes)/[lang]/sitemap.ts | 13 + .../app/(routes)/[lang]/wallet/page.tsx | 16 +- .../app/(routes)/[lang]/wallet/sitemap.ts | 13 + .../app/(routes)/[lang]/whitepaper/sitemap.ts | 13 + apps/webapp/app/actions/save-deposit.ts | 46 ++++ apps/webapp/app/globals.css | 52 +++- apps/webapp/app/sitemap.ts | 2 +- apps/webapp/components/layout/footer/faq.tsx | 36 +-- .../components/layout/footer/footer-links.tsx | 8 +- .../components/layout/footer/footer.tsx | 14 +- .../layout/footer/learn-section.tsx | 21 +- .../components/layout/footer/newsletter.tsx | 21 +- .../components/layout/footer/participate.tsx | 11 +- .../components/layout/footer/recent.tsx | 28 --- .../webapp/components/layout/header/index.tsx | 19 +- .../components/layout/header/mobile-nav.tsx | 34 +-- .../components/layout/header/nav-links.tsx | 29 ++- apps/webapp/components/layout/nav-struct.ts | 12 +- apps/webapp/components/layout/providers.tsx | 52 +++- .../routes/about/about-bitlauncher/index.tsx | 98 ++++++++ .../components/routes/blog/blog-sections.tsx | 9 +- .../routes/blog/hero-section/hero-card.tsx | 16 +- .../routes/home/auction-card-buttons.tsx | 8 +- .../components/routes/home/auction-card.tsx | 28 ++- .../components/routes/home/features.tsx | 6 +- .../components/routes/home/hero/index.tsx | 2 +- .../components/routes/home/upcoming.tsx | 2 +- .../components/routes/home/why-choose-us.tsx | 9 +- .../project/presale/presale-deposit-card.tsx | 183 +++++++------- .../presale/presale-transactions-card.tsx | 233 +++++++++++++----- .../routes/project/project-header.tsx | 8 +- .../routes/project/project-info.tsx | 2 +- .../routes/project/project-presale-data.tsx | 179 +++++++++++--- .../routes/project/project-share.tsx | 2 +- .../routes/wallet/balances-table.tsx | 57 +++-- .../components/routes/wallet/deposit-card.tsx | 138 ++++++----- .../routes/wallet/withdraw-card.tsx | 3 +- .../webapp/components/shared/article-card.tsx | 4 +- apps/webapp/components/shared/banner.tsx | 39 +++ apps/webapp/components/shared/bg-header.tsx | 38 +-- .../components/shared/community-card.tsx | 54 ++++ apps/webapp/components/shared/content.tsx | 4 +- apps/webapp/components/shared/media-card.tsx | 16 +- .../components/shared/media-sections.tsx | 20 +- apps/webapp/components/shared/section.tsx | 12 +- apps/webapp/components/ui/dropdown-menu.tsx | 69 ++---- apps/webapp/components/ui/icons.tsx | 2 +- apps/webapp/components/ui/select.tsx | 2 +- apps/webapp/dictionaries/en/about.ts | 94 +++---- apps/webapp/dictionaries/en/batch-auction.ts | 63 +++++ apps/webapp/dictionaries/en/index.ts | 22 +- apps/webapp/dictionaries/en/security.ts | 2 +- apps/webapp/hooks/use-mobile-navigation.tsx | 47 ++++ apps/webapp/lib/eos.ts | 2 +- apps/webapp/package.json | 1 + apps/webapp/public/images/info-bg-about.webp | Bin 0 -> 80982 bytes .../public/images/info-bg-security.webp | Bin 0 -> 80590 bytes .../public/images/info-bg-whitepaper.webp | Bin 0 -> 79920 bytes apps/webapp/types/routing.type.ts | 12 + bun.lockb | Bin 847608 -> 849672 bytes hardhat/erc20-token/bun.lockb | Bin 0 -> 426384 bytes hardhat/erc20-token/contracts/BLPLToken.sol | 35 +++ hardhat/erc20-token/package.json | 6 +- hardhat/erc20-token/scripts/deployBLPL.js | 16 ++ hardhat/erc20-token/tsconfig.json | 8 + .../dev/{ => auction}/testnet-allow-list.ts | 4 +- .../{ => auction}/testnet-deposit-order.ts | 4 +- .../dev/{ => auction}/testnet-easy-auction.ts | 4 +- packages/app-contracts/src/dev/index.ts | 55 ++++- .../src/dev/{ => tokens}/eos-fake-bitusd.ts | 4 +- .../src/dev/{ => tokens}/eos-fake-usdt.ts | 4 +- .../src/dev/{ => tokens}/sepolia-usdt.ts | 4 +- .../src/dev/tokens/testnet-blpl.ts | 16 ++ .../{ => tokens}/testnet-mbots-prelaunch.ts | 4 +- .../src/dev/{ => tokens}/testnet-usd-cred.ts | 4 +- .../src/dev/{ => tokens}/testnet-usdt.ts | 4 +- packages/app-contracts/src/dev/usdc.ts | 181 -------------- packages/app-contracts/src/dev/usdt.ts | 171 ------------- packages/app-contracts/src/index.ts | 15 +- packages/app-contracts/src/prod/index.ts | 37 ++- .../src/prod/{ => tokens}/eos-bitusd.ts | 4 +- .../src/prod/{ => tokens}/eos-usdt.ts | 4 +- .../app-contracts/src/prod/tokens/usdc.ts | 106 ++++++++ .../app-contracts/src/prod/tokens/usdt.ts | 212 ++++++++++++++++ packages/app-contracts/src/prod/usdc.ts | 181 -------------- packages/app-contracts/src/prod/usdt.ts | 171 ------------- packages/app-contracts/src/types.ts | 3 + packages/app-env/src/chains.ts | 12 +- packages/app-env/src/env.ts | 13 +- packages/app-lib/tsconfig.json | 2 +- 141 files changed, 2273 insertions(+), 1537 deletions(-) rename apps/indexer/src/lib/{evm-client.ts => issuer-client.ts} (63%) create mode 100644 apps/supabase/migrations/20240805231931_remote_schema.sql create mode 100644 apps/webapp/app/(routes)/[lang]/[project]/auction/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/[project]/presale/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/[project]/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/about/about-bitlauncher/page.tsx create mode 100644 apps/webapp/app/(routes)/[lang]/about/ai-startups/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/about/bitcash-app/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/about/communities/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/about/daos-dboard/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/about/investors/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/about/referrals/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/blog/[category]/[slug]/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/blog/[category]/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/blog/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/in/early-access/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/learn/batch-auctions/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/learn/developers/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/learn/media/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/learn/security/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/learn/tokenization/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/legal/privacy/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/legal/terms/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/wallet/sitemap.ts create mode 100644 apps/webapp/app/(routes)/[lang]/whitepaper/sitemap.ts create mode 100644 apps/webapp/app/actions/save-deposit.ts create mode 100644 apps/webapp/components/routes/about/about-bitlauncher/index.tsx create mode 100644 apps/webapp/components/shared/banner.tsx create mode 100644 apps/webapp/components/shared/community-card.tsx create mode 100644 apps/webapp/dictionaries/en/batch-auction.ts create mode 100644 apps/webapp/hooks/use-mobile-navigation.tsx create mode 100644 apps/webapp/public/images/info-bg-about.webp create mode 100644 apps/webapp/public/images/info-bg-security.webp create mode 100644 apps/webapp/public/images/info-bg-whitepaper.webp create mode 100755 hardhat/erc20-token/bun.lockb create mode 100644 hardhat/erc20-token/contracts/BLPLToken.sol create mode 100644 hardhat/erc20-token/scripts/deployBLPL.js create mode 100644 hardhat/erc20-token/tsconfig.json rename packages/app-contracts/src/dev/{ => auction}/testnet-allow-list.ts (94%) rename packages/app-contracts/src/dev/{ => auction}/testnet-deposit-order.ts (94%) rename packages/app-contracts/src/dev/{ => auction}/testnet-easy-auction.ts (99%) rename packages/app-contracts/src/dev/{ => tokens}/eos-fake-bitusd.ts (72%) rename packages/app-contracts/src/dev/{ => tokens}/eos-fake-usdt.ts (72%) rename packages/app-contracts/src/dev/{ => tokens}/sepolia-usdt.ts (98%) create mode 100644 packages/app-contracts/src/dev/tokens/testnet-blpl.ts rename packages/app-contracts/src/dev/{ => tokens}/testnet-mbots-prelaunch.ts (98%) rename packages/app-contracts/src/dev/{ => tokens}/testnet-usd-cred.ts (98%) rename packages/app-contracts/src/dev/{ => tokens}/testnet-usdt.ts (97%) delete mode 100644 packages/app-contracts/src/dev/usdc.ts delete mode 100644 packages/app-contracts/src/dev/usdt.ts rename packages/app-contracts/src/prod/{ => tokens}/eos-bitusd.ts (72%) rename packages/app-contracts/src/prod/{ => tokens}/eos-usdt.ts (73%) create mode 100644 packages/app-contracts/src/prod/tokens/usdc.ts create mode 100644 packages/app-contracts/src/prod/tokens/usdt.ts delete mode 100644 packages/app-contracts/src/prod/usdc.ts delete mode 100644 packages/app-contracts/src/prod/usdt.ts diff --git a/apps/indexer/.env-sample b/apps/indexer/.env-sample index 8d6c745e8..f2a93eb39 100644 --- a/apps/indexer/.env-sample +++ b/apps/indexer/.env-sample @@ -4,3 +4,4 @@ SEPOLIA_RPC=https://eth-sepolia.g.alchemy.com/v2/xxx ISSUER_KEY=xxx ISSUER_ADDRESS=0x DFUSE_API_KEY=server_xxx +ALCHEMY_API_KEY=xxx \ No newline at end of file diff --git a/apps/indexer/Dockerfile b/apps/indexer/Dockerfile index e686d7c2b..9a132e851 100644 --- a/apps/indexer/Dockerfile +++ b/apps/indexer/Dockerfile @@ -11,7 +11,6 @@ COPY apps/indexer/package.json ./apps/indexer/package.json COPY packages/app-env/package.json ./packages/app-env/package.json COPY packages/app-contracts/package.json ./packages/app-contracts/package.json COPY packages/app-lib/package.json ./packages/app-lib/package.json -COPY packages/tsconfig/package.json ./packages/tsconfig/package.json COPY packages/config-typescript/package.json ./packages/config-typescript/package.json COPY packages/config-eslint/package.json ./packages/config-eslint/package.json diff --git a/apps/indexer/package.json b/apps/indexer/package.json index ca2e8f2c2..c89d5e6a9 100644 --- a/apps/indexer/package.json +++ b/apps/indexer/package.json @@ -19,15 +19,15 @@ "@repo/supabase": "workspace:*", "@sentry/node": "^8.19.0", "@supabase/supabase-js": "^2.44.4", + "app-contracts": "workspace:*", + "app-env": "workspace:*", + "app-lib": "workspace:*", "axios": "^1.7.2", "bn.js": "^5.2.1", "express": "^4.19.2", "lodash": "^4.17.21", "node-fetch": "2.6.4", "resend": "^3.5.0", - "app-contracts": "workspace:*", - "app-env": "workspace:*", - "app-lib": "workspace:*", "viem": "latest", "ws": "^8.18.0" }, diff --git a/apps/indexer/src/index.ts b/apps/indexer/src/index.ts index 3041c421b..c342c6ba3 100644 --- a/apps/indexer/src/index.ts +++ b/apps/indexer/src/index.ts @@ -1,14 +1,16 @@ import { getErrorMessage } from 'app-lib' -import { startAuctionIndexer } from './modules/auction' +// import { startAuctionIndexer } from './modules/auction' import { startSwapsService } from './modules/swaps' import { startExpress } from './routes/healthcheck' +import { startPresaleService } from './modules/presale' async function main() { console.log(`Launchpad indexer starting up ...`) try { startExpress() - startAuctionIndexer() + startPresaleService() startSwapsService() + // startAuctionIndexer() } catch (error) { console.log('ERROR:' + getErrorMessage(error), JSON.stringify(error)) } diff --git a/apps/indexer/src/lib/evm-client.ts b/apps/indexer/src/lib/issuer-client.ts similarity index 63% rename from apps/indexer/src/lib/evm-client.ts rename to apps/indexer/src/lib/issuer-client.ts index 2eae608e7..10abb03ab 100644 --- a/apps/indexer/src/lib/evm-client.ts +++ b/apps/indexer/src/lib/issuer-client.ts @@ -1,13 +1,7 @@ import { http, createPublicClient, PublicClient, createWalletClient } from 'viem' -import { sepolia } from 'viem/chains' import { appenv } from '../config' import { eosEvmTestnet } from 'app-env' -export const client: PublicClient = createPublicClient({ - chain: eosEvmTestnet, - transport: http(), -}) - export const walletClient = createWalletClient({ chain: eosEvmTestnet, transport: http(), @@ -15,20 +9,12 @@ export const walletClient = createWalletClient({ account: appenv.evm.issuerAccount, }) -export const sepoliaClient: PublicClient = createPublicClient({ - chain: { - ...sepolia, - rpcUrls: { - default: { - http: [appenv.evm.sepoliaApi], - }, - }, - }, - transport: http(), -}) - export async function getCurrentBlockHeight() { try { + const client = createPublicClient({ + chain: eosEvmTestnet, + transport: http(), + }) const blockNumber = await client.getBlockNumber() return blockNumber } catch (error) { diff --git a/apps/indexer/src/lib/supabase-client.ts b/apps/indexer/src/lib/supabase-client.ts index 00bbbf6d1..217c8e482 100644 --- a/apps/indexer/src/lib/supabase-client.ts +++ b/apps/indexer/src/lib/supabase-client.ts @@ -42,3 +42,17 @@ export async function upsertOrder(data: TablesInsert<'order'>) { return data } + +export async function upsertTransfers(data: TablesInsert<'transfer'>) { + console.log('upsert transfers', data) + const { data: result, error } = await supabase + .from('transfer') + .upsert(data, { onConflict: 'trx_hash' }) + .select() + + if (error) console.error('Error:', error) + + console.log('Result:', result) + + return data +} diff --git a/apps/indexer/src/lib/utils.ts b/apps/indexer/src/lib/utils.ts index c1046d5c1..70cf5a84a 100644 --- a/apps/indexer/src/lib/utils.ts +++ b/apps/indexer/src/lib/utils.ts @@ -1,7 +1,7 @@ import fs from 'fs/promises' import { erc20Abi } from 'abitype/abis' -import { client } from './evm-client' -import { Abi, Address, parseUnits } from 'viem' +import {Abi, Address, parseUnits, http, createPublicClient} from 'viem'; +import {eosEvmTestnet} from 'app-env'; export async function writeToFile(data: string, filePath: string) { try { @@ -38,6 +38,10 @@ export function runPromisesInSeries( } export async function getTokenDetails({ address }: { address: Address }) { + const client = createPublicClient({ + chain: eosEvmTestnet, + transport: http(), + }) const results = await client.multicall({ contracts: [ { diff --git a/apps/indexer/src/modules/auction/auction-indexer.ts b/apps/indexer/src/modules/auction/auction-indexer.ts index ca8c399b1..bdd344051 100644 --- a/apps/indexer/src/modules/auction/auction-indexer.ts +++ b/apps/indexer/src/modules/auction/auction-indexer.ts @@ -1,5 +1,4 @@ -import { Log, stringify } from 'viem' -import { client } from '~/lib/evm-client' +import {Log, stringify, http, createPublicClient} from 'viem'; import { TestnetEasyAuction } from 'app-contracts' import { bigintToPostgresTimestamp, @@ -7,8 +6,7 @@ import { getTokenDetails, runPromisesInSeries, } from '~/lib/utils' -import { NewAuctionEvent, NewSellOrderEvent, NewUserEvent } from '~/modules/auction/auction.type' - +import { NewAuctionEvent, NewSellOrderEvent, NewUserEvent } from './auction.type' import BN from 'bn.js' import { eosEvmTestnet } from 'app-env' import { upsertAuctionDetail, upsertOrder } from '~/lib/supabase-client' @@ -16,6 +14,12 @@ import { upsertAuctionDetail, upsertOrder } from '~/lib/supabase-client' export async function startAuctionIndexer() { console.log('indexing starting') + // TODO: create client for + const client = createPublicClient({ + chain: eosEvmTestnet, + transport: http(), + }) + // await writeToFile(stringify(TestnetEasyAuction.getEvents(), null, 2), './events.json') // Get historical event logs const blockNumber = await client.getBlockNumber() diff --git a/apps/indexer/src/modules/auction/easyauction.ts b/apps/indexer/src/modules/auction/easyauction.ts index 804fe5287..4bf6717f4 100644 --- a/apps/indexer/src/modules/auction/easyauction.ts +++ b/apps/indexer/src/modules/auction/easyauction.ts @@ -1,6 +1,11 @@ -import { getContract } from 'viem' -import { client } from '../../lib/evm-client' +import {getContract, http, createPublicClient} from 'viem'; import { TestnetEasyAuction } from 'app-contracts' +import {eosEvmTestnet} from 'app-env'; + + const client = createPublicClient({ + chain: eosEvmTestnet, + transport: http(), + }) export const easyAuction = getContract({ ...TestnetEasyAuction, diff --git a/apps/indexer/src/modules/presale/eos-contributions.ts b/apps/indexer/src/modules/presale/eos-contributions.ts index a70535d2f..270ed8f4a 100644 --- a/apps/indexer/src/modules/presale/eos-contributions.ts +++ b/apps/indexer/src/modules/presale/eos-contributions.ts @@ -1,13 +1,13 @@ import { smartsaleEnv } from 'app-env' import { stringify } from 'viem/utils' import { createFirehoseSubscription } from '~/lib/dfuse-client' -import { issueTokens } from './presale-issuer' +import { issuePresaleTokens } from './presale-issuer' // https://docs.dfuse.eosnation.io/platform/public-apis/search-query-language/ // https://docs.dfuse.eosnation.io/eosio/public-apis/reference/search/terms/ // receiver: means the account with code that has executed the action. export async function listenToEosContributions(env: 'test' | 'prod' = 'test') { - const usdt = smartsaleEnv[env].usdt.find((t) => (t.chainType = 'antelope'))?.address + const usdt = smartsaleEnv[env].stables.find((t) => (t.chainType = 'antelope'))?.address const bank = smartsaleEnv[env].bitcash.bank const launchpad = smartsaleEnv[env].smartsale.bk @@ -30,7 +30,7 @@ export async function listenToEosContributions(env: 'test' | 'prod' = 'test') { async function handleDeposit(data: { trxId: string; from: string; quantity: string }) { console.log('handle deposit', data) - const response = await issueTokens( + const response = await issuePresaleTokens( '0x7472312e4e1a373df751f84bd871a4c7a16128fa', BigInt(data.quantity), ) diff --git a/apps/indexer/src/modules/presale/evm-contributions.ts b/apps/indexer/src/modules/presale/evm-contributions.ts index 86880c854..ea6c0b8f8 100644 --- a/apps/indexer/src/modules/presale/evm-contributions.ts +++ b/apps/indexer/src/modules/presale/evm-contributions.ts @@ -1,12 +1,12 @@ -import { EVMTokenContractData, SepoliaUSDT, TestnetUSDT } from 'app-contracts' +import { EVMTokenContractData, appContracts } from 'app-contracts' import { runPromisesInSeries } from '~/lib/utils' - import { Address, Log, PublicClient, createPublicClient, http, parseAbiItem, stringify } from 'viem' import { TransferEvent } from '~/modules/auction/auction.type' -import { sepolia } from 'viem/chains' -import { smartsaleChains } from 'app-env' +import { upsertTransfers } from '~/lib/supabase-client' +import { issuePresaleTokens } from './presale-issuer' -const tokens: EVMTokenContractData[] = [SepoliaUSDT, TestnetUSDT] +const presaleWallet = '0xf7bb6BD787FFbA43539219560E3B8162Ba8EEF09' +const tokens: EVMTokenContractData[] = appContracts.dev.tokens.evm && appContracts.prod.tokens.evm export async function listenToEvmContributions() { console.log('subscribing to evm usdt transfers ...') @@ -14,27 +14,26 @@ export async function listenToEvmContributions() { } async function listenToEvmTransfersFn(token: EVMTokenContractData) { - const chain = smartsaleChains.dev.get(token.chainId) - if (!chain) return - console.log(`listening usdt transfers for token ${token.symbol} on chain ${chain.name}`) + console.log(`listening usdt transfers for token ${token.symbol} on chain ${token.chain.name}`) const client: PublicClient = createPublicClient({ - chain, + chain: token.chain, transport: http(), }) try { + const latestBlock = await client.getBlockNumber() const logs = await client.getLogs({ address: token.address, event: parseAbiItem( 'event Transfer(address indexed from, address indexed to, uint256 value)', ), args: { - to: '0x2C9DAAb3F463d6c6D248aCbeaAEe98687936374a', + to: presaleWallet, }, - fromBlock: BigInt(token.indexFromBlock), + fromBlock: latestBlock, }) // delay prevents idempotent transactions: - processLogs(logs, 3000) + processLogs(logs, token, 3000) // Watch for new event logs client.watchEvent({ @@ -43,11 +42,11 @@ async function listenToEvmTransfersFn(token: EVMTokenContractData) { 'event Transfer(address indexed from, address indexed to, uint256 value)', ), args: { - to: '0x2C9DAAb3F463d6c6D248aCbeaAEe98687936374a', + to: presaleWallet, }, onLogs: (logs) => { - console.log('real time transfer', stringify(logs, null, 2)) - processLogs(logs) + console.log('real time transfer') // stringify(logs, null, 2) + processLogs(logs, token) }, }) } catch (error) { @@ -57,14 +56,15 @@ async function listenToEvmTransfersFn(token: EVMTokenContractData) { // takes the generic logs and if the eventName matches one of the eventHandlers keys // it passes the log to corresponding hanlder function -async function processLogs(logs: Log[], delay = 0) { +async function processLogs(logs: Log[], token: EVMTokenContractData, delay = 0) { const actions = logs .map((log) => { const eventName = (log as any).eventName.toString() + if (!(eventName in eventHandlers)) return null return async () => { try { - eventHandlers[eventName] && eventHandlers[eventName](log) + eventHandlers[eventName] && eventHandlers[eventName](log, token) } catch (error) { //TODO: sent sentry reports console.error(error) @@ -76,42 +76,32 @@ async function processLogs(logs: Log[], delay = 0) { runPromisesInSeries(actions, delay) } -const eventHandlers: { [key: string]: (log: any) => void } = { +const eventHandlers: { [key: string]: (log: any, token: EVMTokenContractData) => void } = { Transfer: handleTransfer, } -async function handleTransfer(log: TransferEvent) { - const data = { +async function handleTransfer(log: TransferEvent, token: EVMTokenContractData) { + console.log('handle transfer', log) + const bl_presale_trx = (await issuePresaleTokens( + log.args.from as Address, + log.args.value, + )) as Address + + upsertTransfers({ trx_hash: log.transactionHash!, from: log.args.from as Address, to: log.args.to as Address, - amount: log.args.value, + amount: Number(log.args.value), token: log.address, - chain_id: sepolia.id, - type: 'deposit', - } - - // const result = await db.transfers.upsert({ - // where: { - // trx_hash: log.transactionHash!, - // }, - // update: data, - // create: data, - // }) + chain_id: token.chainId, + type: 'presale', + bl_presale_trx, + }) // console.log('result', result) // if (result.usdcred_trx || data.from === '0x0000000000000000000000000000000000000000') return - // const usdcred_trx = (await issueTokens(data.from, data.amount)) as Address - - // if (!usdcred_trx) return - - // await db.transfers.update({ - // where: { - // trx_hash: log.transactionHash!, - // }, - // data: { usdcred_trx }, - // }) + // // console.log('tokens issued', { usdcred_trx, trx: log.transactionHash }) } diff --git a/apps/indexer/src/modules/presale/index.ts b/apps/indexer/src/modules/presale/index.ts index b32750218..370ee565c 100644 --- a/apps/indexer/src/modules/presale/index.ts +++ b/apps/indexer/src/modules/presale/index.ts @@ -2,6 +2,7 @@ import { listenToEosContributions } from './eos-contributions' import { listenToEvmContributions } from './evm-contributions' export function startPresaleService() { - listenToEosContributions() + console.log('starting presale service') + // listenToEosContributions() listenToEvmContributions() } diff --git a/apps/indexer/src/modules/presale/presale-issuer.ts b/apps/indexer/src/modules/presale/presale-issuer.ts index 1014aebf9..e53995de3 100644 --- a/apps/indexer/src/modules/presale/presale-issuer.ts +++ b/apps/indexer/src/modules/presale/presale-issuer.ts @@ -1,10 +1,10 @@ -import { TestnetUSDCred } from 'app-contracts' +import { TestnetBLPL } from 'app-contracts' import { eosEvmTestnet } from 'app-env' import { createWalletClient } from 'viem' import { appenv } from '~/config' import { Address, http } from 'viem' -export async function issueTokens(to: Address, amount: bigint) { +export async function issuePresaleTokens(to: Address, amount: bigint) { console.log('issueTokens', { args: [to, amount], }) @@ -17,8 +17,8 @@ export async function issueTokens(to: Address, amount: bigint) { account: appenv.evm.issuerAccount, }) return walletClient.writeContract({ - address: TestnetUSDCred.address, - abi: TestnetUSDCred.abi, + address: TestnetBLPL.address, + abi: TestnetBLPL.abi, functionName: 'issue', args: [to, amount], }) diff --git a/apps/indexer/src/modules/swaps/eos-transfers.ts b/apps/indexer/src/modules/swaps/eos-transfers.ts index 412704775..407d74307 100644 --- a/apps/indexer/src/modules/swaps/eos-transfers.ts +++ b/apps/indexer/src/modules/swaps/eos-transfers.ts @@ -7,7 +7,7 @@ import { issueTokens } from './cred-issuer' // https://docs.dfuse.eosnation.io/eosio/public-apis/reference/search/terms/ // receiver: means the account with code that has executed the action. export async function listenToEosTransfers(env: 'test' | 'prod' = 'test') { - const usdt = smartsaleEnv[env].usdt.find((t) => (t.chainType = 'antelope'))?.address + const usdt = smartsaleEnv[env].stables.find((t) => (t.chainType = 'antelope'))?.address const bank = smartsaleEnv[env].bitcash.bank const launchpad = smartsaleEnv[env].smartsale.bk diff --git a/apps/indexer/src/modules/swaps/evm-transfers.ts b/apps/indexer/src/modules/swaps/evm-transfers.ts index 84615820b..94796bc4d 100644 --- a/apps/indexer/src/modules/swaps/evm-transfers.ts +++ b/apps/indexer/src/modules/swaps/evm-transfers.ts @@ -1,12 +1,12 @@ -import { EVMTokenContractData, SepoliaUSDT, TestnetUSDT } from 'app-contracts' +import { EVMTokenContractData, SepoliaUSDT, TestnetUSDT, appContracts } from 'app-contracts' import { runPromisesInSeries } from '~/lib/utils' import { Address, Log, PublicClient, createPublicClient, http, parseAbiItem, stringify } from 'viem' import { TransferEvent } from '~/modules/auction/auction.type' import { sepolia } from 'viem/chains' -import { smartsaleChains } from 'app-env' +import { appChains } from 'app-env' -const tokens: EVMTokenContractData[] = [SepoliaUSDT, TestnetUSDT] +const tokens: EVMTokenContractData[] = appContracts.dev.tokens.evm export async function listenToEvmTransfers() { console.log('subscribing to evm usdt transfers ...') @@ -14,7 +14,7 @@ export async function listenToEvmTransfers() { } async function listenToEvmTransfersFn(token: EVMTokenContractData) { - const chain = smartsaleChains.dev.get(token.chainId) + const chain = appChains.dev.get(token.chainId) if (!chain) return console.log(`listening usdt transfers for token ${token.symbol} on chain ${chain.name}`) const client: PublicClient = createPublicClient({ diff --git a/apps/indexer/src/routes/healthcheck.ts b/apps/indexer/src/routes/healthcheck.ts index 80ac68115..84f683f7f 100644 --- a/apps/indexer/src/routes/healthcheck.ts +++ b/apps/indexer/src/routes/healthcheck.ts @@ -1,5 +1,5 @@ import express from 'express' -import { getCurrentBlockHeight } from '../lib/evm-client' +import { getCurrentBlockHeight } from '../lib/issuer-client' export function startExpress() { const app = express() diff --git a/apps/supabase/migrations/20240805231931_remote_schema.sql b/apps/supabase/migrations/20240805231931_remote_schema.sql new file mode 100644 index 000000000..ca26d1e41 --- /dev/null +++ b/apps/supabase/migrations/20240805231931_remote_schema.sql @@ -0,0 +1,7 @@ +alter table "public"."transfer" add column "bl_presale_trx" text; + +CREATE UNIQUE INDEX transfer_bl_presale_trx_key ON public.transfer USING btree (bl_presale_trx); + +alter table "public"."transfer" add constraint "transfer_bl_presale_trx_key" UNIQUE using index "transfer_bl_presale_trx_key"; + + diff --git a/apps/supabase/package.json b/apps/supabase/package.json index 66439ed3f..941fba6ff 100644 --- a/apps/supabase/package.json +++ b/apps/supabase/package.json @@ -7,7 +7,7 @@ "types": "./src/index.ts", "scripts": { "build": "bun run types && bun run schemas", - "types": "supabase gen types gen types --lang=typescript --project-id mitkjznioyrucenuzsdb > src/supa.types.ts", + "types": "supabase gen types gen types --lang=typescript --project-id jvpdyxpjpodxsuvhufpw > src/supa.types.ts", "schemas": "supabase-to-zod --input src/supa.types.ts --output src/supa.schemas.ts", "fake": "bun run ./scripts/fake-orders.ts" }, diff --git a/apps/supabase/src/supa.schemas.ts b/apps/supabase/src/supa.schemas.ts index 714fe1a2f..f47a1ead2 100644 --- a/apps/supabase/src/supa.schemas.ts +++ b/apps/supabase/src/supa.schemas.ts @@ -261,6 +261,7 @@ export const sessionRelationshipsSchema = z.tuple([]); export const transferRowSchema = z.object({ amount: z.number().nullable(), + bl_presale_trx: z.string().nullable(), chain_id: z.number().nullable(), created_at: z.string(), from: z.string().nullable(), @@ -273,6 +274,7 @@ export const transferRowSchema = z.object({ export const transferInsertSchema = z.object({ amount: z.number().optional().nullable(), + bl_presale_trx: z.string().optional().nullable(), chain_id: z.number().optional().nullable(), created_at: z.string().optional(), from: z.string().optional().nullable(), @@ -285,6 +287,7 @@ export const transferInsertSchema = z.object({ export const transferUpdateSchema = z.object({ amount: z.number().optional().nullable(), + bl_presale_trx: z.string().optional().nullable(), chain_id: z.number().optional().nullable(), created_at: z.string().optional(), from: z.string().optional().nullable(), diff --git a/apps/supabase/src/supa.types.ts b/apps/supabase/src/supa.types.ts index d8df33a53..e8d3dddae 100644 --- a/apps/supabase/src/supa.types.ts +++ b/apps/supabase/src/supa.types.ts @@ -243,6 +243,7 @@ export type Database = { transfer: { Row: { amount: number | null + bl_presale_trx: string | null chain_id: number | null created_at: string from: string | null @@ -254,6 +255,7 @@ export type Database = { } Insert: { amount?: number | null + bl_presale_trx?: string | null chain_id?: number | null created_at?: string from?: string | null @@ -265,6 +267,7 @@ export type Database = { } Update: { amount?: number | null + bl_presale_trx?: string | null chain_id?: number | null created_at?: string from?: string | null diff --git a/apps/webapp/.env.development b/apps/webapp/.env.development index 1aeb13b56..d80266380 100644 --- a/apps/webapp/.env.development +++ b/apps/webapp/.env.development @@ -1,5 +1,5 @@ NEXT_PUBLIC_ENABLE_WALLET_REDIRECT=true - NEXT_PUBLIC_FEAT_NEW_NAV_STRUCT=true + NEXT_PUBLIC_FEAT_NEW_NAV_STRUCT=false NEXT_PUBLIC_FEAT_PRESALE=true NEXT_PUBLIC_NEW_SECTIONS=true NEXT_PUBLIC_LEARN_SECTION=true diff --git a/apps/webapp/.gitignore b/apps/webapp/.gitignore index dd019e403..94f918b2e 100644 --- a/apps/webapp/.gitignore +++ b/apps/webapp/.gitignore @@ -36,3 +36,5 @@ yarn-error.log* .vercel .vscode .env*.local + +.vercel diff --git a/apps/webapp/app/(routes)/[lang]/[project]/auction/page.tsx b/apps/webapp/app/(routes)/[lang]/[project]/auction/page.tsx index 07b51b225..b9e28b74e 100644 --- a/apps/webapp/app/(routes)/[lang]/[project]/auction/page.tsx +++ b/apps/webapp/app/(routes)/[lang]/[project]/auction/page.tsx @@ -1,5 +1,5 @@ import { getDictionary } from '@/dictionaries' -import { Lang, locales } from '@/dictionaries/locales' +import { locales } from '@/dictionaries/locales' import { AuctionBids } from '@/components/routes/project/auction/auction-bids' import { AuctionDataCard } from '@/components/routes/project/auction/auction-data-card' import { ProjectHeader } from '@/components/routes/project/project-header' @@ -18,6 +18,7 @@ import { getProjects } from '@/lib/projects' import { redirect } from 'next/navigation' +import { ProjectPageProps, ProjectPageParams } from '@/types/routing.type' export default async function AuctionPage({ params }: ProjectPageProps) { const dict = await getDictionary(params.lang) @@ -73,8 +74,3 @@ export async function generateStaticParams(): Promise { return params } - -type ProjectPageParams = { project: string; lang: Lang } -type ProjectPageProps = { - params: ProjectPageParams -} diff --git a/apps/webapp/app/(routes)/[lang]/[project]/auction/sitemap.ts b/apps/webapp/app/(routes)/[lang]/[project]/auction/sitemap.ts new file mode 100644 index 000000000..777efd9c7 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/[project]/auction/sitemap.ts @@ -0,0 +1,16 @@ +import { MetadataRoute } from 'next' +import { getDictionary } from '@/dictionaries' +import { getProjects } from '@/lib/projects' +import { ProjectPageProps } from '@/types/routing.type' + +export default async function sitemap({ + params +}: ProjectPageProps): Promise { + const dict = await getDictionary(params.lang) + const projects = await getProjects(dict) + + return projects.map(project => ({ + url: `https://${process.env.VERCEL_URL}/${params.lang}/${project.slug}/auction`, + lastModified: new Date() + })) +} diff --git a/apps/webapp/app/(routes)/[lang]/[project]/layout.tsx b/apps/webapp/app/(routes)/[lang]/[project]/layout.tsx index d31400a25..f4de8194e 100644 --- a/apps/webapp/app/(routes)/[lang]/[project]/layout.tsx +++ b/apps/webapp/app/(routes)/[lang]/[project]/layout.tsx @@ -1,9 +1,9 @@ import { getDictionary } from '@/dictionaries' -import { Lang } from '@/dictionaries/locales' +import { ProjectPageProps, ProjectPagePropsWithChildren } from '@/types/routing.type' import { getProjectBySlug } from '@/lib/projects' import { Metadata } from 'next' -export default function ProjectPagesLayout({ children }: ProjectPageProps) { +export default function ProjectPagesLayout({ children }: ProjectPagePropsWithChildren) { return children } @@ -20,8 +20,3 @@ export async function generateMetadata({ } } } -interface ProjectPageProps { - children: React.ReactNode - params: ProjectPageParams -} -type ProjectPageParams = { project: string; lang: Lang } diff --git a/apps/webapp/app/(routes)/[lang]/[project]/page.tsx b/apps/webapp/app/(routes)/[lang]/[project]/page.tsx index 370b82b02..37afd7401 100644 --- a/apps/webapp/app/(routes)/[lang]/[project]/page.tsx +++ b/apps/webapp/app/(routes)/[lang]/[project]/page.tsx @@ -8,10 +8,11 @@ import { Countdown } from '@/components/shared/countdown' import Link from 'next/link' import dynamic from 'next/dynamic' import { Button } from '@/components/ui/button' -import { Lang, locales } from '@/dictionaries/locales' +import { locales } from '@/dictionaries/locales' import { getDictionary } from '@/dictionaries' import { appConfig } from '@/lib/config' import Image from 'next/image' +import { ProjectPageProps, ProjectPageParams } from '@/types/routing.type' export default async function ProjectPage({ params }: ProjectPageProps) { const dict = await getDictionary(params.lang) @@ -130,11 +131,6 @@ export async function generateStaticParams(): Promise { return params } -type ProjectPageParams = { project: string; lang: Lang } -type ProjectPageProps = { - params: ProjectPageParams -} - const DynamicAddressForm = dynamic( () => import('../../../../components/routes/project/register-address-form').then( diff --git a/apps/webapp/app/(routes)/[lang]/[project]/presale/page.tsx b/apps/webapp/app/(routes)/[lang]/[project]/presale/page.tsx index 72ad4cd15..37c871adc 100644 --- a/apps/webapp/app/(routes)/[lang]/[project]/presale/page.tsx +++ b/apps/webapp/app/(routes)/[lang]/[project]/presale/page.tsx @@ -5,7 +5,7 @@ import { Card, CardContent } from '@/components/ui/card' import { Countdown } from '@/components/shared/countdown' import { ProjectPresaleData } from '@/components/routes/project/project-presale-data' import { PresaleTransactionsCard } from '@/components/routes/project/presale/presale-transactions-card' -import { Lang } from '@/dictionaries/locales' +import { ProjectPageProps } from '@/types/routing.type' import { getDictionary } from '@/dictionaries' import { PresaleDepositCard } from '@/components/routes/project/presale/presale-deposit-card' @@ -20,7 +20,7 @@ export default async function ProjectPage({ params }: ProjectPageProps) { return (
-
+
@@ -36,7 +36,3 @@ export default async function ProjectPage({ params }: ProjectPageProps) {
) } - -type ProjectPageProps = { - params: { project: string; lang: Lang } -} diff --git a/apps/webapp/app/(routes)/[lang]/[project]/presale/sitemap.ts b/apps/webapp/app/(routes)/[lang]/[project]/presale/sitemap.ts new file mode 100644 index 000000000..f140d8c2a --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/[project]/presale/sitemap.ts @@ -0,0 +1,16 @@ +import { MetadataRoute } from 'next' +import { getDictionary } from '@/dictionaries' +import { getProjects } from '@/lib/projects' +import { ProjectPageProps } from '@/types/routing.type' + +export default async function sitemap({ + params +}: ProjectPageProps): Promise { + const dict = await getDictionary(params.lang) + const projects = await getProjects(dict) + + return projects.map(project => ({ + url: `https://${process.env.VERCEL_URL}/${params.lang}/${project.slug}/presale`, + lastModified: new Date() + })) +} diff --git a/apps/webapp/app/(routes)/[lang]/[project]/sitemap.ts b/apps/webapp/app/(routes)/[lang]/[project]/sitemap.ts new file mode 100644 index 000000000..ce5dcd70e --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/[project]/sitemap.ts @@ -0,0 +1,16 @@ +import { MetadataRoute } from 'next' +import { getDictionary } from '@/dictionaries' +import { getProjects } from '@/lib/projects' +import { ProjectPageProps } from '@/types/routing.type' + +export default async function sitemap({ + params +}: ProjectPageProps): Promise { + const dict = await getDictionary(params.lang) + const projects = await getProjects(dict) + + return projects.map(project => ({ + url: `https://${process.env.VERCEL_URL}/${params.lang}/${project.slug}`, + lastModified: new Date() + })) +} diff --git a/apps/webapp/app/(routes)/[lang]/about/about-bitlauncher/page.tsx b/apps/webapp/app/(routes)/[lang]/about/about-bitlauncher/page.tsx new file mode 100644 index 000000000..28dc10fca --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/about/about-bitlauncher/page.tsx @@ -0,0 +1,49 @@ +import { + AboutBitlauncherPageContent, + AboutBitlauncherPageLanding +} from '@/components/routes/about/about-bitlauncher' +import { getDictionary } from '@/dictionaries' +import { CommonPageProps } from '@/types/routing.type' +import { Metadata } from 'next' + +export default async function AboutBitlauncher({ params }: CommonPageProps) { + const dict = await getDictionary(params.lang) + return ( +
+ +
+ ) +} + +const content: AboutBitlauncherPageContent = { + title: 'About', + description: `Bitlauncher is a pioneering launchpad dedicated to transforming the landscape of artificial intelligence + (AI) and cryptocurrency. We are on a mission to empower the next wave of AI innovation by providing + open-source AI projects with equitable fundraising opportunities and decentralized organization through the use of + blockchain technology. + + At Bitlauncher, we combine the transformative powers of AI and cryptocurrency to address the unique challenges faced + by AI startups. By integrating tokenization and decentralized autonomous organizations (DAOs), we create a seamless + synergy that enables these startups to overcome funding barriers, accelerate their growth, and harness global resources. + + Our platform is built on a foundation of transparency, inclusivity, and community-driven progress. We foster a collaborative + environment where developers, investors, and AI enthusiasts can come together to share resources, exchange ideas, and shape + the future of technology.`, + image: { + alt: 'dBoard', + src: '/images/about-bg.svg', + width: 610, + height: 468 + } +} + +export const metadata: Metadata = { + title: 'Bitlauncher', + description: + 'Be part of the intelligent future and join the Ai/Web3 revolution now!' +} diff --git a/apps/webapp/app/(routes)/[lang]/about/ai-startups/sitemap.ts b/apps/webapp/app/(routes)/[lang]/about/ai-startups/sitemap.ts new file mode 100644 index 000000000..c5ab989b8 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/about/ai-startups/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/about/ai-startups`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/about/bitcash-app/sitemap.ts b/apps/webapp/app/(routes)/[lang]/about/bitcash-app/sitemap.ts new file mode 100644 index 000000000..7b9d07015 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/about/bitcash-app/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/about/bitcash-app`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/about/communities/sitemap.ts b/apps/webapp/app/(routes)/[lang]/about/communities/sitemap.ts new file mode 100644 index 000000000..a7de9fe94 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/about/communities/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/about/communities`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/about/daos-dboard/sitemap.ts b/apps/webapp/app/(routes)/[lang]/about/daos-dboard/sitemap.ts new file mode 100644 index 000000000..135bd3cc6 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/about/daos-dboard/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/about/daos-dboard`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/about/investors/sitemap.ts b/apps/webapp/app/(routes)/[lang]/about/investors/sitemap.ts new file mode 100644 index 000000000..cdc1e70ad --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/about/investors/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/about/investors`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/about/referrals/sitemap.ts b/apps/webapp/app/(routes)/[lang]/about/referrals/sitemap.ts new file mode 100644 index 000000000..6f35f9a56 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/about/referrals/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/about/referrals`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/blog/[category]/[slug]/page.tsx b/apps/webapp/app/(routes)/[lang]/blog/[category]/[slug]/page.tsx index c959e65f8..50ab18756 100644 --- a/apps/webapp/app/(routes)/[lang]/blog/[category]/[slug]/page.tsx +++ b/apps/webapp/app/(routes)/[lang]/blog/[category]/[slug]/page.tsx @@ -76,4 +76,4 @@ export async function generateStaticParams(): Promise { } type ArticlePageParams = { lang: Lang; category: string; slug: string } -type ArticlePageProps = { params: ArticlePageParams } +export type ArticlePageProps = { params: ArticlePageParams } diff --git a/apps/webapp/app/(routes)/[lang]/blog/[category]/[slug]/sitemap.ts b/apps/webapp/app/(routes)/[lang]/blog/[category]/[slug]/sitemap.ts new file mode 100644 index 000000000..e0e0ed8fb --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/blog/[category]/[slug]/sitemap.ts @@ -0,0 +1,23 @@ +import { MetadataRoute } from 'next' +import { getBlogCategoryLandingData } from '@/services/datocms' +import { ArticlePageProps } from './page' + +export default async function sitemap( + props: ArticlePageProps +): Promise { + const { + params: { lang, category } + } = props + const data = await getBlogCategoryLandingData(lang, category) + if (!data) return [] + + const { sections } = data + if (!sections) return [] + + const slugs = sections.map((section: any) => section.slug) + + return slugs.map((slug: any) => ({ + url: `https://${process.env.VERCEL_URL}/${lang}/blog/${category}/${slug}`, + lastModified: new Date() + })) +} diff --git a/apps/webapp/app/(routes)/[lang]/blog/[category]/page.tsx b/apps/webapp/app/(routes)/[lang]/blog/[category]/page.tsx index da788822a..d3e9b5541 100644 --- a/apps/webapp/app/(routes)/[lang]/blog/[category]/page.tsx +++ b/apps/webapp/app/(routes)/[lang]/blog/[category]/page.tsx @@ -70,4 +70,4 @@ export async function generateMetadata(props: any): Promise { } type CategoryPageParams = { lang: Lang; category: string } -type CategoryPageProps = { params: CategoryPageParams } +export type CategoryPageProps = { params: CategoryPageParams } diff --git a/apps/webapp/app/(routes)/[lang]/blog/[category]/sitemap.ts b/apps/webapp/app/(routes)/[lang]/blog/[category]/sitemap.ts new file mode 100644 index 000000000..f00a2da9b --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/blog/[category]/sitemap.ts @@ -0,0 +1,23 @@ +import { MetadataRoute } from 'next' +import { getArticleSections } from '@/services/datocms' +import { CategoryPageProps } from './page' + +export default async function sitemap( + props: CategoryPageProps +): Promise { + const { + params: { lang } + } = props + let sections = []; + try { + sections = await getArticleSections(lang); + } catch (error) { + return []; + } + + const categories = sections.map(section => section.slug) + return categories.map(category => ({ + url: `https://${process.env.VERCEL_URL}/${lang}/blog/${category}`, + lastModified: new Date() + })) +} diff --git a/apps/webapp/app/(routes)/[lang]/blog/sitemap.ts b/apps/webapp/app/(routes)/[lang]/blog/sitemap.ts new file mode 100644 index 000000000..2735e869c --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/blog/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/blog`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/in/early-access/sitemap.ts b/apps/webapp/app/(routes)/[lang]/in/early-access/sitemap.ts new file mode 100644 index 000000000..13712b59a --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/in/early-access/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/in/early-access`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/layout.tsx b/apps/webapp/app/(routes)/[lang]/layout.tsx index 6c668c59d..0bc61f4e2 100644 --- a/apps/webapp/app/(routes)/[lang]/layout.tsx +++ b/apps/webapp/app/(routes)/[lang]/layout.tsx @@ -2,18 +2,18 @@ import '@/app/globals.css' import Footer from '@/components/layout/footer/footer' import { Header } from '@/components/layout/header' import { Providers } from '@/components/layout/providers' +import { getDictionary } from '@/dictionaries' +import { locales } from '@/dictionaries/locales' import { cn } from '@/lib/utils' +import { CommonPageParams } from '@/types/routing.type' import { GoogleAnalytics } from '@next/third-parties/google' import '@rainbow-me/rainbowkit/styles.css' +import { Analytics } from '@vercel/analytics/react' +import { SpeedInsights } from '@vercel/speed-insights/next' +import type { Viewport } from 'next' import { Metadata } from 'next' import dynamic from 'next/dynamic' import React from 'react' -import { SpeedInsights } from '@vercel/speed-insights/next' -import { locales } from '@/dictionaries/locales' -import { Analytics } from '@vercel/analytics/react' -import { CommonPageParams } from '@/types/routing.type' -import { getDictionary } from '@/dictionaries' -import type { Viewport } from 'next' import { isMobile } from 'react-device-detect' import { Toaster } from 'react-hot-toast' import '../../globals.css' @@ -37,9 +37,8 @@ export default async function RootLayout({ lang={params.lang || 'en'} className={cn('tk-futura-pt max-w-full text-lg antialiased')} suppressHydrationWarning - style={{ width: '100vw', maxWidth: '100vw' }} > - + { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/learn/batch-auctions`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/learn/developers/sitemap.ts b/apps/webapp/app/(routes)/[lang]/learn/developers/sitemap.ts new file mode 100644 index 000000000..2e092e5c0 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/learn/developers/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/learn/developers`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/learn/media/sitemap.ts b/apps/webapp/app/(routes)/[lang]/learn/media/sitemap.ts new file mode 100644 index 000000000..63437ec44 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/learn/media/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/learn/media`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/learn/security/page.tsx b/apps/webapp/app/(routes)/[lang]/learn/security/page.tsx index 5cc364600..090fa90ce 100644 --- a/apps/webapp/app/(routes)/[lang]/learn/security/page.tsx +++ b/apps/webapp/app/(routes)/[lang]/learn/security/page.tsx @@ -4,22 +4,19 @@ import { PageContent } from '@/components/shared/content' import { CommonPageProps } from '@/types/routing.type' import { getDictionary } from '@/dictionaries' import { BgHeader } from '@/components/shared/bg-header' +import {WhyChooseUs} from '@/components/routes/home/why-choose-us'; export default async function SecurityTips({ params }: CommonPageProps) { const dict = await getDictionary(params.lang) const content = dict.security.content.slice(1) const heading = dict.security.content[0].text - // const subheading = dict.about.content[1].text return ( <> - -
+ subheading={'Be Part of the Intelligent Future'} imageSrc={''} /> +
diff --git a/apps/webapp/app/(routes)/[lang]/learn/security/sitemap.ts b/apps/webapp/app/(routes)/[lang]/learn/security/sitemap.ts new file mode 100644 index 000000000..28a0a6fdd --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/learn/security/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/learn/security`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/learn/tokenization/sitemap.ts b/apps/webapp/app/(routes)/[lang]/learn/tokenization/sitemap.ts new file mode 100644 index 000000000..73c37a637 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/learn/tokenization/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/learn/tokenization`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/legal/privacy/sitemap.ts b/apps/webapp/app/(routes)/[lang]/legal/privacy/sitemap.ts new file mode 100644 index 000000000..c157fc14f --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/legal/privacy/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/legal/privacy`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/legal/terms/sitemap.ts b/apps/webapp/app/(routes)/[lang]/legal/terms/sitemap.ts new file mode 100644 index 000000000..788ddb677 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/legal/terms/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/legal/terms`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/sitemap.ts b/apps/webapp/app/(routes)/[lang]/sitemap.ts new file mode 100644 index 000000000..678d2554f --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/wallet/page.tsx b/apps/webapp/app/(routes)/[lang]/wallet/page.tsx index e4804d928..aeafe5dab 100644 --- a/apps/webapp/app/(routes)/[lang]/wallet/page.tsx +++ b/apps/webapp/app/(routes)/[lang]/wallet/page.tsx @@ -1,5 +1,4 @@ import { DepositCard } from '@/components/routes/wallet/deposit-card' - import { WithdrawCard } from '@/components/routes/wallet/withdraw-card' import { Metadata } from 'next' @@ -14,27 +13,30 @@ import { import { BalancesTable } from '@/components/routes/wallet/balances-table' import { WalletTabs } from '@/components/routes/wallet/tabs' import { OrderCard } from '@/components/routes/wallet/order-card' +import { PresaleTransactionsCard } from '@/components/routes/project/presale/presale-transactions-card' export default function WalletPage() { return (
-
+
-
+
-
-
+ + + {/*
+
-
+
*/}
) } @@ -51,7 +53,7 @@ function BalancesCard() { Wallet Balances - You balances on the Bitcash | Bitlauncher ecosystem. Connect your + Your balances on the Bitcash | Bitlauncher ecosystem. Connect your Bitcash and EVM wallets. diff --git a/apps/webapp/app/(routes)/[lang]/wallet/sitemap.ts b/apps/webapp/app/(routes)/[lang]/wallet/sitemap.ts new file mode 100644 index 000000000..4c03c4163 --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/wallet/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/wallet`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/(routes)/[lang]/whitepaper/sitemap.ts b/apps/webapp/app/(routes)/[lang]/whitepaper/sitemap.ts new file mode 100644 index 000000000..11328434c --- /dev/null +++ b/apps/webapp/app/(routes)/[lang]/whitepaper/sitemap.ts @@ -0,0 +1,13 @@ +import { CommonPageProps } from '@/types/routing.type' +import { MetadataRoute } from 'next' + +export default async function sitemap({ + params +}: CommonPageProps): Promise { + return [ + { + url: `https://${process.env.VERCEL_URL}/${params.lang}/whitepaper`, + lastModified: new Date() + } + ] +} diff --git a/apps/webapp/app/actions/save-deposit.ts b/apps/webapp/app/actions/save-deposit.ts new file mode 100644 index 000000000..fa170b7b2 --- /dev/null +++ b/apps/webapp/app/actions/save-deposit.ts @@ -0,0 +1,46 @@ +'use server' + +import { createSupabaseServerClient } from '@/services/supabase' +import { Tables, TablesInsert, transferInsertSchema } from '@repo/supabase' + +export async function saveDeposit(transfer: TablesInsert<'transfer'>): Promise<{ + success: boolean + message: string + data?: Tables<'transfer'> + error?: any +}> { + try { + const parseResult = transferInsertSchema.safeParse(transfer) + if (!parseResult.success) { + return { + success: false, + message: 'Invalid transfer data', + error: parseResult.error.flatten() + } + } + + const supabase = await createSupabaseServerClient() + const { data, error } = await supabase + .from('transfer') + .upsert(parseResult.data, { onConflict: 'trx_hash' }) + .select() + + if (error) { + console.error('Supabase error:', error) + return { success: false, message: 'Database operation failed' } + } + + if (!data || data.length === 0) { + return { success: false, message: 'No data returned from database' } + } + + return { + success: true, + message: 'Deposit saved successfully', + data: data[0] + } + } catch (error) { + console.error('Unexpected error:', error) + return { success: false, message: 'An unexpected error occurred' } + } +} diff --git a/apps/webapp/app/globals.css b/apps/webapp/app/globals.css index 8fd23b9b2..9cbee940f 100644 --- a/apps/webapp/app/globals.css +++ b/apps/webapp/app/globals.css @@ -171,7 +171,7 @@ input[type='number'] { } .newsletter-wrapper { - @apply container flex flex-col items-center px-0 mx-auto rounded-3xl backdrop-blur-xl sm:text-center; + @apply mx-auto box-content flex flex-col items-center px-0 sm:rounded-3xl sm:text-center; background: url('/images/newsletter-bg.webp') center center no-repeat; background-size: cover; } @@ -181,7 +181,7 @@ input[type='number'] { } .content-container { - @apply flex flex-col w-full max-w-screen-md gap-10 px-5 py-10 mx-auto md:py-24; + @apply mx-auto flex w-full max-w-screen-md flex-col gap-10 px-5 py-10 md:py-24; } /** Scrollbar Styling */ @@ -291,24 +291,60 @@ input[type='number'] { height: calc(100vh - 64px) !important; width: 100vw; overflow: hidden; - @apply fixed inset-x-0 flex flex-col items-center pb-20 overflow-hidden top-16 justify-evenly bg-background; + @apply fixed inset-x-0 top-16 flex flex-col items-center justify-evenly overflow-hidden bg-background pb-20; } -/* BLUR EFFECT TO BACKGROUND CIRCLE */ +/* INFOPAGES BG COVER*/ +.infopages-background { + background-size: cover; + background-repeat: no-repeat; + + @apply relative left-0 top-0 flex h-[510px] w-full items-center justify-center rounded-[45px]; +} + +.infopages-background--whitepaper { + background-image: url('/images/info-bg-whitepaper.webp'); +} +.infopages-background--about { + background-image: url('/images/info-bg-about.webp'); +} +.infopages-background--security { + background-image: url('/images/info-bg-security.webp'); +} + +/* BLUR DOT EFFECT TO BACKGROUND CIRCLE UPCOMING SECTION */ .blur-effect-bg { - --size: 580px; + /* Default mobile size */ + --size: 320px; /* Smaller size for mobile */ --speed: 50s; --easing: cubic-bezier(0.8, 0.2, 0.2, 0.8); - min-width: var(--size); - min-height: var(--size); + width: var(--size); + height: var(--size); filter: blur(calc(var(--size) / 3)); background-image: linear-gradient( hsla(293, 64%, 44%, 1), hsla(293, 64%, 44%, 1) ); border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; - /* z-index: -1; */ + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); +} + +/* Medium devices (tablets, 768px and up) */ +@media (min-width: 768px) { + .blur-effect-bg { + --size: 460px; /* Intermediate size for tablets */ + } +} + +/* Large devices (desktops, 1400px and up) */ +@media (min-width: 1400px) { + .blur-effect-bg { + --size: 460px; /* Full size for desktop and beyond */ + } } .truncate_text { diff --git a/apps/webapp/app/sitemap.ts b/apps/webapp/app/sitemap.ts index b08660802..32ac63127 100644 --- a/apps/webapp/app/sitemap.ts +++ b/apps/webapp/app/sitemap.ts @@ -1,6 +1,6 @@ import { MetadataRoute } from 'next' -export default function sitemap(): MetadataRoute.Sitemap { +export default async function sitemap(): Promise { return [ { url: 'https://bitlauncher.ai', diff --git a/apps/webapp/components/layout/footer/faq.tsx b/apps/webapp/components/layout/footer/faq.tsx index a0bd0eb3c..2a83b6bf4 100644 --- a/apps/webapp/components/layout/footer/faq.tsx +++ b/apps/webapp/components/layout/footer/faq.tsx @@ -19,10 +19,10 @@ export function FAQ({ lang, dict }: FAQProps) { {dict.faq.questions.map( (item: { question: string; answer: string }, index: number) => ( - + {item.question} - + {item.answer} @@ -30,38 +30,6 @@ export function FAQ({ lang, dict }: FAQProps) { )}
- {/*
- {dict.faq.questions.map( - ( - item: { question: string; answer: string; additionalInfo?: string }, - index: number - ) => ( -
-

- - - - {item.question} -

-

{item.answer}

- {item.additionalInfo && ( -

- {item.additionalInfo} -

- )} -
- ) - )} -
*/} ) } diff --git a/apps/webapp/components/layout/footer/footer-links.tsx b/apps/webapp/components/layout/footer/footer-links.tsx index fcd900b78..0c042c51d 100644 --- a/apps/webapp/components/layout/footer/footer-links.tsx +++ b/apps/webapp/components/layout/footer/footer-links.tsx @@ -1,13 +1,13 @@ -import Link from 'next/link' -import { NavSection, NavItem, footerNavStruct } from '../nav-struct' import { IconBitlauncher } from '@/components/ui/icons' +import Link from 'next/link' +import { NavItem, NavSection, footerNavStruct } from '../nav-struct' export function FooterLinks() { return ( -
+
-

+

Be Part Of The Intelligent Future.

diff --git a/apps/webapp/components/layout/footer/footer.tsx b/apps/webapp/components/layout/footer/footer.tsx index 526960954..bab7cc013 100644 --- a/apps/webapp/components/layout/footer/footer.tsx +++ b/apps/webapp/components/layout/footer/footer.tsx @@ -1,11 +1,11 @@ -import { RecentArticles } from './recent' -import Participate from './participate' -import { FAQ } from './faq' -import dynamic from 'next/dynamic' -import { getDictionary } from '@/dictionaries' import { LearnSection } from '@/components/layout/footer/learn-section' -import { appConfig } from '@/lib/config' +import { getDictionary } from '@/dictionaries' import { Lang } from '@/dictionaries/locales' +import { appConfig } from '@/lib/config' +import dynamic from 'next/dynamic' +import { FAQ } from './faq' +import Participate from './participate' +import { RecentArticles } from './recent' const DynamicNewsletter = dynamic(() => import('./newsletter') as any, { ssr: false @@ -14,7 +14,7 @@ const DynamicNewsletter = dynamic(() => import('./newsletter') as any, { export default async function Footer({ params }: { params: { lang: Lang } }) { const dict = await getDictionary(params.lang) return ( -