├── .eslintrc.json ├── public ├── Decor.png ├── left.png ├── right.png ├── decor │ ├── left.png │ ├── right.png │ ├── Decor_Right.png │ ├── shadow_1.svg │ └── shadow_2.svg ├── green_back.png ├── icons │ ├── logo.png │ ├── logo_big.png │ ├── avatar-image.png │ ├── tiger_token.png │ ├── Polygon_token.png │ ├── x.svg │ ├── white_twitter.svg │ ├── twitter.svg │ ├── Telegram.svg │ ├── discord.svg │ ├── white_discord.svg │ ├── UK.svg │ └── Frame.svg ├── banner_back.png ├── vercel.svg ├── wallet_icon.svg ├── next.svg ├── header_logo.svg └── logo.svg ├── src ├── app │ ├── favicon.ico │ ├── providers.tsx │ ├── layout.tsx │ ├── globals.css │ ├── revoke-mint │ │ └── page.tsx │ ├── revoke-freeze │ │ └── page.tsx │ ├── create-market │ │ └── page.tsx │ ├── my-token │ │ └── page.tsx │ ├── faq │ │ └── page.tsx │ ├── add-lp │ │ └── page.tsx │ ├── burn-lp │ │ └── page.tsx │ ├── page.tsx │ └── create-token │ │ └── page.tsx ├── config.ts ├── utils │ ├── axiosInstance.js │ └── fetchData.js ├── components │ ├── HotTokens │ │ ├── RightDecor.tsx │ │ ├── BigShadow.tsx │ │ ├── LeftShadow.tsx │ │ ├── HotTokensComp.tsx │ │ └── HotTokens.tsx │ ├── Header.tsx │ ├── DiscoverTokens │ │ ├── DiscoverTokensComp.tsx │ │ └── DiscoverTokens.tsx │ ├── FaqMain │ │ ├── FaqComp.tsx │ │ └── FaqMain.tsx │ ├── MyToken │ │ └── MyToken.tsx │ ├── Banner │ │ ├── Banner.tsx │ │ └── BannerContent.tsx │ ├── ConnectButton.tsx │ ├── LandingHeader │ │ ├── ConnectButton.tsx │ │ ├── Sidebar.tsx │ │ ├── LandingHeader.tsx │ │ └── SvgIcon.tsx │ ├── SvgIcon.tsx │ └── Footer │ │ └── Footer.tsx └── contexts │ ├── showSideBarContext.tsx │ ├── SolanaWalletProvider.tsx │ ├── PageContext.tsx │ ├── revokeMintAuthority.tsx │ ├── revokeFreezeAuthority.tsx │ ├── burnToken.tsx │ ├── createMarket.tsx │ ├── createLiquidity.tsx │ └── createSPLToken.tsx ├── postcss.config.js ├── .env.example ├── next.config.js ├── .gitignore ├── tsconfig.json ├── package.json ├── README.md └── tailwind.config.ts /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /public/Decor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChangeYourself0613/token_launchpad/HEAD/public/Decor.png -------------------------------------------------------------------------------- /public/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChangeYourself0613/token_launchpad/HEAD/public/left.png -------------------------------------------------------------------------------- /public/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChangeYourself0613/token_launchpad/HEAD/public/right.png -------------------------------------------------------------------------------- /src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChangeYourself0613/token_launchpad/HEAD/src/app/favicon.ico -------------------------------------------------------------------------------- /public/decor/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChangeYourself0613/token_launchpad/HEAD/public/decor/left.png -------------------------------------------------------------------------------- /public/green_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChangeYourself0613/token_launchpad/HEAD/public/green_back.png -------------------------------------------------------------------------------- /public/icons/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChangeYourself0613/token_launchpad/HEAD/public/icons/logo.png -------------------------------------------------------------------------------- /public/banner_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChangeYourself0613/token_launchpad/HEAD/public/banner_back.png -------------------------------------------------------------------------------- /public/decor/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChangeYourself0613/token_launchpad/HEAD/public/decor/right.png -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /public/icons/logo_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChangeYourself0613/token_launchpad/HEAD/public/icons/logo_big.png -------------------------------------------------------------------------------- /public/decor/Decor_Right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChangeYourself0613/token_launchpad/HEAD/public/decor/Decor_Right.png -------------------------------------------------------------------------------- /public/icons/avatar-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChangeYourself0613/token_launchpad/HEAD/public/icons/avatar-image.png -------------------------------------------------------------------------------- /public/icons/tiger_token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChangeYourself0613/token_launchpad/HEAD/public/icons/tiger_token.png -------------------------------------------------------------------------------- /public/icons/Polygon_token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ChangeYourself0613/token_launchpad/HEAD/public/icons/Polygon_token.png -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_SOLANA_RPC = "https://rpc.ankr.com/solana_devnet/b995cf3ee2ea4970e665b61c6a893dd3af7764417af5276cacb82d0c2743835a" 2 | -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | eslint: { 4 |     ignoreDuringBuilds: true, 5 |   }, 6 | } 7 | 8 | module.exports = nextConfig 9 | -------------------------------------------------------------------------------- /src/config.ts: -------------------------------------------------------------------------------- 1 | export const SOL_PRICE_API = 2 | "https://api.coingecko.com/api/v3/simple/price?ids=solana&vs_currencies=usd"; 3 | 4 | export const SOLANA_RPC = process.env.NEXT_PUBLIC_SOLANA_RPC ?? ""; 5 | -------------------------------------------------------------------------------- /public/icons/x.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/utils/axiosInstance.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | const axiosInstance = axios.create({ 4 | baseURL: 'https://public-api.birdeye.so/public/', // Base URL for your requests 5 | headers: { 6 | 'X-API-KEY': 'e31b600b9886411ab67f63ceab5e0801', // Add your API key here 7 | 'Content-Type': 'application/json' // Set the content type if needed 8 | } 9 | }); 10 | 11 | export default axiosInstance; -------------------------------------------------------------------------------- /src/components/HotTokens/RightDecor.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Image from 'next/image' 3 | export default function RightDecor() { 4 | return ( 5 |
6 | SVG Image 14 |
15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env 30 | .env*.local 31 | 32 | # vercel 33 | .vercel 34 | 35 | # typescript 36 | *.tsbuildinfo 37 | next-env.d.ts 38 | -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/icons/white_twitter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/components/Header.tsx: -------------------------------------------------------------------------------- 1 | import { FC } from "react"; 2 | import Link from "next/link"; 3 | import ConnectButton from "@/components/ConnectButton"; 4 | 5 | const Header: FC = () => { 6 | return ( 7 |
8 |
9 | 10 |
11 | SPL-Token Launchpad 12 |
13 | 14 |
15 | 16 |
17 |
18 |
19 | ); 20 | }; 21 | 22 | export default Header; 23 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "noEmit": true, 9 | "esModuleInterop": true, 10 | "module": "esnext", 11 | "moduleResolution": "bundler", 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "jsx": "preserve", 15 | "incremental": true, 16 | "plugins": [ 17 | { 18 | "name": "next" 19 | } 20 | ], 21 | "paths": { 22 | "@/*": ["./src/*"] 23 | } 24 | }, 25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "src/utils/fetchData.js"], 26 | "exclude": ["node_modules"] 27 | } 28 | -------------------------------------------------------------------------------- /public/icons/twitter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/app/providers.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import React, { ReactNode } from "react"; 3 | import { PageProvider } from "@/contexts/PageContext"; 4 | import { ShowSideBarProvider } from "@/contexts/showSideBarContext"; 5 | import { SolanaWalletProvider } from "@/contexts/SolanaWalletProvider"; 6 | import { QueryClientProvider, QueryClient } from "react-query"; 7 | 8 | const queryClient = new QueryClient(); 9 | 10 | export default function Providers({ children }: { children: ReactNode }) { 11 | return ( 12 | 13 | 14 | 15 | {children} 16 | 17 | 18 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /src/components/HotTokens/BigShadow.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Image from 'next/image' 3 | export default function BigShadow() { 4 | return ( 5 |
6 | SVG Image 15 | 22 |
23 | ) 24 | } 25 | -------------------------------------------------------------------------------- /src/components/HotTokens/LeftShadow.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import Image from 'next/image' 3 | export default function LeftShadow() { 4 | return ( 5 |
6 | SVG Image 15 | 23 |
24 | ) 25 | } 26 | -------------------------------------------------------------------------------- /src/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | import { Inter } from "next/font/google"; 3 | import Providers from "./providers"; 4 | import "./globals.css"; 5 | 6 | const inter = Inter({ subsets: ["latin"] }); 7 | 8 | export const metadata: Metadata = { 9 | title: "Mirage Launchpad Beta Version", 10 | description: "Mirage Launchpad Beta Version. Creating an SPL Token on the Solana blockchain. This application allows you to easily create a custom token on Solana", 11 | icons: "https://www.antiersolutions.com/wp-content/uploads/2021/12/solan-min.jpg" 12 | }; 13 | 14 | export default function RootLayout({ 15 | children, 16 | }: { 17 | children: React.ReactNode; 18 | }) { 19 | return ( 20 | 21 | 22 | {children} 23 | 24 | 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /src/contexts/showSideBarContext.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import React from 'react'; 4 | import { createContext, useContext, ReactNode } from "react"; 5 | 6 | export const showSideBarContext = createContext({ 7 | showSideBar: false, 8 | setShowSideBar: (fox:boolean) => { } 9 | }); 10 | 11 | 12 | 13 | export function useData() { 14 | const context = useContext(showSideBarContext); 15 | if (!context) { 16 | throw new Error("useData must be used within a ModalProvider"); 17 | } 18 | return context; 19 | } 20 | 21 | interface PageProviderProps { 22 | children: ReactNode; 23 | } 24 | 25 | export function ShowSideBarProvider({ children }: PageProviderProps) { 26 | const [showSideBar, setShowSideBar] = React.useState(false); 27 | 28 | return ( 29 | 30 | {children} 31 | 32 | ); 33 | } 34 | -------------------------------------------------------------------------------- /src/utils/fetchData.js: -------------------------------------------------------------------------------- 1 | // utils/fetchData.js 2 | import axios from 'axios'; 3 | import NextCors from 'nextjs-cors'; 4 | import axiosInstance from './axiosInstance'; 5 | // export const fetchPopularCollections = async () => { 6 | // try { 7 | // const response = await axios.get('https://api-mainnet.magiceden.dev/v2/marketplace/popular_collections?timeRange=1d'); 8 | // return response.data; 9 | // } catch (error) { 10 | // console.error('Error fetching data:', error); 11 | // throw error; 12 | // } 13 | // }; 14 | 15 | 16 | 17 | export const fetchHotCollections = async () => { 18 | try { 19 | const response = await axiosInstance.get('tokenlist?sort_by=v24hUSD&sort_type=desc'); // Note: Removed the base URL prefix as it's set in the instance 20 | return response.data; 21 | } catch (error) { 22 | console.error('Error fetching token list data:', error); 23 | throw error; 24 | } 25 | }; 26 | -------------------------------------------------------------------------------- /public/decor/shadow_1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /public/icons/Telegram.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/components/DiscoverTokens/DiscoverTokensComp.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | interface Props { 4 | title: string; 5 | mintedNumber: number; 6 | imgUrl: string; 7 | } 8 | const DiscoverTokensComp: React.FC = ({ title, mintedNumber, imgUrl }) => { 9 | return ( 10 |
11 | token 16 |
17 |
18 | {title} 19 |
20 |
21 | {mintedNumber.toFixed(2).toLocaleString()} $USD 22 |
23 |
24 |
25 | ) 26 | } 27 | 28 | export default DiscoverTokensComp; -------------------------------------------------------------------------------- /src/contexts/SolanaWalletProvider.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | ConnectionProvider, 3 | WalletProvider, 4 | } from "@solana/wallet-adapter-react"; 5 | import { WalletModalProvider } from "@solana/wallet-adapter-react-ui"; 6 | import { ReactNode } from "react"; 7 | import { 8 | PhantomWalletAdapter, 9 | SolflareWalletAdapter, 10 | } from "@solana/wallet-adapter-wallets"; 11 | import { SOLANA_RPC } from "@/config"; 12 | 13 | require("@solana/wallet-adapter-react-ui/styles.css"); 14 | 15 | export const SolanaWalletProvider = ({ children }: { children: ReactNode }) => { 16 | // const network = WalletAdapterNetwork.Mainnet; 17 | 18 | // You can also provide a custom RPC endpoint. 19 | const endpoint = SOLANA_RPC; 20 | 21 | const wallets = [new PhantomWalletAdapter(), new SolflareWalletAdapter()]; 22 | 23 | return ( 24 | 25 | 26 | {children} 27 | 28 | 29 | ); 30 | }; -------------------------------------------------------------------------------- /src/components/FaqMain/FaqComp.tsx: -------------------------------------------------------------------------------- 1 | import { isPositiveAmount } from '@metaplex-foundation/js'; 2 | import React from 'react' 3 | 4 | interface Props { 5 | title: string; 6 | content: string; 7 | } 8 | const FaqComp: React.FC = ({ title, content }) => { 9 | const [isOpen, setIsOpen] = React.useState(false); 10 | return ( 11 |
12 |
13 |
14 |
{title}
15 |
setIsOpen(!isOpen)}> 16 | {isOpen ? '-' : '+'} 17 |
18 |
19 | {isOpen && (
{content}
)} 20 |
21 |
22 | ) 23 | } 24 | 25 | export default FaqComp; -------------------------------------------------------------------------------- /src/contexts/PageContext.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { SOL_PRICE_API } from "@/config"; 3 | import { createContext, useContext, ReactNode } from "react"; 4 | import { useQuery } from "react-query"; 5 | 6 | interface PageContextType { 7 | solPrice: number; 8 | } 9 | 10 | export const PageContext = createContext( 11 | undefined 12 | ); 13 | 14 | export function useData() { 15 | const context = useContext(PageContext); 16 | if (!context) { 17 | throw new Error("useData must be used within a ModalProvider"); 18 | } 19 | return context; 20 | } 21 | 22 | interface PageProviderProps { 23 | children: ReactNode; 24 | } 25 | 26 | export function PageProvider({ children }: PageProviderProps) { 27 | const priceData = useQuery("repoData", () => 28 | fetch(SOL_PRICE_API).then(res => res.json()) 29 | ); 30 | 31 | const solPrice = priceData.data?.solana?.usd 32 | ? priceData.data?.solana?.usd 33 | : 57.5; 34 | const pageContextValue: PageContextType = { 35 | solPrice, 36 | }; 37 | 38 | return ( 39 | 40 | {children} 41 | 42 | ); 43 | } 44 | -------------------------------------------------------------------------------- /src/components/MyToken/MyToken.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export default function MyToken() { 4 | return ( 5 |
6 |
7 | My Tokens 8 |
9 |
10 |
11 |
No token
12 |
13 | You don’t have any token here.
Create Token now. 14 |
15 | 16 |
17 |
18 |
19 | ) 20 | } 21 | -------------------------------------------------------------------------------- /src/components/HotTokens/HotTokensComp.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | interface Props { 4 | no: number; 5 | title: string; 6 | imgUrl: string; 7 | mintNumber: number; 8 | } 9 | const HotTokensComp:React.FC = ({no, title, imgUrl, mintNumber}) => { 10 | return ( 11 |
12 |
13 | {no} 14 |
15 |
16 | token image 21 |
22 |
23 | {title} 24 |
25 |
26 | {mintNumber.toLocaleString()} $USD 27 |
28 |
29 |
30 |
31 | ) 32 | } 33 | 34 | export default HotTokensComp; -------------------------------------------------------------------------------- /public/wallet_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/components/Banner/Banner.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import BannerContent from './BannerContent' 3 | import Image from 'next/image' 4 | 5 | export default function Banner() { 6 | return ( 7 |
8 |
9 | 10 |
11 | left_group 12 | left_group 13 |
14 |
15 | right_group 16 | right_group 17 |
18 |
19 |
20 | ) 21 | } 22 | -------------------------------------------------------------------------------- /src/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | input::-webkit-outer-spin-button, 6 | input::-webkit-inner-spin-button { 7 | /* display: none; <- Crashes Chrome on hover */ 8 | -webkit-appearance: none; 9 | margin: 0; /* <-- Apparently some margin are still there even though it's hidden */ 10 | } 11 | 12 | input[type="number"] { 13 | -moz-appearance: textfield; /* Firefox */ 14 | } 15 | 16 | select { 17 | -webkit-appearance: none; 18 | -moz-appearance: none; 19 | text-indent: 1px; 20 | text-overflow: ''; 21 | } 22 | :root { 23 | --foreground-rgb: 0, 0, 0; 24 | --background-start-rgb: 214, 219, 220; 25 | --background-end-rgb: 255, 255, 255; 26 | } 27 | 28 | @media (prefers-color-scheme: dark) { 29 | :root { 30 | --foreground-rgb: 255, 255, 255; 31 | --background-start-rgb: 0, 0, 0; 32 | --background-end-rgb: 0, 0, 0; 33 | } 34 | } 35 | * { 36 | overflow-x: hidden; 37 | } 38 | body { 39 | color: rgb(var(--foreground-rgb)); 40 | overflow-x: hidden; 41 | background: linear-gradient( 42 | to bottom, 43 | transparent, 44 | rgb(var(--background-end-rgb)) 45 | ) 46 | rgb(var(--background-start-rgb)); 47 | } 48 | main { 49 | overflow-x: hidden; 50 | } 51 | .force-h { 52 | min-height: 100% !important; 53 | } -------------------------------------------------------------------------------- /src/contexts/revokeMintAuthority.tsx: -------------------------------------------------------------------------------- 1 | import { TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID, MintLayout, Token, AuthorityType} from '@solana/spl-token'; 2 | import { Connection, PublicKey, Transaction, SystemProgram, Keypair, TransactionInstruction } from '@solana/web3.js'; 3 | import { WalletContextState } from "@solana/wallet-adapter-react"; 4 | 5 | 6 | export async function revokeMintAuthority( 7 | connection : Connection, 8 | wallet : WalletContextState, 9 | mintAddress : PublicKey, 10 | ) { 11 | if(wallet.publicKey != null) { 12 | const transaction = new Transaction(); 13 | transaction.add(await Token.createSetAuthorityInstruction(TOKEN_PROGRAM_ID, mintAddress, null, "MintTokens", wallet.publicKey, [])); 14 | 15 | transaction.recentBlockhash = (await connection.getLatestBlockhash()).blockhash; 16 | transaction.feePayer = wallet.publicKey; 17 | if(wallet.signTransaction != undefined) { 18 | try { 19 | let signTX = await wallet.signTransaction(transaction); 20 | const signature = await connection.sendRawTransaction(signTX.serialize()); 21 | console.log("signature ====>", signature); 22 | } catch(err) { 23 | console.log("revoking error ====>", err); 24 | } 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /public/next.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/contexts/revokeFreezeAuthority.tsx: -------------------------------------------------------------------------------- 1 | import { TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID, MintLayout, Token, AuthorityType} from '@solana/spl-token'; 2 | import { Connection, PublicKey, Transaction, SystemProgram, Keypair, TransactionInstruction } from '@solana/web3.js'; 3 | import { WalletContextState } from "@solana/wallet-adapter-react"; 4 | 5 | 6 | export async function revokeFreezeAuthority( 7 | connection : Connection, 8 | wallet : WalletContextState, 9 | mintAddress : PublicKey, 10 | ) { 11 | if(wallet.publicKey != null) { 12 | const transaction = new Transaction(); 13 | // Token.create 14 | transaction.add(await Token.createSetAuthorityInstruction(TOKEN_PROGRAM_ID, mintAddress, null, "FreezeAccount", wallet.publicKey, [])); 15 | 16 | transaction.recentBlockhash = (await connection.getLatestBlockhash()).blockhash; 17 | transaction.feePayer = wallet.publicKey; 18 | if(wallet.signTransaction != undefined) { 19 | try { 20 | let signTX = await wallet.signTransaction(transaction); 21 | const signature = await connection.sendRawTransaction(signTX.serialize()); 22 | console.log("signature ====>", signature); 23 | } catch(err) { 24 | console.log("revoking error ====>", err); 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /public/decor/shadow_2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "next14-tailwindcss-typescript-solana-wallet-integration", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@material-ui/core": "^4.12.4", 13 | "@material-ui/lab": "^4.0.0-alpha.61", 14 | "@metaplex-foundation/js": "^0.19.4", 15 | "@metaplex-foundation/mpl-token-metadata": "^2.9.1", 16 | "@project-serum/anchor": "^0.19.1-beta.1", 17 | "@raydium-io/raydium-sdk": "^1.3.1-beta.47", 18 | "@solana/spl-token": "^0.1.8", 19 | "@solana/wallet-adapter-base": "^0.9.22", 20 | "@solana/wallet-adapter-react": "^0.15.32", 21 | "@solana/wallet-adapter-react-ui": "^0.9.31", 22 | "@solana/wallet-adapter-wallets": "^0.19.18", 23 | "@solana/web3.js": "^1.89.0", 24 | "@types/bn.js": "^5.1.5", 25 | "bn.js": "^5.2.1", 26 | "next": "14.0.3", 27 | "nextjs-cors": "^2.2.0", 28 | "react": "^18", 29 | "react-dom": "^18", 30 | "react-query": "^3.39.3", 31 | "zustand": "^4.5.0" 32 | }, 33 | "devDependencies": { 34 | "@types/node": "^20", 35 | "@types/react": "^18", 36 | "@types/react-dom": "^18", 37 | "autoprefixer": "^10.0.1", 38 | "eslint": "^8", 39 | "eslint-config-next": "14.0.3", 40 | "postcss": "^8", 41 | "tailwindcss": "^3.3.0", 42 | "typescript": "^5" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). 2 | 3 | ## Getting Started 4 | 5 | First, run the development server: 6 | 7 | ```bash 8 | npm run dev 9 | # or 10 | yarn dev 11 | # or 12 | pnpm dev 13 | # or 14 | bun dev 15 | ``` 16 | 17 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 18 | 19 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. 20 | 21 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. 22 | 23 | ## Learn More 24 | 25 | To learn more about Next.js, take a look at the following resources: 26 | 27 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 28 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. 29 | 30 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 31 | 32 | ## Deploy on Vercel 33 | 34 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. 35 | 36 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 37 | -------------------------------------------------------------------------------- /tailwind.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "tailwindcss"; 2 | 3 | const config: Config = { 4 | content: [ 5 | "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", 6 | "./src/components/**/*.{js,ts,jsx,tsx,mdx}", 7 | "./src/app/**/*.{js,ts,jsx,tsx,mdx}", 8 | ], 9 | theme: { 10 | extend: { 11 | screens: { 12 | 'custom-lg': { 'min': '902px' }, 13 | }, 14 | colors: { 15 | primary: { 16 | 100: "#E4F5F2", 17 | 200: "#10A678", 18 | 300: "#2A896B", 19 | 400: "#5FBB9E ", 20 | 500: "#435854", 21 | 600: "#34554C", 22 | 700: "#071B17", 23 | 800: "#1C1F27", 24 | 900: "#8997AE" 25 | }, 26 | secondary: { 27 | 100: "#507A6E", 28 | 200: "#111318", 29 | 300: "#080A0C", 30 | 400: "#637592", 31 | 500: "#191D24", 32 | 600: "#181B22", 33 | 700: "#5B687D", 34 | 800: "#313741", 35 | 900: "#10A678" 36 | }, 37 | }, 38 | backgroundImage: { 39 | "gradient-radial": "radial-gradient(var(--tw-gradient-stops))", 40 | "gradient-conic": 41 | "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))", 42 | }, 43 | boxShadow: { 44 | "btn-inner": "0px 0px 2px 2px #5FBB9E inset", 45 | box: "6px -6px 44px 0px rgba(35, 68, 58, 0.20) inset", 46 | btn: "4px 4px 21px 0px rgba(7, 30, 26, 0.50) inset", 47 | deposit: "0px -6px 22px 2px #89FFD9 inset", 48 | }, 49 | }, 50 | }, 51 | plugins: [], 52 | }; 53 | export default config; 54 | -------------------------------------------------------------------------------- /src/contexts/burnToken.tsx: -------------------------------------------------------------------------------- 1 | import { TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID, MintLayout, Token } from '@solana/spl-token'; 2 | import { Connection, PublicKey, Transaction, SystemProgram, Keypair, TransactionInstruction, sendAndConfirmRawTransaction } from '@solana/web3.js'; 3 | import { WalletContextState } from "@solana/wallet-adapter-react"; 4 | 5 | 6 | export async function burnToken( 7 | connection: Connection, 8 | wallet: WalletContextState, 9 | mintAddress: PublicKey, 10 | tokenAccount: PublicKey 11 | ) { 12 | if (wallet.publicKey != null) { 13 | const amount = await connection.getTokenAccountBalance(tokenAccount); 14 | console.log("amount ===>", amount); 15 | if (amount.value.uiAmount == null) { 16 | alert("amount is 0"); 17 | return; 18 | } 19 | const burnInstruction = Token.createBurnInstruction(TOKEN_PROGRAM_ID, mintAddress, tokenAccount, wallet.publicKey, [], amount.value.uiAmount * 10 ** amount.value.decimals); 20 | const transaction = new Transaction(); 21 | transaction.add(burnInstruction); 22 | const lastBlockHash = await connection.getLatestBlockhash(); 23 | transaction.recentBlockhash = lastBlockHash.blockhash; 24 | transaction.feePayer = wallet.publicKey; 25 | if (wallet.signTransaction != undefined) { 26 | const signedTX = await wallet.signTransaction(transaction); 27 | 28 | const signature = await sendAndConfirmRawTransaction(connection, signedTX.serialize()); 29 | console.log("transaction signature ===>", signature); 30 | } 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /public/icons/discord.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /public/icons/white_discord.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/app/revoke-mint/page.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | import Image from 'next/image' 3 | import React from 'react' 4 | 5 | export default function Revoke() { 6 | return ( 7 |
8 |
9 |
10 |
11 | Revoke Mint Authority 12 |
13 |
14 |
15 |

Token Mint Address

16 |
17 | avatar image 24 |

25 | 0x8ad129ykba801298t1wopskgdfiyaasdas7gdas532vgd8b6123 26 |

27 |
28 |
29 |
30 | 35 | 40 |
41 |
42 |
43 | ) 44 | } 45 | -------------------------------------------------------------------------------- /src/app/revoke-freeze/page.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | import Image from 'next/image' 3 | import React from 'react' 4 | 5 | export default function Revoke() { 6 | return ( 7 |
8 |
9 |
10 |
11 | Revoke Freezing Authority 12 |
13 |
14 |
15 |

Token Mint Address

16 |
17 | avatar image 24 |

25 | 0x8ad129ykba801298t1wopskgdfiyaasdas7gdas532vgd8b6123 26 |

27 |
28 |
29 |
30 | 35 | 40 |
41 |
42 |
43 | ) 44 | } 45 | -------------------------------------------------------------------------------- /src/components/Banner/BannerContent.tsx: -------------------------------------------------------------------------------- 1 | import Image from 'next/image' 2 | import Link from 'next/link' 3 | import React from 'react' 4 | export default function BannerContent() { 5 | return ( 6 |
7 |
8 |
9 | Looking for updates or support? 10 |
11 |
12 | Get in touch or follow us on social media 13 |
14 |
15 |
16 | 17 | 29 | 30 | 31 | 43 | 44 |
45 |
46 | ) 47 | } 48 | -------------------------------------------------------------------------------- /src/components/ConnectButton.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { FC } from "react"; 4 | import { useWallet } from "@solana/wallet-adapter-react"; 5 | import { useWalletModal } from "@solana/wallet-adapter-react-ui"; 6 | import { ArrowLine, ExitIcon, WalletIcon } from "./SvgIcon"; 7 | 8 | const ConnectButton: FC = () => { 9 | const { setVisible } = useWalletModal(); 10 | const { publicKey, disconnect } = useWallet(); 11 | return ( 12 | 31 | 32 |
  • 33 | 39 |
  • 40 | 41 | 42 | 43 | ) : ( 44 |
    setVisible(true)} 47 | > 48 | Connect wallet 49 |
    50 | )} 51 | {/*
    */} 52 | 53 | ); 54 | }; 55 | 56 | export default ConnectButton; 57 | -------------------------------------------------------------------------------- /src/components/FaqMain/FaqMain.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import FaqComp from './FaqComp' 3 | 4 | export default function FaqMain() { 5 | const tempFaq = [ 6 | { 7 | title: 'What is Mirage Launchpad? ', 8 | content: 'Mirage is a pioneering automatized launchpad for tokens on the Solana ecosystem, create, edit and launch your tokens on a seamless and easy-to-use platform designed by Web3 creators for Web3 creators, no knowledge of coding needed to use Mirage. ' 9 | }, 10 | { 11 | title: 'When will I have my token ready? ', 12 | content: 'Mirage is a pioneering automatized launchpad for tokens on the Solana ecosystem, create, edit and launch your tokens on a seamless and easy-to-use platform designed by Web3 creators for Web3 creators, no knowledge of coding needed to use Mirage. ' 13 | }, 14 | { 15 | title: 'What benefits do the Mirage NFTs provide? ', 16 | content: 'Mirage is a pioneering automatized launchpad for tokens on the Solana ecosystem, create, edit and launch your tokens on a seamless and easy-to-use platform designed by Web3 creators for Web3 creators, no knowledge of coding needed to use Mirage. ' 17 | }, 18 | ] 19 | return ( 20 |
    21 |
    22 | Frequently Asked Question 23 |
    24 |
    25 | {tempFaq.map((item, index) => ( 26 | 27 | ))} 28 |
    29 |
    30 |
    31 | Didn’t find what you looking for,
    feel free to contact us. 32 |
    33 | 34 |
    35 |
    36 | ) 37 | } 38 | -------------------------------------------------------------------------------- /public/icons/UK.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/app/create-market/page.tsx: -------------------------------------------------------------------------------- 1 | import Image from 'next/image' 2 | import React from 'react' 3 | 4 | export default function CreateMarket() { 5 | return ( 6 |
    7 |
    8 |
    9 |
    10 | Create The Market 11 |
    12 | cross 18 |
    19 |
    20 |

    Token Mint Address

    21 |
    22 | avatar image 29 |

    30 | 0x8ad129ykba801298t1wopskgdfiyaasdas7gdas532vgd8b6123 31 |

    32 |
    33 |
    34 |
    35 |
    36 | Create Market Fee 37 |
    38 |
    39 | 2.7 Sol 40 |
    41 |
    42 | 47 |
    48 |
    49 | ) 50 | } 51 | -------------------------------------------------------------------------------- /src/components/HotTokens/HotTokens.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import HotTokensComp from './HotTokensComp' 3 | import BigShadow from './BigShadow' 4 | import RightDecor from './RightDecor' 5 | import LeftShadow from './LeftShadow' 6 | import { fetchHotCollections } from '../../utils/fetchData'; 7 | 8 | export default function HotTokens() { 9 | const [hottestData, setHottestData] = React.useState(); 10 | const [isLoading, setIsLoading] = React.useState(true); 11 | React.useEffect(() => { 12 | const fetchData = async () => { 13 | try { 14 | setIsLoading(true); 15 | const data = await fetchHotCollections(); 16 | setHottestData(data.data.tokens); 17 | setIsLoading(false); 18 | console.log(data, 'data>>><<<<>>><< 31 | {(!isLoading) && (hottestData?.length) && ( 32 | 33 | )} 34 | {(!isLoading) && (hottestData?.length) && ( 35 | 36 | )} 37 | {(!isLoading) && (hottestData?.length) && ( 38 | 39 | )} 40 | 41 |
    42 |
    43 | hot tokens 🔥
    in the market 44 |
    45 | { 46 | (!isLoading) && (hottestData?.length) && ( 47 |
    48 | {hottestData.slice(0, 12).map((item, index) => ( 49 |
    50 | 51 |
    52 | ))} 53 |
    54 | ) 55 | } 56 |
    57 | 58 | ) 59 | } 60 | -------------------------------------------------------------------------------- /src/components/LandingHeader/ConnectButton.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { FC } from "react"; 4 | import { useWallet } from "@solana/wallet-adapter-react"; 5 | import { useWalletModal } from "@solana/wallet-adapter-react-ui"; 6 | import { ArrowLine, ExitIcon, WalletIcon, WhiteWalletIcon } from "./SvgIcon"; 7 | 8 | interface Props { 9 | showSideBar?: boolean; 10 | } 11 | const ConnectButton: FC = ({ showSideBar }) => { 12 | const { setVisible } = useWalletModal(); 13 | const { publicKey, disconnect } = useWallet(); 14 | return ( 15 | 34 | 35 |
  • 36 | 42 |
  • 43 | 44 | 45 | 46 | ) : ( 47 |
    setVisible(true)} 50 | > 51 | {" "} 52 | {showSideBar ? ( 53 | Connect Wallet 54 | ) : ( 55 |
    56 | Connect Wallet 57 | Connect 58 |
    59 | )} 60 |
    61 | ) 62 | } 63 | {/*
    */} 64 | 65 | ); 66 | }; 67 | 68 | export default ConnectButton; 69 | -------------------------------------------------------------------------------- /src/components/LandingHeader/Sidebar.tsx: -------------------------------------------------------------------------------- 1 | import Link from 'next/link'; 2 | import React from 'react'; 3 | import ConnectButton from './ConnectButton'; 4 | import Image from 'next/image'; 5 | import { useData } from "@/contexts/showSideBarContext"; 6 | 7 | export default function Sidebar() { 8 | const { showSideBar, setShowSideBar } = useData(); 9 | 10 | return ( 11 |
    12 |
    13 | 14 | Create Token 15 | 16 | 17 | Hot Tokens 18 | 19 | 20 | FAQ 21 | 22 | 23 | Contact 24 | 25 |
    26 |
    27 |
    28 | 29 | twitter 35 | 36 | 37 | telegram 43 | 44 | 45 | discord 51 | 52 |
    53 | uk setShowSideBar(!showSideBar)} 60 | /> 61 |
    62 | 63 |
    64 | ) 65 | } 66 | -------------------------------------------------------------------------------- /src/app/my-token/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import { useState } from 'react'; 3 | // import { useWallet } from "@solana/wallet-adapter-react"; 4 | import { toMetaplexFileFromBrowser } from '@metaplex-foundation/js'; 5 | import { createSPLToken } from '@/contexts/createSPLToken'; 6 | import { useConnection, useWallet } from '@solana/wallet-adapter-react'; 7 | import LandingHeader from '@/components/LandingHeader/LandingHeader'; 8 | import HotTokens from '@/components/HotTokens/HotTokens'; 9 | import DiscoverTokens from '@/components/DiscoverTokens/DiscoverTokens'; 10 | import Banner from '@/components/Banner/Banner'; 11 | import Footer from '@/components/Footer/Footer'; 12 | import FaqMain from '@/components/FaqMain/FaqMain'; 13 | import MyToken from '@/components/MyToken/MyToken'; 14 | import Link from 'next/link'; 15 | 16 | export default function Home() { 17 | 18 | const wallet = useWallet() 19 | const { connection } = useConnection() 20 | 21 | const [tokenName, setTokenName] = useState("") 22 | const [tokenSymbol, setTokenSymbol] = useState("") 23 | const [tokenLogo, setTokenLogo] = useState() 24 | const [tokenDecimal, setTokenDecimal] = useState(9) 25 | const [tokenBalance, setTokenBalance] = useState(0) 26 | 27 | const handleCreateToken = async () => { 28 | if ( 29 | tokenName != "" && 30 | tokenSymbol != "" && 31 | tokenLogo != null && 32 | tokenBalance != 0 33 | ) { 34 | if (!wallet.publicKey) return; 35 | const _file = await toMetaplexFileFromBrowser(tokenLogo); 36 | await createSPLToken(wallet.publicKey, wallet, connection, tokenBalance, tokenDecimal, true, tokenName, tokenSymbol, "", "", _file, "string") 37 | } else { 38 | alert("Invalid params") 39 | } 40 | } 41 | 42 | 43 | return ( 44 |
    45 | 46 |
    47 |
    48 | My Tokens 49 |
    50 |
    51 |
    52 |
    No token
    53 |
    54 | You don’t have any token here.
    Create Token now. 55 |
    56 | + Create Token 57 |
    58 |
    59 |
    60 |
    61 | ); 62 | } 63 | -------------------------------------------------------------------------------- /src/app/faq/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import {useState} from 'react'; 3 | // import { useWallet } from "@solana/wallet-adapter-react"; 4 | import { toMetaplexFileFromBrowser } from '@metaplex-foundation/js'; 5 | import { createSPLToken } from '@/contexts/createSPLToken'; 6 | import { useConnection, useWallet } from '@solana/wallet-adapter-react'; 7 | import LandingHeader from '@/components/LandingHeader/LandingHeader'; 8 | import HotTokens from '@/components/HotTokens/HotTokens'; 9 | import DiscoverTokens from '@/components/DiscoverTokens/DiscoverTokens'; 10 | import Banner from '@/components/Banner/Banner'; 11 | import Footer from '@/components/Footer/Footer'; 12 | import FaqMain from '@/components/FaqMain/FaqMain'; 13 | 14 | export default function Home() { 15 | 16 | const wallet = useWallet() 17 | const {connection} = useConnection() 18 | 19 | const [tokenName, setTokenName] = useState("") 20 | const [tokenSymbol, setTokenSymbol] = useState("") 21 | const [tokenLogo, setTokenLogo] = useState() 22 | const [tokenDecimal, setTokenDecimal] = useState(9) 23 | const [tokenBalance, setTokenBalance] = useState(0) 24 | 25 | // const [isShowOrigin, setIsShowOrigin] = useState(false); 26 | // const wallet = useWallet(); 27 | // const [loading, setLoading] = useState(false); 28 | // const handleNftStake = async () => { 29 | // if (!mint) return; 30 | // try { 31 | // const tx = await stakeNFT(wallet, mint, setLoading); 32 | // if (!tx || !wallet.publicKey) return; 33 | // await stake(tx, wallet.publicKey?.toBase58(), setLoading, getNfts); 34 | // } catch (err) { 35 | // console.log(err); 36 | // } 37 | // }; 38 | const handleCreateToken = async () => { 39 | if ( 40 | tokenName != "" && 41 | tokenSymbol != "" && 42 | tokenLogo != null && 43 | tokenBalance != 0 44 | ) { 45 | if (!wallet.publicKey ) return; 46 | const _file = await toMetaplexFileFromBrowser(tokenLogo); 47 | await createSPLToken(wallet.publicKey, wallet, connection, tokenBalance, tokenDecimal, true, tokenName, tokenSymbol, "", "", _file, "string") 48 | } else { 49 | alert("Invalid params") 50 | } 51 | } 52 | 53 | const handleNameChange = (value: string) => { 54 | setTokenName(value) 55 | } 56 | const handleSymbolChange = (value: string) => { 57 | setTokenSymbol(value) 58 | } 59 | const handleLogoFileChange = ( files: FileList | null ) => { 60 | if (files) { 61 | setTokenLogo(files[0]) 62 | } else { 63 | setTokenLogo(null) 64 | } 65 | } 66 | const handleDecimalChange = (value: string) => { 67 | setTokenDecimal(parseInt(value)) 68 | } 69 | const handleBalanceChange = (value: string) => { 70 | setTokenBalance(parseInt(value)) 71 | } 72 | 73 | return ( 74 |
    75 | 76 | 77 | 78 |
    79 |
    80 | ); 81 | } 82 | -------------------------------------------------------------------------------- /src/app/add-lp/page.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | import Image from 'next/image' 3 | import React from 'react' 4 | 5 | export default function AddLp() { 6 | const [tokenBalance, setTokenBalance] = React.useState(2.5); 7 | 8 | const handleBalanceChange = (value: string) => { 9 | setTokenBalance(parseInt(value)) 10 | } 11 | return ( 12 |
    13 |
    14 |
    15 |
    16 | Add LP 17 |
    18 | cross 24 |
    25 |
    26 |

    Wallet Address

    27 |
    28 | avatar image 35 |

    36 | 0x8ad129ykba801298t1wopskgdfiyaasdas7gdas532vgd8b6123 37 |

    38 |
    39 |
    40 |
    41 |

    42 | Amount 43 |

    44 |
    45 | handleBalanceChange(e.target.value)} 49 | value={tokenBalance} 50 | /> 51 |

    $sol

    52 |
    53 |
    54 | 59 |
    60 |
    61 | ) 62 | } 63 | -------------------------------------------------------------------------------- /src/components/DiscoverTokens/DiscoverTokens.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import DiscoverTokensComp from './DiscoverTokensComp' 3 | import { fetchHotCollections } from '../../utils/fetchData'; 4 | 5 | export default function DiscoverTokens() { 6 | const [isLoading, setIsLoading] = React.useState(true); 7 | const [totalNumber, setTotalNumber] = React.useState(0); 8 | const [hottestData, setHottestData] = React.useState(); 9 | const [loadMore, setLoadMore] = React.useState(false); 10 | const [discoverNumber, setDiscoverNumber] = React.useState(15); 11 | function getRandomSubarray(arr: any, length: number) { 12 | const shuffled = arr.slice(0); 13 | let i = arr.length; 14 | while (i--) { 15 | const index = Math.floor((i + 1) * Math.random()); 16 | [shuffled[i], shuffled[index]] = [shuffled[index], shuffled[i]]; 17 | } 18 | return shuffled.slice(0, length); 19 | } 20 | 21 | React.useEffect(() => { 22 | const fetchData = async () => { 23 | try { 24 | setIsLoading(true); 25 | const data = await fetchHotCollections(); 26 | const tempData = getRandomSubarray(data.data.tokens, data.data.tokens.length); 27 | setTotalNumber(data.data.total); 28 | setHottestData(tempData); 29 | setIsLoading(false); 30 | console.log(data, '>>>>><<<<<'); 31 | // Handle the data as needed 32 | } catch (error) { 33 | // Handle error 34 | console.error('Error fetching data in component:', error); 35 | } 36 | }; 37 | 38 | fetchData(); 39 | }, []); 40 | React.useEffect(() => { 41 | if (loadMore) { 42 | setDiscoverNumber(50); 43 | } else { 44 | setDiscoverNumber(15); 45 | } 46 | },[loadMore]) 47 | 48 | return ( 49 |
    50 |
    51 |
    52 |
    53 | Discover Tokens 54 |
    55 |
    56 | {totalNumber?.toLocaleString()} Token Listed 57 |
    58 |
    59 |
    60 | {(!isLoading) && (hottestData?.length) && hottestData.slice(0, discoverNumber).map((item, index) => ( 61 | 62 | ))} 63 |
    64 |
    65 | 68 |
    69 |
    70 |
    71 | ) 72 | } 73 | -------------------------------------------------------------------------------- /src/contexts/createMarket.tsx: -------------------------------------------------------------------------------- 1 | import { Token, TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID, MintLayout, } from '@solana/spl-token'; 2 | import { Connection, PublicKey, Transaction, SystemProgram, Keypair, TransactionInstruction, sendAndConfirmTransaction } from '@solana/web3.js'; 3 | import { WalletContextState } from "@solana/wallet-adapter-react"; 4 | import { MarketV2, DEVNET_PROGRAM_ID, TxVersion, MAINNET_PROGRAM_ID, TokenAccount, SPL_ACCOUNT_LAYOUT } from '@raydium-io/raydium-sdk'; 5 | 6 | // const marketProgramId = DEVNET_PROGRAM_ID.OPENBOOK_MARKET; 7 | const marketProgramId = MAINNET_PROGRAM_ID.OPENBOOK_MARKET; 8 | 9 | // mainnet created market Id : 'F9KzEFGJECyabR8EanVdkiVZXs7FLosfQixBqpVCg7p1' 10 | 11 | export async function createMarket( 12 | connection: Connection, 13 | wallet: WalletContextState, 14 | baseMint: PublicKey, 15 | baseDecimal: number, 16 | quoteMint: PublicKey, 17 | quoteDecimal: number, 18 | orderSize: number, 19 | tickSize: number 20 | ) { 21 | console.log("devnet : marketProgramId ====>", marketProgramId.toBase58()); 22 | console.log("mainnet : marketProgramId ====>", MAINNET_PROGRAM_ID.OPENBOOK_MARKET.toBase58()); 23 | let marketId: PublicKey | null = null; 24 | if (wallet.publicKey != null) { 25 | try { 26 | console.log("hello!!!"); 27 | const { innerTransactions, address } = await MarketV2.makeCreateMarketInstructionSimple({ 28 | connection, 29 | wallet: wallet.publicKey, 30 | baseInfo: { 31 | mint: baseMint, 32 | decimals: baseDecimal 33 | }, 34 | quoteInfo: { 35 | mint: quoteMint, 36 | decimals: quoteDecimal 37 | }, 38 | dexProgramId: marketProgramId, 39 | lotSize: orderSize, 40 | tickSize, 41 | makeTxVersion: TxVersion.LEGACY 42 | }) 43 | console.log("innter Transactions ====>", innerTransactions); 44 | console.log("address ====>", address); 45 | console.log("marketId ===>", address.marketId.toBase58()); 46 | marketId = address.marketId; 47 | 48 | for (let i = 0; i < innerTransactions.length; i++) { 49 | const transaction = new Transaction(); 50 | for (let j = 0; j < innerTransactions[i].instructions.length; j++) { 51 | transaction.add(innerTransactions[i].instructions[j]); 52 | } 53 | if (wallet != undefined && wallet.signTransaction != undefined) { 54 | try { 55 | transaction.recentBlockhash = (await connection.getLatestBlockhash()).blockhash; 56 | transaction.feePayer = wallet.publicKey; 57 | 58 | let signedTx = await wallet.signTransaction(transaction); 59 | 60 | const signature = await connection.sendRawTransaction(signedTx.serialize()); 61 | console.log("signature ====>", signature); 62 | } catch (err) { 63 | console.log("transaction error ===>", err); 64 | marketId = null; 65 | } 66 | } 67 | 68 | } 69 | } catch (err) { 70 | console.log("err ===>", err); 71 | marketId = null; 72 | } 73 | } 74 | return marketId; 75 | 76 | } -------------------------------------------------------------------------------- /src/app/burn-lp/page.tsx: -------------------------------------------------------------------------------- 1 | import Image from 'next/image' 2 | import React from 'react' 3 | 4 | export default function BurnLp() { 5 | return ( 6 |
    7 |
    8 |
    9 |
    10 | Burn 11 |
    12 | cross 18 |
    19 |
    20 |

    Wallet Address

    21 |
    22 | avatar image 29 |

    30 | 0x8ad129ykba801298t1wopskgdfiyaasdas7gdas532vgd8b6123 31 |

    32 |
    33 |
    34 |
    35 |

    Token Info

    36 |
    37 | Polygon Token 44 |
    45 |
    46 | CRC Token - Sol 47 |
    48 |
    49 | 50 | Amount: 9 51 | 52 |     53 | 54 | Token to Mint: 1000 55 | 56 |
    57 |
    58 |
    59 |
    60 |
    61 |
    62 | You will receive 63 |
    64 |
    65 | 0.283201 Sol 66 |
    67 |
    68 | 73 |
    74 |
    75 | ) 76 | } 77 | -------------------------------------------------------------------------------- /src/contexts/createLiquidity.tsx: -------------------------------------------------------------------------------- 1 | import { TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID, MintLayout, Token } from '@solana/spl-token'; 2 | import { Connection, PublicKey, Transaction, SystemProgram, Keypair, TransactionInstruction } from '@solana/web3.js'; 3 | import { WalletContextState } from "@solana/wallet-adapter-react"; 4 | import { Liquidity, TokenAccount, MAINNET_PROGRAM_ID, SPL_ACCOUNT_LAYOUT, TxVersion, ComputeBudgetConfig } from '@raydium-io/raydium-sdk'; 5 | import { BN } from '@project-serum/anchor'; 6 | 7 | const raydiumProgram = MAINNET_PROGRAM_ID; 8 | 9 | export async function createLiquidity( 10 | connection: Connection, 11 | wallet: WalletContextState, 12 | baseMint: PublicKey, 13 | baseDecimal: number, 14 | quoteMint: PublicKey, 15 | quoteDecimal: number, 16 | orderSize: number, 17 | tickSize: number, 18 | marketId: PublicKey, 19 | baseAmount: number, 20 | quoteAmount: number, 21 | ) { 22 | let lpMint: PublicKey | null = null; 23 | if (wallet.publicKey != null) { 24 | const walletTokenAccount = await connection.getTokenAccountsByOwner(wallet.publicKey, { 25 | programId: TOKEN_PROGRAM_ID 26 | }); 27 | const tokenAccountsInfo: TokenAccount[] = walletTokenAccount.value.map((i) => ({ 28 | pubkey: i.pubkey, 29 | programId: i.account.owner, 30 | accountInfo: SPL_ACCOUNT_LAYOUT.decode(i.account.data) 31 | })) 32 | console.log("tokenAccountsinfo ===>", tokenAccountsInfo); 33 | console.log("marketid===>", marketId.toBase58()); 34 | try { 35 | const budget: ComputeBudgetConfig = { 36 | units: 600000, 37 | microLamports: 25000 38 | }; 39 | console.log("budget ===>", budget); 40 | console.log("before creating instruction!!!"); 41 | const { innerTransactions, address } = await Liquidity.makeCreatePoolV4InstructionV2Simple({ 42 | connection, 43 | programId: raydiumProgram.AmmV4, 44 | marketInfo: { 45 | programId: raydiumProgram.OPENBOOK_MARKET, 46 | marketId 47 | }, 48 | associatedOnly: false, 49 | ownerInfo: { 50 | feePayer: wallet.publicKey, 51 | wallet: wallet.publicKey, 52 | tokenAccounts: tokenAccountsInfo, 53 | useSOLBalance: true 54 | }, 55 | baseMintInfo: { 56 | mint: baseMint, 57 | decimals: baseDecimal 58 | }, 59 | quoteMintInfo: { 60 | mint: quoteMint, 61 | decimals: quoteDecimal 62 | }, 63 | startTime: new BN(Date.now() / 1000), 64 | baseAmount: new BN(baseAmount * 10 ** baseDecimal), 65 | quoteAmount: new BN(quoteAmount * 10 ** quoteDecimal), 66 | computeBudgetConfig: budget, 67 | checkCreateATAOwner: true, 68 | makeTxVersion: TxVersion.LEGACY, 69 | feeDestinationId: new PublicKey("7YttLkHDoNj9wyDur5pM1ejNaAvT9X4eqaYcHQqtj2G5") 70 | // feeDestinationId: new PublicKey("34vTq3GQxK6pgEbhnrgU1zs27gPWS6ZttxrYofDR4EkD") 71 | }); 72 | console.log("innter transactions ===>", innerTransactions); 73 | // console.log('address ===>', address); 74 | console.log("ammId ===>", address.ammId.toBase58()); 75 | console.log("marketId ====>", address.marketId.toBase58()); 76 | console.log("pcMint ===>", address.pcMint.toBase58()); 77 | console.log("pcVault ===>", address.pcVault.toBase58()); 78 | console.log("coinMint ===>", address.coinMint.toBase58()); 79 | console.log("coinVault ===>", address.coinVault.toBase58()); 80 | console.log("lpMint ===>", address.lpMint.toBase58()); 81 | lpMint = address.lpMint; 82 | for (let i = 0; i < innerTransactions.length; i++) { 83 | const transaction = new Transaction(); 84 | for (let j = 0; j < innerTransactions[i].instructions.length; j++) { 85 | transaction.add(innerTransactions[i].instructions[j]); 86 | } 87 | if (wallet != undefined && wallet.signTransaction != undefined) { 88 | try { 89 | transaction.recentBlockhash = (await connection.getLatestBlockhash()).blockhash; 90 | transaction.feePayer = wallet.publicKey; 91 | console.log(await connection.simulateTransaction(transaction)); 92 | 93 | let signedTx = await wallet.signTransaction(transaction); 94 | 95 | const signature = await connection.sendRawTransaction(signedTx.serialize()); 96 | console.log("signature ====>", signature); 97 | } catch (err) { 98 | console.log("transaction error ===>", err); 99 | } 100 | } 101 | } 102 | } catch (err) { 103 | console.log("creating liquidity ===>", err); 104 | } 105 | // alert("123"); 106 | return lpMint; 107 | } 108 | } -------------------------------------------------------------------------------- /src/components/LandingHeader/LandingHeader.tsx: -------------------------------------------------------------------------------- 1 | import Image from 'next/image' 2 | import Link from 'next/link' 3 | import React from 'react' 4 | import ConnectButton from './ConnectButton' 5 | import { useData } from "@/contexts/showSideBarContext"; 6 | import Sidebar from './Sidebar'; 7 | import { usePathname } from 'next/navigation' 8 | export default function LandingHeader() { 9 | const { showSideBar, setShowSideBar } = useData(); 10 | const pathname = usePathname() 11 | const [pathName, setPathName] = React.useState(''); 12 | React.useEffect(() => { 13 | if (pathname) { 14 | setPathName(pathname); 15 | } 16 | }, [pathname]) 17 | return ( 18 |
    19 |
    20 |
    21 | 22 | Logo Icon 28 | 29 |
    30 | 31 | Create Token 32 | 33 | 34 | My Tokens 35 | 36 | 37 | Hot Tokens 38 | 39 | 40 | FAQ 41 | 42 | 43 | Contact 44 | 45 |
    46 | { 47 | showSideBar ? ( 48 | cross setShowSideBar(false)} 54 | /> 55 | ) : ( 56 |
    57 |
    58 | 59 | twitter 65 | 66 | 67 | telegram 73 | 74 | 75 | discord 81 | 82 |
    83 | uk setShowSideBar(!showSideBar)} 90 | /> 91 | 92 |
    93 | ) 94 | } 95 |
    96 |
    97 |
    98 | { 99 | showSideBar && () 100 | } 101 |
    102 |
    103 | ) 104 | } 105 | -------------------------------------------------------------------------------- /src/app/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import {useState} from 'react'; 3 | import ConnectButton from "@/components/ConnectButton"; 4 | import Header from "@/components/Header"; 5 | // import { useWallet } from "@solana/wallet-adapter-react"; 6 | import Image from "next/image"; 7 | import { toMetaplexFileFromBrowser } from '@metaplex-foundation/js'; 8 | import { createSPLToken } from '@/contexts/createSPLToken'; 9 | import { useConnection, useWallet } from '@solana/wallet-adapter-react'; 10 | import LandingHeader from '@/components/LandingHeader/LandingHeader'; 11 | import HotTokens from '@/components/HotTokens/HotTokens'; 12 | import DiscoverTokens from '@/components/DiscoverTokens/DiscoverTokens'; 13 | import Banner from '@/components/Banner/Banner'; 14 | import Footer from '@/components/Footer/Footer'; 15 | import { RAYDIUM_MAINNET, Clmm } from '@raydium-io/raydium-sdk'; 16 | 17 | export default function Home() { 18 | 19 | const wallet = useWallet() 20 | const {connection} = useConnection() 21 | 22 | const [tokenName, setTokenName] = useState("") 23 | const [tokenSymbol, setTokenSymbol] = useState("") 24 | const [tokenLogo, setTokenLogo] = useState() 25 | const [tokenDecimal, setTokenDecimal] = useState(9) 26 | const [tokenBalance, setTokenBalance] = useState(0) 27 | 28 | // const [isShowOrigin, setIsShowOrigin] = useState(false); 29 | // const wallet = useWallet(); 30 | // const [loading, setLoading] = useState(false); 31 | // const handleNftStake = async () => { 32 | // if (!mint) return; 33 | // try { 34 | // const tx = await stakeNFT(wallet, mint, setLoading); 35 | // if (!tx || !wallet.publicKey) return; 36 | // await stake(tx, wallet.publicKey?.toBase58(), setLoading, getNfts); 37 | // } catch (err) { 38 | // console.log(err); 39 | // } 40 | // }; 41 | const handleCreateToken = async () => { 42 | if ( 43 | tokenName != "" && 44 | tokenSymbol != "" && 45 | tokenLogo != null && 46 | tokenBalance != 0 47 | ) { 48 | if (!wallet.publicKey ) return; 49 | const _file = await toMetaplexFileFromBrowser(tokenLogo); 50 | await createSPLToken(wallet.publicKey, wallet, connection, tokenBalance, tokenDecimal, true, tokenName, tokenSymbol, "", "", _file, "string") 51 | } else { 52 | alert("Invalid params") 53 | } 54 | } 55 | 56 | const handleNameChange = (value: string) => { 57 | setTokenName(value) 58 | } 59 | const handleSymbolChange = (value: string) => { 60 | setTokenSymbol(value) 61 | } 62 | const handleLogoFileChange = ( files: FileList | null ) => { 63 | if (files) { 64 | setTokenLogo(files[0]) 65 | } else { 66 | setTokenLogo(null) 67 | } 68 | } 69 | const handleDecimalChange = (value: string) => { 70 | setTokenDecimal(parseInt(value)) 71 | } 72 | const handleBalanceChange = (value: string) => { 73 | setTokenBalance(parseInt(value)) 74 | } 75 | 76 | return ( 77 |
    78 | 79 | 80 | 81 | 82 |
    83 | {/*
    84 |
    85 |
    86 |

    Name:

    87 | handleNameChange(e.target.value)} 90 | value={tokenName} 91 | /> 92 |
    93 |
    94 |

    Symbol:

    95 | handleSymbolChange(e.target.value)} 98 | value={tokenSymbol} 99 | /> 100 |
    101 |
    102 |

    Token Logo:

    103 | handleLogoFileChange(e.target.files)} 108 | /> 109 |
    110 | 111 |
    112 |

    Decimals:

    113 | handleDecimalChange(e.target.value)} 117 | value={tokenDecimal} 118 | /> 119 |
    120 |
    121 |

    122 | Tokens to Mint:{" "} 123 |

    124 | handleBalanceChange(e.target.value)} 128 | value={tokenBalance} 129 | /> 130 |
    131 | 132 |
    133 | 140 |
    141 |
    142 |
    */} 143 |
    144 | ); 145 | } 146 | -------------------------------------------------------------------------------- /src/components/SvgIcon.tsx: -------------------------------------------------------------------------------- 1 | import { FC } from "react"; 2 | 3 | interface IconProps { 4 | color?: string; 5 | className?: string; 6 | } 7 | 8 | export const ArrowLine: FC = () => { 9 | return ( 10 | 17 | 18 | 25 | 26 | 27 | 31 | 32 | 33 | ); 34 | }; 35 | 36 | export const SolanaIcon: FC = () => { 37 | return ( 38 | 45 | 49 | 53 | 57 | 58 | ); 59 | }; 60 | 61 | export const WalletIcon: FC = () => { 62 | return ( 63 | 70 | 71 | 75 | 76 | 77 | ); 78 | }; 79 | 80 | export const ExitIcon: FC = () => { 81 | return ( 82 | 89 | 90 | 94 | 95 | 96 | ); 97 | }; 98 | -------------------------------------------------------------------------------- /src/components/LandingHeader/SvgIcon.tsx: -------------------------------------------------------------------------------- 1 | import { FC } from "react"; 2 | 3 | interface IconProps { 4 | color?: string; 5 | className?: string; 6 | } 7 | 8 | export const ArrowLine: FC = () => { 9 | return ( 10 | 17 | 18 | 25 | 26 | 27 | 31 | 32 | 33 | ); 34 | }; 35 | 36 | export const SolanaIcon: FC = () => { 37 | return ( 38 | 45 | 49 | 53 | 57 | 58 | ); 59 | }; 60 | 61 | export const WalletIcon: FC = () => { 62 | return ( 63 | 70 | 71 | 75 | 76 | 77 | ); 78 | }; 79 | 80 | export const WhiteWalletIcon: FC = () => { 81 | return ( 82 | 83 | 84 | 85 | ); 86 | }; 87 | 88 | export const ExitIcon: FC = () => { 89 | return ( 90 | 97 | 98 | 102 | 103 | 104 | ); 105 | }; 106 | -------------------------------------------------------------------------------- /src/contexts/createSPLToken.tsx: -------------------------------------------------------------------------------- 1 | import { TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID, MintLayout, Token } from '@solana/spl-token'; 2 | import { Connection, PublicKey, Transaction, SystemProgram, Keypair, TransactionInstruction, sendAndConfirmRawTransaction, sendAndConfirmTransaction } from '@solana/web3.js'; 3 | import { WalletContextState } from "@solana/wallet-adapter-react"; 4 | import { Dispatch, SetStateAction } from 'react'; 5 | import { PROGRAM_ID, DataV2, createCreateMetadataAccountV3Instruction } from '@metaplex-foundation/mpl-token-metadata'; 6 | import { bundlrStorage, Metaplex, MetaplexFileTag, walletAdapterIdentity, } from '@metaplex-foundation/js'; 7 | 8 | export async function createSPLToken(owner: PublicKey, wallet: WalletContextState, connection: Connection, quantity: number, decimals: number, isChecked: boolean, tokenName: string, symbol: string, metadataURL: string, description: string, file: Readonly<{ 9 | buffer: Buffer; 10 | fileName: string; 11 | displayName: string; 12 | uniqueName: string; 13 | contentType: string | null; 14 | extension: string | null; 15 | tags: MetaplexFileTag[]; 16 | }> | undefined, 17 | metadataMethod: string) { 18 | try { 19 | console.log("creating spl token") 20 | // setIscreating(true) 21 | // setTokenAddresss('') 22 | 23 | const metaplex = Metaplex.make(connection) 24 | .use(walletAdapterIdentity(wallet)) 25 | .use(bundlrStorage({ 26 | address: 'https://node1.bundlr.network', 27 | providerUrl: "https://cosmopolitan-greatest-wave.solana-mainnet.quiknode.pro/85222162e13661be38ab86fe26925e667496812d/", 28 | timeout: 60000, 29 | })); 30 | 31 | const mint_rent = await Token.getMinBalanceRentForExemptMint(connection); 32 | // Token.createSetAuthorityInstruction() 33 | 34 | const mint_account = Keypair.generate(); 35 | 36 | let InitMint: TransactionInstruction 37 | 38 | const [metadataPDA] = await PublicKey.findProgramAddress( 39 | [ 40 | Buffer.from("metadata"), 41 | PROGRAM_ID.toBuffer(), 42 | mint_account.publicKey.toBuffer(), 43 | ], PROGRAM_ID 44 | ); 45 | 46 | let URI: string = '' 47 | console.log("start =====>"); 48 | 49 | if (metadataMethod == 'url') { 50 | if (metadataURL != '') { 51 | URI = metadataURL 52 | } 53 | else { 54 | // setIscreating(false) 55 | // setError('Please provide a metadata URL!') 56 | } 57 | } 58 | 59 | else { 60 | if (file) { 61 | console.log("upload ===>"); 62 | const ImageUri = await metaplex.storage().upload(file); 63 | console.log("imageuri ===>", ImageUri); 64 | if (ImageUri) { 65 | const { uri } = await metaplex.nfts().uploadMetadata({ 66 | name: tokenName, 67 | symbol: symbol, 68 | description: description, 69 | image: ImageUri, 70 | }) 71 | console.log("uri ===>", uri); 72 | if (uri) { 73 | URI = uri 74 | } 75 | } 76 | } 77 | else { 78 | // setIscreating(false) 79 | // setError('Please provide an image file!') 80 | } 81 | } 82 | 83 | if (URI != '') { 84 | 85 | const tokenMetadata: DataV2 = { 86 | name: tokenName, 87 | symbol: symbol, 88 | uri: URI, 89 | sellerFeeBasisPoints: 0, 90 | creators: null, 91 | collection: null, 92 | uses: null 93 | }; 94 | 95 | const args = { 96 | data: tokenMetadata, 97 | isMutable: true, 98 | collectionDetails: null 99 | }; 100 | 101 | const createMintAccountInstruction = await SystemProgram.createAccount({ 102 | fromPubkey: owner, 103 | newAccountPubkey: mint_account.publicKey, 104 | space: MintLayout.span, 105 | lamports: mint_rent, 106 | programId: TOKEN_PROGRAM_ID, 107 | }); 108 | 109 | if (isChecked) { 110 | InitMint = await Token.createInitMintInstruction( 111 | TOKEN_PROGRAM_ID, 112 | mint_account.publicKey, 113 | decimals, 114 | owner, 115 | owner 116 | ); 117 | 118 | } else { 119 | InitMint = await Token.createInitMintInstruction( 120 | TOKEN_PROGRAM_ID, 121 | mint_account.publicKey, 122 | decimals, 123 | owner, 124 | null 125 | ); 126 | 127 | }; 128 | 129 | const associatedTokenAccount = await Token.getAssociatedTokenAddress( 130 | ASSOCIATED_TOKEN_PROGRAM_ID, 131 | TOKEN_PROGRAM_ID, 132 | mint_account.publicKey, 133 | owner 134 | ); 135 | 136 | const createATAInstruction = await Token.createAssociatedTokenAccountInstruction( 137 | ASSOCIATED_TOKEN_PROGRAM_ID, 138 | TOKEN_PROGRAM_ID, 139 | mint_account.publicKey, 140 | associatedTokenAccount, 141 | owner, 142 | owner 143 | ); 144 | 145 | const mintInstruction = await Token.createMintToInstruction( 146 | TOKEN_PROGRAM_ID, 147 | mint_account.publicKey, 148 | associatedTokenAccount, 149 | owner, 150 | [], 151 | quantity * 10 ** decimals 152 | ); 153 | 154 | 155 | const MetadataInstruction = createCreateMetadataAccountV3Instruction( 156 | { 157 | metadata: metadataPDA, 158 | mint: mint_account.publicKey, 159 | mintAuthority: owner, 160 | payer: owner, 161 | updateAuthority: owner, 162 | }, 163 | { 164 | createMetadataAccountArgsV3: args, 165 | } 166 | ); 167 | 168 | console.log("confirming"); 169 | if (wallet.publicKey == null) return; 170 | const createAccountTransaction = new Transaction().add(createMintAccountInstruction, InitMint, createATAInstruction, mintInstruction, MetadataInstruction); 171 | if (wallet.signTransaction == undefined) return undefined; 172 | const blockHash = await connection.getLatestBlockhash(); 173 | createAccountTransaction.recentBlockhash = blockHash.blockhash; 174 | createAccountTransaction.feePayer = wallet.publicKey; 175 | 176 | // const signedTX = await wallet.signTransaction(createAccountTransaction); 177 | 178 | // const createAccountSignature = await sendAndConfirmTransaction(connection, signedTX, [mint_account]); 179 | // console.log(await connection.simulateTransaction(createAccountTransaction)); 180 | 181 | const createAccountSignature = await wallet.sendTransaction(createAccountTransaction, connection, { signers: [mint_account] }); 182 | 183 | console.log("createAccountSignature ===>", createAccountSignature); 184 | // return mint_account.publicKey; 185 | const createAccountconfirmed = await connection.confirmTransaction(createAccountSignature, 'confirmed'); 186 | if (createAccountconfirmed) 187 | return mint_account.publicKey; 188 | return undefined; 189 | // const signature = createAccountSignature.toString() 190 | 191 | 192 | // if (createAccountconfirmed) { 193 | // console.log("confirmed: ", signature); 194 | // return mint_account.publicKey; 195 | // // setIscreating(false); 196 | // // setTokenAddresss(mint_account.publicKey.toBase58()); 197 | // // setSignature(signature) 198 | // } 199 | // const newToken = new Token(connection, mint_account.publicKey, TOKEN_PROGRAM_ID, [wallet.publicKey]); 200 | } 201 | 202 | } catch (error) { 203 | console.log("error: ", error); 204 | // setIscreating(false); 205 | // const err = (error as any)?.message; 206 | // setError(err) 207 | } 208 | 209 | } -------------------------------------------------------------------------------- /src/components/Footer/Footer.tsx: -------------------------------------------------------------------------------- 1 | import Image from 'next/image' 2 | import Link from 'next/link' 3 | import React from 'react' 4 | 5 | export default function Footer() { 6 | return ( 7 | <> 8 |
    9 |
    10 |
    11 |
    12 | logo 17 |
    18 |
    19 | Enjoy the Leading of the
    NFT Token Creator 20 |
    21 |
    22 | 23 | 35 | 36 | 37 | 49 | 50 |
    51 |
    52 | {/*
    53 |
    54 |
    55 | Market 56 |
    57 | 58 | Home 59 | 60 | 61 | About Us 62 | 63 | 64 | How it works? 65 | 66 |
    67 |
    68 |
    69 | Collections 70 |
    71 | 72 | Creator 73 | 74 | 75 | Collections 76 | 77 | 78 | Minted 79 | 80 |
    81 |
    82 |
    83 | Resources 84 |
    85 | 86 | Help 87 | 88 | 89 | Guide 90 | 91 | 92 | Affiliate 93 | 94 |
    95 |
    */} 96 |
    97 |
    98 |
    99 |
    100 |
    101 | ©2024 MIRAGE 102 |
    103 |
    104 |
    105 | Terms & Conditions 106 |
    107 |
    108 | Privacy Policy 109 |
    110 |
    111 |
    112 | 113 | twitter 119 | 120 | 121 | telegram 127 | 128 | 129 | discord 135 | 136 |
    137 |
    138 |
    139 | ©2024 MIRAGE 140 |
    141 |
    142 | 143 | twitter 149 | 150 | 151 | telegram 157 | 158 | 159 | discord 165 | 166 |
    167 |
    168 |
    169 |
    170 | 171 | ) 172 | } 173 | -------------------------------------------------------------------------------- /public/icons/Frame.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /public/header_logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /public/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /src/app/create-token/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import { useState, useRef } from 'react'; 3 | import ConnectButton from "@/components/ConnectButton"; 4 | import Header from "@/components/Header"; 5 | // import { useWallet } from "@solana/wallet-adapter-react"; 6 | import Image from "next/image"; 7 | import { toMetaplexFileFromBrowser } from '@metaplex-foundation/js'; 8 | import { createSPLToken } from '@/contexts/createSPLToken'; 9 | import { useConnection, useWallet } from '@solana/wallet-adapter-react'; 10 | import LandingHeader from '@/components/LandingHeader/LandingHeader'; 11 | import { useRouter } from 'next/navigation'; 12 | import Link from 'next/link'; 13 | import { MarketV2, DEVNET_PROGRAM_ID } from '@raydium-io/raydium-sdk'; 14 | import { createMarket } from '@/contexts/createMarket'; 15 | import { PublicKey } from '@solana/web3.js'; 16 | import { revokeMintAuthority } from '@/contexts/revokeMintAuthority'; 17 | import { revokeFreezeAuthority } from '@/contexts/revokeFreezeAuthority'; 18 | import { createLiquidity } from '@/contexts/createLiquidity'; 19 | import { burnToken } from '@/contexts/burnToken'; 20 | import { ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID, Token } from '@solana/spl-token'; 21 | import { Snackbar } from '@material-ui/core' 22 | import Alert from '@material-ui/lab/Alert' 23 | interface AlertState { 24 | open: boolean 25 | message: string 26 | severity: 'success' | 'info' | 'warning' | 'error' | undefined 27 | } 28 | 29 | let mintAddress: PublicKey | undefined = undefined; 30 | let marketId: PublicKey | null = null; 31 | let lpMint: PublicKey | null | undefined = null; 32 | 33 | export default function Home() { 34 | 35 | const wallet = useWallet() 36 | const { connection } = useConnection() 37 | const router = useRouter(); 38 | const [tokenName, setTokenName] = useState("") 39 | const [tokenSymbol, setTokenSymbol] = useState("") 40 | const [tokenLogo, setTokenLogo] = useState() 41 | const [imageUrl, setImageUrl] = useState(null); 42 | const [tokenDecimal, setTokenDecimal] = useState(9) 43 | const [tokenBalance, setTokenBalance] = useState(0) 44 | const [solBalance, setSolBalance] = useState('0') 45 | const [alertState, setAlertState] = useState({ 46 | open: false, 47 | message: '', 48 | severity: undefined, 49 | }) 50 | // const [isShowOrigin, setIsShowOrigin] = useState(false); 51 | // const wallet = useWallet(); 52 | // const [loading, setLoading] = useState(false); 53 | // const handleNftStake = async () => { 54 | // if (!mint) return; 55 | // try { 56 | // const tx = await stakeNFT(wallet, mint, setLoading); 57 | // if (!tx || !wallet.publicKey) return; 58 | // await stake(tx, wallet.publicKey?.toBase58(), setLoading, getNfts); 59 | // } catch (err) { 60 | // console.log(err); 61 | // } 62 | // }; 63 | const [step, setStep] = useState(1); 64 | const sendLanding = () => { 65 | router.push('/'); 66 | } 67 | const handleCreateToken = async () => { 68 | 69 | if ( 70 | tokenName != "" && 71 | tokenSymbol != "" && 72 | tokenLogo != null && 73 | tokenBalance != 0 74 | ) { 75 | if (!wallet.publicKey) return; 76 | const _file = await toMetaplexFileFromBrowser(tokenLogo); 77 | console.log("file ====>", _file); 78 | console.log("wallet publicKey ===>", wallet.publicKey, wallet); 79 | console.log("connection ===>", connection); 80 | console.log("tokenBalance ===>", tokenBalance); 81 | console.log("tokenName ===>", tokenName); 82 | console.log("tokenSymbol ===>", tokenSymbol); 83 | setAlertState({ 84 | open: true, 85 | message: 'Transaction is in progress...', 86 | severity: 'info', 87 | }) 88 | mintAddress = await createSPLToken(wallet.publicKey, wallet, connection, tokenBalance, tokenDecimal, true, tokenName, tokenSymbol, "", "", _file, "string") 89 | setAlertState({ 90 | open: false, 91 | message: 'Done', 92 | severity: 'info', 93 | }) 94 | } else { 95 | setAlertState({ 96 | open: true, 97 | message: 'Invalid params', 98 | severity: 'error', 99 | }) 100 | return; 101 | // alert("Invalid params") 102 | } 103 | setStep(2); 104 | } 105 | 106 | const handleCreateMarket = async () => { 107 | const baseMint = mintAddress != undefined ? mintAddress : new PublicKey("AXVANX9Exmoghok94dQkdLbQddpe9NjQkQ9heEcauDiF"); 108 | const baseDecimal = tokenDecimal; 109 | const quoteMint = new PublicKey("So11111111111111111111111111111111111111112"); 110 | const quoteDecimal = 9; 111 | const orderSize = 1; 112 | const tickSize = 0.01; 113 | setAlertState({ 114 | open: true, 115 | message: 'Loading...', 116 | severity: 'info', 117 | }) 118 | marketId = await createMarket(connection, wallet, baseMint, baseDecimal, quoteMint, quoteDecimal, orderSize, tickSize); 119 | console.log("creating market id ====>", marketId); 120 | setAlertState({ 121 | open: false, 122 | message: 'Done', 123 | severity: 'info', 124 | }) 125 | setStep(5); 126 | } 127 | 128 | const handleNameChange = (value: string) => { 129 | setTokenName(value) 130 | } 131 | const handleSymbolChange = (value: string) => { 132 | setTokenSymbol(value) 133 | } 134 | const handleLogoFileChange = (files: FileList | null) => { 135 | if (files) { 136 | setTokenLogo(files[0]) 137 | if (files[0]) { 138 | const imageUrls = Object.values(files).map((file) => URL.createObjectURL(file)); 139 | setImageUrl(imageUrls[0]); 140 | } 141 | } else { 142 | setImageUrl(''); 143 | setTokenLogo(null) 144 | } 145 | } 146 | const handleDecimalChange = (value: string) => { 147 | setTokenDecimal(parseInt(value)) 148 | } 149 | const handleBalanceChange = (value: string) => { 150 | setTokenBalance(parseInt(value)) 151 | } 152 | const handleSolBalanceChange = (value: string) => { 153 | setSolBalance(value); 154 | 155 | // alert(value); 156 | } 157 | 158 | const clickRevokeMint = async () => { 159 | if (mintAddress == undefined) { 160 | setAlertState({ 161 | open: true, 162 | message: 'Mint Address Not Set', 163 | severity: 'error', 164 | }) 165 | // alert("mint address is not set"); 166 | return; 167 | } 168 | if (wallet.publicKey == null) { 169 | setAlertState({ 170 | open: true, 171 | message: 'Wallet Not Configured', 172 | severity: 'error', 173 | }) 174 | // alert("wallet is not configured"); 175 | return; 176 | } 177 | const mint = mintAddress; 178 | console.log("revoke mint :mint ===>", mint.toBase58()) 179 | setAlertState({ 180 | open: true, 181 | message: 'Transaction is in progress...', 182 | severity: 'info', 183 | }) 184 | await revokeMintAuthority(connection, wallet, mint); 185 | setAlertState({ 186 | open: false, 187 | message: 'Done', 188 | severity: 'info', 189 | }) 190 | setStep(3); 191 | } 192 | 193 | const clickRevokeFreeze = async () => { 194 | if (mintAddress == undefined) { 195 | setAlertState({ 196 | open: true, 197 | message: 'Mint Address Not Set', 198 | severity: 'error', 199 | }) 200 | // alert("mint address is not set"); 201 | return; 202 | } 203 | const mint = mintAddress; 204 | console.log("revoke freeze: mint ==>", mint.toBase58()); 205 | setAlertState({ 206 | open: true, 207 | message: 'Transaction is in progress...', 208 | severity: 'info', 209 | }) 210 | await revokeFreezeAuthority(connection, wallet, mint); 211 | setAlertState({ 212 | open: false, 213 | message: 'Done', 214 | severity: 'info', 215 | }) 216 | setStep(4); 217 | } 218 | // LP Mint : GozTnFTuSphKc8V2rGnaUm56WGBFnWS3W99iPzhRFv6n 219 | // AMM Id : CVtUnBf87fD3W3v1hcZ9kzXKSHDXjdXpDS6stFTYEPyp 220 | 221 | 222 | // marketId : krnKbe4BiwN7rDDhto1kmnxJttXPnM5u8JDYbMSUL93 223 | // AMM Id : DeaKJBnzRZEEGwfx9TLUSd6YHZuFqtLV9zCUj5PY8Aw8 224 | const clickAddLiquidity = async () => { 225 | if (marketId == undefined) { 226 | setAlertState({ 227 | open: true, 228 | message: 'MarketID not Set', 229 | severity: 'error', 230 | }) 231 | // alert("marketId is not set"); 232 | return; 233 | } 234 | if (mintAddress == undefined) { 235 | setAlertState({ 236 | open: true, 237 | message: 'Mint Address Not Set', 238 | severity: 'error', 239 | }) 240 | // alert("mint address is not set"); 241 | return; 242 | } 243 | 244 | console.log("Liquidity marketId ====>", marketId); 245 | const baseMint = mintAddress; 246 | // const baseMint = new PublicKey("24rsNkc3Xg5mMhPKLi5LvxkY7eS2R9d3CiaqGKUCEa4J"); 247 | const baseDecimal = tokenDecimal; 248 | const quoteMint = new PublicKey("So11111111111111111111111111111111111111112"); 249 | const quoteDecimal = 9; 250 | const orderSize = 1; 251 | const tickSize = 0.01; 252 | // const marketId1 = new PublicKey("krnKbe4BiwN7rDDhto1kmnxJttXPnM5u8JDYbMSUL93"); 253 | // const balanceElement = document.getElementById("sol-balance"); 254 | // if (balanceElement == null) return; 255 | console.log("mintaddress ==>", baseMint.toBase58()); 256 | console.log("solbalance ===>", parseFloat(solBalance)); 257 | setAlertState({ 258 | open: true, 259 | message: 'Transaction is in progress...', 260 | severity: 'info', 261 | }) 262 | lpMint = await createLiquidity(connection, wallet, baseMint, baseDecimal, quoteMint, quoteDecimal, orderSize, tickSize, marketId, tokenBalance, parseFloat(solBalance)); 263 | setAlertState({ 264 | open: false, 265 | message: 'Done', 266 | severity: 'info', 267 | }) 268 | setStep(6); 269 | } 270 | 271 | const clickBurnToken = async () => { 272 | if (wallet.publicKey == null) { 273 | setAlertState({ 274 | open: true, 275 | message: 'Wallet Not Configured Yet', 276 | severity: 'error', 277 | }) 278 | // alert("wallet is not configured yet"); 279 | return; 280 | } 281 | if (lpMint == undefined || null) { 282 | setAlertState({ 283 | open: true, 284 | message: 'No LP Token Exist', 285 | severity: 'error', 286 | }) 287 | // alert("no LP token exist"); 288 | return; 289 | } 290 | const mint = lpMint; 291 | console.log('lpMint ===>', lpMint); 292 | const tokenAccountAddress = await Token.getAssociatedTokenAddress(ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID, mint, wallet.publicKey); 293 | console.log('tokenAccountAddress ===>', tokenAccountAddress.toBase58()); 294 | setAlertState({ 295 | open: true, 296 | message: 'Transaction is in progress...', 297 | severity: 'error', 298 | }) 299 | await burnToken(connection, wallet, mint, tokenAccountAddress); 300 | setAlertState({ 301 | open: false, 302 | message: 'Done', 303 | severity: 'info', 304 | }) 305 | router.push('my-token'); 306 | } 307 | 308 | const fileInputRef = useRef(null); 309 | const handleBig = () => { 310 | if (fileInputRef.current) { 311 | fileInputRef.current.click(); 312 | } 313 | }; 314 | return ( 315 |
    316 | 317 | { 318 | step == 1 && ( 319 |
    320 |
    321 |
    322 | Create Token 323 |
    324 | cross sendLanding()} 331 | /> 332 |
    333 |
    334 |

    Name

    335 | handleNameChange(e.target.value)} 339 | value={tokenName} 340 | /> 341 |
    342 |
    343 |

    Symbol

    344 | handleSymbolChange(e.target.value)} 348 | value={tokenSymbol} 349 | /> 350 |
    351 |
    352 |

    Token Logo

    353 |
    354 |
    355 |
    356 | Token Symbol 357 |
    358 |
    359 | Token Name 360 |
    361 |
    362 | 372 | { 373 | imageUrl && ( 374 |
    375 | fox 380 |
    381 | ) 382 | } 383 |
    384 |
    385 |
    386 |
    387 |

    Decimal

    388 | handleDecimalChange(e.target.value)} 392 | value={tokenDecimal} 393 | /> 394 |
    395 |
    396 |

    397 | Token to Mint 398 |

    399 | handleBalanceChange(e.target.value)} 403 | value={tokenBalance} 404 | /> 405 |
    406 |
    407 |
    408 |
    409 | Create Token Fee 410 |
    411 |
    412 | 0.62 Sol 413 |
    414 |
    415 | 422 |
    423 | ) 424 | } 425 | { 426 | step == 2 && ( 427 |
    428 |
    429 |
    430 | Revoke Mint Authority 431 |
    432 |
    433 |
    434 |

    Token Mint Address

    435 |
    436 | avatar image 443 |

    444 | {wallet.publicKey?.toBase58()} 445 |

    446 |
    447 |
    448 |
    449 | 455 | 461 |
    462 |
    463 | ) 464 | } 465 | { 466 | step == 3 && ( 467 |
    468 |
    469 |
    470 | Revoke Freezing Authority 471 |
    472 |
    473 |
    474 |

    Token Mint Address

    475 |
    476 | avatar image 483 |

    484 | {wallet.publicKey?.toBase58()} 485 |

    486 |
    487 |
    488 |
    489 | 495 | 501 |
    502 |
    503 | ) 504 | } 505 | { 506 | step == 5 && ( 507 |
    508 |
    509 |
    510 | Add LP 511 |
    512 | cross sendLanding() 520 | } 521 | /> 522 |
    523 |
    524 |

    Wallet Address

    525 |
    526 | avatar image 533 |

    534 | {wallet.publicKey?.toBase58()} 535 |

    536 |
    537 |
    538 |
    539 |

    540 | Amount 541 |

    542 |
    543 | handleSolBalanceChange(e.target.value)} 548 | value={solBalance} 549 | /> 550 |

    $sol

    551 |
    552 |
    553 | 559 |
    560 | ) 561 | } 562 | { 563 | step == 4 && ( 564 |
    565 |
    566 |
    567 | Create The Market 568 |
    569 | cross sendLanding()} 576 | /> 577 |
    578 |
    579 |

    Token Mint Address

    580 |
    581 | avatar image 588 |

    589 | {wallet.publicKey?.toBase58()} 590 |

    591 |
    592 |
    593 |
    594 |
    595 | Create Market Fee 596 |
    597 |
    598 | 2.7 Sol 599 |
    600 |
    601 | 607 |
    608 | ) 609 | } 610 | { 611 | step == 6 && ( 612 |
    613 |
    614 |
    615 | Burn 616 |
    617 | cross sendLanding()} 624 | /> 625 |
    626 |
    627 |

    Wallet Address

    628 |
    629 | avatar image 636 |

    637 | {wallet.publicKey?.toBase58()} 638 |

    639 |
    640 |
    641 |
    642 |

    Token Info

    643 |
    644 | Polygon Token 651 |
    652 |
    653 | CRC Token - Sol 654 |
    655 |
    656 | 657 | Decimal: {tokenDecimal} 658 | 659 |     660 | 661 | Token to Mint: {tokenBalance} 662 | 663 |
    664 |
    665 |
    666 |
    667 | {/*
    668 |
    669 | You will receive 670 |
    671 |
    672 | 0.283201 Sol 673 |
    674 |
    */} 675 |
    679 | Burn It 680 |
    681 |
    682 | ) 683 | } 684 | setAlertState({ ...alertState, open: false })} 688 | > 689 | setAlertState({ ...alertState, open: false })} 691 | severity={alertState.severity} 692 | className='text-[red]' 693 | > 694 | {alertState.message} 695 | 696 | 697 |
    698 | ); 699 | } 700 | --------------------------------------------------------------------------------