From 5743097f4ef727dd32dee518e0c3da67f6a1fc0b Mon Sep 17 00:00:00 2001 From: adaki2004 Date: Fri, 28 Jul 2023 16:34:19 +0200 Subject: [PATCH] Remove releasedMsg and unnecessary comments --- .../contracts/tokenvault/ERC20Vault.sol | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/packages/protocol/contracts/tokenvault/ERC20Vault.sol b/packages/protocol/contracts/tokenvault/ERC20Vault.sol index a5383d3b46e..d81f6cf7242 100644 --- a/packages/protocol/contracts/tokenvault/ERC20Vault.sol +++ b/packages/protocol/contracts/tokenvault/ERC20Vault.sol @@ -74,10 +74,7 @@ contract ERC20Vault is EssentialContract { uint256 chainId => mapping(address canonicalAddress => address btoken) ) public canonicalToBridged; - // Released message hashes - mapping(bytes32 msgHash => bool released) public releasedMessages; - - uint256[46] private __gap; + uint256[47] private __gap; /*////////////////////////////////////////////////////////////// EVENTS @@ -299,29 +296,15 @@ contract ERC20Vault is EssentialContract { nonReentrant onlyFromNamed("bridge") { - // if (message.owner == address(0)) revert VAULT_INVALID_OWNER(); - // if (message.srcChainId != block.chainid) { - // revert VAULT_INVALID_SRC_CHAIN_ID(); - // } - IBridge bridge = IBridge(resolve("bridge", false)); bytes32 msgHash = bridge.hashMessage(message); - //if (releasedMessages[msgHash]) { - // revert VAULT_MESSAGE_RELEASED_ALREADY(); - //} - //releasedMessages[msgHash] = true; - (, address token,, uint256 amount) = abi.decode( message.data[4:], (CanonicalERC20, address, address, uint256) ); if (token == address(0)) revert VAULT_INVALID_TOKEN(); - // if (!bridge.isMessageFailed(msgHash, message.destChainId, proof)) { - // revert VAULT_MESSAGE_NOT_FAILED(); - // } - if (amount > 0) { if (isBridgedToken[token] || token == resolve("taiko_token", true)) {