Skip to content

Commit

Permalink
wip: reproduce-able issue
Browse files Browse the repository at this point in the history
  • Loading branch information
0xteddybear committed Aug 29, 2024
1 parent b362a01 commit 17c14bf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions packages/contracts-bedrock/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ bracket_spacing=true
wrap_comments=true

[invariant]
runs=1000
depth=500
runs=100000
depth=4
fail_on_revert=false
shrink_run_limit=5000
shrink_run_limit=500000

################################################################
# PROFILE: CI #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { EIP1967Helper } from "test/mocks/EIP1967Helper.sol";
import { Predeploys } from "src/libraries/Predeploys.sol";
import { OptimismSuperchainERC20 } from "src/L2/OptimismSuperchainERC20.sol";
import { IL2ToL2CrossDomainMessenger } from "src/L2/IL2ToL2CrossDomainMessenger.sol";
import { ProtocolProperties } from "../properties/medusa/Protocol.properties.t.sol";
import { ProtocolProperties } from "../properties/medusa/Protocol.t.sol";
import { MockL2ToL2CrossDomainMessenger } from "../properties/helpers/MockL2ToL2CrossDomainMessenger.t.sol";

contract MedusaAdaptooor is Test {
Expand Down Expand Up @@ -42,10 +42,10 @@ contract MedusaAdaptooor is Test {
totalSupply += OptimismSuperchainERC20(supertoken).totalSupply();
}
}
console.log('trackedSupply :', trackedSupply);
console.log('totalSupply :', totalSupply);
console.log('trackedSupply :', trackedSupply);
console.log('totalSupply :', totalSupply);
console.log('fundsInTransit :', fundsInTransit);
assert(trackedSupply == totalSupply + fundsInTransit);
assertEq(trackedSupply, totalSupply + fundsInTransit);
}
}

Expand Down Expand Up @@ -75,6 +75,10 @@ contract MedusaAdaptooor is Test {
assertEq(trackedSupply, totalSupply);
}
}

function invariant_handlerAssertions() external {
assertFalse(properties.failed());
}
}

/// @title OptimismSuperchainERC20_User
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Test } from "forge-std/Test.sol";

contract HalmosBase is Test {
uint256 internal constant CURRENT_CHAIN_ID = 1;
uint256 internal constant ZERO_AMOUNT;
uint256 internal constant ZERO_AMOUNT = 0;

address internal remoteToken = address(bytes20(keccak256("remoteToken")));
string internal name = "SuperchainERC20";
Expand Down

0 comments on commit 17c14bf

Please sign in to comment.