Skip to content

Commit

Permalink
fix: emit amount authorized + rescuded token in AuthorizedCollector/T…
Browse files Browse the repository at this point in the history
…okensRescued respectively.
  • Loading branch information
MoonBoi9001 committed Sep 30, 2024
1 parent cf2109f commit aa27c54
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ abstract contract DataServiceRescuable is DataService, IDataServiceRescuable {
if (Denominations.isNativeToken(_token)) Address.sendValue(payable(_to), _tokens);
else SafeERC20.safeTransfer(IERC20(_token), _to, _tokens);

emit TokensRescued(msg.sender, _to, _tokens);
emit TokensRescued(msg.sender, _to, _token, _tokens);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface IDataServiceRescuable is IDataService {
/**
* @notice Emitted when tokens are rescued from the contract.
*/
event TokensRescued(address indexed from, address indexed to, uint256 tokens);
event TokensRescued(address indexed from, address indexed to, address token, uint256 tokens);

/**
* @notice Emitted when a rescuer is set.
Expand Down
3 changes: 2 additions & 1 deletion packages/horizon/contracts/interfaces/IPaymentsEscrow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ interface IPaymentsEscrow {
* @notice Emitted when a payer authorizes a collector to collect funds
* @param payer The address of the payer
* @param collector The address of the collector
* @param allowance The number of tokens the collector is allowed to collect
*/
event AuthorizedCollector(address indexed payer, address indexed collector);
event AuthorizedCollector(address indexed payer, address indexed collector, uint256 allowance);

/**
* @notice Emitted when a payer thaws a collector
Expand Down
2 changes: 1 addition & 1 deletion packages/horizon/contracts/payments/PaymentsEscrow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ contract PaymentsEscrow is Initializable, MulticallUpgradeable, GraphDirectory,
require(allowance != 0, PaymentsEscrowInvalidZeroTokens());
Collector storage collector = authorizedCollectors[msg.sender][collector_];
collector.allowance += allowance;
emit AuthorizedCollector(msg.sender, collector_);
emit AuthorizedCollector(msg.sender, collector_, collector.allowance);
}

/**
Expand Down

0 comments on commit aa27c54

Please sign in to comment.