Skip to content

Commit

Permalink
chore: remove zero-initializations
Browse files Browse the repository at this point in the history
  • Loading branch information
0xteddybear committed Aug 27, 2024
1 parent 3adeba5 commit 5e7eb87
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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 = 0;
uint256 internal constant ZERO_AMOUNT;

address internal remoteToken = address(bytes20(keccak256("remoteToken")));
string internal name = "SuperchainERC20";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ contract ProtocolProperties is ProtocolHandler, CryticERC20ExternalBasicProperti
/// convert(super, legacy)
function property_totalSupplyAcrossChainsEqualsMints() external view {
// iterate over unique deploy salts aka supertokens that are supposed to be compatible with each other
for (uint256 deploySaltIndex = 0; deploySaltIndex < ghost_totalSupplyAcrossChains.length(); deploySaltIndex++) {
uint256 totalSupply = 0;
for (uint256 deploySaltIndex; deploySaltIndex < ghost_totalSupplyAcrossChains.length(); deploySaltIndex++) {
uint256 totalSupply;
(bytes32 currentSalt, uint256 trackedSupply) = ghost_totalSupplyAcrossChains.at(deploySaltIndex);
// and then over all the (mocked) chain ids where that supertoken could be deployed
for (uint256 validChainId = 0; validChainId < MAX_CHAINS; validChainId++) {
for (uint256 validChainId; validChainId < MAX_CHAINS; validChainId++) {
address supertoken = MESSENGER.superTokenAddresses(validChainId, currentSalt);
if (supertoken != address(0)) {
totalSupply += OptimismSuperchainERC20(supertoken).totalSupply();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ contract ProtocolHandler is TestBase, StdUtils, Actors {
constructor() {
vm.etch(address(MESSENGER), address(new MockL2ToL2CrossDomainMessenger()).code);
superchainERC20Impl = new OptimismSuperchainERC20ForToBProperties();
for (uint256 remoteTokenIndex = 0; remoteTokenIndex < INITIAL_TOKENS; remoteTokenIndex++) {
for (uint256 remoteTokenIndex; remoteTokenIndex < INITIAL_TOKENS; remoteTokenIndex++) {
_deployRemoteToken();
for (uint256 supertokenChainId = 0; supertokenChainId < INITIAL_SUPERTOKENS; supertokenChainId++) {
for (uint256 supertokenChainId; supertokenChainId < INITIAL_SUPERTOKENS; supertokenChainId++) {
_deploySupertoken(remoteTokens[remoteTokenIndex], WORDS[0], WORDS[0], DECIMALS[0], supertokenChainId);
}
}
Expand Down

0 comments on commit 5e7eb87

Please sign in to comment.