Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

🔧 🚧 Testing Provable's Delegated Math Example.


This repo is to demonstrate how you would set up a Provable smart-contract development environment using Truffle & the Ethereum-Bridge to do most of the heavy lifting for you. Head on over to the ./test folder to examine the javascript files that thoroughly test the smart-contract, which latter you will find in ./contracts.

📃 Instructions

1) Fire up your favourite console & clone this repo somewhere:

❍ git clone

2) Enter this directory & install dependencies:

❍ cd ethereum-examples/solidity/truffle-examples/delegated-math && npm install

3) Launch Truffle:

❍ npx truffle develop

4) Open a new console in the same directory & spool up the ethereum-bridge:

❍ npx ethereum-bridge -a 9 -H -p 9545 --dev

5) Once the bridge is ready & listening, go back to the first console with Truffle running & set the tests going!

❍ truffle(develop)> test


📷 Passing Tests:

  Contract: Delegated Math Example Tests
    ✓ Should retrieve a result from an offchain computation (80350ms)
    ✓ Should have calculated the offchain computation correctly

  2 passing (1m)


✒️ Notes:

If you have any issues, head on over to our Gitter channel to get timely support!

Happy developing!

You can’t perform that action at this time.