Skip to content

Commit 40ee9ea

Browse files
authored
Merge pull request defisaver#544 from defisaver/test/chain-agnostic-tests
test: fix tests
2 parents 03d9ed7 + e4e662d commit 40ee9ea

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@commitlint/config-conventional": "^12.1.1",
3535
"@curvefi/api": "=2.52.1",
3636
"@defisaver/automation-sdk": "^3.0.2",
37-
"@defisaver/sdk": "^1.3.2",
37+
"@defisaver/sdk": "^1.3.18",
3838
"@defisaver/tokens": "^1.6.5",
3939
"@nomicfoundation/hardhat-verify": "^2.0.11",
4040
"@nomiclabs/hardhat-ethers": "^2.2.3",

test-sol/actions/sky/SkyStakingEngineClaimRewards.t.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ contract TestSkyStakingEngineClaimRewards is SkyExecuteActions {
9999
SkyView.UrnInfo[] memory urnsInfoBeforeClaim = skyView.getUserInfo(walletAddr, farms);
100100
uint256 amountEarnedBeforeClaim = urnsInfoBeforeClaim[index].amountsEarned[0].amountEarned;
101101

102-
if (_farm != USDS_FARM) {
102+
if (_farm != USDS_FARM && _farm != SPARK_FARM) {
103103
assertGt(amountEarnedBeforeClaim, 0, "Should have earned rewards before claiming");
104104
}
105105

@@ -112,7 +112,7 @@ contract TestSkyStakingEngineClaimRewards is SkyExecuteActions {
112112
wallet.execute(address(cut), executeActionCallData, 0);
113113

114114
uint256 amountAfter = IERC20(_rewardToken).balanceOf(sender);
115-
if (_farm != USDS_FARM) {
115+
if (_farm != USDS_FARM && _farm != SPARK_FARM) {
116116
assertGt(amountAfter, amountBefore);
117117
}
118118

test-sol/views/AaveV3View.t.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ contract TestAaveV3View is BaseTest, ActionsUtils, AaveV3Helper {
262262
TestConfig({
263263
supplyToken: Addresses.WETH_ADDR,
264264
borrowToken: Addresses.USDT_ADDR,
265-
supplyAmount: 30e18, // 30 WETH
265+
supplyAmount: 40e18, // 40 WETH
266266
borrowAmount: 50_000e6, // 50k USDT
267267
initialBalance: 100e18 // 100 WETH
268268
})
@@ -273,7 +273,7 @@ contract TestAaveV3View is BaseTest, ActionsUtils, AaveV3Helper {
273273
TestConfig({
274274
supplyToken: Addresses.WETH_ADDR,
275275
borrowToken: Addresses.USDC_ADDR,
276-
supplyAmount: 30e18, // 30 WETH
276+
supplyAmount: 40e18, // 40 WETH
277277
borrowAmount: 50_000e6, // 50k USDC
278278
initialBalance: 100e18 // 100 WETH
279279
})
@@ -284,7 +284,7 @@ contract TestAaveV3View is BaseTest, ActionsUtils, AaveV3Helper {
284284
TestConfig({
285285
supplyToken: Addresses.WBTC_ADDR,
286286
borrowToken: Addresses.USDT_ADDR,
287-
supplyAmount: 3e8, // 3 WBTC
287+
supplyAmount: 4e8, // 4 WBTC
288288
borrowAmount: 100_000e6, // 100k USDT
289289
initialBalance: 10e8 // 10 WBTC
290290
})
@@ -295,7 +295,7 @@ contract TestAaveV3View is BaseTest, ActionsUtils, AaveV3Helper {
295295
TestConfig({
296296
supplyToken: Addresses.WBTC_ADDR,
297297
borrowToken: Addresses.GHO_TOKEN,
298-
supplyAmount: 3e8, // 3 WBTC
298+
supplyAmount: 4e8, // 4 WBTC
299299
borrowAmount: 100_000e8, // 100k GHO
300300
initialBalance: 10e8 // 10 WBTC
301301
})

test-sol/views/SkyView.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ contract TestSkyView is SkyExecuteActions {
131131
SkyView.UrnInfo[] memory urnsInfoAfterAYear = cut.getUserInfo(walletAddr, farms);
132132

133133
for (uint256 i = 0; i < urnsInfoAfterAYear[index].amountsEarned.length; i++) {
134-
if (_farm == USDS_FARM) continue; // USDS farm is currently not earning any rewards
134+
if (_farm == USDS_FARM || _farm == SPARK_FARM) continue; // USDS and SPARK farm are currently not earning any rewards
135135
if (urnsInfoAfterAYear[index].amountsEarned[i].farm == _farm) {
136136
assertGt(
137137
urnsInfoAfterAYear[index].amountsEarned[i].amountEarned,

0 commit comments

Comments
 (0)