Request form
Cyfrin Security / 4-puppy-raffle-audit
    Docs
    Source
    ChefGPT

    This project is to enter a raffle to win a cute dog NFT. The protocol should do the following: Call the enterRaffle function with the following parameters: 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. Duplicate addresses are not allowed Users are allowed to get a refund of their ticket & value if they call the refund function Every X seconds, the raffle will be able to draw a winner and be minted a random puppy 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.

    base64.sol
    test.sol
    Base.sol
    Script.sol
    StdAssertions.sol
    StdChains.sol
    StdCheats.sol
    StdError.sol
    StdInvariant.sol
    StdJson.sol
    StdMath.sol
    StdStorage.sol
    StdStyle.sol
    StdUtils.sol
    Test.sol
    Vm.sol
    console.sol
    console2.sol
    IMulticall3.sol
    safeconsole.sol
    Ownable.sol
    ERC165.sol
    IERC165.sol
    SafeMath.sol
    ERC721.sol
    IERC721.sol
    IERC721Enumerable.sol
    IERC721Metadata.sol
    IERC721Receiver.sol
    Address.sol
    Context.sol
    EnumerableMap.sol
    EnumerableSet.sol
    Strings.sol
    DeployPuppyRaffle.sol
    PuppyRaffle.sol
    PuppyRaffleTest.t.sol

    4 downloads

    Chains

    Authors

    Cyfrin Security / 4-puppy-raffle-audit
      Info
      Source
      ChefGPT
      Expand
      Share

      Get Cookin'

      4 downloads

      Authors

      puppy-raffle

      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.

      Getting Started

      Requirements

      • 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
        • 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.

      Open in Gitpod

      Usage

      Testing

      forge test
      

      Test Coverage

      forge coverage
      

      and for coverage based testing:

      forge coverage --report debug
      

      Audit Scope Details

      • Commit Hash: e30d199697bbc822b646d76533b66b7d529b8ef5
      • In Scope:
      ./src/
      └── PuppyRaffle.sol
      

      Compatibilities

      • Solc Version: 0.7.6
      • Chain(s) to deploy contract to: Ethereum

      Roles

      Owner - Deployer of the protocol, has the power to change the wallet address to which fees are sent through the changeFeeAddress function. Player - Participant of the raffle, has the power to enter the raffle with the enterRaffle function and refund value through refund function.

      Known Issues

      None

      This project is to enter a raffle to win a cute dog NFT. The protocol should do the following: Call the enterRaffle function with the following parameters: 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. Duplicate addresses are not allowed Users are allowed to get a refund of their ticket & value if they call the refund function Every X seconds, the raffle will be able to draw a winner and be minted a random puppy 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.
      base64.sol
      test.sol
      Base.sol
      Script.sol
      StdAssertions.sol
      StdChains.sol
      StdCheats.sol
      StdError.sol
      StdInvariant.sol
      StdJson.sol
      StdMath.sol
      StdStorage.sol
      StdStyle.sol
      StdUtils.sol
      Test.sol
      Vm.sol
      console.sol
      console2.sol
      IMulticall3.sol
      safeconsole.sol
      Ownable.sol
      ERC165.sol
      IERC165.sol
      SafeMath.sol
      ERC721.sol
      IERC721.sol
      IERC721Enumerable.sol
      IERC721Metadata.sol
      IERC721Receiver.sol
      Address.sol
      Context.sol
      EnumerableMap.sol
      EnumerableSet.sol
      Strings.sol
      DeployPuppyRaffle.sol
      PuppyRaffle.sol
      PuppyRaffleTest.t.sol