{"id":28259517,"url":"https://github.com/ambersun1234/lottery-raffle-contract","last_synced_at":"2025-06-15T17:31:31.596Z","repository":{"id":133920401,"uuid":"598926705","full_name":"ambersun1234/lottery-raffle-contract","owner":"ambersun1234","description":"Smart contract for lottery raffle","archived":false,"fork":false,"pushed_at":"2024-09-01T01:12:11.000Z","size":1201,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-20T03:12:29.833Z","etag":null,"topics":["integration-test","smart-contracts","solidity","typescript","unit-test"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ambersun1234.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-02-08T04:39:51.000Z","updated_at":"2023-02-08T05:00:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"a9d0c23a-534f-4815-ba5e-f11444254ec1","html_url":"https://github.com/ambersun1234/lottery-raffle-contract","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ambersun1234/lottery-raffle-contract","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ambersun1234%2Flottery-raffle-contract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ambersun1234%2Flottery-raffle-contract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ambersun1234%2Flottery-raffle-contract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ambersun1234%2Flottery-raffle-contract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ambersun1234","download_url":"https://codeload.github.com/ambersun1234/lottery-raffle-contract/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ambersun1234%2Flottery-raffle-contract/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260022154,"owners_count":22947099,"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":["integration-test","smart-contracts","solidity","typescript","unit-test"],"created_at":"2025-05-20T03:12:16.676Z","updated_at":"2025-06-15T17:31:31.584Z","avatar_url":"https://github.com/ambersun1234.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lottery Raffle Contract\nThis project implements simple lottery contract with chainlink keeper and vrf\n\n## Description\nThis smart contract will choose one winner in a time interval(default for `30 seconds`, change the default value in [helper-hardhat.config.ts](./helper-hardhat.config.ts))\\\nUser can pay at least `0.1 goerli ETH` entrance fee to play the raffle, and after 30 seconds, the smart contract will automatically pick a winner(by chainlink keeper and vrf)\\\nAll of the entrance fee will be send to winner's crypto wallet\n\n## Prerequisite\n```\n$ yarn install\n```\n\n## Note\nIn order to use the contract on the testnet correctly, you will need to set up [chainlink keeper](https://automation.chain.link/) and [chainlink vrf](https://vrf.chain.link/) correctly\\\nAfter you setup the keeper and vrf, grab the vrf subscription id and place it into `subscriptionID`(inside `NetworkConfig.5`) in [helper-hardhat.config.ts](./helper-hardhat.config.ts)\n\n## Deploy to Goerli Testnet\n```\n$ yarn hardhat deploy --network goerli\n```\n\n## Test\n### Unit Test\n```\n$ yarn hardhat test\n```\n\n### Integration Test\n```\n$ yarn hardhat test --network goerli\n```\n\n## Code Coverage\n```\n$ yarn hardhat coverage\n```\n\nFile                       |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |\n---------------------------|----------|----------|----------|----------|----------------|\n contracts/                |    94.74 |       90 |    92.86 |    94.74 |                |\n  Lottery.sol              |    94.74 |       90 |    92.86 |    94.74 |         81,146 |\n  VRFCoordinatorV2Mock.sol |      100 |      100 |      100 |      100 |                |\n---------------------------|----------|----------|----------|----------|----------------|\nAll files                  |    94.74 |       90 |    92.86 |    94.74 |                |\n---------------------------|----------|----------|----------|----------|----------------|\n\n## License\nThis project is licensed under MIT License - see the [LICENSE](./LICENSE) file for detail","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fambersun1234%2Flottery-raffle-contract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fambersun1234%2Flottery-raffle-contract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fambersun1234%2Flottery-raffle-contract/lists"}