Skip to content

Commit

Permalink
Remove releasedMsg and unnecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adaki2004 committed Jul 28, 2023
1 parent 3edbe55 commit 5743097
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions packages/protocol/contracts/tokenvault/ERC20Vault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
{
Expand Down

0 comments on commit 5743097

Please sign in to comment.