Skip to content

Commit

Permalink
add token Transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
hujw77 committed Jun 4, 2021
1 parent cf2f623 commit 81b8158
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/ds-token/src/token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ contract DSToken is DSMath, DSAuth {
function mint(address guy, uint wad) public auth stoppable {
balanceOf[guy] = add(balanceOf[guy], wad);
totalSupply = add(totalSupply, wad);
emit Transfer(address(0), guy, wad);
emit Mint(guy, wad);
}

Expand All @@ -118,6 +119,7 @@ contract DSToken is DSMath, DSAuth {
require(balanceOf[guy] >= wad, "ds-token-insufficient-balance");
balanceOf[guy] = sub(balanceOf[guy], wad);
totalSupply = sub(totalSupply, wad);
emit Transfer(guy, address(0), wad);
emit Burn(guy, wad);
}

Expand Down

0 comments on commit 81b8158

Please sign in to comment.