Skip to content

Commit

Permalink
Changes following review
Browse files Browse the repository at this point in the history
  • Loading branch information
area committed Aug 23, 2023
1 parent dcc529b commit 19efb73
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions contracts/colony/ColonyDataTypes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -350,13 +350,14 @@ interface ColonyDataTypes {
event ArbitraryTransaction(address target, bytes data, bool success);

/// @notice Event logged when an expenditure payout is claimed.
/// @dev This is emitted in addition to PayoutClaimed event
/// @dev This is emitted in addition to the other PayoutClaimed
/// event. The other will be removed soon.
/// @param agent The address that is responsible for triggering this event
/// @param id Id of the expenditure
/// @param slot Expenditure slot of the payout claimed
/// @param token Token of the payout claim
/// @param tokenPayout Amount of the payout claimed, after network fee was deducted
event ExpenditurePayoutClaimed(address agent, uint256 id, uint256 slot, address token, uint256 tokenPayout);
event PayoutClaimed(address agent, uint256 id, uint256 slot, address token, uint256 tokenPayout);

// Structs

Expand Down
3 changes: 2 additions & 1 deletion contracts/colony/ColonyFunding.sol
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ contract ColonyFunding is ColonyStorage { // ignore-swc-123

// Finish the payout
processPayout(expenditure.fundingPotId, _token, tokenPayout, slot.recipient);
emit ExpenditurePayoutClaimed(msgSender(), _id, _slot, _token, tokenPayout);

emit PayoutClaimed(msgSender(), _id, _slot, _token, tokenPayout);
}

function setPaymentPayout(uint256 _permissionDomainId, uint256 _childSkillIndex, uint256 _id, address _token, uint256 _amount) public
Expand Down
2 changes: 1 addition & 1 deletion test/contracts-network/colony-expenditure.js
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ contract("Colony Expenditure", (accounts) => {
);
await colony.finalizeExpenditure(expenditureId, { from: ADMIN });
const tx = await colony.claimExpenditurePayout(expenditureId, SLOT0, token.address);
await expectEvent(tx, "ExpenditurePayoutClaimed", [accounts[0], expenditureId, SLOT0, token.address, WAD]);
await expectEvent(tx, "PayoutClaimed", [accounts[0], expenditureId, SLOT0, token.address, WAD]);
await expectEvent(tx, "PayoutClaimed", [accounts[0], expenditure.fundingPotId, token.address, WAD.divn(100).muln(99).subn(1)]);
});

Expand Down

0 comments on commit 19efb73

Please sign in to comment.