Skip to content

0xMacro/january_sale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

january_sale

Contracts and test for the January sale toy problem.

To use:

  1. git clone https://github.com/0xMacro/january_sale.git
  2. cd january_sale
  3. npm install
  4. npx hardhat test

The challenge is to get the tests to pass by editing contracts/FairBidder.sol (for the first test) and contracts/CheatingBidder.sol (for the second test), without making any changes to contracts/JanuarySaleItem.sol or test/Sale.js

The first test just checks that the FairBidder contract can buy the sale item, which is easily done by bidding the reserve price or higher.

The second test requires the CheatingBidder to exploit a vulnerability to buy the sale item at a price of zero.

About

contracts for the January sale toy problem

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published