-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: João Bruno - Balancer Labs <[email protected]>
- Loading branch information
1 parent
70800a1
commit c0d4ada
Showing
1 changed file
with
33 additions
and
0 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,33 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
pragma solidity ^0.8.24; | ||
|
||
import "forge-std/Test.sol"; | ||
|
||
import { IERC4626 } from "@openzeppelin/contracts/interfaces/IERC4626.sol"; | ||
|
||
import { ERC4626WrapperBaseTest } from "../ERC4626WrapperBase.t.sol"; | ||
|
||
contract ERC4626SonicSiloV2WanSTest is ERC4626WrapperBaseTest { | ||
function setUp() public override { | ||
ERC4626WrapperBaseTest.setUp(); | ||
|
||
// By default Silo V2 uses 21 decimals for their ERC4626 implementation. | ||
// Specifically to support balancer boosted pools, they've deployed markets with 18 decimals that truncate | ||
// the last 3 decimal places. Since the additional 3 digits of precision are always 0 and only used as an | ||
// additional layer of security against first deposit attacks, it does not impact the functioning of the market. | ||
// As such, the conversion rate is 1:1000, which we account for here by overwriting underlyingToWrappedFactor | ||
underlyingToWrappedFactor = 1000; | ||
} | ||
|
||
function setUpForkTestVariables() internal override { | ||
network = "sonic"; | ||
overrideBlockNumber = 6634482; | ||
|
||
// Silo V2's wS in wans/ws market (id 25) | ||
wrapper = IERC4626(0x016C306e103FbF48EC24810D078C65aD13c5f11B); | ||
// Donor of solvBTC | ||
underlyingDonor = 0xE223C8e92AA91e966CA31d5C6590fF7167E25801; | ||
amountToDonate = 50 * 1e18; | ||
} | ||
} |