-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
evm: Update NTT token interface (#309)
* evm: add burn method to `INttTokenInterface` * evm: add natspec for errors and events * evm: document INTTToken interface methods * evm: add old minter to NewMinter event * evm: rename INTTToken -> INttToken --------- Co-authored-by: Rahul Maganti <rahulmaganti@rahuls-mbp.mynetworksettings.com>
- Loading branch information
1 parent
87bf873
commit cb57ed2
Showing
4 changed files
with
43 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// SPDX-License-Identifier: Apache 2 | ||
pragma solidity >=0.8.8 <0.9.0; | ||
|
||
interface INttToken { | ||
/// @notice Error when the caller is not the minter. | ||
/// @dev Selector 0x5fb5729e. | ||
/// @param caller The caller of the function. | ||
error CallerNotMinter(address caller); | ||
|
||
/// @notice Error when the minter is the zero address. | ||
/// @dev Selector 0x04a208c7. | ||
error InvalidMinterZeroAddress(); | ||
|
||
/// @notice Error when insufficient balance to burn the amount. | ||
/// @dev Selector 0xcf479181. | ||
/// @param balance The balance of the account. | ||
/// @param amount The amount to burn. | ||
error InsufficientBalance(uint256 balance, uint256 amount); | ||
|
||
/// @notice The minter has been changed. | ||
/// @dev Topic0 | ||
/// 0x0b5e7be615a67a819aff3f47c967d1535cead1b98db60fafdcbf22dcaa8fa5a9. | ||
/// @param newMinter The new minter. | ||
event NewMinter(address previousMinter, address newMinter); | ||
|
||
// NOTE: the `mint` method is not present in the standard ERC20 interface. | ||
function mint(address account, uint256 amount) external; | ||
|
||
// NOTE: the `setMinter` method is not present in the standard ERC20 interface. | ||
function setMinter(address newMinter) external; | ||
|
||
// NOTE: NttTokens in `burn` mode require the `burn` method to be present. | ||
// This method is not present in the standard ERC20 interface, but is | ||
// found in the `ERC20Burnable` interface. | ||
function burn(uint256 amount) external; | ||
} |