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

ensure the event emits amount in units of base #671

Merged
merged 1 commit into from
Nov 14, 2023
Merged
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
7 changes: 5 additions & 2 deletions contracts/src/internal/HyperdriveAdmin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ abstract contract HyperdriveAdmin is HyperdriveBase {

/// @dev This function collects the governance fees accrued by the pool.
/// @param _options The options that configure how the fees are settled.
/// @return proceeds The amount of base collected.
/// @return proceeds The amount collected in units specified by _options.
function _collectGovernanceFee(
IHyperdrive.Options calldata _options
) internal nonReentrant returns (uint256 proceeds) {
Expand All @@ -42,7 +42,10 @@ abstract contract HyperdriveAdmin is HyperdriveBase {
uint256 governanceFeesAccrued = _governanceFeesAccrued;
delete _governanceFeesAccrued;
proceeds = _withdraw(governanceFeesAccrued, _options);
emit CollectGovernanceFee(_feeCollector, proceeds);
emit CollectGovernanceFee(
_feeCollector,
_convertToBaseFromOption(proceeds, _pricePerShare(), _options)
);
}

/// @dev Allows an authorized address to pause this contract.
Expand Down
Loading