A DApp that can be used to host blind auctions (school project).
A blind auction is a type of auction where all bidders submit sealed bids during the bidding stage, so that no bidder knows the bid of any other participant. In this case, a sealed bid will be the sha256
hash of the actual bid value concatenated with a 8 byte nonce. The bidders will then reveal their bids during the reveal stage, and the highest bidder will win after this stage ends. Compared to a standard auction, a blind auction has the advantage that there is no time pressure towards the end of the bidding period.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Node.js v12.16.1
- Ganache CLI v6.9.1
- Truffle Suite v5.1.22
- py-solc-x v0.8.1
Install NodeJS modules
$ npm install
Install Solidity compiler
$ pip3 install py-solc-x
$ python3 -m solcx.install v0.6.1
First, make sure ganache is running on on 127.0.0.1:8545
. Then run it with:
$ python3 server.py
$ npm start
First, make sure ganache is running on on 127.0.0.1:8545
. Also, the stage during in the BlindAuction contract needs to be changed to 5 seconds for testing purposes. Deploy the contracts with:
$ truffle migrate --reset
Then run the tests with:
$ truffle test