# Shark Contract Testing ## Contract Setup All contracts deployed on Rinkeby. Nouns contracts are deployed by the Nouns team and run on ~5m auctions. **GitHub Repository**: https://github.com/theforager/sharkdao-bid-management Auction contract: https://rinkeby.etherscan.io/address/0x7cb0384b923280269b3BD85f0a7fEaB776588382 **Forager Contract**: [0xeEe2747427bf9C316059479F581c8778A5CB2b6d](https://rinkeby.etherscan.io/address/0xeEe2747427bf9C316059479F581c8778A5CB2b6d#code) owner → 0xB0D6f9CFa8E8D4381E5623E23963623941c57c40 **Goldy.mov Contract**: [0x7bB583271dC55C73B063e8C98F237C1E58Ed5ca1](https://rinkeby.etherscan.io/address/0x7bB583271dC55C73B063e8C98F237C1E58Ed5ca1#code) owner → 0x021edd67d43b365a6401a5ee704aa6f264f3f4e4 **Dropnerd Contract**: [0x7174C4a5a30caF273F752582466Cb877Dc8f54b1](https://rinkeby.etherscan.io/address/0x7174C4a5a30caF273F752582466Cb877Dc8f54b1#code) owner → 0x65acB3B56bfBD08Ac41926BE918438970C1f7912 **Sasquatch Contract**: [0x16D6a1AB169b05Cd101C1f5A56809ef29eCB7d71](https://rinkeby.etherscan.io/address/0x16D6a1AB169b05Cd101C1f5A56809ef29eCB7d71#code) owner → 0xD1762d9c571538D5DD4830ef2095B3F71e0C17c3 ----- ## Owner Bidding Testing 💸 **Goal:** Confirm bidding works properly for the owner **Tests:** - [x] *Owner* attempt to call `submitBidUnderMax` on the Noun : should **revert** - [x] *Owner* call `setMaxBid` to an amount `A` of your chosing : should **confirm** - [x] *Owner* call `submitBidUnderMax` less than `A` : should **confirm** - [x] *Owner* call `submitBidUnderMax` greater than `A` : should **revert** ## DAO Bidder Testing 🧙‍♂️ **Goal:** Confirm the delegated DAO bidder capability works **Tests:** - [x] *Owner* call `setMaxBid` to an amount `A` of your chosing : should **confirm** - [x] *Bidder* call `submitBidUnderMax` less than `A` : should **revert** - [x] *Owner* call `addDaoBidder` to add *Bidder* address : should **confirm** - [x] *Bidder* call `submitBidUnderMax` less than `A` : should **confirm** - [x] *Owner* call `removeDaoBidder` on *Bidder* address : should **confirm** - [x] *Bidder* call `submitBidUnderMax` less than `A` : should **confirm** ## Funds Pulling & Ownership Transfer Test 👋 **Goal:** Confirm withdrawing funds works properly **Prep:** - Ensure contract has some amount of ETH. If not, send some. - Ensure contract has 1 Noun. If not, win an auction (or have forager mint). **Tests:** - [x] *Owner* call `transferOwnership` to another address : should **revert** - [x] *Owner* call `pullFunds` : should **confirm**, **send full ETH amount to *Owner*** - [x] *Owner* call `transferOwnership` to another address : should **revert** - [x] *Owner* call `pullNoun` for the owned Noun : should **confirm**, **send Noun to *Owner*** - [x] *Owner* call `transferOwnership` to another address : should **confirm** ## Access Check Test 🚔 **Goal:** Confirm unauthorized access is not possible **Prep:** - Ensure contract has some amount of ETH. If not, send some. - Ensure contract has 1 Noun. If not, win an auction (or have forager mint). - Add one valid DAO *Bidder* by calling `addDaoBidder` with *Owner* - **Note:** some tests should be conducted by a random address *and* and authorized bidder, others just require a *random* address **Tests:** - [x] *Bidder* / *Random* call `setMaxBid` to an amount of your chosing : should **revert** - [x] *Bidder* / *Random* call `transferOwnership` to yourself : should **revert** - [x] *Bidder* / *Random* call `pullFunds` to yourself : should **revert** - [x] *Bidder* / *Random* call `pullNoun` for the owned Noun : should **revert** - [x] *Random* call `addDaoBidder` to yourself : should **revert** - [x] *Random* call `removeDaoBidder` to a valid bidder : should **revert** - [x] *Owner* call `setMaxBid` to an amount `A` of your chosing : should **confirm** - [x] *Random* call `submitBidUnderMax` less than `A` : should **revert** ## Ape Test 🦧 **Goal:** Explore the contract to see if any unexpected failure modes occur - [x] Do whatever random things come to mind to see if you can break, lock, or somehow mess up the contract