Skip to content
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

fix ballot claim test #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build/
build/
output.json
2 changes: 1 addition & 1 deletion contracts/Registry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ contract Registry {
require(didStart == false, "TCR already started");
require(didRagequit == true, "need to ragequit before starting TCR");

tcrContract.start(_token);
tcrContract.start(_token, msg.sender);
didStart = true;

emit TCRStart(address(tcrContract), name, symbol, decimals, bootstrapList);
Expand Down
4 changes: 2 additions & 2 deletions contracts/TCR.sol
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ contract TCR {
// Initialization
// -------------------------------------------------------------------------

function start(address _token) public onlyOwner returns(bool) {
function start(address _token, address _msgSender) public onlyOwner returns(bool) {
require(startDate == 0, "TCR already started");

// launch TCR token
Expand Down Expand Up @@ -236,7 +236,7 @@ contract TCR {
tallyQueue.push(bootstrapTally);
pollQueue.push(bootstrapPoll);

ballotQueue[0].votesByVoter[owner] = bootstrapSubmission;
ballotQueue[0].votesByVoter[_msgSender] = bootstrapSubmission;
startDate = now;
currentBallotIndex = 1;

Expand Down
4 changes: 4 additions & 0 deletions test/tcr.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ contract('TCR', ([creator, alice, bob]) => {
});

it('process ballot', async () => {
await setupDaoMembership();
const shares = '1';
await initTcr(shares);

const votingDurationSecs = await tcr.votingDurationSecs();
await moveForwardSecs(votingDurationSecs.toNumber());

Expand Down