From 403dc70de62b19c0e2615a24ca5fc3f0ba2e342f Mon Sep 17 00:00:00 2001 From: teddy Date: Tue, 27 Aug 2024 11:36:08 -0300 Subject: [PATCH] fix: feedback from disco --- .../OptimismSuperchainERC20ForToBProperties.t.sol | 3 ++- .../test/properties/medusa/Protocol.properties.t.sol | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/contracts-bedrock/test/properties/helpers/OptimismSuperchainERC20ForToBProperties.t.sol b/packages/contracts-bedrock/test/properties/helpers/OptimismSuperchainERC20ForToBProperties.t.sol index 865534a9efa8..145bf5ff01e5 100644 --- a/packages/contracts-bedrock/test/properties/helpers/OptimismSuperchainERC20ForToBProperties.t.sol +++ b/packages/contracts-bedrock/test/properties/helpers/OptimismSuperchainERC20ForToBProperties.t.sol @@ -4,6 +4,7 @@ pragma solidity ^0.8.25; import { OptimismSuperchainERC20 } from "src/L2/OptimismSuperchainERC20.sol"; contract OptimismSuperchainERC20ForToBProperties is OptimismSuperchainERC20 { + /// @notice This is used by CryticERC20ExternalBasicProperties to know + // which properties to test bool public constant isMintableOrBurnable = true; - uint256 public initialSupply = 0; } diff --git a/packages/contracts-bedrock/test/properties/medusa/Protocol.properties.t.sol b/packages/contracts-bedrock/test/properties/medusa/Protocol.properties.t.sol index 2d8b8b77917f..e73d84f26861 100644 --- a/packages/contracts-bedrock/test/properties/medusa/Protocol.properties.t.sol +++ b/packages/contracts-bedrock/test/properties/medusa/Protocol.properties.t.sol @@ -150,7 +150,8 @@ contract ProtocolProperties is ProtocolHandler, CryticERC20ExternalBasicProperti fromIndex = bound(fromIndex, 0, allSuperTokens.length - 1); address recipient = getActorByRawIndex(recipientIndex); OptimismSuperchainERC20 token = OptimismSuperchainERC20(allSuperTokens[fromIndex]); - uint256 balanceBefore = token.balanceOf(currentActor()); + uint256 balanceSenderBefore = token.balanceOf(currentActor()); + uint256 balanceRecipeintBefore = token.balanceOf(recipient); uint256 supplyBefore = token.totalSupply(); MESSENGER.setCrossDomainMessageSender(address(token)); @@ -163,9 +164,11 @@ contract ProtocolProperties is ProtocolHandler, CryticERC20ExternalBasicProperti // error due to the crossDomainMessageSender being manually set assert(false); } - uint256 balanceAfter = token.balanceOf(currentActor()); + uint256 balanceSenderAfter = token.balanceOf(currentActor()); + uint256 balanceRecipeintAfter = token.balanceOf(recipient); uint256 supplyAfter = token.totalSupply(); - assert(balanceBefore == balanceAfter); + assert(balanceSenderBefore == balanceSenderAfter); + assert(balanceRecipeintBefore == balanceRecipeintAfter); assert(supplyBefore == supplyAfter); }