-
Notifications
You must be signed in to change notification settings - Fork 0
Ballot #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Ballot #5
Conversation
|
|
||
| import "./lib/Ballot.sol"; | ||
| import "./lib/BallotList.sol"; | ||
| import "./IBallots.sol"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove or extend
| require(length > 0 | ||
| ? ballots.list[length - 1].status != BallotType.BallotStatus.ACTIVE | ||
| : true, | ||
| "You have active voting" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a voting in progress
| /** | ||
| * @dev returns the confirmation that this is a project | ||
| */ | ||
| function isProject() public pure returns (bool) { return true; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
| mapping(address => mapping(address => VM.Vote)) votes; | ||
| mapping(address => mapping(address => uint256)) votesWeight; | ||
| mapping(address => mapping(uint => uint256)) descisionWeights; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add comments
try to use VM.Vote as key
| noActiveVotings | ||
| returns (uint id) | ||
| { | ||
| id = ballots.add(_votingPrimary); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try to do this without BallotSimple struct
| await ballot.setVote(2); | ||
| const userVote = await ballot.getUserVote(0, token.address, from) | ||
| assert.strictEqual(userVote.toNumber(), 1); | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test excluded
test zero tokens
| describe('constructor()', () => { | ||
| it('should be successfully created', async () => { | ||
| token = await CustomToken.new( ...params, { from }); | ||
| console.log(token.address) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
| beforeEach( async () => { | ||
| token = await CustomToken.new( ...params, { from }); | ||
| zeroOne = await ZeroOne.new({from}); | ||
| // zeroOne = await ZeroOne.new({from}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
| @@ -1,5 +1,5 @@ | |||
| const CustomToken = artifacts.require('./CustomToken.sol'); | |||
| const ZeroOne = artifacts.require('./ZeroOneMock.sol'); | |||
| // const ZeroOne = artifacts.require('./ZeroOneMock.sol'); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
| module.exports = { | ||
| questions : [{ | ||
| groupId: 0, | ||
| name: "Добавить Вопрос", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename
No description provided.