1import{t as e}from"./jsx-runtime-DxoCn-kY.js";import{t}from"./link-CH4xpYBE.js";import{t as n}from"./site-shell-CZ0Ciykv.js";import{t as r}from"./copy-button-B3yD9nno.js";var i=e(),a=`// contracts/Provenance.sol â every contract carries the hackathon credit in NatSpec 2// SPDX-License-Identifier: MIT 3pragma solidity ^0.8.24; 4 5/// @title Provenance 6/// @notice Built during the Creative AI & Quantum Hackathon 7/// @notice organised by StreetKode Fam during Indian Krump Festival 14 8contract Provenance { 9 event Logged(address indexed author, string cid, uint256 at); 10 11 function log(string calldata cid) external { 12 emit Logged(msg.sender, cid, block.timestamp); 13 } 14} 15`,o=`// scripts/deploy.ts â reads METAMASK_PRIVATE_KEY + CRONOS_RPC_URL from process.env 16import { ethers, run } from "hardhat"; 17 18async function main() { 19 const F = await ethers.getContractFactory("Provenance"); 20 const c = await F.deploy(); 21 await c.waitForDeployment(); 22 const addr = await c.getAddress(); 23 console.log("deployed:", addr); 24 25 // verify on Cronos Explorer 26 await run("verify:verify", { address: addr, constructorArguments: [] }); 27} 28main(); 29`,s=`// src/lib/pinata.ts â pin a Blob to IPFS via Pinata JWT 30export async function pinToIPFS(file: Blob, name = "artifact") { 31 const fd = new FormData(); 32 fd.append("file", file, name); 33 const r = await fetch("https://api.pinata.cloud/pinning/pinFileToIPFS", { 34 method: "POST", 35 headers: { Authorization: \`Bearer \${process.env.PINATA_JWT}\` }, 36 body: fd, 37 }); 38 const { IpfsHash } = await r.json(); 39 return IpfsHash as string; // the CID 40} 41`,c=`// src/main.tsx â Privy social login (embedded wallet, user pays sub-cent gas) 42import { PrivyProvider } from "@privy-io/react-auth"; 43import { cronosTestnet } from "viem/chains"; 44 45<PrivyProvider 46 appId={import.meta.env.VITE_PRIVY_APP_ID} 47 config={{ 48 loginMethods: ["google", "email"], 49 embeddedWallets: { createOnLogin: "users-without-wallets" }, 50 defaultChain: cronosTestnet, 51 supportedChains: [cronosTestnet], 52 }} 53> 54 <App /> 55</PrivyProvider> 56`,l=`# 1. In your Lovable project, add secrets (Settings -> Secrets): 57METAMASK_PRIVATE_KEY=0x... 58PRIVY_APP_ID=... 59PINATA_JWT=eyJhbGciOi... 60CRONOS_RPC_URL=https://evm-t3.cronos.com 61 62# 2. Fund the MetaMask deployer account with test CRO: 63open https://faucet.cronos.com/ 64 65# 3. Copy a mega-prompt from this repo into Lovable. One paste: 66# - scaffolds the React app 67# - writes the Solidity contract (with hackathon credit in NatSpec) 68# - deploys to Cronos Testnet and verifies on Cronos Explorer 69# - wires Privy social login (embedded wallet, user pays sub-cent gas) 70# - pins generated assets to IPFS via Pinata 71# - exposes the contract address + Cronos Explorer link in the UI 72 73# 4. Open the live Cronos Explorer link. Your demo is provably onchain. 74`;function u(){return(0,i.jsx)(n,{children:(0,i.jsxs)(`article`,{className:`max-w-3xl mx-auto px-5 pt-14 pb-20`,children:[(0,i.jsx)(`div`,{className:`eyebrow text-primary mb-4`,children:`build strategy · onchain`}),(0,i.jsxs)(`h1`,{className:`font-display text-4xl sm:text-5xl md:text-6xl font-bold leading-[0.95] tracking-tight text-foreground`,children:[`Real onchain, `,(0,i.jsx)(`span`,{className:`text-primary italic`,children:`five secrets`}),`, one build.`]}),(0,i.jsx)(`p`,{className:`mt-6 text-lg text-muted-foreground leading-relaxed font-light`,children:`Every mega-prompt in this repo uses the same pattern, because it's the only pattern that lets a Lovable account ship a verifiable Cronos demo in one shot.`}),(0,i.jsxs)(`section`,{className:`mt-10 p-6 border border-primary/30 bg-card`,children:[(0,i.jsx)(`h2`,{className:`font-display text-xl font-semibold text-foreground italic`,children:`Why Cronos Testnet and not mainnet?`}),(0,i.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground leading-relaxed font-light`,children:`Cronos Testnet is a real EVM testnet â the same Solidity, the same explorer UI, the same wallets â but funded by a free faucet (test CRO). Every contract you deploy is publicly inspectable, but you never spend real CRO and your demo can't accidentally drain a user. Move to Cronos mainnet (chain 25) after the hackathon by swapping the RPC and chain id.`})]}),(0,i.jsxs)(`section`,{className:`mt-10`,children:[(0,i.jsx)(`h2`,{className:`font-display text-2xl font-semibold mb-3 text-foreground italic`,children:`The recipe`}),(0,i.jsxs)(`div`,{className:`flex items-baseline justify-between mb-2`,children:[(0,i.jsx)(`span`,{className:`eyebrow text-primary`,children:`recipe`}),(0,i.jsx)(r,{text:l,label:`Copy recipe`})]}),(0,i.jsx)(`pre`,{className:`whitespace-pre-wrap break-words [overflow-wrap:anywhere] font-mono text-[12px] sm:text-[13px] leading-relaxed p-4 sm:p-5 max-w-full overflow-x-hidden border border-border bg-card text-foreground
74/90`,children:l})]}),(0,i.jsxs)(`section`,{className:`mt-10`,children:[(0,i.jsx)(`h2`,{className:`font-display text-2xl font-semibold mb-3 text-foreground italic`,children:`1. The contract â credit baked in`}),(0,i.jsx)(`p`,{className:`text-sm text-muted-foreground mb-3 font-light`,children:`Every Solidity file deployed from a Creative Blockchain prompt MUST carry the hackathon credit in NatSpec, so provenance lives onchain alongside the bytecode.`}),(0,i.jsxs)(`div`,{className:`flex items-baseline justify-between mb-2`,children:[(0,i.jsx)(`span`,{className:`eyebrow text-primary`,children:`contracts/Provenance.sol`}),(0,i.jsx)(r,{text:a,label:`Copy`})]}),(0,i.jsx)(`pre`,{className:`whitespace-pre-wrap break-words [overflow-wrap:anywhere] font-mono text-[11px] sm:text-[12px] leading-relaxed p-4 sm:p-5 max-w-full overflow-x-hidden border border-border bg-card text-foreground/90`,children:a})]}),(0,i.jsxs)(`section`,{className:`mt-10`,children:[(0,i.jsx)(`h2`,{className:`font-display text-2xl font-semibold mb-3 text-foreground italic`,children:`2. Deploy + verify on Cronos Explorer`}),(0,i.jsxs)(`div`,{className:`flex items-baseline justify-between mb-2`,children:[(0,i.jsx)(`span`,{className:`eyebrow text-primary`,children:`scripts/deploy.ts`}),(0,i.jsx)(r,{text:o,label:`Copy`})]}),(0,i.jsx)(`pre`,{className:`whitespace-pre-wrap break-words [overflow-wrap:anywhere] font-mono text-[11px] sm:text-[12px] leading-relaxed p-4 sm:p-5 max-w-full overflow-x-hidden border border-border bg-card text-foreground/90`,children:o})]}),(0,i.jsxs)(`section`,{className:`mt-10`,children:[(0,i.jsx)(`h2`,{className:`font-display text-2xl font-semibold mb-3 text-foreground italic`,children:`3. Pin assets to IPFS via Pinata`}),(0,i.jsxs)(`div`,{className:`flex items-baseline justify-between mb-2`,children:[(0,i.jsx)(`span`,{className:`eyebrow text-primary`,children:`src/lib/pinata.ts`}),(0,i.jsx)(r,{text:s,label:`Copy`})]}),(0,i.jsx)(`pre`,{className:`whitespace-pre-wrap break-words [overflow-wrap:anywhere] font-mono text-[11px] sm:text-[12px] leading-relaxed p-4 sm:p-5 max-w-full overflow-x-hidden border border-border bg-card text-foreground/90`,children:s})]}),(0,i.jsxs)(`section`,{className:`mt-10`,children:[(0,i.jsx)(`h2`,{className:`font-display text-2xl font-semibold mb-3 text-foreground italic`,children:`4. Sign in with Google via Privy`}),(0,i.jsxs)(`div`,{className:`flex items-baseline justify-between mb-2`,children:[(0,i.jsx)(`span`,{className:`eyebrow text-primary`,children:`src/main.tsx`}),(0,i.jsx)(r,{text:c,label:`Copy`})]}),(0,i.jsx)(`pre`,{className:`whitespace-pre-wrap break-words [overflow-wrap:anywhere] font-mono text-[11px] sm:text-[12px] leading-relaxed p-4 sm:p-5 max-w-full overflow-x-hidden border border-border bg-card text-foreground/90`,children:c})]}),(0,i.jsxs)(`section`,{className:`mt-10 p-6 border border-border bg-card`,children:[(0,i.jsx)(`h2`,{className:`font-display text-xl font-semibold text-foreground italic`,children:`Hackathon rules of thumb`}),(0,i.jsxs)(`ul`,{className:`mt-3 space-y-2 text-sm text-muted-foreground font-light`,children:[(0,i.jsx)(`li`,{children:`· One mega-prompt = one build message. Don't iterate the architecture, iterate the UI.`}),(0,i.jsx)(`li`,{children:`· Always show the live Cronos Explorer link in the UI â that's your proof.`}),(0,i.jsx)(`li`,{children:`· Have judges grab free test CRO from faucet.cronos.com â gas is sub-cent on Cronos.`}),(0,i.jsx)(`li`,{children:`· Pin every user-generated asset to IPFS the moment it's created.`}),(0,i.jsx)(`li`,{children:`· Add a "Built during the Creative AI & Quantum Hackathon â StreetKode Fam · Indian Krump Festival 14" line to your footer.`})]})]}),(0,i.jsxs)(`div`,{className:`mt-10 flex flex-wrap gap-3`,children:[(0,i.jsx)(t,{to:`/themes`,className:`px-5 py-2.5 bg-primary text-primary-foreground font-semibold hover:bg-foreground transition`,children:`Pick an idea â`}),(0,i.jsx)(t,{to:`/quantum-primer`,className:`px-5 py-2.5 border border-primary/40 text-foreground hover:bg-primary hover:text-primary-foreground transition`,children:`Blockchain primer`})]})]})})}export{u as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.