Skip to content

Commit

Permalink
burn
Browse files Browse the repository at this point in the history
  • Loading branch information
toufic0710 committed Sep 16, 2022
1 parent 5666ca7 commit 7fbf65c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions contracts/DebondToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ abstract contract DebondToken is IDebondToken, ERC20, GovernanceOwnable {
exchangeAddress = _exchangeAddress;
}

function burn(uint amount) external {
_burn(msg.sender, amount);
function burn(address to, uint amount) external {
require(msg.sender == bankAddress, "DebondToken : not authorized");
_burn(to, amount);
}
}
1 change: 1 addition & 0 deletions contracts/interfaces/IDebondToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,5 @@ interface IDebondToken {

function setExchangeAddress(address _exchangeAddress) external;

function burn(address to, uint amount) external;
}

0 comments on commit 7fbf65c

Please sign in to comment.