Our Decentralized Exchange is a secure, on-chain trading platform that enables peer-to-peer trading of ERC20 tokens without the need for intermediaries. Built on Ethereum, it implements an order book model providing users with traditional exchange functionalities in a decentralized manner.
- Truffle v5.11.5 (core: 5.11.5)
- Ganache v7.9.1
- Solidity - 0.8.20 (solc-js)
- Node v22.2.0
- Web3.js v1.10.0
- Clone the repository:
git clone <repository-url>
cd <project-directory>
- Install dependencies:
npm install
- Install Truffle:
npm install -g truffle
- Install Ganache and run it in the terminal on port 8545:
npm i ganache
ganache
- Run migrations and
migrate.sh
file
truffle compile
chmod +x migrate.sh
./migrate.sh
- Install all frontend dependencies:
cd frontend
npm install
- Run the frontend
npm run dev
-
Add local Ganache chain to Metamask. (RPC URL: http://127.0.0.1:8545, Chain ID: 1337)
-
Import the private key of account1 (owner) and account3 (user2) into Metamask.
-
Click "Connect Wallet" on the landing page.