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

Add Inverted Quoter for AMO fork test. #2210

Merged
merged 31 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d29dc6f
feat: add inverted quoter for rebalancing.
clement-ux Aug 29, 2024
4e9d161
test: use quoter for AMO rebalancing.
clement-ux Aug 29, 2024
8810a77
chore: increase gas limit for test for AMO quoter.
clement-ux Aug 29, 2024
5e7df11
fix: remove arguments from quoter call.
clement-ux Aug 30, 2024
9b91a6a
fix: set strategist back to origin strategist for quoter.
clement-ux Aug 31, 2024
585b40a
feat: add AMO quoter for `amountToSwapToReachPrice`.
clement-ux Aug 31, 2024
4390da3
feat: add quoter for moving price in AMO tests and upgrade swap funct…
clement-ux Aug 31, 2024
aea2198
docs: add descriptions to functions.
clement-ux Sep 4, 2024
bf51ef9
feat: add `overrideWethShare` on `quoteAmountToSwapBeforeRebalance`.
clement-ux Sep 4, 2024
c502ed6
fix: use dictionnary syntax to call function that has same name as an…
clement-ux Sep 4, 2024
7383e79
fix: increase max iteration for quoter.
clement-ux Sep 9, 2024
ffa2d8e
fix: failling test.
clement-ux Sep 9, 2024
280f6b4
fix: move AMOQuoter to fixture.
clement-ux Sep 11, 2024
8abb412
feat: add more comments.
clement-ux Sep 11, 2024
3e076b9
fix: rethink variance calculation for AMO Quoter.
clement-ux Sep 11, 2024
a4d585b
fix: give more WETH at start and simplifies swap.
clement-ux Sep 11, 2024
ef2bf26
fix: remove unused import.
clement-ux Sep 11, 2024
2d663be
fix: _minTokenReceived is 99% of amountToSwap.
clement-ux Sep 11, 2024
80d115b
fix: refactor % comparison.
clement-ux Sep 11, 2024
6b72dc9
fix: change public into internal.
clement-ux Sep 16, 2024
944bb28
fix: adjust quoteAmountToSwapBeforeRebalance for custom shares.
clement-ux Sep 16, 2024
26035cc
fix: split boundaries for quoter.
clement-ux Sep 16, 2024
ea44472
fix: fetch governor before impersonning.
clement-ux Sep 16, 2024
d6d386a
fix: increase tolereance eth remaining in AMO after withdraw.
clement-ux Sep 16, 2024
aa3bb5b
fix: fix failing test and add description.
clement-ux Sep 16, 2024
29c18b5
fix: add doc for edge case in withdraw.
clement-ux Sep 17, 2024
f1c84b0
Merge branch 'master' into clement/add-quoter-for-AMO-fork-tests
clement-ux Sep 18, 2024
10e1ba8
fix: adjust test with latest values.
clement-ux Sep 18, 2024
920099b
Merge remote-tracking branch 'origin/master' into clement/add-quoter-…
sparrowDom Sep 24, 2024
8dce05e
Fix issues with fork testing (#2255)
sparrowDom Sep 30, 2024
d146df8
Merge remote-tracking branch 'origin/master' into clement/add-quoter-…
sparrowDom Sep 30, 2024
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
46 changes: 46 additions & 0 deletions contracts/contracts/interfaces/aerodrome/IAMOStrategy.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import { ICLPool } from "./ICLPool.sol";

interface IAMOStrategy {
error NotEnoughWethForSwap(uint256 wethBalance, uint256 requiredWeth);
error NotEnoughWethLiquidity(uint256 wethBalance, uint256 requiredWeth);
error PoolRebalanceOutOfBounds(
uint256 currentPoolWethShare,
uint256 allowedWethShareStart,
uint256 allowedWethShareEnd
);
error OutsideExpectedTickRange(int24 currentTick);

function governor() external view returns (address);

function rebalance(
uint256 _amountToSwap,
bool _swapWeth,
uint256 _minTokenReceived
) external;

function clPool() external view returns (ICLPool);

function vaultAddress() external view returns (address);

function poolWethShareVarianceAllowed() external view returns (uint256);

function poolWethShare() external view returns (uint256);

function tokenId() external view returns (uint256);

function withdrawAll() external;

function setAllowedPoolWethShareInterval(
uint256 _allowedWethShareStart,
uint256 _allowedWethShareEnd
) external;

function setWithdrawLiquidityShare(uint128 share) external;

function lowerTick() external view returns (int24);

function upperTick() external view returns (int24);
}
316 changes: 316 additions & 0 deletions contracts/contracts/utils/AerodromeAMOQuoter.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,316 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;

import { IAMOStrategy } from "../interfaces/aerodrome/IAMOStrategy.sol";

contract QuoterHelper {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a small comment here why the QuoterHelper is required. It might not be immediately obvious to others that try/catch in solidity requires a separate contract in order to function

enum RevertReasons {
DefaultStatus,
RebalanceOutOfBounds,
NotInExpectedTickRange,
NotEnoughWethForSwap,
NotEnoughWethLiquidity,
UnexpectedError,
Found,
NotFound
}

struct RebalanceStatus {
RevertReasons reason;
uint256 currentPoolWETHShare; // Case 1
uint256 allowedWETHShareStart; // Case 1
uint256 allowedWETHShareEnd; // Case 1
int24 currentTick; // Case 2
uint256 balanceWETH; // Case 3
uint256 amountWETH; // Case 3
string revertMessage;
}

struct QuoterParams {
address strategy;
bool swapWETHForOETHB;
uint256 minAmount;
uint256 maxAmount;
uint256 maxIterations;
}

error UnexpectedError(string message);
error OutOfIterations(uint256 iterations);
error ValidAmount(uint256 amount, uint256 iterations);

/// @notice This call can only end with a revert.
function getAmountToSwapBeforeRebalance(QuoterParams memory params) public {
IAMOStrategy strategy = IAMOStrategy(params.strategy);
uint256 iterations;
uint256 low = params.minAmount;
uint256 high = params.maxAmount;
int24 lowerTick = strategy.lowerTick();
int24 upperTick = strategy.upperTick();

Check warning on line 48 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L42-L48

Added lines #L42 - L48 were not covered by tests

while (low <= high && iterations < params.maxIterations) {
uint256 mid = (low + high) / 2;

Check warning on line 51 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L50-L51

Added lines #L50 - L51 were not covered by tests

RebalanceStatus memory status = getRebalanceStatus(

Check warning on line 53 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L53

Added line #L53 was not covered by tests
params.strategy,
mid,
params.swapWETHForOETHB
);

// Best case, we found the `amount` that will reach the target pool share!
// We can revert with the amount and the number of iterations
if (status.reason == RevertReasons.Found) {
revert ValidAmount(mid, iterations);

Check warning on line 62 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L62

Added line #L62 was not covered by tests
}

// If the rebalance failed then we should try to change the amount.
// We will handle all possible revert reasons here.

// Case 1: Rebalance out of bounds
// If the pool is out of bounds, we need to adjust the amount to reach the target pool share
if (status.reason == RevertReasons.RebalanceOutOfBounds) {
// If the current pool share is less than the target pool share, we need to increase the amount
if (
params.swapWETHForOETHB
? status.currentPoolWETHShare <
status.allowedWETHShareStart
: status.currentPoolWETHShare >

Check warning on line 76 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L76

Added line #L76 was not covered by tests
status.allowedWETHShareEnd
) {
low = mid + 1;

Check warning on line 79 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L79

Added line #L79 was not covered by tests
}
// Else we need to decrease the amount
else {
high = mid;

Check warning on line 83 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L83

Added line #L83 was not covered by tests
}
}

// Case 2: Not in expected tick range
// If the pool is not in the expected tick range, we need to adjust the amount
// to reach the target pool share
if (status.reason == RevertReasons.NotInExpectedTickRange) {
// If we are buying OETHb and the current tick is greater than the lower tick,
//we need to increase the amount in order to continue to push price down.
// If we are selling OETHb and the current tick is less than the upper tick,
// we need to increase the amount in order to continue to push price up.
if (
params.swapWETHForOETHB
? status.currentTick > lowerTick
: status.currentTick < upperTick

Check warning on line 98 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L98

Added line #L98 was not covered by tests
) {
low = mid + 1;

Check warning on line 100 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L100

Added line #L100 was not covered by tests
}
// Else we need to decrease the amount
else {
high = mid;

Check warning on line 104 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L104

Added line #L104 was not covered by tests
}
}

// Case 3: Not enough WETH for swap
// If we don't have enough WETH to swap, we need to decrease the amount
// This error can happen, when initial value of mid is too high, so we need to decrease it
if (status.reason == RevertReasons.NotEnoughWethForSwap) {
high = mid;

Check warning on line 112 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L112

Added line #L112 was not covered by tests
}

// Case 4: Not enough WETH liquidity
// If we don't have enough WETH liquidity
// Revert for the moment, we need to improve this
if (status.reason == RevertReasons.NotEnoughWethLiquidity) {
revert("Quoter: Not enough WETH liquidity");

Check warning on line 119 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L119

Added line #L119 was not covered by tests
}

// Case 5: Unexpected error
// Worst case, it reverted with an unexpected error.
if (status.reason == RevertReasons.UnexpectedError) {
revert UnexpectedError(status.revertMessage);

Check warning on line 125 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L125

Added line #L125 was not covered by tests
}

iterations++;

Check warning on line 128 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L128

Added line #L128 was not covered by tests
}

// Case 6: Out of iterations
// If we didn't find the amount after the max iterations, we need to revert.
revert OutOfIterations(iterations);

Check warning on line 133 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L133

Added line #L133 was not covered by tests
}

function getRebalanceStatus(

Check warning on line 136 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L136

Added line #L136 was not covered by tests
address strategy,
uint256 amount,
bool swapWETH
) public returns (RebalanceStatus memory status) {
try IAMOStrategy(strategy).rebalance(amount, swapWETH, 0) {
status.reason = RevertReasons.Found;
return status;

Check warning on line 143 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L141-L143

Added lines #L141 - L143 were not covered by tests
} catch Error(string memory reason) {
status.reason = RevertReasons.UnexpectedError;
status.revertMessage = reason;

Check warning on line 146 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L145-L146

Added lines #L145 - L146 were not covered by tests
} catch (bytes memory reason) {
bytes4 receivedSelector = bytes4(reason);

Check warning on line 148 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L148

Added line #L148 was not covered by tests

// Case 1: Rebalance out of bounds
if (
receivedSelector ==
IAMOStrategy.PoolRebalanceOutOfBounds.selector
) {
uint256 currentPoolWETHShare;
uint256 allowedWETHShareStart;
uint256 allowedWETHShareEnd;

Check warning on line 157 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L155-L157

Added lines #L155 - L157 were not covered by tests

// solhint-disable-next-line no-inline-assembly
assembly {

Check warning on line 160 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L160

Added line #L160 was not covered by tests
currentPoolWETHShare := mload(add(reason, 0x24))
allowedWETHShareStart := mload(add(reason, 0x44))
allowedWETHShareEnd := mload(add(reason, 0x64))
}
return

Check warning on line 165 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L165

Added line #L165 was not covered by tests
RebalanceStatus({
reason: RevertReasons.RebalanceOutOfBounds,
currentPoolWETHShare: currentPoolWETHShare,
allowedWETHShareStart: allowedWETHShareStart,
allowedWETHShareEnd: allowedWETHShareEnd,
currentTick: 0,
balanceWETH: 0,
amountWETH: 0,
revertMessage: ""
});
}

// Case 2: Not in expected tick range
if (
receivedSelector ==
IAMOStrategy.OutsideExpectedTickRange.selector
) {
int24 currentTick;

Check warning on line 183 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L183

Added line #L183 was not covered by tests

// solhint-disable-next-line no-inline-assembly
assembly {

Check warning on line 186 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L186

Added line #L186 was not covered by tests
currentTick := mload(add(reason, 0x24))
}
return

Check warning on line 189 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L189

Added line #L189 was not covered by tests
RebalanceStatus({
reason: RevertReasons.NotInExpectedTickRange,
currentPoolWETHShare: 0,
allowedWETHShareStart: 0,
allowedWETHShareEnd: 0,
currentTick: currentTick,
balanceWETH: 0,
amountWETH: 0,
revertMessage: ""
});
}

// Case 3: Not enough WETH for swap
if (
receivedSelector == IAMOStrategy.NotEnoughWethForSwap.selector
) {
uint256 balanceWETH;
uint256 amountWETH;

Check warning on line 207 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L206-L207

Added lines #L206 - L207 were not covered by tests

// solhint-disable-next-line no-inline-assembly
assembly {

Check warning on line 210 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L210

Added line #L210 was not covered by tests
balanceWETH := mload(add(reason, 0x24))
amountWETH := mload(add(reason, 0x44))
}
return

Check warning on line 214 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L214

Added line #L214 was not covered by tests
RebalanceStatus({
reason: RevertReasons.NotEnoughWethForSwap,
currentPoolWETHShare: 0,
allowedWETHShareStart: 0,
allowedWETHShareEnd: 0,
currentTick: 0,
balanceWETH: balanceWETH,
amountWETH: amountWETH,
revertMessage: ""
});
}

// Case 4: Not enough WETH liquidity
if (
receivedSelector == IAMOStrategy.NotEnoughWethLiquidity.selector
sparrowDom marked this conversation as resolved.
Show resolved Hide resolved
) {
return

Check warning on line 231 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L231

Added line #L231 was not covered by tests
RebalanceStatus({
reason: RevertReasons.NotEnoughWethLiquidity,
currentPoolWETHShare: 0,
allowedWETHShareStart: 0,
allowedWETHShareEnd: 0,
currentTick: 0,
balanceWETH: 0,
amountWETH: 0,
revertMessage: ""
});
}

// Case 5: Unexpected error
return

Check warning on line 245 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L245

Added line #L245 was not covered by tests
RebalanceStatus({
reason: RevertReasons.UnexpectedError,
currentPoolWETHShare: 0,
allowedWETHShareStart: 0,
allowedWETHShareEnd: 0,
currentTick: 0,
balanceWETH: 0,
amountWETH: 0,
revertMessage: abi.decode(reason, (string))
});
}
}
}

contract AerodromeAMOQuoter {
QuoterHelper public quoterHelper;

sparrowDom marked this conversation as resolved.
Show resolved Hide resolved
constructor() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

constructor should probably also contain the amoStrategy  as a parameter and clPool (underlying aerodrome slipstream pool)

quoterHelper = new QuoterHelper();

Check warning on line 264 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L263-L264

Added lines #L263 - L264 were not covered by tests
}

struct Data {
uint256 amount;
uint256 iterations;
}

event ValueFound(uint256 value, uint256 iterations);
event ValueNotFound(string message);

function quoteAmountToSwapBeforeRebalance(

Check warning on line 275 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L275

Added line #L275 was not covered by tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome stuff!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

address strategy,
bool swapWETHForOETHB,
uint256 minAmount,
uint256 maxAmount,
uint256 maxIterations
) public returns (Data memory data) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: was this supposed to be internal?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, fixed!

QuoterHelper.QuoterParams memory params = QuoterHelper.QuoterParams({

Check warning on line 282 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L282

Added line #L282 was not covered by tests
strategy: strategy,
swapWETHForOETHB: swapWETHForOETHB,
minAmount: minAmount,
maxAmount: maxAmount,
maxIterations: maxIterations
});
try quoterHelper.getAmountToSwapBeforeRebalance(params) {
revert("Previous call should only revert, it cannot succeed");

Check warning on line 290 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L289-L290

Added lines #L289 - L290 were not covered by tests
sparrowDom marked this conversation as resolved.
Show resolved Hide resolved
} catch (bytes memory reason) {
bytes4 receivedSelector = bytes4(reason);

Check warning on line 292 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L292

Added line #L292 was not covered by tests

if (receivedSelector == QuoterHelper.ValidAmount.selector) {
uint256 value;
uint256 iterations;

Check warning on line 296 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L295-L296

Added lines #L295 - L296 were not covered by tests

// solhint-disable-next-line no-inline-assembly
assembly {

Check warning on line 299 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L299

Added line #L299 was not covered by tests
value := mload(add(reason, 0x24))
iterations := mload(add(reason, 0x44))
}
emit ValueFound(value, iterations);
return Data({ amount: value, iterations: iterations });

Check warning on line 304 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L303-L304

Added lines #L303 - L304 were not covered by tests
}

if (receivedSelector == QuoterHelper.OutOfIterations.selector) {
emit ValueNotFound("Out of iterations");
revert("Out of iterations");

Check warning on line 309 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L308-L309

Added lines #L308 - L309 were not covered by tests
}

emit ValueNotFound("Unexpected error");
revert(abi.decode(reason, (string)));

Check warning on line 313 in contracts/contracts/utils/AerodromeAMOQuoter.sol

View check run for this annotation

Codecov / codecov/patch

contracts/contracts/utils/AerodromeAMOQuoter.sol#L312-L313

Added lines #L312 - L313 were not covered by tests
}
}
}
1 change: 1 addition & 0 deletions contracts/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ module.exports = {
accounts: {
mnemonic,
},
blockGasLimit: 1000000000,
chainId,
...(isArbitrumFork
? { tags: ["arbitrumOne"] }
Expand Down
Loading
Loading