Verax is a shared registry for storing attestations of public interest on EVM chains, designed to enhance data discoverability and consumption for dApps across the network.
Currently, the withdraw function of a Portal is not implemented at all by default, which can lead to funds being stuck on it.
That's why we'll implement a default withdraw function, at the AbstractPortal level, to make sure there is always a way to retrieve the funds.
Proposed implementation:
/**
* @notice Withdraw funds from the Portal
* @param to the address to send the funds to
* @param amount the amount to withdraw
* @dev Only the Portal owner can withdraw funds
*/
function withdraw(address payable to, uint256 amount) external override onlyPortalOwner {
(bool s, ) = to.call{value: amount}("");
if (!s) revert WithdrawFail();
}
Currently, the
withdraw
function of a Portal is not implemented at all by default, which can lead to funds being stuck on it.That's why we'll implement a default
withdraw
function, at theAbstractPortal
level, to make sure there is always a way to retrieve the funds.Proposed implementation: