diff --git a/contracts/schemes/Competition.sol b/contracts/schemes/Competition.sol index 9d6f1a19..f97ee38e 100644 --- a/contracts/schemes/Competition.sol +++ b/contracts/schemes/Competition.sol @@ -29,8 +29,8 @@ contract Competition { event NewSuggestion( bytes32 indexed _proposalId, uint256 indexed _suggestionId, - string indexed _descriptionHash, - address payable _suggester + string _descriptionHash, + address payable indexed _suggester ); event NewVote( @@ -359,7 +359,7 @@ contract Competition { uint256 numberOfTieSuggestions = proposal.suggestionsPerVote[suggestions[_suggestionId].totalVotes]; uint256 j; //calc the reward percentage for this suggestion - for (j = orderIndex; j < (orderIndex+numberOfTieSuggestions) && j < proposal.rewardSplit.length; j++) { + for (j = orderIndex; j < (orderIndex+numberOfTieSuggestions) && j < proposal.numberOfWinners; j++) { rewardPercentage = rewardPercentage.add(proposal.rewardSplit[j]); } rewardPercentage = rewardPercentage.div(numberOfTieSuggestions); diff --git a/contracts/schemes/ContributionRewardExt.sol b/contracts/schemes/ContributionRewardExt.sol index d921a1b5..6d3b953e 100644 --- a/contracts/schemes/ContributionRewardExt.sol +++ b/contracts/schemes/ContributionRewardExt.sol @@ -313,7 +313,7 @@ contract ContributionRewardExt is VotingMachineCallbacks, ProposalExecuteInterfa * @param _proposalId the ID of the voting in the voting machine * @param _beneficiary the beneficiary to mint reputation to. * @param _reputation the reputation amount to mint - * note: burn reputation is not supported via this function + * note: burn reputation is not supported via this function */ function redeemReputationByRewarder(bytes32 _proposalId, address _beneficiary, uint256 _reputation) public diff --git a/package-lock.json b/package-lock.json index ac351d89..530c8578 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@daostack/arc", - "version": "0.0.1-rc.35", + "version": "0.0.1-rc.36", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index eadf0321..90abcb78 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@daostack/arc", - "version": "0.0.1-rc.35", + "version": "0.0.1-rc.36", "description": "A platform for building DAOs", "files": [ "contracts/", diff --git a/test/competition.js b/test/competition.js index c78299b2..fd360272 100644 --- a/test/competition.js +++ b/test/competition.js @@ -211,6 +211,7 @@ contract('Competition', accounts => { assert.equal(tx.logs.length, 1); assert.equal(tx.logs[0].event, "NewSuggestion"); assert.equal(tx.logs[0].args._suggestionId,1); + assert.equal(tx.logs[0].args._descriptionHash,"suggestion"); }); it("cannot suggest after suggestionEndTime", async function() {