Guest User

Untitled

a guest
Apr 20th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. var Voting = artifacts.require("./Voting.sol");
  2. var ECRecovery = artifacts.require("./ECRecovery.sol");
  3.  
  4. const sigUtil = require("eth-sig-util")
  5.  
  6. var alice_vote_hash = sigUtil.typedSignatureHash([{ type: 'string', name: 'Message', value: "Vote for Alice"}])
  7. var bob_vote_hash = sigUtil.typedSignatureHash([{ type: 'string', name: 'Message', value: "Vote for Bob"}])
  8. var carol_vote_hash = sigUtil.typedSignatureHash([{ type: 'string', name: 'Message', value: "Vote for Carol"}])
  9.  
  10. module.exports = function(deployer) {
  11. deployer.deploy(ECRecovery);
  12. deployer.link(ECRecovery, Voting);
  13. deployer.deploy(Voting, ['Alice', 'Bob', 'Carol'], [alice_vote_hash, bob_vote_hash, carol_vote_hash]);
  14. };
Add Comment
Please, Sign In to add comment