Ethereum based coin flip betting DApp
Blochchain: solidity, truffle, web3.js, ganache, infura
Testing: mocha/chai (contracts), jasmine (frontend)
Front End: angular 8, bootstrap, html/css
Contract deployed to kovan
test net
https://kovan.etherscan.io/address/0xa10c36F1382B67d58A946C2A604a6BB987dE69Dd
Hosted on Netflify
https://mayjer-cryptocoinflip.netlify.app/
- An Ethereum wallet like Metamask
- Kovan testnet ETH. Can get some from for free at a faucet
- Make sure to connect the wallet to the Kovan network
To run the project:
- Clone the githup repo
npm install
- Start Gnache. Import an account from Gnache into MetaMask.
- Deploy the smart contracts in Truffle.
- Run the smart contract tests in truffle with the test command
- Copy the
PlaceCoinFlipBet
contract address into theContractService
in/src/app/contract-service.ts
protected contractAddress = {
private: '0x837Cc0a50e594F162f6D2625C7a552a2c37A9b55', // ganache
kovan: '0xa10c36F1382B67d58A946C2A604a6BB987dE69Dd',
}
- Start app with
npm start
orng serve
- Open
http://localhost:4200
in the browser
This project was generated with Angular CLI version 8.3.23.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.