Skip to content

Commit 4602f2b

Browse files
TepNiksakulstra
andauthored
fix: vm.assume for user address for the Pool Deficit tests & update snapshots (#105)
Foundry had an issue in regards to storage hotness checks on gas reports. The changes in the gas reports here highlight the updated snapshots based on the fix. Co-authored-by: Lukas <[email protected]>
1 parent 43eab2c commit 4602f2b

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

snapshots/Pool.Getters.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"getLiquidationGracePeriod": "7765",
55
"getReserveData": "32157",
66
"getUserAccountData: supplies: 0, borrows: 0": "22641",
7-
"getUserAccountData: supplies: 0, borrows: 0 with eMode enabled": "7641",
8-
"getUserAccountData: supplies: 1, borrows: 0": "35053",
9-
"getUserAccountData: supplies: 1, borrows: 0 with eMode enabled": "27360",
10-
"getUserAccountData: supplies: 2, borrows: 0": "47575",
11-
"getUserAccountData: supplies: 2, borrows: 0 with eMode enabled": "40267",
12-
"getUserAccountData: supplies: 2, borrows: 1": "29431",
13-
"getUserAccountData: supplies: 2, borrows: 1 with eMode enabled": "30623"
7+
"getUserAccountData: supplies: 0, borrows: 0 with eMode enabled": "22641",
8+
"getUserAccountData: supplies: 1, borrows: 0": "58553",
9+
"getUserAccountData: supplies: 1, borrows: 0 with eMode enabled": "61360",
10+
"getUserAccountData: supplies: 2, borrows: 0": "87575",
11+
"getUserAccountData: supplies: 2, borrows: 0 with eMode enabled": "90767",
12+
"getUserAccountData: supplies: 2, borrows: 1": "118931",
13+
"getUserAccountData: supplies: 2, borrows: 1 with eMode enabled": "122123"
1414
}

snapshots/ProtocolDataProvider.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"getSiloedBorrowing": "16792",
1212
"getTotalDebt": "35491",
1313
"getUnbackedMintCap": "16721",
14-
"getUserReserveData": "29607",
14+
"getUserReserveData": "72607",
1515
"getVirtualUnderlyingBalance": "16533"
1616
}

tests/protocol/pool/Pool.Deficit.sol

+1
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ contract PoolDeficitTests is TestnetProcedures {
279279
vm.assume(user != contracts.poolProxy.getReserveAToken(tokenList.usdx));
280280
vm.assume(user != contracts.poolProxy.getReserveAToken(tokenList.wbtc));
281281
vm.assume(user != contracts.poolProxy.getReserveAToken(tokenList.weth));
282+
vm.assume(user != report.poolConfiguratorProxy);
282283
}
283284

284285
// we reinvent these helpers on each contract and should move them somewhere common

0 commit comments

Comments
 (0)