-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor burn native tokens method #123
Conversation
# Conflicts: # contracts/sfc/SFC.sol
contracts/sfc/SFC.sol
Outdated
function _burnFTM(uint256 amount) internal { | ||
if (amount != 0) { | ||
function _burnNativeTokens(uint256 amount) internal { | ||
if (amount != 0 && totalSupply >= amount) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if amount > totalSupply
you could also do amount = totalSupply;
and then burn that amount
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replaced with revert
payable(address(0)).transfer(amount); | ||
emit BurntFTM(amount); | ||
emit BurntNativeTokens(amount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could also use call instead of transfer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is pending in #111
No description provided.