Git Product home page Git Product logo

ppbdice's Introduction

ppbDice-Contract-Code

Environment set up:

Install... truffle (then run 'truffle init') ethereum bridge (clone from Github(https://github.com/oraclize/ethereum-bridge), then run 'npm install' in unzipped folder webpack (truffleframework.com/tutorials/building-testing-frontend-app-truffle-3)

(Optional Install) Solidity intellij plugIn Solhint intellij plugIn (depends on installing 'solhint JS' file in '/usr/local/lib/node_modules/solhint/solhint.js')

To deploy... testrpc --mnemonic "case meadow shuffle purpose renew echo before correct rate artist seed net" -a 50 of if using 'truffle develop' truffle develop --log

cd ~/IdeaProjects/ppbDice/ethereum-bridge-master node bridge -a 49 or if using 'truffle develop' node bridge -H localhost:9545 -a 9 --dev

cd ~/IdeaProjects/ppbDice/ rm -rf build/contracts

truffle migrate --reset --compile-all or if using 'truffle develop' migrate --reset --compile-all

To install the webapp.... npm run dev

To run unit tests... truffle test

If using 'truffle develop' to call contracts directly truffle develop --log (in a separate window) truffle develop (in a separate window, and then run the following) compile migrate --reset --compile-all Dice.deployed().then(function(instance){return instance.bet({value: 1});}); Dice.deployed().then(function(instance){return instance.bet({value: 1, from:'0x627306090abab3a6e1400e9345bc60c78a8bef57'});}); Dice.deployed().then(function(instance){return instance.logPosition.call();}).then(function(value){return value.toNumber()}); Dice.deployed().then(function(instance){return instance.investorsProfit.call();}).then(function(value){return value.toNumber()}); Dice.deployed().then(function(instance){return instance.investorsLoses.call();}).then(function(value){return value.toNumber()}); Dice.deployed().then(function(instance){return instance.winAmount.call();}).then(function(value){return value.toNumber()});

To run.... truffle exec TestDice.js

To debug..... truffle debug 0x48689dd9172ac7a0ccc2496ecd2245d5a5071a7bb64fd28cdf880444a4ac76d5

ppbdice's People

Contributors

bgaughran avatar jamesgroton avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

mason0510

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.