diff --git a/apps/contribution/contracts/Contribution.sol b/apps/contribution/contracts/Contribution.sol index f26c81e..c5ed47d 100644 --- a/apps/contribution/contracts/Contribution.sol +++ b/apps/contribution/contracts/Contribution.sol @@ -27,8 +27,6 @@ contract Contribution is AragonApp { string internal name_; string internal symbol_; - address public tokenContract; - mapping(uint256 => address) contributionOwner; mapping(address => uint256[]) ownedContributions; @@ -112,9 +110,10 @@ contract Contribution is AragonApp { require(c.exists, 'NOT_FOUND'); require(!c.claimed, 'ALREADY_CLAIMED'); require(block.number > c.claimAfterBlock, 'NOT_CLAIMABLE'); + + c.claimed = true; address token = getTokenContract(); IToken(token).mintFor(c.contributor, c.amount, contributionId); - emit ContributionClaimed(contributionId, c.contributor, c.amount); } diff --git a/apps/proposal/contracts/Proposal.sol b/apps/proposal/contracts/Proposal.sol index 50adf96..7d9eca5 100644 --- a/apps/proposal/contracts/Proposal.sol +++ b/apps/proposal/contracts/Proposal.sol @@ -123,9 +123,9 @@ contract Proposal is AragonApp { require(!p.executed, 'ALREADY_EXECUTED'); require(p.votesCount >= p.votesNeeded, 'MISSING_VOTES'); + p.executed = true; address contributorAccount = IContributor(getContributorContract()).getContributorAddressById(p.contributorId); IContribution(getContributionContract()).add(p.amount, contributorAccount, p.hashDigest, p.hashFunction, p.hashSize); - p.executed = true; emit ProposalExecuted(proposalId, p.contributorId, p.amount); }