{"id":21239182,"url":"https://github.com/cutupdev/dice-gambling","last_synced_at":"2025-03-15T03:40:29.639Z","repository":{"id":231686349,"uuid":"782415388","full_name":"cutupdev/Dice-Gambling","owner":"cutupdev","description":"Dice Gambling Project with Anchor on Solana Chain","archived":false,"fork":false,"pushed_at":"2024-04-05T08:58:23.000Z","size":63,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-21T19:22:34.796Z","etag":null,"topics":["nextjs","rust","typescript"],"latest_commit_sha":null,"homepage":"https://dice-game-frontend.vercel.app/","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/cutupdev.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}},"created_at":"2024-04-05T08:56:02.000Z","updated_at":"2024-04-18T17:55:35.000Z","dependencies_parsed_at":"2024-04-05T10:55:35.995Z","dependency_job_id":null,"html_url":"https://github.com/cutupdev/Dice-Gambling","commit_stats":null,"previous_names":["harmonitech/dice-gambling","cutupdev/dice-gambling"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutupdev%2FDice-Gambling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutupdev%2FDice-Gambling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutupdev%2FDice-Gambling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cutupdev%2FDice-Gambling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cutupdev","download_url":"https://codeload.github.com/cutupdev/Dice-Gambling/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243680974,"owners_count":20330154,"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":["nextjs","rust","typescript"],"created_at":"2024-11-21T00:42:20.492Z","updated_at":"2025-03-15T03:40:29.621Z","avatar_url":"https://github.com/cutupdev.png","language":"Rust","readme":"# DDR-Dice\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/scripts.ts`\n- Program account types are declared here: `/cli/types.ts`\n- Idl to make the JS binding easy is here: `/cli/dice_gaming.json`\n\nAble to test the script functions working in this way.\n- Change commands properly in the main functions of the `scripts.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\nThe smart contract owner can only withdraw SOL from this PDA\n- `withdraw`\n \n### As a player(Summary of Game Logic)\nPlayers can play this game.\n\nIf the player set the number 1-3 and deposit 0.1 SOL, then call function `play_game`, the program generate the random number and compare with the set number. \n\nIf the random number is in [1, 3], then he will win and call function `claim_reward` to receive the reward. The reward amount is double of deposit amount.\n\nIf the random number isn't in [1, 3], then he will lose.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcutupdev%2Fdice-gambling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcutupdev%2Fdice-gambling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcutupdev%2Fdice-gambling/lists"}