Skip to content

Commit

Permalink
Merge branch 'main' into oz-L11
Browse files Browse the repository at this point in the history
  • Loading branch information
dianakocsis committed Aug 28, 2024
2 parents b3ab935 + fab30d8 commit c600625
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
15 changes: 5 additions & 10 deletions src/base/Notifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ abstract contract Notifier is INotifier {
if (_subscriber != NO_SUBSCRIBER) revert AlreadySubscribed(address(_subscriber));
subscriber[tokenId] = ISubscriber(newSubscriber);

bool success = _call(
address(newSubscriber), abi.encodeWithSelector(ISubscriber.notifySubscribe.selector, tokenId, config, data)
);
bool success =
_call(address(newSubscriber), abi.encodeCall(ISubscriber.notifySubscribe, (tokenId, config, data)));

if (!success) {
Wrap__SubsciptionReverted.selector.bubbleUpAndRevertWith(address(newSubscriber));
Expand Down Expand Up @@ -88,9 +87,7 @@ abstract contract Notifier is INotifier {

bool success = _call(
address(_subscriber),
abi.encodeWithSelector(
ISubscriber.notifyModifyLiquidity.selector, tokenId, config, liquidityChange, feesAccrued
)
abi.encodeCall(ISubscriber.notifyModifyLiquidity, (tokenId, config, liquidityChange, feesAccrued))
);

if (!success) {
Expand All @@ -101,10 +98,8 @@ abstract contract Notifier is INotifier {
function _notifyTransfer(uint256 tokenId, address previousOwner, address newOwner) internal {
ISubscriber _subscriber = subscriber[tokenId];

bool success = _call(
address(_subscriber),
abi.encodeWithSelector(ISubscriber.notifyTransfer.selector, tokenId, previousOwner, newOwner)
);
bool success =
_call(address(_subscriber), abi.encodeCall(ISubscriber.notifyTransfer, (tokenId, previousOwner, newOwner)));

if (!success) {
Wrap__TransferNotificationReverted.selector.bubbleUpAndRevertWith(address(_subscriber));
Expand Down
8 changes: 4 additions & 4 deletions src/lens/Quoter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ contract Quoter is IQuoter, SafeCallback {
override
returns (int128[] memory deltaAmounts, uint160 sqrtPriceX96After, uint32 initializedTicksLoaded)
{
try poolManager.unlock(abi.encodeWithSelector(this._quoteExactInputSingle.selector, params)) {}
try poolManager.unlock(abi.encodeCall(this._quoteExactInputSingle, (params))) {}
catch (bytes memory reason) {
return _handleRevertSingle(reason);
}
Expand All @@ -75,7 +75,7 @@ contract Quoter is IQuoter, SafeCallback {
uint32[] memory initializedTicksLoadedList
)
{
try poolManager.unlock(abi.encodeWithSelector(this._quoteExactInput.selector, params)) {}
try poolManager.unlock(abi.encodeCall(this._quoteExactInput, (params))) {}
catch (bytes memory reason) {
return _handleRevert(reason);
}
Expand All @@ -87,7 +87,7 @@ contract Quoter is IQuoter, SafeCallback {
override
returns (int128[] memory deltaAmounts, uint160 sqrtPriceX96After, uint32 initializedTicksLoaded)
{
try poolManager.unlock(abi.encodeWithSelector(this._quoteExactOutputSingle.selector, params)) {}
try poolManager.unlock(abi.encodeCall(this._quoteExactOutputSingle, (params))) {}
catch (bytes memory reason) {
if (params.sqrtPriceLimitX96 == 0) delete amountOutCached;
return _handleRevertSingle(reason);
Expand All @@ -104,7 +104,7 @@ contract Quoter is IQuoter, SafeCallback {
uint32[] memory initializedTicksLoadedList
)
{
try poolManager.unlock(abi.encodeWithSelector(this._quoteExactOutput.selector, params)) {}
try poolManager.unlock(abi.encodeCall(this._quoteExactOutput, (params))) {}
catch (bytes memory reason) {
return _handleRevert(reason);
}
Expand Down

0 comments on commit c600625

Please sign in to comment.