Created
April 12, 2018 18:36
-
-
Save maheshmurthy/f05f241e293c16ea4f67b6e70ee3dca4 to your computer and use it in GitHub Desktop.
This file contains 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
var Voting = artifacts.require("./Voting.sol"); | |
var ECRecovery = artifacts.require("./ECRecovery.sol"); | |
const sigUtil = require("eth-sig-util") | |
var alice_vote_hash = sigUtil.typedSignatureHash([{ type: 'string', name: 'Message', value: "Vote for Alice"}]) | |
var bob_vote_hash = sigUtil.typedSignatureHash([{ type: 'string', name: 'Message', value: "Vote for Bob"}]) | |
var carol_vote_hash = sigUtil.typedSignatureHash([{ type: 'string', name: 'Message', value: "Vote for Carol"}]) | |
module.exports = function(deployer) { | |
deployer.deploy(ECRecovery); | |
deployer.link(ECRecovery, Voting); | |
deployer.deploy(Voting, ['Alice', 'Bob', 'Carol'], [alice_vote_hash, bob_vote_hash, carol_vote_hash]); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment