https://github.com/patrickalphac/puppy-raffle-smartcon
https://github.com/patrickalphac/puppy-raffle-smartcon
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/patrickalphac/puppy-raffle-smartcon
- Owner: PatrickAlphaC
- Created: 2023-09-28T03:08:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-01T00:21:12.000Z (over 1 year ago)
- Last Synced: 2023-10-02T00:47:36.241Z (over 1 year ago)
- Language: Solidity
- Size: 1.8 MB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![]()
# Puppy Raffle
This project is to enter a raffle to win a cute dog NFT. The protocol should do the following:
1. Call the `enterRaffle` function with the following parameters:
1. `address[] participants`: A list of addresses that enter. You can use this to enter yourself multiple times, or yourself and a group of your friends.
2. Duplicate addresses are not allowed
3. Users are allowed to get a refund of their ticket & `value` if they call the `refund` function
4. Every X seconds, the raffle will be able to draw a winner and be minted a random puppy
5. The owner of the protocol will set a feeAddress to take a cut of the `value`, and the rest of the funds will be sent to the winner of the puppy.- [Puppy Raffle](#puppy-raffle)
- [Getting Started](#getting-started)
- [Requirements](#requirements)
- [Quickstart](#quickstart)
- [Optional Gitpod](#optional-gitpod)
- [Usage](#usage)
- [Testing](#testing)
- [Test Coverage](#test-coverage)
- [Audit Scope Details](#audit-scope-details)# Getting Started
## Requirements
- [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- You'll know you did it right if you can run `git --version` and you see a response like `git version x.x.x`
- [foundry](https://getfoundry.sh/)
- You'll know you did it right if you can run `forge --version` and you see a response like `forge 0.2.0 (816e00b 2023-03-16T00:05:26.396218Z)`## Quickstart
```
git clone https://github.com/Cyfrin/4-puppy-raffle-audit
cd 4-puppy-raffle-audit
make
```### Optional Gitpod
If you can't or don't want to run and install locally, you can work with this repo in Gitpod. If you do this, you can skip the `clone this repo` part.
[](https://gitpod.io/#github.com/Cyfrin/3-passwordstore-audit)
# Usage
## Testing
```
forge test
```### Test Coverage
```
forge coverage
```and for coverage based testing:
```
forge coverage --report debug
```# Audit Scope Details
- Commit Hash: 22bbbb2c47f3f2b78c1b134590baf41383fd354f
- In Scope:
```
./src/
└── PuppyRaffle.sol
```
- Solc Version: 0.7.6
- Chain(s) to deploy contract to: Ethereum