decentralized-betting-platform

所属分类:其他
开发工具:TypeScript
文件大小:0KB
下载次数:0
上传日期:2023-01-04 21:54:41
上 传 者sh-1993
说明:  no intro
(decentralized betting platform,,)

文件列表:
.editorconfig (246, 2019-07-06)
angular.json (4249, 2019-07-06)
build/ (0, 2019-07-06)
build/contracts/ (0, 2019-07-06)
build/contracts/Betting.json (595880, 2019-07-06)
build/contracts/Migrations.json (55233, 2019-07-06)
contracts/ (0, 2019-07-06)
contracts/Betting.sol (4937, 2019-07-06)
contracts/Migrations.sol (515, 2019-07-06)
e2e/ (0, 2019-07-06)
e2e/protractor.conf.js (752, 2019-07-06)
e2e/src/ (0, 2019-07-06)
e2e/src/app.e2e-spec.ts (322, 2019-07-06)
e2e/src/app.po.ts (204, 2019-07-06)
e2e/tsconfig.e2e.json (213, 2019-07-06)
migrations/ (0, 2019-07-06)
migrations/1_initial_migration.js (125, 2019-07-06)
migrations/2_deploy_contracts.js (119, 2019-07-06)
package-lock.json (528531, 2019-07-06)
package.json (1701, 2019-07-06)
src/ (0, 2019-07-06)
src/app/ (0, 2019-07-06)
src/app/app-routing.module.ts (733, 2019-07-06)
src/app/app.module.ts (1989, 2019-07-06)
src/app/components/ (0, 2019-07-06)
src/app/components/about/ (0, 2019-07-06)
src/app/components/about/about.component.html (1021, 2019-07-06)
src/app/components/about/about.component.scss (311, 2019-07-06)
src/app/components/about/about.component.spec.ts (621, 2019-07-06)
src/app/components/about/about.component.ts (266, 2019-07-06)
src/app/components/app.component.html (770, 2019-07-06)
src/app/components/app.component.scss (1099, 2019-07-06)
src/app/components/app.component.spec.ts (1167, 2019-07-06)
src/app/components/app.component.ts (328, 2019-07-06)
src/app/components/dashboard/ (0, 2019-07-06)
src/app/components/dashboard/dashboard.component.html (1591, 2019-07-06)
src/app/components/dashboard/dashboard.component.scss (1729, 2019-07-06)
src/app/components/dashboard/dashboard.component.spec.ts (649, 2019-07-06)
... ...

# DecentralizedBettingPlatform Project developed while learning about Ethereum and Dapps. Is a completely decentralized betting platform, you bet against other people without third party involved. No company put the odds. The maths are the ones in charge of distribute the money when the match finishes: All the winners will get all the money bet in the match, while the losers just lose that money. This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.1. ## Development server 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. ## How to bet You need a ethereum account to be able to bet. Currently a Ropsten one (test network). ## Instrutions to create the Smart Contract First install the dependencies needed for our dapp: web3, truffle-contract, truffle-wallet-provider & ethereumjs-wallet: npm install web3 truffle-contract truffle-wallet-provider ethereumjs-wallet --save Then, initialize truffle: truffle init Compile the smart contract, and run for testing purposes with REMIX: https://remix.ethereum.org/ To deploy in Ethereum Network For testing purposes I will use the Ropsten testing network First I go to Infura and I create a project: BettingPlatform Then I put some ether (test one with a faucet) to an account managed with Metamask Complete the file truffle.js with your data (Infura end point and metamask account private key) For security reasons the truffle.js is without the real data here. Then compile truffle compile And migrate the contract on the Ropsten Test network: truffle migrate —-reset —network ropsten or truffle deploy --network ropsten To test contract has been deployed: truffle console --network ropsten Betting.deployed().then(function(instance){return instance }); To test with ganache truffle migrate — compile-all — reset — network ganache

近期下载者

相关文件


收藏者