Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
98849e3
test: add Lido ARM unit test fixtures
clement-ux May 16, 2026
b12b615
test: cover Lido ARM exact input swaps
clement-ux May 16, 2026
c3f186f
Merge branch 'nicka/withdraw-on-swap' into clement/add-tests
clement-ux May 18, 2026
843c4d2
Merge branch 'nicka/withdraw-on-swap' into clement/add-tests
clement-ux May 18, 2026
9e5dca9
test: add Lido ARM exact-output swap tests
clement-ux May 18, 2026
a5a4243
Merge branch 'nicka/withdraw-on-swap' into clement/add-tests
clement-ux May 18, 2026
ecf73e1
test(lido): add Lido ARM swap fuzz tests
clement-ux May 18, 2026
b499855
Merge branch 'nicka/withdraw-on-swap' into clement/add-tests
clement-ux May 18, 2026
5777c4f
Merge branch 'nicka/withdraw-on-swap' into clement/add-tests
clement-ux May 18, 2026
8514813
test(lido): add Lido ARM deposit unit tests
clement-ux May 18, 2026
e07d6e9
test(lido): add Lido ARM claimRedeem and requestRedeem unit tests
clement-ux May 19, 2026
ba73a89
test(lido): add Lido ARM deposit, requestRedeem and claimRedeem fuzz …
clement-ux May 20, 2026
2de6f9a
test(lido): add MockLidoWithdraw for unit-new LidoARM tests
clement-ux May 20, 2026
c46a4e7
test(lido): add requestBaseAssetRedeem and claimBaseAssetRedeem unit …
clement-ux May 20, 2026
3294a9d
test(lido): add Active Market unit tests for LidoARM
clement-ux May 20, 2026
fbcd1a5
test(lido): add Accounting unit tests for LidoARM view functions
clement-ux May 20, 2026
76aa8f1
test(lido): add wstETH cases to BaseAssetRedeem unit tests
clement-ux May 20, 2026
b33bbd1
Merge branch 'clement/wsteth-base-redeem-tests' into clement/add-tests
clement-ux May 20, 2026
dcea453
test(lido): add AbstractLidoAssetAdapter unit tests
clement-ux May 20, 2026
2bbfdbd
test(lido): cover _splitShares defensive branches via TestableLidoAda…
clement-ux May 20, 2026
cd2b3b8
test(lido): fuzz _splitAmounts and _splitShares invariants
clement-ux May 20, 2026
06e382f
test(lido): deepen adapter coverage with state machine and no-op edge…
clement-ux May 20, 2026
72a7629
test(lido): use Math.mulDiv(Floor) for all mul-then-div in Split fuzz
clement-ux May 20, 2026
1db7e6b
test(lido): add admin function unit tests for LidoARM
clement-ux May 20, 2026
3fe580b
test(lido): accrue fees through real swap instead of vm.store
clement-ux May 20, 2026
f94e075
test(lido): add pause/unpause unit tests for LidoARM
clement-ux May 20, 2026
320f185
test(lido): drop unused IERC20 import from Split.fuzz
clement-ux May 20, 2026
c6b5ceb
test(lido): refactor unit tests around LidoARM with concrete + fuzz s…
clement-ux May 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions test/unit/LidoARM/Base.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

// Foundry
import {Test} from "forge-std/Test.sol";

// Contracts
import {LidoARM} from "contracts/LidoARM.sol";
import {CapManager} from "contracts/CapManager.sol";
import {StETHAssetAdapter} from "contracts/adapters/StETHAssetAdapter.sol";
import {WstETHAssetAdapter} from "contracts/adapters/WstETHAssetAdapter.sol";

// Interfaces
import {IERC20} from "contracts/Interfaces.sol";

// Mocks
import {MockWstETH} from "./mocks/MockWstETH.sol";
import {MockERC4626Market} from "./mocks/MockERC4626Market.sol";
import {MockLidoWithdraw} from "./mocks/MockLidoWithdraw.sol";

abstract contract Base_Test_ is Test {
//////////////////////////////////////////////////////
/// --- CONTRACTS
//////////////////////////////////////////////////////
// Main contracts
LidoARM public lidoARM;
CapManager public capManager;
StETHAssetAdapter public stETHAssetAdapter;
WstETHAssetAdapter public wstETHAssetAdapter;

// Interfaces
IERC20 public weth;
IERC20 public steth;
IERC20 public wsteth;

// Mocks
MockWstETH public mockWstETH;
MockLidoWithdraw public lidoWithdrawalQueue;
MockERC4626Market public mockERC4626Market;
MockERC4626Market public mockERC4626Market2;

//////////////////////////////////////////////////////
/// --- Governance, multisigs and EOAs
//////////////////////////////////////////////////////
// Users
address public alice = makeAddr("alice");
address public bobby = makeAddr("bobby");

// Privileged roles
address public deployer = makeAddr("deployer");
address public governor = makeAddr("governor");
address public operator = makeAddr("operator");
address public feeCollector = makeAddr("feeCollector");

//////////////////////////////////////////////////////
/// --- DEFAULT VALUES
//////////////////////////////////////////////////////
uint256 public constant FEE_SCALE = 10_000;
uint256 public constant PRICE_SCALE = 1e36;
uint256 public constant DEFAULT_FEE = 2_000;
uint256 public constant CLAIM_DELAY = 10 minutes;
uint256 public constant DELAY_REQUEST = 30 minutes;
uint256 public constant DEFAULT_AMOUNT = 1 ether;
uint256 public constant MIN_TOTAL_SUPPLY = 1e12;
uint256 public constant MIN_SHARES_TO_REDEEM = 1e7;
uint256 public constant MAX_CROSS_PRICE_DEVIATION = 20e32;
}
Loading
Loading