Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.24; | |
import "openzeppelin-solidity/contracts/math/SafeMath.sol"; | |
import "./VotingToken.sol"; | |
contract Voting { | |
using SafeMath for uint; | |
// Array of Poll structs |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from "react"; | |
import PropTypes from "prop-types"; | |
import { withStyles } from "@material-ui/core/styles"; | |
import Button from "@material-ui/core/Button"; | |
import Dialog from "@material-ui/core/Dialog"; | |
import DialogActions from "@material-ui/core/DialogActions"; | |
import DialogContent from "@material-ui/core/DialogContent"; | |
import DialogContentText from "@material-ui/core/DialogContentText"; | |
import DialogTitle from "@material-ui/core/DialogTitle"; | |
import Input from "@material-ui/core/Input"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from "react"; | |
import PropTypes from "prop-types"; | |
import { withStyles } from "@material-ui/core/styles"; | |
import Button from "@material-ui/core/Button"; | |
import { Message } from "semantic-ui-react"; | |
import AddMillionaireDialog from "./AddMillionaireDialog"; | |
const engUtils = require("./lib/enigma-utils"); | |
// Specify the signature for the callable and callback functions, make sure there are NO spaces | |
const CALLABLE = "computeRichest(address[],uint[])"; | |
const CALLBACK = "setRichestAddress(address)"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from "react"; | |
import getContractInstance from "./utils/getContractInstance"; | |
import EnigmaSetup from "./utils/getEnigmaSetup"; | |
import millionairesProblemFactoryContractDefinition from "./contracts/MillionairesProblemFactory.json"; | |
import millionairesProblemContractDefinition from "./contracts/MillionairesProblem.json"; | |
import { Container, Message } from "semantic-ui-react"; | |
import Header from "./Header"; | |
import MillionairesProblemWrapper from "./MillionairesProblemWrapper"; | |
import Paper from "@material-ui/core/Paper"; | |
import "./App.css"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const http = require("http"); | |
const MillionairesProblemFactory = artifacts.require( | |
"MillionairesProblemFactory.sol" | |
); | |
module.exports = function(deployer) { | |
return ( | |
deployer | |
.then(() => { | |
return new Promise((resolve, reject) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.17; | |
import "./MillionairesProblem.sol"; | |
contract MillionairesProblemFactory { | |
address public enigmaAddress; | |
// List of addresses for deployed MillionaireProblem instances | |
address[] public millionairesProblems; | |
constructor(address _enigmaAddress) public { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.17; | |
contract MillionairesProblem { | |
// Stores # of millionaires that have joined and stated their net worths | |
uint public numMillionaires; | |
// Stores Millionaire structs (defined below) | |
Millionaire[] millionaires; | |
// Stores address of richest millionaire; set in callback function below | |
address public richestMillionaire; |
NewerOlder