Yao's Millionaires' Problem
Allows "millionaires" to enter their net worth and see who is the richest without revealing their wealth.
Implementation of the articles that introduce Enigma, the Rust programming language, the process of creating your first Enigma secret contract, and React/Redux front-end, using the latest improvements for writing secret contracts.
Install the CLI for the Enigma Protocol Developer Testnet:
npm install -g @enigmampc/discovery-cli
git clone https://github.com/lauraweindorf/enigma-millionaires-problem
cd enigma-millionaires-problem
npm install
discovery start
discovery compile
discovery migrate
discovery test
Now you're all set to run the DApp front-end:
cd client
npm install
npm start
For more information on the client front-end, see the discovery-template-dapp repo on GitHub.
NOTE: The DApp uses the Http Web3 provider to connect to the local Ethereum blockchain (Ganache network) configured in truffle.js
. An alternative implementation would be to set the Web3 provider to use MetaMask and change the address field from a dropdown to a text field.
For instructions on how to install and setup the Enigma Developer Testnet see the link above for Getting Started with Enigma: An Intro to Secret Contracts.
rustc 1.40.0-nightly
node 11.15
Docker version 19.03.5
docker-compose version 1.24.1
@enigmampc/discovery-cli 0.1.8