3

​Hey all, I was wondering something. I am planning to create a simple Voting Dapp for a closed election, where a number of accounts will be set up ahead of time and pre-authorised to vote. The Voting Contract will contain a Whitelist to know whether or not someone who makes a call to its functions should be allowed to vote. My question is this: the number of PCs that I have (maybe twelve or so) is far less than the number of prospective voters I have. Ideally, I would like to be able to use the PCs in a manner akin to Voting Stations: that is, they would be able to log in and make a vote on an Account, which would be unique to them, but which would be only one of many accounts available on that particular PC. Is this possible? Would it require, say, Metamask accounts? I'm unclear as to what an architecture like this would look like.

Thanks for your help.

1

To elaborate on JAG's answer - if you run a local Ethereum blockchain like Ganache, you get 10 accounts with 100ETH each by default (or you can configure it for any other number of accounts/value). Then connect your Metamask to that network (http://localhost:7545) and add private keys that show in Ganache, to Metamask (via Import account menu).

Then in Metamask you can switch between all the accounts you add and run send a transaction as a currently active account. I am doing exactly that for my multi-account dapp testing.

  • Thanks. To make it clear, I'm planning to have more voters than I have machines, and I can't rely on my voters to be familiar with the blockchain or to be diligent in keeping Metamask account information, etc. I essentially want to know if it's possible to have an Account vote even if I can't rely on each Account owner to have their own personal node. – Eoin Moloney Feb 28 '18 at 11:51
0

MetaMask supports multiple wallets from a single log on or you can have the user restore their wallets from a seed phrase.

If you choose to use the option of having multiple accounts from a single login of MetaMask then there is an easy to use drop-down style menu which is quite user-friendly (easier than restoring from passphrase)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.