A Decentralized App Representing a Bank
- Contract address used as bank.
- Tests for all contract functions.
- Strict checks using modifiers.
- Strict checks in web interface.
- Different interface for admin and regular customers.
- Up to date exchange rate via coinbase API.
- Set Transaction Threshold.
- Receive alert when transaction is above threshold.
- Receive alert when the bank has a balance of more than 50 ethers (a case of money laundering).
- Deposit.
- Withdraw.
- Compile code via
truffle compile
- Deploy to ganache using
truffle migrate --reset
truffle console
to interact with the deployed contract
- Tests are located in the test folder
- To run tests run
truffle test
The contrct is already deployed to the ropstan test network using infura, to redeploy you need to use the first account from the accounts generated by the seed phrase in truffle-config.json.
more information on how to deploy and intract with contracts on infura in this guide.
- Deployed contract address: ropstan.
- Run
truffle migrate --network ropstan
to deploy to ropstan test network
There are 2 user interfaces, one for the customer and another for the admin/regulator, which one is loaded depends on the account selected in metamask, if its the first account in ganache then its the admin, o add accounts from ganache to metamask follow this guide.
- Start the server using
npm run dev
- Referesh the page after changing account in metamask.
tailwind.config.js
enables tailwind IntelliSense in vscode with the tailwind extension.
- Dapp-university for the helpful tutorials and Javascript boilerplate.
- Google and StackOverflow for always answering my questions.