From f1f487ca75b32d9cce5a19a54ce1d4420ce1a682 Mon Sep 17 00:00:00 2001 From: vicnaum Date: Tue, 13 Feb 2024 22:55:37 +0100 Subject: [PATCH] fix: PermissionlessCreator withdrawFunds fixed to work with Safe --- contracts/misc/PermissionlessCreator.sol | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contracts/misc/PermissionlessCreator.sol b/contracts/misc/PermissionlessCreator.sol index 4145de0..e25de5c 100644 --- a/contracts/misc/PermissionlessCreator.sol +++ b/contracts/misc/PermissionlessCreator.sol @@ -266,7 +266,9 @@ contract PermissionlessCreator is ImmutableOwnable { // Owner functions function withdrawFunds() external onlyOwner { - payable(OWNER).transfer(address(this).balance); + // Use call instead of transfer to provide more gas (otherwise it doesn't work with SAFE): + // https://diligence.consensys.net/blog/2019/09/stop-using-soliditys-transfer-now/ + (bool success, ) = OWNER.call{value: address(this).balance}(''); } function addCreditProvider(address creditProvider) external onlyOwner {