An open API service indexing awesome lists of open source software.

https://github.com/devalpha18/ethereum-dice-oracle-example

Basic Ethereum & Solidity Oracle Example
https://github.com/devalpha18/ethereum-dice-oracle-example

dapp ethereum oracles solidity truffle

Last synced: 4 months ago
JSON representation

Basic Ethereum & Solidity Oracle Example

Awesome Lists containing this project

README

        

# A Simple Dice Resulting Oracle Example

## Setting up
```
npm install -g [email protected]
npm install -g [email protected]
npm install
```

## Running the Oracle

#### Start Test RPC
```bash
testrpc
```

#### Compile and deploy the Oracle Contract
```bash
truffle compile && truffle migrate --force
```

### Running your Oracle
```bash
node oracle.js
```

### Running your client
```bash
node client.js
```

## Testing

* Enter truffle CLI - N.B. you do NOT need testrpc running to do this with truffle 4+
```bash
truffle develop
```

* Run the tests
```bash
truffle(develop)> test
```