cached pair fees
This commit is contained in:
@@ -237,10 +237,10 @@ contract GasTest is Test {
|
||||
vm.prank(alice);
|
||||
TestERC20(address(tokens[1])).approve(address(testPool), type(uint256).max);
|
||||
|
||||
uint256 maxIn = 1_000;
|
||||
uint256 maxIn = 10_000;
|
||||
|
||||
// Perform 10 swaps alternating directions to avoid large imbalance
|
||||
for (uint256 i = 0; i < 10; i++) {
|
||||
// Perform swaps alternating directions to avoid large imbalance
|
||||
for (uint256 i = 0; i < 20; i++) {
|
||||
vm.prank(alice);
|
||||
if (i % 2 == 0) {
|
||||
// swap token0 -> token1
|
||||
@@ -249,6 +249,9 @@ contract GasTest is Test {
|
||||
// swap token1 -> token0
|
||||
testPool.swap(alice, alice, 1, 0, maxIn, 0, 0, false);
|
||||
}
|
||||
// shake up the bits
|
||||
maxIn *= 787;
|
||||
maxIn /= 1000;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user