Skip to content

Commit

Permalink
[OZ][L-02] Transfer and send Calls Are No Longer Considered Best Prac…
Browse files Browse the repository at this point in the history
…tice (#111)
  • Loading branch information
Mike-CZ authored Jan 31, 2025
1 parent 47a34c4 commit 86add7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contracts/sfc/SFC.sol
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,10 @@ contract SFC is OwnableUpgradeable, UUPSUpgradeable, Version {
revert ValueTooLarge();
}
totalSupply -= amount;
payable(address(0)).transfer(amount);
(bool sent, ) = payable(address(0)).call{value: amount}("");
if (!sent) {
revert TransferFailed();
}
emit BurntNativeTokens(amount);
}
}
Expand Down

0 comments on commit 86add7e

Please sign in to comment.