Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8ca5bc1
Ballots started
pavkahanov Feb 7, 2020
1b12a00
first implementation of votings
pavkahanov Feb 10, 2020
ba42cf5
added some new methods for ballots
pavkahanov Feb 11, 2020
c07e298
Create voting function
pavkahanov Feb 11, 2020
5e9d2a8
small fix
pavkahanov Feb 11, 2020
4e2eaae
added modifier for active voting
pavkahanov Feb 12, 2020
9da162f
Merge branch 'master' of github.com:Neos1/zeroone-contracts into ballot
pavkahanov Feb 13, 2020
ef4ca34
some fixes and some tests
pavkahanov Feb 13, 2020
851d0cd
Added:
pavkahanov Feb 14, 2020
4310b4b
Some fixes and additions
pavkahanov Feb 17, 2020
4535a06
some fixes and tests (need to fix)
pavkahanov Feb 18, 2020
1344f40
some fixes and improvements
pavkahanov Feb 19, 2020
b34994e
some docs fixes
pavkahanov Feb 25, 2020
4ac94a3
Merge branch 'master' of github.com:Neos1/zeroone-contracts into ballot
pavkahanov Feb 25, 2020
c67ed7d
started using zeroone vm's
pavkahanov Feb 26, 2020
813225c
some fixes, remaked voting methods
pavkahanov Feb 27, 2020
e659e8b
Ballots are working with VM's some test for votings
pavkahanov Feb 28, 2020
a5f9816
some changes in Ballots
pavkahanov Mar 10, 2020
3fd8cae
small doc fix
pavkahanov Mar 10, 2020
fa19497
function closeVoting returned to Ballots
pavkahanov Mar 10, 2020
f503165
fixes for ballots
pavkahanov Mar 11, 2020
a3b0a43
some fixes, mock for ballots
pavkahanov Mar 11, 2020
0317c20
fixes
pavkahanov Mar 11, 2020
48be965
Ballots tested
pavkahanov Mar 12, 2020
65157bc
fixes and tests
pavkahanov Mar 12, 2020
dd5b02b
uncommented one condition
pavkahanov Mar 12, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions contracts/Token/CustomToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pragma solidity 0.6.1;
pragma experimental ABIEncoderV2;

import "../lib/Ownable.sol";
import "../ZeroOne/IZeroOne.sol";
import "../ZeroOne/Ballots/IBallots.sol";

/**
* @title CustomToken
Expand Down Expand Up @@ -191,8 +191,9 @@ contract CustomToken is Ownable {
{
for (uint i = 1; i < projects.length - 1; i++) {
if (isTokenLocked(projects[i], _user)) {
IZeroOne project = IZeroOne(projects[i]);
project.updateUserVote(address(this), _user, balanceOf(_user));
IBallots project = IBallots(projects[i]);
uint256 newBalance = balanceOf(_user);
project.updateUserVote(address(this), _user, newBalance);
}
}
}
Expand Down Expand Up @@ -333,7 +334,7 @@ contract CustomToken is Ownable {
"This operation is not allowed for this address"
);
require(_sender != address(0), "Address must be non-empty");
require(balanceOf(_sender) > 0, "Balance of sender must be greater, then zero");
require(balanceOf(_sender) >= _count, "Balance of sender must be greater, then amount");

if (msg.sender == owner()) {
transfer(_sender, _reciepient, _count);
Expand All @@ -357,7 +358,7 @@ contract CustomToken is Ownable {
returns(bool isUnlocked)
{
require(isProjectAddress(_project), "Address is not in project list");
IZeroOne project = IZeroOne(_project);
IBallots project = IBallots(_project);
require(
project.didUserVote(address(this), msg.sender) == true,
"User not voted, nothing to unlock"
Expand Down
Loading