Open
Conversation
masteralx
suggested changes
Mar 13, 2020
|
|
||
| import "./lib/Ballot.sol"; | ||
| import "./lib/BallotList.sol"; | ||
| import "./IBallots.sol"; |
| require(length > 0 | ||
| ? ballots.list[length - 1].status != BallotType.BallotStatus.ACTIVE | ||
| : true, | ||
| "You have active voting" |
Contributor
There was a problem hiding this comment.
There is a voting in progress
Comment on lines
+54
to
+57
| /** | ||
| * @dev returns the confirmation that this is a project | ||
| */ | ||
| function isProject() public pure returns (bool) { return true; } |
Comment on lines
+25
to
+27
| mapping(address => mapping(address => VM.Vote)) votes; | ||
| mapping(address => mapping(address => uint256)) votesWeight; | ||
| mapping(address => mapping(uint => uint256)) descisionWeights; |
Contributor
There was a problem hiding this comment.
add comments
try to use VM.Vote as key
| noActiveVotings | ||
| returns (uint id) | ||
| { | ||
| id = ballots.add(_votingPrimary); |
Contributor
There was a problem hiding this comment.
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); | ||
| }) |
Contributor
There was a problem hiding this comment.
test excluded
test zero tokens
| describe('constructor()', () => { | ||
| it('should be successfully created', async () => { | ||
| token = await CustomToken.new( ...params, { from }); | ||
| console.log(token.address) |
| beforeEach( async () => { | ||
| token = await CustomToken.new( ...params, { from }); | ||
| zeroOne = await ZeroOne.new({from}); | ||
| // zeroOne = await ZeroOne.new({from}); |
| @@ -1,5 +1,5 @@ | |||
| const CustomToken = artifacts.require('./CustomToken.sol'); | |||
| const ZeroOne = artifacts.require('./ZeroOneMock.sol'); | |||
| // const ZeroOne = artifacts.require('./ZeroOneMock.sol'); | |||
| module.exports = { | ||
| questions : [{ | ||
| groupId: 0, | ||
| name: "Добавить Вопрос", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.