Skip to content

mikesjak/BlockChain-Dutch-Auction

Repository files navigation

Dutch Auction

This project was a course assingment at Nanyang Technological University in Singapore.
The goal was to make a functioning dutch auction that would sell our own token.

Requirements

  • NodeJS
  • ganache-cli
  • truffle
  • openzeppelin
  • web3

Step-by-step

  1. Installing requirements
    download NodeJS
    download necessary libraries
npm install -g truffle
npm install @openzeppelin/contracts
npm install -g ganache-cli
npm install web3
  1. Setting up the environment for local testing
# Start up ganache-cli - terminal 1
ganache-cli

# Migrate solidity code - terminal 2
truffle migrate

# Run the tests - terminal 2
truffle test
  1. Configuring addresses
    Adding addresses of the Auction Factory and RerichaCoin to config.js
    run the truffle test and copy these 2 addresses into /UI/config.js
# terminal 2
truffle test
Using network 'development'.

Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.
Token deployed at: 0x10A11A375E26095CE76531dD4F002210fF3cE390
Auction Factory deployed at: 0xB60125dB046678aC29908a39268260eb214969f7

Example of config.js

config = {
 tokenAddress: "0x10A11A375E26095CE76531dD4F002210fF3cE390",
 auctionFactoryAddress: "0xB60125dB046678aC29908a39268260eb214969f7"
};
  1. Running the scheduler
    This server is vital for ending the auctions
# Run local JS server - terminal 3
node scheduler.js

UI

Home - index.html

  • Home page of the auction

Auctions - auctionList.html

  • List of auctions
  • Participation in auctions
  • Retrieving current auction stats

Account - account.html

  • Loggining into account
  • Retrieving current account stats

Deployment - deploy.html

  • Creation of new auction

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors