{"id":24667981,"url":"https://github.com/vvizardev/super-potato-raffle","last_synced_at":"2026-05-11T16:14:04.711Z","repository":{"id":253462436,"uuid":"822732030","full_name":"vvizardev/super-potato-raffle","owner":"vvizardev","description":"super-potato-raffle : This is the raffle program by using $SOL to buy tickets","archived":false,"fork":false,"pushed_at":"2024-10-05T19:13:03.000Z","size":611,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T12:22:16.507Z","etag":null,"topics":["frontend","raffle","smart-contract","solana","tickets"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vvizardev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-01T17:50:32.000Z","updated_at":"2024-10-05T19:13:07.000Z","dependencies_parsed_at":"2024-08-16T21:57:11.568Z","dependency_job_id":"76016a4e-1292-4374-b827-f49a2f077aae","html_url":"https://github.com/vvizardev/super-potato-raffle","commit_stats":null,"previous_names":["solkeen/super-potato-raffle","wizasol/super-potato-raffle","vvizardev/super-potato-raffle"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vvizardev/super-potato-raffle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvizardev%2Fsuper-potato-raffle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvizardev%2Fsuper-potato-raffle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvizardev%2Fsuper-potato-raffle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvizardev%2Fsuper-potato-raffle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vvizardev","download_url":"https://codeload.github.com/vvizardev/super-potato-raffle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvizardev%2Fsuper-potato-raffle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32902653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["frontend","raffle","smart-contract","solana","tickets"],"created_at":"2025-01-26T08:25:07.299Z","updated_at":"2026-05-11T16:14:04.684Z","avatar_url":"https://github.com/vvizardev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SuperPotato-Raffle-program\nThis is the raffle program by using $SOL to buy tickets\n\n\u003ch4\u003e 📞 Cᴏɴᴛᴀᴄᴛ ᴍᴇ Oɴ ʜᴇʀᴇ: 👆🏻 \u003c/h4\u003e\n\n\u003cp\u003e \n    \u003ca href=\"mailto:nakao95911@gmail.com\" target=\"_blank\"\u003e\n        \u003cimg alt=\"Email\"\n        src=\"https://img.shields.io/badge/Email-00599c?style=for-the-badge\u0026logo=gmail\u0026logoColor=white\"/\u003e\n    \u003c/a\u003e\n     \u003ca href=\"https://x.com/_wizardev\" target=\"_blank\"\u003e\u003cimg alt=\"Twitter\"\n        src=\"https://img.shields.io/badge/Twitter-000000?style=for-the-badge\u0026logo=x\u0026logoColor=white\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://discordapp.com/users/471524111512764447\" target=\"_blank\"\u003e\u003cimg alt=\"Discord\"\n        src=\"https://img.shields.io/badge/Discord-7289DA?style=for-the-badge\u0026logo=discord\u0026logoColor=white\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://t.me/wizardev\" target=\"_blank\"\u003e\u003cimg alt=\"Telegram\"\n        src=\"https://img.shields.io/badge/Telegram-26A5E4?style=for-the-badge\u0026logo=telegram\u0026logoColor=white\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Install Dependencies\n- Install `node` and `yarn`\n- Install `ts-node` as global command\n- Confirm the solana wallet preparation: `/home/---/.config/solana/id.json` in test case\n\n## Usage\n- Main script source for all functionality is here: `/cli/script.ts`\n- Program account types are declared here: `/cli/types.ts`\n- Idl to make the JS binding easy is here: `/cli/raffle.json`\n\nAble to test the script functions working in this way.\n- Change commands properly in the main functions of the `script.ts` file to call the other functions\n- Confirm the `ANCHOR_WALLET` environment variable of the `ts-node` script in `package.json`\n- Run `yarn ts-node`\n\n# Features\n\n##  How to deploy this program?\nFirst of all, you have to git clone in your PC.\nIn the folder `raffle`, in the terminal \n1. `yarn`\n2. `anchor build`\n   In the last sentence you can see:  \n```\n To deploy this program:\n  $ solana program deploy /home/.../raffle/target/deploy/raffle.so\nThe program address will default to this keypair (override with --program-id):\n  /home/.../raffle/target/deploy/raffle-keypair.json\n```  \n3. `solana-keygen pubkey /home/.../raffle/target/deploy/raffle-keypair.json`\n4. You can get the pubkey of the program ID : ex.\"7M...KWJ\"\n5. Please add this pubkey to the lib.rs\n  `line 20: declare_id!(\"7M...KWJ\");`\n6. Please add this pubkey to the Achor.toml\n  `line 4: raffle = \"7M...KWJ\"`\n7. Please add this pubkey to the scripts.ts\n  `line 21: const PROGRAM_ID = \"7M...KWJ\";`\n8. `anchor build` again\n9. `solana program deploy /home/.../raffle/target/deploy/raffle.so`\n10. In the script.ts code, `line 54 decomment`\n```js\n    await initProject();\n```  \n11. `yarn ts-node`\n12. If this error comes - `Error: Provider local is not available on browser.`, `export BRWOSER=`\n13. `yarn ts-node`\n\n\u003cp align = \"center\"\u003e\nThen, you can enjoy this program 🎭\n\u003c/p\u003e\n\u003c/br\u003e\n\n## How to use?\n\n### - As a Smart Contract Owner\nFor the first time use, the Smart Contract Owner should `initialize` the Smart Contract for global account allocation.\n```js\ninitProject()\n```\n\nTo add collections who will use this raffle site, Admin should call `addCollection` function.(In this collectionId is the verified creator of this collection NFTs)\n```js\naddCollection(\n    userAddress: PublicKey,\n    collectionId: PublicKey\n)\n```\n\n### - As the Creator of Raffle\nThe NFTs will be stored in the globalAuthority address.\nWhen the admin creates a raffle, call the `createRaffle` function, the NFT will be sent to the PDA and the data of this raffle is stored on blockchain.\n```js\ncreateRaffle(\n    userAddress: PublicKey,\n    nft_mint: PublicKey,\n    ticketPriceSol: number,\n    endTimestamp: number,\n    max: number\n)\n```\n\nThe creator can withdraw NFT from the PDA if nobody buys tickets and the time exceeds the endTime of raffle. \n```js\nwithdrawNft(\n    userAddress: PublicKey,\n    nft_mint: PublicKey\n)\n```\n\n### - As the User of Raffle\nWhen users buy tickets, call the `buyTicket` function, users will send $SOL to the raffle creator.\n```js\nbuyTicket(\n    userAddress: PublicKey,\n    nft_mint: PublicKey,\n    amount: number\n)\n```\n\nTo see the winner of the raffle, someone should call `revealWinnner` function. If then, in the `RafflePool` account, `winner`  field will be charged with winner's address.\n```js\nrevealWinner(\n    userAddress: PublicKey,\n    nft_mint: PublicKey\n)\n```\n\n\n### - As the Winner of Raffle \nWinners can claim rewards by calling `claimReward` function.\n```js\nclaimReward(\n    userAddress: PublicKey,\n    nft_mint: PublicKey\n)\n```\n\n# 🥔🥔🥔 Super Potato NFT Raffle | Solana | Next.js + Typescript\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./.github/preview.png\" alt=\"Super potato\" /\u003e\n\u003c/p\u003e\n\n## 📖 Requirements\n### 👶 User side\n- Collection register\n- Raffle create \u003cbr /\u003e\n  They will have to pay about 0.4 SOL per NFT when creating a raffle.\n- Buy tickets\n- Withdraw NFT (after end time \u0026 and not sold any tickets)\n- Reveal winner\n- Claim reward\n### 👨‍💻 Admin side\n- User-registered Accept/Deny of collection\n### Like FFF Raffle (famous fox federation)\n[rafffle.famousfoxes.com](https://rafffle.famousfoxes.com/)\n\u003cbr /\u003e\n\n## Mindfolk Landing Page\n[www.mindfolk.art](https://www.mindfolk.art/)\n\n## 🌐 Deployed\n[superpotato-raffle.herokuapp.com/](https://superpotato-raffle.herokuapp.com/)\n\n\n## 🛠 ※ SET PROJECT ENVIRONMENT\n### Firebase set\nReplace firebase configuration values \u003cbr /\u003e\n`src/api/firebase.ts` \u003cbr/\u003e\n```tsx\nconst firebaseConfig = {\n    apiKey: \"AIzaSyAI_r1Rs11kIsWJFiCVA4aGt58ffsZrclY\",\n    authDomain: \"mindfolk-raffle-afb92.firebaseapp.com\",\n    projectId: \"mindfolk-raffle-afb92\",\n    storageBucket: \"mindfolk-raffle-afb92.appspot.com\",\n    messagingSenderId: \"106626330620\",\n    appId: \"1:106626330620:web:c3343f7736902e58774c79\",\n    measurementId: \"G-NHD9LYKTVJ\"\n};\n```\n### Project config data\n`src/config.tsx` \u003cbr /\u003e\n```tsx\nexport const NETWORK = \"mainnet-beta\"; //mainnet-beta | devnet\nexport const ADMINS = [\n    \"7TBRMXkRbVpRWgLkrrTaqFJvXSMkMwnNKEZ4dbRh8Lnf\",\n    \"FePFmE1CbbTkiKg4K9A41dQcXfhPqLSJrEBcdXwBj3aa\",\n    \"A8rgsJecHutEamvb7e8p1a14LQH3vGRPr796CDaESMeu\" // developer wallet address\n]\n\n// deployed url\nexport const LIVE_URL = \"https://superpotato-raffle.herokuapp.com/\" \n// treasury wallet address\nexport const TREASURY_WALLET = new PublicKey('BEQZXkjg1BzY5349FXGPgvsbySWw5R7zjEC4xQhzmQR5');\n//smart contract program id\nexport const PROGRAM_ID = \"Geb2fkVJMgNbjPwMkcjfR3n4AiN7DKqKwctFwfErkbn7\"; \n// solana RPC url\nexport const RPC_URL = \"https://a2-mind-prd-api.azurewebsites.net/rpc\";\n\n```\n\n## Install\n\n```bash\nnpm run install\n# or\nyarn install\n```\n## Development\n\n```bash\nnpm run dev\n# or\nyarn dev\n```\n\n## 🔥 Database\nGoogle **Firebase**\n- **collections** \u003cbr /\u003e\n    When users send a request to register a Collection, it is stored in the database Collection calls **collections**.\u003cbr /\u003e\n    Admin can **Accept** or **Deny** those collections. \u003cbr /\u003e\n    All collections are also stored on the blockchain.\n- **raffles** \u003cbr /\u003e\n    When user create a raffle, it saved also database `raffles` document. \u003cbr /\u003e\n    Raffle on db is updated, when those actions \u003cbr /\u003e\n    `buy tickets`, `reveal winner`, `withdraw nft`, `claim reward`\n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvizardev%2Fsuper-potato-raffle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvvizardev%2Fsuper-potato-raffle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvizardev%2Fsuper-potato-raffle/lists"}