Skip to content

Commit

Permalink
Add transfer status check
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-CZ committed Jan 31, 2025
1 parent b7e78f4 commit 9d8d725
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)).call{value: amount}("");
(bool sent, ) = payable(address(0)).call{value: amount}("");
if (!sent) {
revert TransferFailed();
}
emit BurntNativeTokens(amount);
}
}
Expand Down

0 comments on commit 9d8d725

Please sign in to comment.