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.
- NodeJS
- ganache-cli
- truffle
- openzeppelin
- web3
- Installing requirements
download NodeJS
download necessary libraries
npm install -g truffle
npm install @openzeppelin/contracts
npm install -g ganache-cli
npm install web3
- 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
- Configuring addresses
Adding addresses of the Auction Factory and RerichaCoin toconfig.js
run thetruffle testand 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"
};
- Running the scheduler
This server is vital for ending the auctions
# Run local JS server - terminal 3
node scheduler.js
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