Skip to content

Commit 006ca27

Browse files
committed
gas: update gas snapshots
1 parent 69b23b8 commit 006ca27

File tree

6 files changed

+44
-38
lines changed

6 files changed

+44
-38
lines changed

snapshots/AToken.transfer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"full amount; receiver: ->enableCollateral": "144837",
3-
"full amount; sender: ->disableCollateral;": "103274",
4-
"full amount; sender: ->disableCollateral; receiver: ->enableCollateral": "145016",
5-
"full amount; sender: ->disableCollateral; receiver: dirty, ->enableCollateral": "133059",
6-
"full amount; sender: collateralDisabled": "103095",
7-
"partial amount; sender: collateralDisabled;": "103095",
8-
"partial amount; sender: collateralDisabled; receiver: ->enableCollateral": "144837",
9-
"partial amount; sender: collateralEnabled;": "103303",
10-
"partial amount; sender: collateralEnabled; receiver: ->enableCollateral": "145045"
2+
"full amount; receiver: ->enableCollateral": "144881",
3+
"full amount; sender: ->disableCollateral;": "103318",
4+
"full amount; sender: ->disableCollateral; receiver: ->enableCollateral": "145060",
5+
"full amount; sender: ->disableCollateral; receiver: dirty, ->enableCollateral": "133158",
6+
"full amount; sender: collateralDisabled": "103139",
7+
"partial amount; sender: collateralDisabled;": "103139",
8+
"partial amount; sender: collateralDisabled; receiver: ->enableCollateral": "144881",
9+
"partial amount; sender: collateralEnabled;": "103347",
10+
"partial amount; sender: collateralEnabled; receiver: ->enableCollateral": "145089"
1111
}

snapshots/Pool.Getters.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"getEModeCategoryCollateralConfig": "8000",
3-
"getEModeCategoryData": "13430",
4-
"getLiquidationGracePeriod": "29197",
5-
"getReserveData": "34935",
3+
"getEModeCategoryData": "11053",
4+
"getLiquidationGracePeriod": "7765",
5+
"getReserveData": "32157",
66
"getUserAccountData: supplies: 0, borrows: 0": "22641",
7-
"getUserAccountData: supplies: 1, borrows: 0": "34774",
8-
"getUserAccountData: supplies: 2, borrows: 0": "47296",
9-
"getUserAccountData: supplies: 2, borrows: 1": "28968"
7+
"getUserAccountData: supplies: 1, borrows: 0": "35053",
8+
"getUserAccountData: supplies: 2, borrows: 0": "47575",
9+
"getUserAccountData: supplies: 2, borrows: 1": "29247"
1010
}

snapshots/Pool.Operations.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"borrow: first borrow->borrowingEnabled": "256189",
3-
"borrow: recurrent borrow": "248474",
4-
"liquidationCall: deficit on liquidated asset": "392266",
5-
"liquidationCall: deficit on liquidated asset + other asset": "422243",
6-
"liquidationCall: full liquidation": "392266",
7-
"liquidationCall: partial liquidation": "381149",
8-
"repay: full repay": "176547",
9-
"repay: partial repay": "189971",
10-
"supply: collateralDisabled": "146829",
11-
"supply: collateralEnabled": "146829",
12-
"supply: first supply->collateralEnabled": "176387",
13-
"withdraw: full withdraw": "165303",
14-
"withdraw: partial withdraw": "181992"
2+
"borrow: first borrow->borrowingEnabled": "256480",
3+
"borrow: recurrent borrow": "248834",
4+
"liquidationCall: deficit on liquidated asset": "392439",
5+
"liquidationCall: deficit on liquidated asset + other asset": "492078",
6+
"liquidationCall: full liquidation": "392439",
7+
"liquidationCall: partial liquidation": "383954",
8+
"repay: full repay": "176521",
9+
"repay: partial repay": "189949",
10+
"supply: collateralDisabled": "146755",
11+
"supply: collateralEnabled": "146755",
12+
"supply: first supply->collateralEnabled": "176366",
13+
"withdraw: full withdraw": "165226",
14+
"withdraw: partial withdraw": "181916"
1515
}

snapshots/Pool.Setters.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"setUserEMode: enter eMode, 1 borrow, 1 supply": "140164",
3-
"setUserEMode: leave eMode, 1 borrow, 1 supply": "112199",
4-
"setUserUseReserveAsCollateral: disableCollateral, 1 supply": "93434",
5-
"setUserUseReserveAsCollateral: enableCollateral, 1 supply": "105145"
2+
"setUserEMode: enter eMode, 1 borrow, 1 supply": "140652",
3+
"setUserEMode: leave eMode, 1 borrow, 1 supply": "112451",
4+
"setUserUseReserveAsCollateral: disableCollateral, 1 supply": "93456",
5+
"setUserUseReserveAsCollateral: enableCollateral, 1 supply": "105167"
66
}

snapshots/StataTokenV2.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"deposit": "284677",
3-
"depositATokens": "220136",
4-
"redeem": "205767",
5-
"redeemAToken": "153413"
2+
"deposit": "281869",
3+
"depositATokens": "220224",
4+
"redeem": "205695",
5+
"redeemAToken": "153479"
66
}

tests/gas/Pool.Operations.gas.t.sol

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,15 @@ contract PoolOperations_gas_Tests is Testhelpers {
8383
}
8484

8585
function test_liquidationCall_partial() external {
86+
// on v3.3 the amounts need to be adjusted to not cause error 103 (min leftover) issues
87+
uint256 scalingFactor = 10;
8688
uint256 price = contracts.aaveOracle.getAssetPrice(tokenList.weth);
87-
_supplyOnReserve(borrower, (((price * 1e6) / 1e8) * 90) / 100, tokenList.usdx);
88-
_borrowArbitraryAmount(borrower, 1 ether, tokenList.weth);
89+
_supplyOnReserve(
90+
borrower,
91+
((((price * 1e6) / 1e8) * 90) / 100) * scalingFactor,
92+
tokenList.usdx
93+
);
94+
_borrowArbitraryAmount(borrower, 1 ether * scalingFactor, tokenList.weth);
8995
deal(tokenList.weth, liquidator, 0.5 ether);
9096
vm.startPrank(liquidator);
9197
IERC20(tokenList.weth).approve(report.poolProxy, 0.5 ether);

0 commit comments

Comments
 (0)