Skip to content

Conversation

@pavkahanov
Copy link
Contributor

No description provided.

@pavkahanov pavkahanov requested a review from masteralx March 10, 2020 10:12

import "./lib/Ballot.sol";
import "./lib/BallotList.sol";
import "./IBallots.sol";
Copy link
Contributor

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"
Copy link
Contributor

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

Comment on lines +54 to +57
/**
* @dev returns the confirmation that this is a project
*/
function isProject() public pure returns (bool) { return true; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

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;
Copy link
Contributor

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);
Copy link
Contributor

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);
})
Copy link
Contributor

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)
Copy link
Contributor

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});
Copy link
Contributor

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');
Copy link
Contributor

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: "Добавить Вопрос",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants