A simple way to keep track of who owes who money over a blockchain. Automatically removes cycles of dept similar to Splitwise.
- Run npm install --save-dev hardhat
- Run npm install --save-dev @nomiclabs/hardhat-ethers ethers
- Run npm install [email protected] (downgrade ethers to a stable version)
- Run npx hardhat node (should see "Started HTTP and WebSocket JSON-RPC server at https://localhost:8545" followed by 20 priavte keys)
- In a seperate terminal Run npx hardhat run --network localhost scripts/deploy.js
- Update the contact adresss in web_app/script.js found from previous step
- Update ABI in web_app/script.js which can be found in artifacts/contracts/mycontract.sol/Splitwise.json (make sure this is the whole ABI field)
- Open web_app/index.html in your browser
- Choose debtor address in the top right
- Choose creditor address in the bottom right
- Exchange debt between the parties
CS 251 Project 3: Splitwise