Function bodies 14 total
main function · typescript · L11-L54 (44 LOC)scripts/add-metadata.ts
async function main() {
const walletPath = process.env.HOME + "/system-dropshoping/dropaccess-wallet.json";
const secretKey = JSON.parse(fs.readFileSync(walletPath, "utf-8"));
const web3Keypair = Keypair.fromSecretKey(Uint8Array.from(secretKey));
console.log("Wallet:", web3Keypair.publicKey.toBase58());
console.log("Mint:", MINT_ADDRESS);
console.log("Metadata URI:", METADATA_URI);
const umi = createUmi("https://api.mainnet-beta.solana.com");
const umiKeypair = fromWeb3JsKeypair(web3Keypair);
const signer = createSignerFromKeypair(umi, umiKeypair);
umi.use(signerIdentity(signer));
console.log("Creating metadata account...");
const tx = await createMetadataAccountV3(umi, {
mint: publicKey(MINT_ADDRESS),
mintAuthority: signer,
payer: signer,
updateAuthority: signer.publicKey,
data: {
name: "DropAccess",
symbol: "DROPA",
uri: METADATA_URI,
sellerFeeBasisPoints: 0,
creators: null,
collection: null,
usmain function · typescript · L9-L91 (83 LOC)scripts/create-pool.ts
async function main() {
const walletPath = process.env.HOME + "/system-dropshoping/dropaccess-wallet.json";
const secretKey = JSON.parse(fs.readFileSync(walletPath, "utf-8"));
const owner = Keypair.fromSecretKey(Uint8Array.from(secretKey));
console.log("Wallet:", owner.publicKey.toBase58());
const connection = new Connection("https://api.mainnet-beta.solana.com", "confirmed");
const balance = await connection.getBalance(owner.publicKey);
console.log("Balance:", balance / 1e9, "SOL");
console.log("Loading Raydium SDK...");
const raydium = await Raydium.load({
owner,
connection,
cluster: "mainnet",
disableFeatureCheck: true,
blockhashCommitment: "finalized",
});
console.log("Fetching pool configs...");
const cpmmConfigs = await raydium.api.getCpmmConfigs();
console.log("Available configs:", cpmmConfigs.length);
// Find a config that has an initialized fee account
for (const cfg of cpmmConfigs) {
console.log(`Config: ${cfg.id}, fuAboutPage function · typescript · L10-L70 (61 LOC)src/app/about/page.tsx
export default function AboutPage() {
return (
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-20">
{/* Mission */}
<div className="text-center mb-20">
<h1 className="text-4xl font-bold">
<span className="gradient-text">{MISSION.title}</span>
</h1>
<p className="mt-6 text-lg text-gray-400 max-w-3xl mx-auto leading-relaxed">
{MISSION.description}
</p>
</div>
{/* Values */}
<div className="mb-20">
<h2 className="text-2xl font-bold text-center text-white mb-10">Our Values</h2>
<div className="grid sm:grid-cols-2 lg:grid-cols-4 gap-6">
{VALUES.map((value) => (
<div key={value.title} className="gradient-border rounded-xl p-6 bg-surface-light">
<h3 className="text-lg font-semibold text-white mb-2">{value.title}</h3>
<p className="text-sm text-gray-400">{value.description}</p>
</div>
))}
</div>
HowToBuyPage function · typescript · L38-L96 (59 LOC)src/app/how-to-buy/page.tsx
export default function HowToBuyPage() {
return (
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-20">
<div className="text-center mb-16">
<h1 className="text-4xl font-bold">
How to Buy <span className="gradient-text">DROPA</span>
</h1>
<p className="mt-4 text-gray-400 max-w-xl mx-auto">
Get your {TOKEN.symbol} tokens in 5 simple steps. No complicated process — just a wallet and some SOL.
</p>
</div>
{/* Contract Address */}
<div className="text-center mb-12 p-6 rounded-xl bg-surface-light border border-white/5">
<p className="text-sm text-gray-400 mb-3">Contract Address</p>
<CopyAddress />
<p className="text-xs text-gray-500 mt-2">Always verify the contract address before swapping</p>
</div>
{/* Steps */}
<div className="space-y-6 mb-16">
{STEPS.map((s) => (
<div key={s.step} className="flex gap-5 p-6 rounded-xl bg-surface-light bordRootLayout function · typescript · L34-L48 (15 LOC)src/app/layout.tsx
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body className={`${inter.className} antialiased`}>
<Navbar />
<main className="min-h-screen pt-16">{children}</main>
<Footer />
</body>
</html>
);
}Home function · typescript · L52-L166 (115 LOC)src/app/page.tsx
export default function Home() {
return (
<>
{/* Hero */}
<section className="relative overflow-hidden">
<div className="absolute inset-0 bg-gradient-to-b from-primary/10 via-transparent to-transparent" />
<div className="relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-24 sm:py-32 lg:py-40">
<div className="text-center max-w-3xl mx-auto">
<Image src="/images/logo.png" alt="DropAccess" width={80} height={80} className="rounded-full mx-auto mb-6" />
<div className="inline-block px-4 py-1.5 rounded-full bg-primary/10 border border-primary/20 text-primary-light text-sm font-medium mb-6">
Built on Solana
</div>
<h1 className="text-4xl sm:text-5xl lg:text-6xl font-bold tracking-tight">
Unlock{" "}
<span className="gradient-text">Exclusive Access</span>{" "}
to Dropshipping
</h1>
<p className="mt-6 text-lg text-gray-400 RoadmapPage function · typescript · L9-L66 (58 LOC)src/app/roadmap/page.tsx
export default function RoadmapPage() {
return (
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-20">
<div className="text-center mb-16">
<h1 className="text-4xl font-bold">
<span className="gradient-text">Roadmap</span>
</h1>
<p className="mt-4 text-gray-400 max-w-xl mx-auto">
Our journey from token launch to building the leading decentralized e-commerce membership platform.
</p>
</div>
<div className="relative">
{/* Vertical line */}
<div className="absolute left-6 top-0 bottom-0 w-px bg-gradient-to-b from-primary via-accent to-transparent" />
<div className="space-y-12">
{PHASES.map((phase) => (
<div key={phase.phase} className="relative pl-16">
{/* Dot */}
<div
className={`absolute left-4 top-1 w-5 h-5 rounded-full border-2 ${
phase.status === "current"
? "bg-primary boSource: Repobility analyzer · https://repobility.com
SwapPage function · typescript · L26-L162 (137 LOC)src/app/swap/page.tsx
export default function SwapPage() {
return (
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-20">
<div className="text-center mb-12">
<h1 className="text-4xl font-bold">
Swap for <span className="gradient-text">DROPA</span>
</h1>
<p className="mt-4 text-gray-400 max-w-xl mx-auto">
Buy {TOKEN.symbol} tokens directly on Raydium, Solana's leading decentralized exchange.
</p>
</div>
{/* Contract Address */}
<div className="text-center mb-10 p-6 rounded-xl bg-surface-light border border-white/5">
<p className="text-sm text-gray-400 mb-3">Contract Address</p>
<CopyAddress />
</div>
{/* Raydium Swap Embed */}
<div className="rounded-2xl bg-surface-light border border-white/5 p-6 mb-12">
<div className="text-center mb-6">
<h2 className="text-xl font-bold text-white mb-2">Swap via Raydium</h2>
<p className="text-sm text-gray-400">SolanPieChart function · typescript · L10-L48 (39 LOC)src/app/tokenomics/page.tsx
function PieChart() {
const size = 200;
const cx = size / 2;
const cy = size / 2;
const radius = 80;
let cumulativePercent = 0;
function getCoordinates(percent: number) {
const x = Math.cos(2 * Math.PI * percent) * radius;
const y = Math.sin(2 * Math.PI * percent) * radius;
return [cx + x, cy + y];
}
return (
<svg viewBox={`0 0 ${size} ${size}`} className="w-64 h-64 mx-auto">
{ALLOCATIONS.map((alloc) => {
const startPercent = cumulativePercent;
cumulativePercent += alloc.percent / 100;
const [startX, startY] = getCoordinates(startPercent);
const [endX, endY] = getCoordinates(cumulativePercent);
const largeArc = alloc.percent > 50 ? 1 : 0;
const d = [
`M ${cx} ${cy}`,
`L ${startX} ${startY}`,
`A ${radius} ${radius} 0 ${largeArc} 1 ${endX} ${endY}`,
"Z",
].join(" ");
return <path key={alloc.label} d={d} fill={alloc.color} opacity={0.85} />;
getCoordinates function · typescript · L17-L21 (5 LOC)src/app/tokenomics/page.tsx
function getCoordinates(percent: number) {
const x = Math.cos(2 * Math.PI * percent) * radius;
const y = Math.sin(2 * Math.PI * percent) * radius;
return [cx + x, cy + y];
}TokenomicsPage function · typescript · L50-L92 (43 LOC)src/app/tokenomics/page.tsx
export default function TokenomicsPage() {
return (
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-20">
<div className="text-center mb-16">
<h1 className="text-4xl font-bold">
<span className="gradient-text">Tokenomics</span>
</h1>
<p className="mt-4 text-gray-400 max-w-xl mx-auto">
Transparent, fair, and built to last. Here's exactly how {TOKEN.totalSupply} DROPA tokens are distributed.
</p>
</div>
{/* Chart + Allocations */}
<div className="grid md:grid-cols-2 gap-12 items-center mb-20">
<PieChart />
<div className="space-y-4">
{ALLOCATIONS.map((alloc) => (
<div key={alloc.label} className="flex items-center gap-4 p-4 rounded-xl bg-surface-light border border-white/5">
<div className="w-4 h-4 rounded-full shrink-0" style={{ backgroundColor: alloc.color }} />
<div className="flex-1">
<div className="flex juFooter function · typescript · L5-L84 (80 LOC)src/components/layout/Footer.tsx
export default function Footer() {
return (
<footer className="bg-surface-light border-t border-white/5">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
<div className="grid grid-cols-1 md:grid-cols-4 gap-8">
{/* Brand */}
<div className="md:col-span-2">
<div className="flex items-center gap-2">
<Image src="/images/logo.png" alt={TOKEN.name} width={28} height={28} className="rounded-full" />
<span className="text-xl font-bold gradient-text">{TOKEN.name}</span>
</div>
<p className="mt-3 text-gray-400 text-sm max-w-md">
Bridging cryptocurrency and e-commerce. Hold DROPA to unlock exclusive
dropshipping resources, tools, and a global community of entrepreneurs.
</p>
<div className="flex gap-4 mt-4">
{[
{ href: LINKS.twitter, label: "Twitter", icon: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.2Navbar function · typescript · L8-L82 (75 LOC)src/components/layout/Navbar.tsx
export default function Navbar() {
const [open, setOpen] = useState(false);
return (
<nav className="fixed top-0 left-0 right-0 z-50 bg-surface/80 backdrop-blur-xl border-b border-white/5">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="flex items-center justify-between h-16">
<Link href="/" className="flex items-center gap-2">
<Image src="/images/logo.png" alt="DropAccess" width={32} height={32} className="rounded-full" />
<span className="text-xl font-bold gradient-text">DropAccess</span>
</Link>
{/* Desktop */}
<div className="hidden md:flex items-center gap-6">
{NAV_ITEMS.map((item) => (
<Link
key={item.href}
href={item.href}
className="text-sm text-gray-300 hover:text-white transition-colors"
>
{item.label}
</Link>
))}
<Link
CopyAddress function · typescript · L6-L31 (26 LOC)src/components/shared/CopyAddress.tsx
export default function CopyAddress() {
const [copied, setCopied] = useState(false);
const copy = () => {
navigator.clipboard.writeText(TOKEN.mintAddress);
setCopied(true);
setTimeout(() => setCopied(false), 2000);
};
return (
<button
onClick={copy}
className="inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-surface-lighter border border-white/10 hover:border-primary/50 transition-colors text-sm font-mono text-gray-300"
>
<span className="truncate max-w-[200px]">{TOKEN.mintAddress}</span>
<svg className="w-4 h-4 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
{copied ? (
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 13l4 4L19 7" />
) : (
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" />
)}
</svg