Most of the contracts have a rescueFunds()
function that can rescue any funds and tokens that are accidentally send to the contract.
The one exception is contract Hasher
.
Hasher
doesn't have any payable
functions to ETH would not normally be present in the contract.
Tokens could be send to this contract, but that doesn't seem very likely.
Adding a function rescueFunds()
does increase the complexity so probably not worth the trouble to implement.
However adding a comment in the contract might be useful (also to prevent future remaks about this).
Would expect Hasher
to also have this function or have a comment why it is lacking.
Tokens send to the Hasher
contract can't be rescued.
contract Hasher is IHasher {
function packMessage(...) external pure override returns (bytes32) {
...
}
// no rescueFunds
}
function rescueFunds(
address token_,
address userAddress_,
uint256 amount_
) external onlyRole(RESCUE_ROLE) {
RescueFundsLib.rescueFunds(token_, userAddress_, amount_);
}