{"id":27404720,"url":"https://github.com/vvizardev/raffle-gaming-contract","last_synced_at":"2026-03-08T07:31:34.680Z","repository":{"id":253465887,"uuid":"822935018","full_name":"vvizardev/raffle-gaming-contract","owner":"vvizardev","description":"raffle-gaming-contract : This is the raffle project that winners can receive the raffle NFT, spl-tokens or winners can buy NFTs by low price. You can buy tickets by $Sol and $PREY token.","archived":false,"fork":false,"pushed_at":"2024-10-05T19:14:35.000Z","size":79,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-28T09:37:26.467Z","etag":null,"topics":["gaming","nft","raffle","smartcontract","solana","spl-token","token"],"latest_commit_sha":null,"homepage":"","language":"Rust","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-02T05:54:22.000Z","updated_at":"2024-11-01T14:48:55.000Z","dependencies_parsed_at":"2024-09-29T07:05:57.916Z","dependency_job_id":"37e8e88f-c898-4b13-a87c-c397b5e61f67","html_url":"https://github.com/vvizardev/raffle-gaming-contract","commit_stats":null,"previous_names":["solkeen/raffle-gaming-contract","wizasol/raffle-gaming-contract","vvizardev/raffle-gaming-contract"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vvizardev/raffle-gaming-contract","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvizardev%2Fraffle-gaming-contract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvizardev%2Fraffle-gaming-contract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvizardev%2Fraffle-gaming-contract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvizardev%2Fraffle-gaming-contract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vvizardev","download_url":"https://codeload.github.com/vvizardev/raffle-gaming-contract/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvizardev%2Fraffle-gaming-contract/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30248857,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T05:41:50.788Z","status":"ssl_error","status_checked_at":"2026-03-08T05:41:39.075Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["gaming","nft","raffle","smartcontract","solana","spl-token","token"],"created_at":"2025-04-14T05:42:50.768Z","updated_at":"2026-03-08T07:31:34.663Z","avatar_url":"https://github.com/vvizardev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raffle-program\nThis is the raffle project that winners can receive the raffle NFT, spl-tokens or winners can buy NFTs by low price. You can buy tickets by $Sol and $PREY token.\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/fury/.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### - As a Smart Contract Owner\nFor the first time use, the Smart Contract Owner should `initialize` the Smart Contract for global account allocation.\n- `initProject`\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 `creatRaffle` function, the NFT will be sent to the PDA and the data of this raffle is stored on blockchain.\n```js\ncreatRaffle(\n    userAddress: PublicKey,\n    nft_mint: PublicKey,\n    ticketPriceSol: number,\n    ticketPriceReap: number,\n    endTimestamp: number,\n    rewardAmount: number,\n    winnerCount: number,\n    whitelisted: 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 and $REAP token to the raffle creator.\n```js\nbuyTicket(\n    userAddress: PublicKey,\n    nft_mint: PublicKey,\n    amount: number\n)\n```\n\nWhen users want to see the winners, call `revealWinner` function.\n```js\nrevealWinner(\n    userAddress: PublicKey,\n    nft_mint: PublicKey\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvizardev%2Fraffle-gaming-contract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvvizardev%2Fraffle-gaming-contract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvizardev%2Fraffle-gaming-contract/lists"}