# Shark Contract Testing v2 ## 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**: [0x9CD5F374252358B1D40FBB647b742268F09e5c5b](https://rinkeby.etherscan.io/address/0x9CD5F374252358B1D40FBB647b742268F09e5c5b#code) owner → 0xf49478bbBB27Cc7A5e17D42588960195d127338b **Goldy.mov Contract**: [0x23067BE7633F93FE9B242758b017237346095647](https://rinkeby.etherscan.io/address/0x23067BE7633F93FE9B242758b017237346095647#code) owner → 0x021edd67d43b365a6401a5ee704aa6f264f3f4e4 **Dropnerd Contract**: [0xF1d7A1B216364edcfc0Bc9B7EEfc7c94B85FB716](https://rinkeby.etherscan.io/address/0xF1d7A1B216364edcfc0Bc9B7EEfc7c94B85FB716#code) owner → 0x65acB3B56bfBD08Ac41926BE918438970C1f7912 **Sasquatch Contract**: [](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 `submitBid` on the Noun : should **revert** - [x] *Owner* use `addFunds` to send `A` ETH : should **confirm** - [x] *Owner* call `submitBid` less than `A` : should **confirm** - [x] *Owner* call `submitBid` greater than `A` : should **revert** ## DAO Bidder Testing 🧙‍♂️ **Goal:** Confirm the delegated DAO bidder capability works **Tests:** - [x] *Bidder* call `submitBid` less than `A` : should **revert** - [x] *Owner* call `addDaoBidder` to add *Bidder* address : should **confirm** - [x] *Bidder* call `submitBid` less than `A` : should **confirm** - [x] *Owner* call `removeDaoBidder` on *Bidder* address : should **confirm** - [x] *Bidder* call `submitBid` less than `A` : should **revert** ## 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 `addFunds` to an amount of your chosing : should **confirm** - [x] *Bidder* / *Random* call `submitBid` 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** ## 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