Description:Description\
The problem is that the contracts that make use of Ownable do not set the initial owner which will make onlyOwner restricted functions permanently inaccessible, along with potential future transfers of ownership.
AllowedRelayers.sol
VaultBitcoinWallet.sol
BitcoinProver.sol
AllowedRelayers.sol - no functionality that sets the owner
abstract contract AllowedRelayers is Ownable {
mapping(address => bool) public relayers;
bool public relayersWhitelistEnabled;
modifier onlyRelayer() {
if (relayersWhitelistEnabled && !relayers[msg.sender]) {
revert("NRL");
}
_;
}
constructor() {
relayersWhitelistEnabled = true;
_toggleRelayer(msg.sender);
}
function _toggleRelayer(address _relayer) internal {
relayers[_relayer] = !relayers[_relayer];
}
function toggleRelayersWhitelistEnabled() public onlyOwner {
relayersWhitelistEnabled = !relayersWhitelistEnabled;
}
function toggleRelayer(address _relayer) public onlyOwner {
_toggleRelayer(_relayer);
}
}
Recommendations
Consider to set the constructor of Ownable therefore setting the initial owner in the constructor of the above mentioned contracts.
Github username: -- Twitter username: -- Submission hash (on-chain): 0xd50e370ac6d50f8514a0cd033d2e76daf1ddd0bae30644a5e6cda37b8c8ca7bf Severity: medium
Description: Description\ The problem is that the contracts that make use of
Ownable
do not set the initial owner which will makeonlyOwner
restricted functions permanently inaccessible, along with potential future transfers of ownership.AllowedRelayers.sol
VaultBitcoinWallet.sol
BitcoinProver.sol
AllowedRelayers.sol
- no functionality that sets the ownerRecommendations
Consider to set the constructor of
Ownable
therefore setting the initial owner in the constructor of the above mentioned contracts.