ricardoprins / decentralhacks

ElectroCrypt is a voting platform that augments prevalent blockchain powered e-voting systems with the integration of cloud technology, in order to provide strong security, flexible ballot casting, attack mitigation, and public auditing for transparency.
https://outofidea.life
MIT License
4 stars 1 forks source link

Add Feature for populating individual Elections for multiple organizers #9

Closed bijoy26 closed 4 years ago

bijoy26 commented 4 years ago

Task Handler: @Timidan

Our current prototype works for a single election instance (which is handled in a single smart contract).

To take it into the next level, we can prepare and deploy another smart contract (ElectionFactory.sol), the job of which is to populate a new Election when a new Election Organizer schedules one.

This particular feature requires careful development, so start by checking these two contracts from seresistvanandras/evoting repo -

  1. ElectionECCwPrecompile.sol (Equivalent to our Election.sol smart contract)

  2. ElectionFactory.sol (The purpose of this contract is take an election-ID as parameter and create a new instance of ElectionECCwPrecompile.sol contract )

I am not sure if we require Token creation to make this feature happen, but if it is mandatory, do some checkup on that requirement too.

If this feature seems to break the current contract functionality, we'll continue with single election instance approach.

Timidan commented 4 years ago

will check this out and implement ASAP

Timidan commented 4 years ago

Done!...Turns out that implementation was correct...i was deploying it wrongly

bijoy26 commented 4 years ago

@Timidan awesome! I was planning to check and debug the code right now, but you've cleared it up already.