Created
April 12, 2018 18:36
-
-
Save maheshmurthy/f05f241e293c16ea4f67b6e70ee3dca4 to your computer and use it in GitHub Desktop.
Revisions
-
Mahesh Murthy created this gist
Apr 12, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ 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]); };