{"id":19413975,"url":"https://github.com/0xapp123/raffle-pro-contract","last_synced_at":"2026-05-12T21:36:53.293Z","repository":{"id":232096160,"uuid":"781702497","full_name":"0xapp123/raffle-pro-contract","owner":"0xapp123","description":"This is the raffle program by using 🌇$ZION, 👻$BOOGA and $SOL","archived":false,"fork":false,"pushed_at":"2024-04-09T09:23:56.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-07T16:10:57.669Z","etag":null,"topics":["anchor","nft","raffle","rust","smartcontracts","solana","spl-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/0xapp123.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-04-03T21:58:37.000Z","updated_at":"2024-04-03T22:18:58.000Z","dependencies_parsed_at":"2024-11-10T12:37:22.063Z","dependency_job_id":"b26a9a3e-8aac-47b7-8ae6-d2bd69d2d0b1","html_url":"https://github.com/0xapp123/raffle-pro-contract","commit_stats":null,"previous_names":["0xapp123/raffle-pro-contract"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xapp123%2Fraffle-pro-contract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xapp123%2Fraffle-pro-contract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xapp123%2Fraffle-pro-contract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xapp123%2Fraffle-pro-contract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xapp123","download_url":"https://codeload.github.com/0xapp123/raffle-pro-contract/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240593147,"owners_count":19825930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["anchor","nft","raffle","rust","smartcontracts","solana","spl-token"],"created_at":"2024-11-10T12:35:40.993Z","updated_at":"2026-05-12T21:36:53.239Z","avatar_url":"https://github.com/0xapp123.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raffle-program\nThis is the raffle project that winners can receive the raffle NFT or winners can buy NFTs by half price by buying tickets. You can buy tickets by $Sol, $BOOGA and $ZION token.\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    ticketPriceBooga: number,\n    ticketPriceZion: number,\n    endTimestamp: number,\n    winnerCount: number,\n    whitelisted: number,\n    max: number\n)\n```\nThe creator can update the period of the raffle he wants.\n```js\nupdateRafflePeriod(\n    userAddress: PublicKey,\n    nft_mint: PublicKey,\n    endTimestamp: number\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### - As the User of Raffle\nWhen users buy tickets, call the `buyTicket` function, users will send $Sol and $FLWR token to the raffle creator.\n```js\nbuyTicket(\n    userAddress: PublicKey,\n    nft_mint: PublicKey,\n    amount: number\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### - 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%2F0xapp123%2Fraffle-pro-contract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xapp123%2Fraffle-pro-contract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xapp123%2Fraffle-pro-contract/lists"}