Skip to content

secretchaingirl/enigma-millionaires-problem

Repository files navigation

Enigma Millionaires Problem

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.

Instructions

Install the CLI for the Enigma Protocol Developer Testnet: npm install -g @enigmampc/discovery-cli

  1. git clone https://github.com/lauraweindorf/enigma-millionaires-problem
  2. cd enigma-millionaires-problem
  3. npm install
  4. In another terminal, start : discovery start
  5. Compile the contracts: discovery compile
  6. Migrate: discovery migrate
  7. Run the tests: discovery test

Now you're all set to run the DApp front-end:

  1. cd client
  2. npm install
  3. 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.

More Info

Dependencies

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

Contributors

Resources

About

Implementation of Yao's Millionaires' Problem using Enigma secret contracts

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published