Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion remappings.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/
@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/
@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/
forge-std/=lib/forge-std/src/
12 changes: 12 additions & 0 deletions test/gnosis/GnoValidatorsChecker.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {IGnoVault} from "../../contracts/interfaces/IGnoVault.sol";
import {IVaultEnterExit} from "../../contracts/interfaces/IVaultEnterExit.sol";
import {IVaultState} from "../../contracts/interfaces/IVaultState.sol";
import {IKeeperRewards} from "../../contracts/interfaces/IKeeperRewards.sol";
import {IValidatorsChecker} from "../../contracts/interfaces/IValidatorsChecker.sol";
import {GnoHelpers} from "../helpers/GnoHelpers.sol";

contract GnoValidatorsCheckerTest is Test, GnoHelpers {
Expand Down Expand Up @@ -63,6 +64,17 @@ contract GnoValidatorsCheckerTest is Test, GnoHelpers {
validRegistryRoot = contracts.validatorsRegistry.get_deposit_root();
}

// Test checkValidatorsManagerSignature with an empty vault
function testCheckValidatorsManagerSignature_InsufficientAssets() public view {
// Test with empty vault
(uint256 blockNumber, IValidatorsChecker.Status status) =
validatorsChecker.checkValidatorsManagerSignature(emptyVault, validRegistryRoot, "", "");

// Verify result
assertEq(uint256(status), uint256(IValidatorsChecker.Status.INSUFFICIENT_ASSETS));
assertEq(blockNumber, block.number);
}

// Test getExitQueueCumulativeTickets and getExitQueueMissingAssets with an empty exit queue
function testGetExitQueueFunctions_EmptyQueue() public view {
// Get cumulative tickets for empty queue
Expand Down