Skip to content

Commit

Permalink
update erc20 contract
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer-zq committed Apr 16, 2024
1 parent b96bb36 commit 4018d9c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions contracts/Token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ contract Token is ERC20, ERC20Permit, Ownable, ReentrancyGuard {
{
require(bytes(to).length > 0, "to must be vaild iaa address");

_burn(msg.sender, amount);
emit SwapToNative(msg.sender, to, amount);
address sender = _msgSender();
_burn(sender, amount);
emit SwapToNative(sender, to, amount);
}

/**
Expand Down
Loading

0 comments on commit 4018d9c

Please sign in to comment.