Description:Description\
Assuming (_getChainId() == _data.governanceEid) is correct, the if block containing this check will not revert if the condition evaluates to false. The if block will be skipped, including minting, and the code proceeds to run the rest of the code as if everything is okay.
This is because there's no revert statement to this effect when the condition (_getChainId() == _data.governanceEid) is false.
It's important to note that the if block is inside a constructor which only run once.
Github username: -- Twitter username: -- Submission hash (on-chain): 0x49f7f912d008fde61c3be1d3177bc8fd25dc7135c0d0dd5d6c8046778c0f552a Severity: medium
Description: Description\ Assuming
(_getChainId() == _data.governanceEid)
is correct, the if block containing this check will not revert if the condition evaluates to false. The if block will be skipped, including minting, and the code proceeds to run the rest of the code as if everything is okay.This is because there's no revert statement to this effect when the condition
(_getChainId() == _data.governanceEid)
is false.It's important to note that the if block is inside a constructor which only run once.
Attachments https://github.com/hats-finance/Tapioca-0xe0b920d38a0900af3bab7ff0ca0af554129f54ad/blob/baddafc15616a5674e73c2f5a920b92bf9b21888/contracts/tokens/TapToken.sol#L154C3-L163C1
The code should revert if
(_getChainId() == _data.governanceEid)
is false.