Require fallback function selector
Check msg.data.length to ensure the fallback was not called
with the intent to call a different function.
If msg.data.length is zero
it's safe to assume that the fallback is called by direct value transfer.
If not, it was probably an unknown function and should revert.
@@ -36,6 +36,7 @@ contract Deposit is DepositFactoryAuthority {
}
function () external payable {
+ require(msg.data.length == 0, "Deposit contract was called with unknown function selector.");
}
/// @notice Get the keep contract address associated with the Deposit.
