Skip to content

Commit

Permalink
Update InvariantBridge.t.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
wcgcyx committed Feb 20, 2024
1 parent 22caaca commit ec68779
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions test/invariant/InvariantBridge.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ contract InvariantBridge is Test {
uint256 public constant IMX_DEPOSIT_LIMIT = 10000 ether;
uint256 public constant MAX_AMOUNT = 10000;
address public constant ADMIN = address(0x111);
uint256 public constant NO_OF_USERS = 20;
uint256 public constant NO_OF_TOKENS = 20;
uint256 public constant NO_OF_USERS = 5;
uint256 public constant NO_OF_TOKENS = 4;

uint256 childId;
uint256 rootId;
Expand Down Expand Up @@ -168,14 +168,17 @@ contract InvariantBridge is Test {
childSelectors[0] = childBridgeHandler.withdraw.selector;
targetSelector(FuzzSelector({addr: address(childBridgeHandler), selectors: childSelectors}));

bytes4[] memory rootSelectors = new bytes4[](1);
rootSelectors[0] = rootBridgeHandler.deposit.selector;
targetSelector(FuzzSelector({addr: address(rootBridgeHandler), selectors: rootSelectors}));
// bytes4[] memory rootSelectors = new bytes4[](1);
// rootSelectors[0] = rootBridgeHandler.deposit.selector;
// targetSelector(FuzzSelector({addr: address(rootBridgeHandler), selectors: rootSelectors}));

targetContract(address(childBridgeHandler));
targetContract(address(rootBridgeHandler));
// targetContract(address(rootBridgeHandler));
}

/// forge-config: default.invariant.runs = 1
/// forge-config: default.invariant.depth = 10
/// forge-config: default.invariant.fail-on-revert = true
function invariant_A() external {
}
}

0 comments on commit ec68779

Please sign in to comment.