{"id":20217063,"url":"https://github.com/allwin199/raffle-foundry","last_synced_at":"2026-05-12T09:40:02.757Z","repository":{"id":216447382,"uuid":"741348395","full_name":"allwin199/raffle-foundry","owner":"allwin199","description":"Raffle protocol implemented using Solidity, Foundry and Chainlink.","archived":false,"fork":false,"pushed_at":"2024-02-02T11:37:55.000Z","size":143,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T22:19:15.568Z","etag":null,"topics":["chainlink-keepers","chainlink-vrf","ethereum","etherscan","foundry","smart-contracts"],"latest_commit_sha":null,"homepage":"https://sepolia.etherscan.io/address/0xa4ef0128e0bd906c1d3d3af704861af1641d4e74#code","language":"Solidity","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/allwin199.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-01-10T07:58:15.000Z","updated_at":"2024-05-07T07:27:37.000Z","dependencies_parsed_at":"2024-11-14T06:42:07.905Z","dependency_job_id":null,"html_url":"https://github.com/allwin199/raffle-foundry","commit_stats":null,"previous_names":["allwin199/foundry-raffle-v3","allwin199/raffle-foundry"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allwin199%2Fraffle-foundry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allwin199%2Fraffle-foundry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allwin199%2Fraffle-foundry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allwin199%2Fraffle-foundry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/allwin199","download_url":"https://codeload.github.com/allwin199/raffle-foundry/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241654383,"owners_count":19997850,"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":["chainlink-keepers","chainlink-vrf","ethereum","etherscan","foundry","smart-contracts"],"created_at":"2024-11-14T06:31:58.356Z","updated_at":"2026-05-12T09:40:02.700Z","avatar_url":"https://github.com/allwin199.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Foundry Smart Contract Lottery\n\n## About\n\nPlayers can enter the raffle by paying in ETH and a random winner will be picked by chainlink nodes.\n\n## Workflow\n\n![Raffle Worflow](./raffle_workflow.png)\n\n-   [Checkout the Complete Workflow](./test/unit/RaffleTest.tree)\n\n## Test\n\n```sh\nforge test\n```\n\n| File                      | % Lines         | % Statements    | % Branches   | % Funcs         |\n| ------------------------- | --------------- | --------------- | ------------ | --------------- |\n| script/DeployRaffle.s.sol | 100.00% (17/17) | 100.00% (21/21) | 50.00% (2/4) | 100.00% (1/1)   |\n| src/Raffle.sol            | 100.00% (36/36) | 100.00% (45/45) | 87.50% (7/8) | 100.00% (10/10) |\n\nor\n\n```sh\nforge test --rpc-url \u003cRPC_URL\u003e\n```\n\n### Test Coverage\n\n```sh\nforge coverage\n```\n\n```sh\nforge coverage --report debug \u003e coverage.txt\n```\n\n-   To generate lcov report\n\n```sh\nmake generateTestReport\n```\n\n## Deploy\n\nThis will default to your local node. You need to have it running in another terminal in order for it to deploy.\n\n```sh\nmake deployToAnvil\n```\n\n## Deployment to a testnet or mainnet\n\n1. Setup environment variables\n\n-   You'll want to set your `SEPOLIA_RPC_URL` in environment variables. You can add them to a `.env` file, similar to what you see in `.env.example`.\n\n2. Use wallet options to Encrypt Private Keys\n\n-   [Private Key Encryption](https://github.com/allwin199/foundry-fundamendals/blob/main/DeploymentDetails.md)\n\nOptionally, add your `ETHERSCAN_API_KEY` if you want to verify your contract on [Etherscan](https://etherscan.io/).\n\n### Get testnet ETH\n\nHead over to [faucets.chain.link](https://faucets.chain.link/) and get some testnet ETH. You should see the ETH show up in your metamask.\n\n### Deploy\n\n```sh\nmake deployToSepolia\n```\n\nThis will setup a ChainlinkVRF Subscription for you. If you already have one, update it in the `scripts/HelperConfig.s.sol` file. It will also automatically add your contract as a consumer.\n\n### Register a Chainlink Automation Upkeep\n\n-   [Documentation](https://docs.chain.link/chainlink-automation/compatible-contracts)\n\n-   Go to [automation.chain.link](https://automation.chain.link/new) and register a new upkeep. Choose `Custom logic` as your trigger mechanism for automation.\n\n## Estimate gas\n\nYou can estimate how much gas things cost by running:\n\n```sh\nforge snapshot\n```\n\nAnd you'll see an output file called `.gas-snapshot`\n\n---\n\n## Demo\n\n[Raffle front-end](https://raffle-frontend-new.vercel.app/)  \n[Github](https://github.com/allwin199/raffle-frontend)\n\n![Raffle](./raffle.png)\n\n# Thank you :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallwin199%2Fraffle-foundry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallwin199%2Fraffle-foundry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallwin199%2Fraffle-foundry/lists"}