Skip to content

Commit

Permalink
move invariant from test/foundry to test
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitastupin-matterlabs committed Feb 6, 2025
1 parent 37045d2 commit 9259c0b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions l1-contracts/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ enable_eravm_extensions = true
zksolc = "1.5.7"

[profile.invariant_tests]
test = "test"
# verbosity = 5
ignored_error_codes = ["missing-receive-ether", "code-size", 2018, 5667, 2519, 6321, 3149, 3860]
optimizer = false
Expand Down
2 changes: 1 addition & 1 deletion l1-contracts/scripts/run-invariant-tests
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fi
echo "$WHERE" > "$HOME/.foundry/cache/where"

case "$WHERE" in
"L1") forge test --match-path 'test/foundry/invariant/AssetRouterTest.t.sol' --match-test invariant_TotalDepositsEqualTotalSupply ;;
"L1") forge test --match-path 'test/invariant/AssetRouterTest.t.sol' --match-test invariant_TotalDepositsEqualTotalSupply ;;
"L2") forge test --zksync --match-path 'test/foundry/l2/*' --match-test invariant_TotalDepositsEqualTotalSupply ;;
esac

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import {L1AssetRouterActorHandler} from "./handlers/L1AssetRouterActorHandler.so
import {BridgedStandardERC20} from "contracts/bridge/BridgedStandardERC20.sol";
import {L2AssetRouter} from "contracts/bridge/asset-router/L2AssetRouter.sol";
import {IL2NativeTokenVault} from "contracts/bridge/ntv/IL2NativeTokenVault.sol";

import {L2_NATIVE_TOKEN_VAULT_ADDR} from "contracts/common/L2ContractAddresses.sol";
import {SharedL2ContractDeployer} from "../l1/integration/l2-tests-in-l1-context/_SharedL2ContractDeployer.sol";

import {SharedL2ContractDeployer} from "../foundry/l1/integration/l2-tests-in-l1-context/_SharedL2ContractDeployer.sol";

abstract contract AssetRouterProperties is Test, SharedL2ContractDeployer {
L1AssetRouterActorHandler internal h;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import {DeployUtils} from "deploy-scripts/DeployUtils.s.sol";

import {L1AssetRouterActorHandler} from "./handlers/L1AssetRouterActorHandler.sol";
import {AssetRouterProperties} from "./AssetRouterProperties.sol";
import {SharedL2ContractL1DeployerUtils} from "../l1/integration/l2-tests-in-l1-context/_SharedL2ContractL1DeployerUtils.sol";
import {SharedL2ContractDeployer} from "../l1/integration/l2-tests-in-l1-context/_SharedL2ContractDeployer.sol";
import {SystemContractsArgs} from "../l1/integration/l2-tests-in-l1-context/_SharedL2ContractL1DeployerUtils.sol";
import {SharedL2ContractL1DeployerUtils} from "../foundry/l1/integration/l2-tests-in-l1-context/_SharedL2ContractL1DeployerUtils.sol";
import {SharedL2ContractDeployer} from "../foundry/l1/integration/l2-tests-in-l1-context/_SharedL2ContractDeployer.sol";
import {SystemContractsArgs} from "../foundry/l1/integration/l2-tests-in-l1-context/_SharedL2ContractL1DeployerUtils.sol";

contract AssetRouterTest is Test, SharedL2ContractL1DeployerUtils, SharedL2ContractDeployer, AssetRouterProperties {
function test() internal virtual override(DeployUtils, SharedL2ContractL1DeployerUtils) {}
Expand Down

0 comments on commit 9259c0b

Please sign in to comment.