-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Refactoring foundry testcase files
- Loading branch information
1 parent
c965610
commit 6c52beb
Showing
7 changed files
with
183 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@openzeppelin/=node_modules/@openzeppelin/ | ||
ds-test/=lib/forge-std/lib/ds-test/src/ | ||
eth-gas-reporter/=node_modules/eth-gas-reporter/ | ||
forge-std/=lib/forge-std/src/ | ||
hardhat/=node_modules/hardhat/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
pragma solidity 0.8.18; | ||
|
||
import "./SetupHelper.sol"; | ||
|
||
contract BendNftPoolTest is SetupHelper { | ||
function setUp() public override { | ||
super.setUp(); | ||
} | ||
|
||
function test_deposit_basic() public { | ||
super.prepareAllApprovals(testUser0); | ||
super.prepareMintNfts(testUser0, 5); | ||
|
||
vm.startPrank(testUser0); | ||
|
||
nftPool.deposit(address(mockBAYC), testBaycTokenIds); | ||
nftPool.withdraw(address(mockBAYC), testBaycTokenIds); | ||
|
||
nftPool.deposit(address(mockMAYC), testMaycTokenIds); | ||
nftPool.withdraw(address(mockMAYC), testMaycTokenIds); | ||
|
||
nftPool.deposit(address(mockBAKC), testBakcTokenIds); | ||
nftPool.withdraw(address(mockBAKC), testBakcTokenIds); | ||
|
||
vm.stopPrank(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
pragma solidity 0.8.18; | ||
|
||
import "./SetupHelper.sol"; | ||
|
||
contract BendStakeManagerTest is SetupHelper { | ||
function setUp() public override { | ||
super.setUp(); | ||
} | ||
|
||
function test_compound_StakeApeCoin() public { | ||
super.prepareAllApprovals(testUser0); | ||
super.prepareDepositCoins(testUser0, 1_000_000 * 1e18); | ||
|
||
vm.startPrank(botAdmin); | ||
|
||
IStakeManager.CompoundArgs memory compoundArgs1; | ||
compoundArgs1.coinStakeThreshold = 0; | ||
stakeManager.compound(compoundArgs1); | ||
|
||
vm.stopPrank(); | ||
} | ||
|
||
function test_compound_StakeBAYC() public { | ||
super.prepareAllApprovals(testUser0); | ||
super.prepareDepositCoins(testUser0, 1_000_000 * 1e18); | ||
super.prepareDepositNfts(testUser0, 5); | ||
|
||
vm.startPrank(botAdmin); | ||
IStakeManager.CompoundArgs memory compoundArgs1; | ||
compoundArgs1.stake.bayc = testBaycTokenIds; | ||
stakeManager.compound(compoundArgs1); | ||
vm.stopPrank(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.