Skip to content

Commit 86add7e

Browse files
authored
[OZ][L-02] Transfer and send Calls Are No Longer Considered Best Practice (#111)
1 parent 47a34c4 commit 86add7e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

contracts/sfc/SFC.sol

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,10 @@ contract SFC is OwnableUpgradeable, UUPSUpgradeable, Version {
835835
revert ValueTooLarge();
836836
}
837837
totalSupply -= amount;
838-
payable(address(0)).transfer(amount);
838+
(bool sent, ) = payable(address(0)).call{value: amount}("");
839+
if (!sent) {
840+
revert TransferFailed();
841+
}
839842
emit BurntNativeTokens(amount);
840843
}
841844
}

0 commit comments

Comments
 (0)