diff --git a/apps/web/.eslintrc.js b/apps/launchpad/.eslintrc.js similarity index 100% rename from apps/web/.eslintrc.js rename to apps/launchpad/.eslintrc.js diff --git a/apps/web/.gitignore b/apps/launchpad/.gitignore similarity index 100% rename from apps/web/.gitignore rename to apps/launchpad/.gitignore diff --git a/apps/web/index.html b/apps/launchpad/index.html similarity index 89% rename from apps/web/index.html rename to apps/launchpad/index.html index e4b78ea..9d58d11 100644 --- a/apps/web/index.html +++ b/apps/launchpad/index.html @@ -4,7 +4,7 @@ - Vite + React + TS + Launchpad
diff --git a/apps/launchpad/package.json b/apps/launchpad/package.json new file mode 100644 index 0000000..dcfac93 --- /dev/null +++ b/apps/launchpad/package.json @@ -0,0 +1,38 @@ +{ + "name": "launchpad-web", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "preview": "vite preview" + }, + "dependencies": { + "@chakra-ui/icons": "^2.1.1", + "@chakra-ui/react": "^2.8.1", + "@emotion/react": "^11.11.1", + "@emotion/styled": "^11.11.0", + "@fontsource/roboto": "^5.0.8", + "@rainbow-me/rainbowkit": "^1.0.11", + "@wagmi/core": "1.4.2", + "framer-motion": "^10.16.4", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-router-dom": "^6.16.0", + "viem": "^1.10.13", + "wagmi": "^1.4.1", + "shared-web": "workspace:*" + }, + "devDependencies": { + "@types/react": "^18.2.15", + "@types/react-dom": "^18.2.7", + "@vitejs/plugin-react-swc": "^3.3.2", + "eslint": "^8.45.0", + "eslint-config-custom": "*", + "typescript": "^5.0.2", + "vite": "^4.4.5" + }, + "license": "AGPL-3.0-or-later" +} \ No newline at end of file diff --git a/apps/web/public/ABCLaunchpadLogo.svg b/apps/launchpad/public/ABCLaunchpadLogo.svg similarity index 100% rename from apps/web/public/ABCLaunchpadLogo.svg rename to apps/launchpad/public/ABCLaunchpadLogo.svg diff --git a/apps/web/public/CS Logo.svg b/apps/launchpad/public/CS Logo.svg similarity index 100% rename from apps/web/public/CS Logo.svg rename to apps/launchpad/public/CS Logo.svg diff --git a/apps/web/public/Check.svg b/apps/launchpad/public/Check.svg similarity index 100% rename from apps/web/public/Check.svg rename to apps/launchpad/public/Check.svg diff --git a/apps/web/public/Delete.svg b/apps/launchpad/public/Delete.svg similarity index 100% rename from apps/web/public/Delete.svg rename to apps/launchpad/public/Delete.svg diff --git a/apps/web/public/Error.svg b/apps/launchpad/public/Error.svg similarity index 100% rename from apps/web/public/Error.svg rename to apps/launchpad/public/Error.svg diff --git a/apps/web/public/HeaderLogo.svg b/apps/launchpad/public/HeaderLogo.svg similarity index 100% rename from apps/web/public/HeaderLogo.svg rename to apps/launchpad/public/HeaderLogo.svg diff --git a/apps/web/public/InformationIcon.svg b/apps/launchpad/public/InformationIcon.svg similarity index 100% rename from apps/web/public/InformationIcon.svg rename to apps/launchpad/public/InformationIcon.svg diff --git a/apps/web/public/VictorSerifTrial-40Regular.otf b/apps/launchpad/public/VictorSerifTrial-40Regular.otf similarity index 100% rename from apps/web/public/VictorSerifTrial-40Regular.otf rename to apps/launchpad/public/VictorSerifTrial-40Regular.otf diff --git a/apps/web/public/launchpad/ConfigureABC.svg b/apps/launchpad/public/launchpad/ConfigureABC.svg similarity index 100% rename from apps/web/public/launchpad/ConfigureABC.svg rename to apps/launchpad/public/launchpad/ConfigureABC.svg diff --git a/apps/web/public/launchpad/ConfigureToken.svg b/apps/launchpad/public/launchpad/ConfigureToken.svg similarity index 100% rename from apps/web/public/launchpad/ConfigureToken.svg rename to apps/launchpad/public/launchpad/ConfigureToken.svg diff --git a/apps/web/public/launchpad/ConfigureVoting.svg b/apps/launchpad/public/launchpad/ConfigureVoting.svg similarity index 100% rename from apps/web/public/launchpad/ConfigureVoting.svg rename to apps/launchpad/public/launchpad/ConfigureVoting.svg diff --git a/apps/web/public/launchpad/ContinuousFunding.svg b/apps/launchpad/public/launchpad/ContinuousFunding.svg similarity index 100% rename from apps/web/public/launchpad/ContinuousFunding.svg rename to apps/launchpad/public/launchpad/ContinuousFunding.svg diff --git a/apps/web/public/launchpad/CreamEllipse.png b/apps/launchpad/public/launchpad/CreamEllipse.png similarity index 100% rename from apps/web/public/launchpad/CreamEllipse.png rename to apps/launchpad/public/launchpad/CreamEllipse.png diff --git a/apps/web/public/launchpad/DAOName.svg b/apps/launchpad/public/launchpad/DAOName.svg similarity index 100% rename from apps/web/public/launchpad/DAOName.svg rename to apps/launchpad/public/launchpad/DAOName.svg diff --git a/apps/web/public/launchpad/GreenEllipse.png b/apps/launchpad/public/launchpad/GreenEllipse.png similarity index 100% rename from apps/web/public/launchpad/GreenEllipse.png rename to apps/launchpad/public/launchpad/GreenEllipse.png diff --git a/apps/web/public/launchpad/LaunchDAO.svg b/apps/launchpad/public/launchpad/LaunchDAO.svg similarity index 100% rename from apps/web/public/launchpad/LaunchDAO.svg rename to apps/launchpad/public/launchpad/LaunchDAO.svg diff --git a/apps/web/public/launchpad/MarketAccessibility.svg b/apps/launchpad/public/launchpad/MarketAccessibility.svg similarity index 100% rename from apps/web/public/launchpad/MarketAccessibility.svg rename to apps/launchpad/public/launchpad/MarketAccessibility.svg diff --git a/apps/web/public/launchpad/SustainableGrowth.svg b/apps/launchpad/public/launchpad/SustainableGrowth.svg similarity index 100% rename from apps/web/public/launchpad/SustainableGrowth.svg rename to apps/launchpad/public/launchpad/SustainableGrowth.svg diff --git a/apps/web/public/token-logos/gnosis-gno-gno-logo.svg b/apps/launchpad/public/token-logos/gnosis-gno-gno-logo.svg similarity index 100% rename from apps/web/public/token-logos/gnosis-gno-gno-logo.svg rename to apps/launchpad/public/token-logos/gnosis-gno-gno-logo.svg diff --git a/apps/web/public/token-logos/multi-collateral-dai-dai-logo.svg b/apps/launchpad/public/token-logos/multi-collateral-dai-dai-logo.svg similarity index 100% rename from apps/web/public/token-logos/multi-collateral-dai-dai-logo.svg rename to apps/launchpad/public/token-logos/multi-collateral-dai-dai-logo.svg diff --git a/apps/web/public/token-logos/optimism-ethereum-op-logo.svg b/apps/launchpad/public/token-logos/optimism-ethereum-op-logo.svg similarity index 100% rename from apps/web/public/token-logos/optimism-ethereum-op-logo.svg rename to apps/launchpad/public/token-logos/optimism-ethereum-op-logo.svg diff --git a/apps/web/public/token-logos/tether-usdt-logo.svg b/apps/launchpad/public/token-logos/tether-usdt-logo.svg similarity index 100% rename from apps/web/public/token-logos/tether-usdt-logo.svg rename to apps/launchpad/public/token-logos/tether-usdt-logo.svg diff --git a/apps/web/public/token-logos/usd-coin-usdc-logo.svg b/apps/launchpad/public/token-logos/usd-coin-usdc-logo.svg similarity index 100% rename from apps/web/public/token-logos/usd-coin-usdc-logo.svg rename to apps/launchpad/public/token-logos/usd-coin-usdc-logo.svg diff --git a/apps/web/public/vite.svg b/apps/launchpad/public/vite.svg similarity index 100% rename from apps/web/public/vite.svg rename to apps/launchpad/public/vite.svg diff --git a/apps/web/src/App.tsx b/apps/launchpad/src/App.tsx similarity index 76% rename from apps/web/src/App.tsx rename to apps/launchpad/src/App.tsx index bcb89d1..9e8bed8 100644 --- a/apps/web/src/App.tsx +++ b/apps/launchpad/src/App.tsx @@ -1,8 +1,8 @@ import { Link, useLocation } from "react-router-dom"; -import Footer from './presentation/components/shared/Footer'; +import Footer from '../../shared/src/presentation/components/Footer'; import { Box } from "@chakra-ui/react"; import { Outlet } from "react-router-dom"; -import Header from "./presentation/components/shared/Header"; +import Header from "../../shared/src/presentation/components/Header"; export default function App() { @@ -15,7 +15,6 @@ export default function App() {
{isInitialRoute && ( <> - Swap Launchpad )} diff --git a/apps/web/src/data/DAOCreationWagmiLSRepository.ts b/apps/launchpad/src/data/DAOCreationWagmiLSRepository.ts similarity index 97% rename from apps/web/src/data/DAOCreationWagmiLSRepository.ts rename to apps/launchpad/src/data/DAOCreationWagmiLSRepository.ts index 1c23b40..db37dca 100644 --- a/apps/web/src/data/DAOCreationWagmiLSRepository.ts +++ b/apps/launchpad/src/data/DAOCreationWagmiLSRepository.ts @@ -1,7 +1,7 @@ import { Abi } from "viem"; import { useContractWrite, usePrepareContractWrite, useWaitForTransaction } from "wagmi"; -import { knownContracts } from '../../config.json'; -import newDaoWithABCAbi from '../../utils/abi/augmented-bonding-curve.json'; +import { knownContracts } from '../../../shared/config.json'; +import newDaoWithABCAbi from '../../../shared/src/utils/abi/augmented-bonding-curve.json'; import { DAOInfoStatus } from "../domain/enum/DAOInfoStatus"; import { ABCConfig } from "../domain/model/ABCConfig"; import { DAOCreationResult, DAOCreationResultStatus } from "../domain/model/DAOCreationResult"; diff --git a/apps/web/src/domain/enum/DAOInfoStatus.ts b/apps/launchpad/src/domain/enum/DAOInfoStatus.ts similarity index 100% rename from apps/web/src/domain/enum/DAOInfoStatus.ts rename to apps/launchpad/src/domain/enum/DAOInfoStatus.ts diff --git a/apps/web/src/domain/model/ABCConfig.ts b/apps/launchpad/src/domain/model/ABCConfig.ts similarity index 100% rename from apps/web/src/domain/model/ABCConfig.ts rename to apps/launchpad/src/domain/model/ABCConfig.ts diff --git a/apps/web/src/domain/model/DAOCreationResult.ts b/apps/launchpad/src/domain/model/DAOCreationResult.ts similarity index 100% rename from apps/web/src/domain/model/DAOCreationResult.ts rename to apps/launchpad/src/domain/model/DAOCreationResult.ts diff --git a/apps/web/src/domain/model/DAOInfo.ts b/apps/launchpad/src/domain/model/DAOInfo.ts similarity index 100% rename from apps/web/src/domain/model/DAOInfo.ts rename to apps/launchpad/src/domain/model/DAOInfo.ts diff --git a/apps/web/src/domain/model/TokenHolder.ts b/apps/launchpad/src/domain/model/TokenHolder.ts similarity index 100% rename from apps/web/src/domain/model/TokenHolder.ts rename to apps/launchpad/src/domain/model/TokenHolder.ts diff --git a/apps/web/src/domain/model/TokenInfo.ts b/apps/launchpad/src/domain/model/TokenInfo.ts similarity index 100% rename from apps/web/src/domain/model/TokenInfo.ts rename to apps/launchpad/src/domain/model/TokenInfo.ts diff --git a/apps/web/src/domain/model/VotingConfig.ts b/apps/launchpad/src/domain/model/VotingConfig.ts similarity index 100% rename from apps/web/src/domain/model/VotingConfig.ts rename to apps/launchpad/src/domain/model/VotingConfig.ts diff --git a/apps/web/src/domain/repository/DAOCreationRepository.ts b/apps/launchpad/src/domain/repository/DAOCreationRepository.ts similarity index 100% rename from apps/web/src/domain/repository/DAOCreationRepository.ts rename to apps/launchpad/src/domain/repository/DAOCreationRepository.ts diff --git a/apps/web/src/domain/use-case/DAOCreationUseCases.ts b/apps/launchpad/src/domain/use-case/DAOCreationUseCases.ts similarity index 100% rename from apps/web/src/domain/use-case/DAOCreationUseCases.ts rename to apps/launchpad/src/domain/use-case/DAOCreationUseCases.ts diff --git a/apps/web/src/main.tsx b/apps/launchpad/src/main.tsx similarity index 84% rename from apps/web/src/main.tsx rename to apps/launchpad/src/main.tsx index 103e19d..4ecb1ec 100644 --- a/apps/web/src/main.tsx +++ b/apps/launchpad/src/main.tsx @@ -1,4 +1,4 @@ -import './polyfills.ts' +import '../../shared/src/polyfills.ts'; import "@rainbow-me/rainbowkit/styles.css"; import { RainbowKitProvider } from "@rainbow-me/rainbowkit"; import React from 'react' @@ -6,13 +6,12 @@ import ReactDOM from 'react-dom/client' import { ChakraProvider } from '@chakra-ui/react' import { WagmiConfig } from "wagmi"; import { chains, wagmiConfig } from "../wagmi"; -import theme from './presentation/theme/index.ts'; +import theme from '../../shared/src/presentation/theme/index.ts'; import App from './App.tsx' import Launchpad from './presentation/pages/launchpad'; -import Swap from './presentation/pages/swap'; import { createHashRouter, RouterProvider, createRoutesFromElements, Route } from "react-router-dom"; import NewDao from './presentation/pages/new-dao/new-dao.tsx'; -import { TransactionProvider } from './presentation/providers/TransactionProvider.tsx'; +import { TransactionProvider } from '../../shared/src/presentation/providers/TransactionProvider.tsx'; import { DAOCreationWagmiLSRepository } from './data/DAOCreationWagmiLSRepository.ts'; const daoCreationRepository = new DAOCreationWagmiLSRepository(); @@ -20,7 +19,6 @@ const daoCreationRepository = new DAOCreationWagmiLSRepository(); const router = createHashRouter( createRoutesFromElements( }> - } /> } /> } /> diff --git a/apps/web/src/presentation/assets/react.svg b/apps/launchpad/src/presentation/assets/react.svg similarity index 100% rename from apps/web/src/presentation/assets/react.svg rename to apps/launchpad/src/presentation/assets/react.svg diff --git a/apps/web/src/presentation/components/launchpad/DAOLayout.tsx b/apps/launchpad/src/presentation/components/DAOLayout.tsx similarity index 100% rename from apps/web/src/presentation/components/launchpad/DAOLayout.tsx rename to apps/launchpad/src/presentation/components/DAOLayout.tsx diff --git a/apps/web/src/presentation/components/launchpad/abc/ABCSettingsModelController.ts b/apps/launchpad/src/presentation/components/abc/ABCSettingsModelController.ts similarity index 96% rename from apps/web/src/presentation/components/launchpad/abc/ABCSettingsModelController.ts rename to apps/launchpad/src/presentation/components/abc/ABCSettingsModelController.ts index 0b0adb7..c45bccf 100644 --- a/apps/web/src/presentation/components/launchpad/abc/ABCSettingsModelController.ts +++ b/apps/launchpad/src/presentation/components/abc/ABCSettingsModelController.ts @@ -1,8 +1,8 @@ import { useEffect, useState } from "react"; -import { DAOCreationRepository } from "../../../../domain/repository/DAOCreationRepository"; -import { setABCConfig } from "../../../../domain/use-case/DAOCreationUseCases"; -import { ABCConfig } from "../../../../domain/model/ABCConfig"; -import { TokenInfo } from "../../../../domain/model/TokenInfo"; +import { DAOCreationRepository } from "../../../domain/repository/DAOCreationRepository"; +import { setABCConfig } from "../../../domain/use-case/DAOCreationUseCases"; +import { ABCConfig } from "../../../domain/model/ABCConfig"; +import { TokenInfo } from "../../../domain/model/TokenInfo"; import { fetchBalance, getAccount } from "@wagmi/core"; import { parseEther } from "viem"; diff --git a/apps/web/src/presentation/components/launchpad/abc/AugmentedBondingCurveSettings.tsx b/apps/launchpad/src/presentation/components/abc/AugmentedBondingCurveSettings.tsx similarity index 97% rename from apps/web/src/presentation/components/launchpad/abc/AugmentedBondingCurveSettings.tsx rename to apps/launchpad/src/presentation/components/abc/AugmentedBondingCurveSettings.tsx index 94d349b..8adff94 100644 --- a/apps/web/src/presentation/components/launchpad/abc/AugmentedBondingCurveSettings.tsx +++ b/apps/launchpad/src/presentation/components/abc/AugmentedBondingCurveSettings.tsx @@ -1,8 +1,8 @@ import { Divider, Box, Button, Flex, FormControl, FormLabel, HStack, Image, InputGroup, Select, Text, VStack, Tooltip } from "@chakra-ui/react"; import { useEffect } from "react"; -import { DAOCreationRepository } from "../../../../domain/repository/DAOCreationRepository"; -import CustomInput from "../../shared/CustomInput"; -import CustomInputRightAddon from "../../shared/CustomInputRightAddon"; +import { DAOCreationRepository } from "../../../domain/repository/DAOCreationRepository"; +import CustomInput from "../../../../../shared/src/presentation/components/CustomInput"; +import CustomInputRightAddon from "../../../../../shared/src/presentation/components/CustomInputRightAddon"; import { useABCSettingsModelController } from "./ABCSettingsModelController"; interface AugmentedBondingCurveSettingsProps { diff --git a/apps/web/src/presentation/components/launchpad/name/DAONameModelController.ts b/apps/launchpad/src/presentation/components/name/DAONameModelController.ts similarity index 85% rename from apps/web/src/presentation/components/launchpad/name/DAONameModelController.ts rename to apps/launchpad/src/presentation/components/name/DAONameModelController.ts index 76a1d71..aad9cca 100644 --- a/apps/web/src/presentation/components/launchpad/name/DAONameModelController.ts +++ b/apps/launchpad/src/presentation/components/name/DAONameModelController.ts @@ -1,6 +1,6 @@ import { useEffect, useState } from "react"; -import { DAOCreationRepository } from "../../../../domain/repository/DAOCreationRepository"; -import { setDAOName } from "../../../../domain/use-case/DAOCreationUseCases"; +import { DAOCreationRepository } from "../../../domain/repository/DAOCreationRepository"; +import { setDAOName } from "../../../domain/use-case/DAOCreationUseCases"; export function useDAONameModelController(daoCreationRepository: DAOCreationRepository) { const [organizationName, setOrganizationName] = useState(''); diff --git a/apps/web/src/presentation/components/launchpad/name/OrganizationName.tsx b/apps/launchpad/src/presentation/components/name/OrganizationName.tsx similarity index 85% rename from apps/web/src/presentation/components/launchpad/name/OrganizationName.tsx rename to apps/launchpad/src/presentation/components/name/OrganizationName.tsx index 4d4d83a..218e410 100644 --- a/apps/web/src/presentation/components/launchpad/name/OrganizationName.tsx +++ b/apps/launchpad/src/presentation/components/name/OrganizationName.tsx @@ -1,10 +1,10 @@ import { Box, InputGroup, Text, VStack, Image } from "@chakra-ui/react"; import { useEffect } from "react"; -import { DAOCreationRepository } from "../../../../domain/repository/DAOCreationRepository"; -import CustomInput from "../../shared/CustomInput"; -import CustomInputRightAddon from "../../shared/CustomInputRightAddon"; +import { DAOCreationRepository } from "../../../domain/repository/DAOCreationRepository"; +import CustomInput from "../../../../../shared/src/presentation/components/CustomInput"; +import CustomInputRightAddon from "../../../../../shared/src/presentation/components/CustomInputRightAddon"; import { useDAONameModelController } from "./DAONameModelController"; -import "../../../../styles.css"; +import "../../../styles.css"; interface OrganizationNameProps { onStepCompletionChanged: (completed: boolean) => void; diff --git a/apps/web/src/presentation/components/launchpad/summary/DAOCreationSummaryModelController.ts b/apps/launchpad/src/presentation/components/summary/DAOCreationSummaryModelController.ts similarity index 85% rename from apps/web/src/presentation/components/launchpad/summary/DAOCreationSummaryModelController.ts rename to apps/launchpad/src/presentation/components/summary/DAOCreationSummaryModelController.ts index bf51b47..48b3fc3 100644 --- a/apps/web/src/presentation/components/launchpad/summary/DAOCreationSummaryModelController.ts +++ b/apps/launchpad/src/presentation/components/summary/DAOCreationSummaryModelController.ts @@ -1,13 +1,13 @@ import { useEffect, useState } from "react"; import { useTransaction } from 'wagmi'; -import { VotingConfig } from "../../../../domain/model/VotingConfig"; -import { DAOCreationRepository } from "../../../../domain/repository/DAOCreationRepository"; +import { VotingConfig } from "../../../domain/model/VotingConfig"; +import { DAOCreationRepository } from "../../../domain/repository/DAOCreationRepository"; -import { ABCConfig } from "../../../../domain/model/ABCConfig"; -import { DAOCreationResult, DAOCreationResultStatus } from "../../../../domain/model/DAOCreationResult"; -import { TokenHolder } from "../../../../domain/model/TokenHolder"; -import { TokenInfo } from "../../../../domain/model/TokenInfo"; -import { launchDAO } from "../../../../domain/use-case/DAOCreationUseCases"; +import { ABCConfig } from "../../../domain/model/ABCConfig"; +import { DAOCreationResult, DAOCreationResultStatus } from "../../../domain/model/DAOCreationResult"; +import { TokenHolder } from "../../../domain/model/TokenHolder"; +import { TokenInfo } from "../../../domain/model/TokenInfo"; +import { launchDAO } from "../../../domain/use-case/DAOCreationUseCases"; export function useDAOCreationSummaryModelController(daoCreationRepository: DAOCreationRepository) { const [isSending, setIsSending] = useState(false); diff --git a/apps/launchpad/src/presentation/components/summary/Summary.tsx b/apps/launchpad/src/presentation/components/summary/Summary.tsx new file mode 100644 index 0000000..71001e4 --- /dev/null +++ b/apps/launchpad/src/presentation/components/summary/Summary.tsx @@ -0,0 +1,157 @@ +import { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, Box, Button, Checkbox, Spinner, Table, Tbody, Td, Text, Th, Thead, Tr, VStack } from "@chakra-ui/react"; +import { useEffect, useState } from 'react'; + +import { DAOCreationRepository } from "../../../domain/repository/DAOCreationRepository"; +import { useDAOCreationSummaryModelController } from "./DAOCreationSummaryModelController"; + +interface SummaryViewProps { + onStepCompletionChanged: (completed: boolean) => void; + daoCreationRepository: DAOCreationRepository; +}; + +export default function Summary({ onStepCompletionChanged, daoCreationRepository }: SummaryViewProps) { + // use cases + const { + isSending, + isLoading, + txData, + daoName, + votingSettings, + tokenInfo, + tokenHolders, + abcConfig, + } = useDAOCreationSummaryModelController(daoCreationRepository); + + // Handle user confirmation of summary + const [_validated, setValidated] = useState(false) + + useEffect(() => { + const isCompleted = _validated; + if (onStepCompletionChanged) { + onStepCompletionChanged(isCompleted); + } + }, [_validated]); + + return ( +
+ {isSending || isLoading ? ( + + + Creating your DAO... + + + + ) : txData && !!txData.hash ? ( + + + Your DAO has been successfully created! + + + + ) : ( + + + Launch your DAO + Make sure your settings are correct + + + + + Organization settings + + + + + + Organization domain: {daoName + '.aragonid.eth'} + + + + + + + Governance settings + + + + + + Support: {votingSettings.getSupportRequiredValue() + '%'} + + + Minimum approval: {votingSettings.getMinimumAcceptanceQuorumValue() + '%'} + + + Vote duration: {votingSettings.getVoteDurationDays() + ' days ' + votingSettings.getVoteDurationHours() + ' hours ' + votingSettings.getVoteDurationMinutes() + ' minutes'} + + + + + + + Token settings + + + + + + Token name: {tokenInfo.tokenName} + + + Token symbol: {tokenInfo.tokenSymbol} + + + + + + + + + + {tokenHolders?.map((holder, index) => ( + + + + + ))} + +
HOLDER ACCOUNTBALANCE
{holder.address || "-"}{holder.balance !== null ? holder.balance : "-"}
+
+
+ + + + Augmented bonding curve settings + + + + + + Reserve ratio: {abcConfig.getReserveRatio() + '%'} + + + Colateral token: {abcConfig.collateralToken?.tokenSymbol} + + + Initial reserve token: {abcConfig.getReserveInitialBalance() + ' ' + abcConfig.collateralToken?.tokenSymbol} + + + Entry tribute: {abcConfig.entryTribute + '%'} + + + Exit tribute: {abcConfig.entryTribute + '%'} + + + +
+ + Review all the settings. + If there are any mistakes, fix them before proceeding. + + setValidated(e.target.checked)} >Did you verify that all the information is correct? +
+
+ )} +
+ ) +} \ No newline at end of file diff --git a/apps/web/src/presentation/components/launchpad/token/TokenSettings.tsx b/apps/launchpad/src/presentation/components/token/TokenSettings.tsx similarity index 95% rename from apps/web/src/presentation/components/launchpad/token/TokenSettings.tsx rename to apps/launchpad/src/presentation/components/token/TokenSettings.tsx index a68081e..add54f9 100644 --- a/apps/web/src/presentation/components/launchpad/token/TokenSettings.tsx +++ b/apps/launchpad/src/presentation/components/token/TokenSettings.tsx @@ -1,10 +1,10 @@ import { Divider, Button, FormControl, FormLabel, HStack, InputGroup, Text, VStack, Image, Tooltip } from "@chakra-ui/react"; import React from 'react'; -import { DAOCreationRepository } from "../../../../domain/repository/DAOCreationRepository"; -import CustomInput from "../../shared/CustomInput"; -import CustomInputRightAddon from "../../shared/CustomInputRightAddon"; +import { DAOCreationRepository } from "../../../domain/repository/DAOCreationRepository"; +import CustomInput from "../../../../../shared/src/presentation/components/CustomInput"; +import CustomInputRightAddon from "../../../../../shared/src/presentation/components//CustomInputRightAddon"; import { useTokenSettingsModelController } from "./TokenSettingsModelController"; -import "../../../../styles.css"; +import "../../../styles.css"; interface TokenSettingProps { onStepCompletionChanged: (completed: boolean) => void; diff --git a/apps/web/src/presentation/components/launchpad/token/TokenSettingsModelController.tsx b/apps/launchpad/src/presentation/components/token/TokenSettingsModelController.tsx similarity index 93% rename from apps/web/src/presentation/components/launchpad/token/TokenSettingsModelController.tsx rename to apps/launchpad/src/presentation/components/token/TokenSettingsModelController.tsx index cdcc2eb..8c87869 100644 --- a/apps/web/src/presentation/components/launchpad/token/TokenSettingsModelController.tsx +++ b/apps/launchpad/src/presentation/components/token/TokenSettingsModelController.tsx @@ -1,8 +1,8 @@ import { useEffect, useState } from "react"; -import { DAOCreationRepository } from "../../../../domain/repository/DAOCreationRepository"; -import { setTokenHolders, setTokenInfo } from "../../../../domain/use-case/DAOCreationUseCases"; -import { TokenHolder } from "../../../../domain/model/TokenHolder"; -import { TokenInfo } from "../../../../domain/model/TokenInfo"; +import { DAOCreationRepository } from "../../../domain/repository/DAOCreationRepository"; +import { setTokenHolders, setTokenInfo } from "../../../domain/use-case/DAOCreationUseCases"; +import { TokenHolder } from "../../../domain/model/TokenHolder"; +import { TokenInfo } from "../../../domain/model/TokenInfo"; import { tokenHolderIsValid } from "./TokenSettingsValidators"; export interface TokenSettings { diff --git a/apps/web/src/presentation/components/launchpad/token/TokenSettingsValidators.ts b/apps/launchpad/src/presentation/components/token/TokenSettingsValidators.ts similarity index 67% rename from apps/web/src/presentation/components/launchpad/token/TokenSettingsValidators.ts rename to apps/launchpad/src/presentation/components/token/TokenSettingsValidators.ts index 193fb37..a772a7c 100644 --- a/apps/web/src/presentation/components/launchpad/token/TokenSettingsValidators.ts +++ b/apps/launchpad/src/presentation/components/token/TokenSettingsValidators.ts @@ -1,4 +1,4 @@ -import { TokenHolder } from "../../../../domain/model/TokenHolder"; +import { TokenHolder } from "../../../domain/model/TokenHolder"; export function tokenHolderIsValid(tokenHolder: TokenHolder) : boolean { return tokenHolder.address !== "" && tokenHolder.balance !== ""; diff --git a/apps/web/src/presentation/components/launchpad/voting/VotingSettings.tsx b/apps/launchpad/src/presentation/components/voting/VotingSettings.tsx similarity index 96% rename from apps/web/src/presentation/components/launchpad/voting/VotingSettings.tsx rename to apps/launchpad/src/presentation/components/voting/VotingSettings.tsx index c4c2342..1985f3f 100644 --- a/apps/web/src/presentation/components/launchpad/voting/VotingSettings.tsx +++ b/apps/launchpad/src/presentation/components/voting/VotingSettings.tsx @@ -1,9 +1,9 @@ import { FormControl, FormLabel, HStack, InputGroup, Slider, SliderFilledTrack, SliderThumb, SliderTrack, Text, VStack, Image, Divider, Tooltip } from "@chakra-ui/react"; -import { DAOCreationRepository } from "../../../../domain/repository/DAOCreationRepository"; -import CustomInput from "../../shared/CustomInput"; -import CustomInputRightAddon from "../../shared/CustomInputRightAddon"; +import { DAOCreationRepository } from "../../../domain/repository/DAOCreationRepository"; +import CustomInput from "../../../../../shared/src/presentation/components/CustomInput"; +import CustomInputRightAddon from "../../../../../shared/src/presentation/components/CustomInputRightAddon"; import { useVotingSettingsModelController } from "./VotingSettingsModelController"; -import "../../../../styles.css"; +import "../../../styles.css"; interface VotingSettingsProps { onStepCompletionChanged: (completed: boolean) => void; diff --git a/apps/web/src/presentation/components/launchpad/voting/VotingSettingsModelController.ts b/apps/launchpad/src/presentation/components/voting/VotingSettingsModelController.ts similarity index 93% rename from apps/web/src/presentation/components/launchpad/voting/VotingSettingsModelController.ts rename to apps/launchpad/src/presentation/components/voting/VotingSettingsModelController.ts index 7474acb..271f789 100644 --- a/apps/web/src/presentation/components/launchpad/voting/VotingSettingsModelController.ts +++ b/apps/launchpad/src/presentation/components/voting/VotingSettingsModelController.ts @@ -1,7 +1,7 @@ import { useEffect, useState } from "react"; -import { DAOCreationRepository } from "../../../../domain/repository/DAOCreationRepository"; -import { VotingConfig } from "../../../../domain/model/VotingConfig"; -import { setVotingConfig } from "../../../../domain/use-case/DAOCreationUseCases"; +import { DAOCreationRepository } from "../../../domain/repository/DAOCreationRepository"; +import { VotingConfig } from "../../../domain/model/VotingConfig"; +import { setVotingConfig } from "../../../domain/use-case/DAOCreationUseCases"; export type VotingSettings = { support: number, diff --git a/apps/web/src/presentation/pages/launchpad.css b/apps/launchpad/src/presentation/pages/launchpad.css similarity index 100% rename from apps/web/src/presentation/pages/launchpad.css rename to apps/launchpad/src/presentation/pages/launchpad.css diff --git a/apps/web/src/presentation/pages/launchpad.tsx b/apps/launchpad/src/presentation/pages/launchpad.tsx similarity index 100% rename from apps/web/src/presentation/pages/launchpad.tsx rename to apps/launchpad/src/presentation/pages/launchpad.tsx diff --git a/apps/web/src/presentation/pages/new-dao/NewDaoModelController.tsx b/apps/launchpad/src/presentation/pages/new-dao/NewDaoModelController.tsx similarity index 91% rename from apps/web/src/presentation/pages/new-dao/NewDaoModelController.tsx rename to apps/launchpad/src/presentation/pages/new-dao/NewDaoModelController.tsx index ab1fe11..6f1b481 100644 --- a/apps/web/src/presentation/pages/new-dao/NewDaoModelController.tsx +++ b/apps/launchpad/src/presentation/pages/new-dao/NewDaoModelController.tsx @@ -1,8 +1,8 @@ -import OrganizationName from '../../components/launchpad/name/OrganizationName' -import VotingSettings from '../../components/launchpad/voting/VotingSettings' -import TokenSettings from '../../components/launchpad/token/TokenSettings' -import AugmentedBondingCurveSettings from '../../components/launchpad/abc/AugmentedBondingCurveSettings' -import Summary from '../../components/launchpad/summary/Summary' +import OrganizationName from '../../components/name/OrganizationName' +import VotingSettings from '../../components/voting/VotingSettings' +import TokenSettings from '../../components/token/TokenSettings' +import AugmentedBondingCurveSettings from '../../components/abc/AugmentedBondingCurveSettings' +import Summary from '../../components/summary/Summary' import { useEffect, useState } from 'react' import { useAccount, useBalance } from 'wagmi' import { parseEther } from 'viem' diff --git a/apps/web/src/presentation/pages/new-dao/new-dao.tsx b/apps/launchpad/src/presentation/pages/new-dao/new-dao.tsx similarity index 96% rename from apps/web/src/presentation/pages/new-dao/new-dao.tsx rename to apps/launchpad/src/presentation/pages/new-dao/new-dao.tsx index 16b2622..129801c 100644 --- a/apps/web/src/presentation/pages/new-dao/new-dao.tsx +++ b/apps/launchpad/src/presentation/pages/new-dao/new-dao.tsx @@ -1,6 +1,6 @@ import { Box, HStack, Text, VStack, Image, Button } from '@chakra-ui/react' -import { CustomConnectButtonLong } from '../../components/shared/ConnectButtonLong' -import DAOLayout from '../../components/launchpad/DAOLayout' +import { CustomConnectButtonLong } from '../../../../../shared/src/presentation/components/ConnectButtonLong' +import DAOLayout from '../../components/DAOLayout' import { DAOCreationRepository } from '../../../domain/repository/DAOCreationRepository' import { useNewDaoModelController } from './NewDaoModelController' diff --git a/apps/web/src/styles.css b/apps/launchpad/src/styles.css similarity index 100% rename from apps/web/src/styles.css rename to apps/launchpad/src/styles.css diff --git a/apps/web/src/vite-env.d.ts b/apps/launchpad/src/vite-env.d.ts similarity index 100% rename from apps/web/src/vite-env.d.ts rename to apps/launchpad/src/vite-env.d.ts diff --git a/apps/web/test/domain/model/VotingConfig.test.ts b/apps/launchpad/test/domain/model/VotingConfig.test.ts similarity index 100% rename from apps/web/test/domain/model/VotingConfig.test.ts rename to apps/launchpad/test/domain/model/VotingConfig.test.ts diff --git a/apps/launchpad/tsconfig.json b/apps/launchpad/tsconfig.json new file mode 100644 index 0000000..44a86f0 --- /dev/null +++ b/apps/launchpad/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "tsconfig/vite-react.json", + "include": ["src", "vite.config.ts", "test/domain/model/TokenConfig.test.ts", "../../shared/src/presentation/types", "../../shared/src/polyfills.ts"] +} \ No newline at end of file diff --git a/apps/web/vite.config.ts b/apps/launchpad/vite.config.ts similarity index 78% rename from apps/web/vite.config.ts rename to apps/launchpad/vite.config.ts index fae2d60..e290a42 100644 --- a/apps/web/vite.config.ts +++ b/apps/launchpad/vite.config.ts @@ -1,4 +1,4 @@ -import { defineConfig } from "vite"; +import { defineConfig } from "vitest/config"; import react from "@vitejs/plugin-react-swc"; // https://vitejs.dev/config/ diff --git a/apps/web/wagmi.ts b/apps/launchpad/wagmi.ts similarity index 100% rename from apps/web/wagmi.ts rename to apps/launchpad/wagmi.ts diff --git a/apps/shared/.eslintrc.js b/apps/shared/.eslintrc.js new file mode 100644 index 0000000..b4b4f30 --- /dev/null +++ b/apps/shared/.eslintrc.js @@ -0,0 +1,5 @@ +module.exports = { + root: true, + extends: ['custom'], + parser: '@typescript-eslint/parser', +} diff --git a/apps/web/config.json b/apps/shared/config.json similarity index 100% rename from apps/web/config.json rename to apps/shared/config.json diff --git a/apps/shared/index.html b/apps/shared/index.html new file mode 100644 index 0000000..1db4a85 --- /dev/null +++ b/apps/shared/index.html @@ -0,0 +1,11 @@ + + + + + + Shared + + +
+ + diff --git a/apps/web/package.json b/apps/shared/package.json similarity index 95% rename from apps/web/package.json rename to apps/shared/package.json index b26686e..44064e0 100644 --- a/apps/web/package.json +++ b/apps/shared/package.json @@ -1,7 +1,7 @@ { - "name": "app-web", + "name": "shared-web", "private": true, - "version": "0.0.0", + "version": "0.0.1", "type": "module", "scripts": { "dev": "vite", diff --git a/apps/web/src/polyfills.ts b/apps/shared/src/polyfills.ts similarity index 100% rename from apps/web/src/polyfills.ts rename to apps/shared/src/polyfills.ts diff --git a/apps/web/src/presentation/components/shared/ConnectButton.css b/apps/shared/src/presentation/components/ConnectButton.css similarity index 100% rename from apps/web/src/presentation/components/shared/ConnectButton.css rename to apps/shared/src/presentation/components/ConnectButton.css diff --git a/apps/web/src/presentation/components/shared/ConnectButton.tsx b/apps/shared/src/presentation/components/ConnectButton.tsx similarity index 100% rename from apps/web/src/presentation/components/shared/ConnectButton.tsx rename to apps/shared/src/presentation/components/ConnectButton.tsx diff --git a/apps/web/src/presentation/components/shared/ConnectButtonLong.css b/apps/shared/src/presentation/components/ConnectButtonLong.css similarity index 100% rename from apps/web/src/presentation/components/shared/ConnectButtonLong.css rename to apps/shared/src/presentation/components/ConnectButtonLong.css diff --git a/apps/web/src/presentation/components/shared/ConnectButtonLong.tsx b/apps/shared/src/presentation/components/ConnectButtonLong.tsx similarity index 100% rename from apps/web/src/presentation/components/shared/ConnectButtonLong.tsx rename to apps/shared/src/presentation/components/ConnectButtonLong.tsx diff --git a/apps/web/src/presentation/components/shared/CustomInput.css b/apps/shared/src/presentation/components/CustomInput.css similarity index 100% rename from apps/web/src/presentation/components/shared/CustomInput.css rename to apps/shared/src/presentation/components/CustomInput.css diff --git a/apps/web/src/presentation/components/shared/CustomInput.tsx b/apps/shared/src/presentation/components/CustomInput.tsx similarity index 98% rename from apps/web/src/presentation/components/shared/CustomInput.tsx rename to apps/shared/src/presentation/components/CustomInput.tsx index a9c329e..a5a4c8a 100644 --- a/apps/web/src/presentation/components/shared/CustomInput.tsx +++ b/apps/shared/src/presentation/components/CustomInput.tsx @@ -1,5 +1,6 @@ import { Input } from "@chakra-ui/react"; import "./CustomInput.css"; +import React from "react" type CustomInputProps = { diff --git a/apps/web/src/presentation/components/shared/CustomInputRightAddon.tsx b/apps/shared/src/presentation/components/CustomInputRightAddon.tsx similarity index 100% rename from apps/web/src/presentation/components/shared/CustomInputRightAddon.tsx rename to apps/shared/src/presentation/components/CustomInputRightAddon.tsx diff --git a/apps/web/src/presentation/components/shared/Footer.tsx b/apps/shared/src/presentation/components/Footer.tsx similarity index 96% rename from apps/web/src/presentation/components/shared/Footer.tsx rename to apps/shared/src/presentation/components/Footer.tsx index 7889072..ac976e1 100644 --- a/apps/web/src/presentation/components/shared/Footer.tsx +++ b/apps/shared/src/presentation/components/Footer.tsx @@ -1,4 +1,4 @@ -import { Text, Box, HStack, VStack, Divider, Image } from "@chakra-ui/react"; +import { Box, Divider, HStack, Image, Text, VStack } from "@chakra-ui/react"; import SubscribeButton from "./footer/SubscribeButton"; import SubscribeInput from "./footer/SubscribeInput"; diff --git a/apps/web/src/presentation/components/shared/Header.tsx b/apps/shared/src/presentation/components/Header.tsx similarity index 90% rename from apps/web/src/presentation/components/shared/Header.tsx rename to apps/shared/src/presentation/components/Header.tsx index cea784c..3ea3812 100644 --- a/apps/web/src/presentation/components/shared/Header.tsx +++ b/apps/shared/src/presentation/components/Header.tsx @@ -1,4 +1,4 @@ -import { Text, Box, HStack, Image } from "@chakra-ui/react" +import { Box, HStack, Image, Text } from "@chakra-ui/react" import { CustomConnectButton } from "./ConnectButton" export default function Header() { diff --git a/apps/web/src/presentation/components/shared/footer/SubscribeButton.tsx b/apps/shared/src/presentation/components/footer/SubscribeButton.tsx similarity index 100% rename from apps/web/src/presentation/components/shared/footer/SubscribeButton.tsx rename to apps/shared/src/presentation/components/footer/SubscribeButton.tsx diff --git a/apps/web/src/presentation/components/shared/footer/SubscribeInput.css b/apps/shared/src/presentation/components/footer/SubscribeInput.css similarity index 100% rename from apps/web/src/presentation/components/shared/footer/SubscribeInput.css rename to apps/shared/src/presentation/components/footer/SubscribeInput.css diff --git a/apps/web/src/presentation/components/shared/footer/SubscribeInput.tsx b/apps/shared/src/presentation/components/footer/SubscribeInput.tsx similarity index 100% rename from apps/web/src/presentation/components/shared/footer/SubscribeInput.tsx rename to apps/shared/src/presentation/components/footer/SubscribeInput.tsx diff --git a/apps/web/src/presentation/hooks/useConvertSteps.ts b/apps/shared/src/presentation/hooks/useConvertSteps.ts similarity index 93% rename from apps/web/src/presentation/hooks/useConvertSteps.ts rename to apps/shared/src/presentation/hooks/useConvertSteps.ts index 945e3a5..e93be8f 100644 --- a/apps/web/src/presentation/hooks/useConvertSteps.ts +++ b/apps/shared/src/presentation/hooks/useConvertSteps.ts @@ -1,6 +1,6 @@ import { knownContracts } from '../../../config.json'; -import bondingCurveAbi from '../../../utils/abi/augmented-bonding-curve.json'; -import tokenAbi from '../../../utils/abi/token.json'; +import bondingCurveAbi from '../../utils/abi/augmented-bonding-curve.json'; +import tokenAbi from '../../utils/abi/token.json'; import { Abi, parseUnits } from 'viem'; export default function useConvertSteps(toSymbol: string, fromAmount: string, account: `0x${string}` | undefined, bonded: { symbol: string, contract: `0x${string}` }) { diff --git a/apps/web/src/presentation/hooks/useProcessTransactions.ts b/apps/shared/src/presentation/hooks/useProcessTransactions.ts similarity index 100% rename from apps/web/src/presentation/hooks/useProcessTransactions.ts rename to apps/shared/src/presentation/hooks/useProcessTransactions.ts diff --git a/apps/web/src/presentation/providers/TransactionProvider.tsx b/apps/shared/src/presentation/providers/TransactionProvider.tsx similarity index 100% rename from apps/web/src/presentation/providers/TransactionProvider.tsx rename to apps/shared/src/presentation/providers/TransactionProvider.tsx diff --git a/apps/web/src/presentation/theme/colors.ts b/apps/shared/src/presentation/theme/colors.ts similarity index 100% rename from apps/web/src/presentation/theme/colors.ts rename to apps/shared/src/presentation/theme/colors.ts diff --git a/apps/web/src/presentation/theme/components/button.ts b/apps/shared/src/presentation/theme/components/button.ts similarity index 100% rename from apps/web/src/presentation/theme/components/button.ts rename to apps/shared/src/presentation/theme/components/button.ts diff --git a/apps/web/src/presentation/theme/components/select.ts b/apps/shared/src/presentation/theme/components/select.ts similarity index 100% rename from apps/web/src/presentation/theme/components/select.ts rename to apps/shared/src/presentation/theme/components/select.ts diff --git a/apps/web/src/presentation/theme/components/slider.ts b/apps/shared/src/presentation/theme/components/slider.ts similarity index 100% rename from apps/web/src/presentation/theme/components/slider.ts rename to apps/shared/src/presentation/theme/components/slider.ts diff --git a/apps/web/src/presentation/theme/components/tooltip.ts b/apps/shared/src/presentation/theme/components/tooltip.ts similarity index 100% rename from apps/web/src/presentation/theme/components/tooltip.ts rename to apps/shared/src/presentation/theme/components/tooltip.ts diff --git a/apps/web/src/presentation/theme/fonts.ts b/apps/shared/src/presentation/theme/fonts.ts similarity index 100% rename from apps/web/src/presentation/theme/fonts.ts rename to apps/shared/src/presentation/theme/fonts.ts diff --git a/apps/web/src/presentation/theme/index.ts b/apps/shared/src/presentation/theme/index.ts similarity index 100% rename from apps/web/src/presentation/theme/index.ts rename to apps/shared/src/presentation/theme/index.ts diff --git a/apps/web/src/presentation/types/index.ts b/apps/shared/src/presentation/types/index.ts similarity index 100% rename from apps/web/src/presentation/types/index.ts rename to apps/shared/src/presentation/types/index.ts diff --git a/apps/web/utils/abi/augmented-bonding-curve.json b/apps/shared/src/utils/abi/augmented-bonding-curve.json similarity index 100% rename from apps/web/utils/abi/augmented-bonding-curve.json rename to apps/shared/src/utils/abi/augmented-bonding-curve.json diff --git a/apps/web/utils/abi/bancor.json b/apps/shared/src/utils/abi/bancor.json similarity index 100% rename from apps/web/utils/abi/bancor.json rename to apps/shared/src/utils/abi/bancor.json diff --git a/apps/web/utils/abi/new-dao-with-abc.json b/apps/shared/src/utils/abi/new-dao-with-abc.json similarity index 100% rename from apps/web/utils/abi/new-dao-with-abc.json rename to apps/shared/src/utils/abi/new-dao-with-abc.json diff --git a/apps/web/utils/abi/token-manager.json b/apps/shared/src/utils/abi/token-manager.json similarity index 100% rename from apps/web/utils/abi/token-manager.json rename to apps/shared/src/utils/abi/token-manager.json diff --git a/apps/web/utils/abi/token.json b/apps/shared/src/utils/abi/token.json similarity index 100% rename from apps/web/utils/abi/token.json rename to apps/shared/src/utils/abi/token.json diff --git a/apps/web/utils/getCollateral.ts b/apps/shared/src/utils/getCollateral.ts similarity index 94% rename from apps/web/utils/getCollateral.ts rename to apps/shared/src/utils/getCollateral.ts index 1da91aa..d6cea1c 100644 --- a/apps/web/utils/getCollateral.ts +++ b/apps/shared/src/utils/getCollateral.ts @@ -1,4 +1,4 @@ -import { knownContracts } from '../config.json'; +import { knownContracts } from '../../config.json'; import bondingCurveAbi from './abi/augmented-bonding-curve.json' import { readContract } from '@wagmi/core' import { Abi } from 'viem'; diff --git a/apps/shared/tsconfig.json b/apps/shared/tsconfig.json new file mode 100644 index 0000000..a72c955 --- /dev/null +++ b/apps/shared/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "tsconfig/vite-react.json", + "include": ["src"] +} \ No newline at end of file diff --git a/apps/swap/.eslintrc.js b/apps/swap/.eslintrc.js new file mode 100644 index 0000000..b4b4f30 --- /dev/null +++ b/apps/swap/.eslintrc.js @@ -0,0 +1,5 @@ +module.exports = { + root: true, + extends: ['custom'], + parser: '@typescript-eslint/parser', +} diff --git a/apps/swap/.gitignore b/apps/swap/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/apps/swap/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/apps/swap/index.html b/apps/swap/index.html new file mode 100644 index 0000000..84f3f91 --- /dev/null +++ b/apps/swap/index.html @@ -0,0 +1,13 @@ + + + + + + + Swap + + +
+ + + diff --git a/apps/swap/package.json b/apps/swap/package.json new file mode 100644 index 0000000..3805d79 --- /dev/null +++ b/apps/swap/package.json @@ -0,0 +1,38 @@ +{ + "name": "swap-web", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "preview": "vite preview" + }, + "dependencies": { + "@chakra-ui/icons": "^2.1.1", + "@chakra-ui/react": "^2.8.1", + "@emotion/react": "^11.11.1", + "@emotion/styled": "^11.11.0", + "@fontsource/roboto": "^5.0.8", + "@rainbow-me/rainbowkit": "^1.0.11", + "@wagmi/core": "^1.4.2", + "framer-motion": "^10.16.4", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-router-dom": "^6.16.0", + "viem": "^1.10.13", + "wagmi": "^1.4.1", + "shared-web": "workspace:*" + }, + "devDependencies": { + "@types/react": "^18.2.15", + "@types/react-dom": "^18.2.7", + "@vitejs/plugin-react-swc": "^3.3.2", + "eslint": "^8.45.0", + "eslint-config-custom": "*", + "typescript": "^5.0.2", + "vite": "^4.4.5" + }, + "license": "AGPL-3.0-or-later" +} \ No newline at end of file diff --git a/apps/swap/public/ABCLaunchpadLogo.svg b/apps/swap/public/ABCLaunchpadLogo.svg new file mode 100644 index 0000000..14627e7 --- /dev/null +++ b/apps/swap/public/ABCLaunchpadLogo.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/swap/public/CS Logo.svg b/apps/swap/public/CS Logo.svg new file mode 100644 index 0000000..f995fa1 --- /dev/null +++ b/apps/swap/public/CS Logo.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/apps/swap/public/Check.svg b/apps/swap/public/Check.svg new file mode 100644 index 0000000..7d5fbbb --- /dev/null +++ b/apps/swap/public/Check.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/apps/swap/public/Delete.svg b/apps/swap/public/Delete.svg new file mode 100644 index 0000000..13b6ead --- /dev/null +++ b/apps/swap/public/Delete.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/apps/swap/public/Error.svg b/apps/swap/public/Error.svg new file mode 100644 index 0000000..82e23f5 --- /dev/null +++ b/apps/swap/public/Error.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/apps/swap/public/HeaderLogo.svg b/apps/swap/public/HeaderLogo.svg new file mode 100644 index 0000000..8e2a405 --- /dev/null +++ b/apps/swap/public/HeaderLogo.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/swap/public/InformationIcon.svg b/apps/swap/public/InformationIcon.svg new file mode 100644 index 0000000..654a738 --- /dev/null +++ b/apps/swap/public/InformationIcon.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/apps/swap/public/VictorSerifTrial-40Regular.otf b/apps/swap/public/VictorSerifTrial-40Regular.otf new file mode 100644 index 0000000..84f5dfc Binary files /dev/null and b/apps/swap/public/VictorSerifTrial-40Regular.otf differ diff --git a/apps/swap/public/launchpad/ConfigureABC.svg b/apps/swap/public/launchpad/ConfigureABC.svg new file mode 100644 index 0000000..ed394db --- /dev/null +++ b/apps/swap/public/launchpad/ConfigureABC.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/swap/public/launchpad/ConfigureToken.svg b/apps/swap/public/launchpad/ConfigureToken.svg new file mode 100644 index 0000000..4f76866 --- /dev/null +++ b/apps/swap/public/launchpad/ConfigureToken.svg @@ -0,0 +1,4 @@ + + + + diff --git a/apps/swap/public/launchpad/ConfigureVoting.svg b/apps/swap/public/launchpad/ConfigureVoting.svg new file mode 100644 index 0000000..1cb5032 --- /dev/null +++ b/apps/swap/public/launchpad/ConfigureVoting.svg @@ -0,0 +1,4 @@ + + + + diff --git a/apps/swap/public/launchpad/ContinuousFunding.svg b/apps/swap/public/launchpad/ContinuousFunding.svg new file mode 100644 index 0000000..94c0836 --- /dev/null +++ b/apps/swap/public/launchpad/ContinuousFunding.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/apps/swap/public/launchpad/CreamEllipse.png b/apps/swap/public/launchpad/CreamEllipse.png new file mode 100644 index 0000000..8f4ea82 Binary files /dev/null and b/apps/swap/public/launchpad/CreamEllipse.png differ diff --git a/apps/swap/public/launchpad/DAOName.svg b/apps/swap/public/launchpad/DAOName.svg new file mode 100644 index 0000000..b698704 --- /dev/null +++ b/apps/swap/public/launchpad/DAOName.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/apps/swap/public/launchpad/GreenEllipse.png b/apps/swap/public/launchpad/GreenEllipse.png new file mode 100644 index 0000000..5d39e6a Binary files /dev/null and b/apps/swap/public/launchpad/GreenEllipse.png differ diff --git a/apps/swap/public/launchpad/LaunchDAO.svg b/apps/swap/public/launchpad/LaunchDAO.svg new file mode 100644 index 0000000..057b519 --- /dev/null +++ b/apps/swap/public/launchpad/LaunchDAO.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/apps/swap/public/launchpad/MarketAccessibility.svg b/apps/swap/public/launchpad/MarketAccessibility.svg new file mode 100644 index 0000000..a986df8 --- /dev/null +++ b/apps/swap/public/launchpad/MarketAccessibility.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/apps/swap/public/launchpad/SustainableGrowth.svg b/apps/swap/public/launchpad/SustainableGrowth.svg new file mode 100644 index 0000000..12cf5c0 --- /dev/null +++ b/apps/swap/public/launchpad/SustainableGrowth.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/apps/swap/public/token-logos/gnosis-gno-gno-logo.svg b/apps/swap/public/token-logos/gnosis-gno-gno-logo.svg new file mode 100644 index 0000000..9784242 --- /dev/null +++ b/apps/swap/public/token-logos/gnosis-gno-gno-logo.svg @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/apps/swap/public/token-logos/multi-collateral-dai-dai-logo.svg b/apps/swap/public/token-logos/multi-collateral-dai-dai-logo.svg new file mode 100644 index 0000000..2ae2e32 --- /dev/null +++ b/apps/swap/public/token-logos/multi-collateral-dai-dai-logo.svg @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/apps/swap/public/token-logos/optimism-ethereum-op-logo.svg b/apps/swap/public/token-logos/optimism-ethereum-op-logo.svg new file mode 100644 index 0000000..098392b --- /dev/null +++ b/apps/swap/public/token-logos/optimism-ethereum-op-logo.svg @@ -0,0 +1,21 @@ + + + + + + + + diff --git a/apps/swap/public/token-logos/tether-usdt-logo.svg b/apps/swap/public/token-logos/tether-usdt-logo.svg new file mode 100644 index 0000000..e530822 --- /dev/null +++ b/apps/swap/public/token-logos/tether-usdt-logo.svg @@ -0,0 +1 @@ +tether-usdt-logo \ No newline at end of file diff --git a/apps/swap/public/token-logos/usd-coin-usdc-logo.svg b/apps/swap/public/token-logos/usd-coin-usdc-logo.svg new file mode 100644 index 0000000..5dfea92 --- /dev/null +++ b/apps/swap/public/token-logos/usd-coin-usdc-logo.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/swap/public/vite.svg b/apps/swap/public/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/apps/swap/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/swap/src/App.tsx b/apps/swap/src/App.tsx new file mode 100644 index 0000000..0c22a24 --- /dev/null +++ b/apps/swap/src/App.tsx @@ -0,0 +1,27 @@ +import { Link, useLocation } from "react-router-dom"; +import Footer from '../../shared/src/presentation/components/Footer'; +import { Box } from "@chakra-ui/react"; +import { Outlet } from "react-router-dom"; +import Header from "../../shared/src/presentation/components/Header"; + + +export default function App() { + + const location = useLocation(); + const isInitialRoute = location.pathname === "/"; + + return ( + <> + +
+ {isInitialRoute && ( + <> + Swap + + )} + +