aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWayne Chiu <chaoweichiu@gmail.com>2019-01-08 15:46:28 +0800
committerWayne Chiu <chaoweichiu@gmail.com>2019-01-08 15:46:28 +0800
commit92035842a18fb0e314f825897fdee1e666650db9 (patch)
tree4a5e86f5917fcea0219843708b6e2f8ddca6400a
parentdda0de45b0fd83f5b10842e97d43c7c41d8769a0 (diff)
downloaddexon-lottery-92035842a18fb0e314f825897fdee1e666650db9.tar
dexon-lottery-92035842a18fb0e314f825897fdee1e666650db9.tar.gz
dexon-lottery-92035842a18fb0e314f825897fdee1e666650db9.tar.bz2
dexon-lottery-92035842a18fb0e314f825897fdee1e666650db9.tar.lz
dexon-lottery-92035842a18fb0e314f825897fdee1e666650db9.tar.xz
dexon-lottery-92035842a18fb0e314f825897fdee1e666650db9.tar.zst
dexon-lottery-92035842a18fb0e314f825897fdee1e666650db9.zip
wording modification
-rw-r--r--contracts/ElectionPractice.sol15
1 files changed, 8 insertions, 7 deletions
diff --git a/contracts/ElectionPractice.sol b/contracts/ElectionPractice.sol
index 127f45a..56d33d7 100644
--- a/contracts/ElectionPractice.sol
+++ b/contracts/ElectionPractice.sol
@@ -10,10 +10,10 @@ pragma solidity ^0.5.0;
* @title - In this Election Contract, it could take as many rounds of election.
* - As a user of this contract, you are able to
* - 1. Register as a candiate of the election.
- * - 2. One vote the candiate of your choose, and can fund any of the candiate as much money as you want.
- * - 3. Candiate will get the fund if the round is over.
+ * - 2. Everyone can vote only ONE candidate in each round but we can fund multiple candidates as much money as we want.
+ * - 3. Candidates will be funded when the current round is over.
*
- * @dev - There would be only 1 active round each at a time.
+ * @dev - There would be only 1 active round at a time.
* - Before round start, any user can use their `wallet` to register as candiate "once".
* - Only the contract owner can start voting process and call a voting process to the end.
* - Once a voting proces start, no more user can register as candiate.
@@ -70,8 +70,8 @@ contract Election is Events {
/**
* @notice - With solidity, it gives you "mapping" as one of the data store mechanism.
- * - However, you cannot iterate it like you would with "array"
- * - because it uses hash table as its mechanism.
+ * - it's a key-value pair
+ * - However, you cannot iterate the keys, because it uses hash table as its storing mechanism.
* - In theroy, you can use "array" to store data as you would with "mapping".
* - Within smart contract, each line of running code cost money.
* - In other words, the bigger of an array it gets the higher of gas a user should pay.
@@ -90,8 +90,9 @@ contract Election is Events {
/**
* @title candiatesList
- * @dev - This will store candiates data for each active round, and will be reset whenever an election is over.
- * - The reason of this approach is because we are not able to iterate "mapping"
+ * @dev - This array stores candidates address of current round, and will be reset whenever an election is over.
+ * - The reason of this approach is because we cannot iterate the keys in the mapping There would be only 1 active round at a time.
+
*
* @title round
* @dev - This is the mark of current active round, and will increase by one if a new round start