-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CCIP-4428 Decouple LiquidityManager tests with LockReleaseTokenPool (#…
…16017) * decouple LiquidityManager tests with LockReleaseTokenPool + Test Rename * split test files * [Bot] Update changeset file with jira issues * prettier run * liquiditymanager test refactor * reference events from interface / contracts + solidity version + spacing * prettier * remove duplicate events * prettier fix * fix * pretty --------- Co-authored-by: app-token-issuer-infra-releng[bot] <120227048+app-token-issuer-infra-releng[bot]@users.noreply.github.com>
- Loading branch information
1 parent
d7f5497
commit 17a9e2a
Showing
16 changed files
with
556 additions
and
525 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,9 @@ | ||
--- | ||
'@chainlink/contracts': patch | ||
--- | ||
|
||
#internal decouple LiquidityManager tests with LockReleaseTokenPool + Test Rename | ||
|
||
PR issue: CCIP-4428 | ||
|
||
Solidity Review issue: CCIP-3966 |
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
24 changes: 24 additions & 0 deletions
24
contracts/src/v0.8/liquiditymanager/test/LiquidityManager.addLiquidity.t.sol
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,24 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
pragma solidity ^0.8.24; | ||
|
||
import "./LiquidityManagerSetup.t.sol"; | ||
import {LiquidityManager} from "../LiquidityManager.sol"; | ||
|
||
contract LiquidityManager_addLiquidity is LiquidityManagerSetup { | ||
function test_addLiquidity() external { | ||
address caller = STRANGER; | ||
changePrank(caller); | ||
|
||
uint256 amount = 12345679; | ||
deal(address(s_l1Token), caller, amount); | ||
|
||
s_l1Token.approve(address(s_liquidityManager), amount); | ||
|
||
vm.expectEmit(); | ||
emit LiquidityManager.LiquidityAddedToContainer(caller, amount); | ||
|
||
s_liquidityManager.addLiquidity(amount); | ||
|
||
assertEq(s_l1Token.balanceOf(address(s_lockReleaseTokenPool)), amount); | ||
} | ||
} |
Oops, something went wrong.