-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from zama-ai/feat/refactor-erc20
feat: refactored erc20 as abstract with extensions
- Loading branch information
Showing
4 changed files
with
31 additions
and
20 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
19 changes: 19 additions & 0 deletions
19
contracts/token/ERC20/extensions/EncryptedERC20Mintable.sol
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,19 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause-Clear | ||
|
||
pragma solidity ^0.8.20; | ||
|
||
import "../EncryptedERC20.sol"; | ||
import "@openzeppelin/contracts/access/Ownable2Step.sol"; | ||
|
||
contract EncryptedERC20Mintable is Ownable2Step, EncryptedERC20 { | ||
constructor( | ||
string memory name_, | ||
string memory symbol_, | ||
address owner | ||
) Ownable(owner) EncryptedERC20(name_, symbol_) {} | ||
|
||
// Increase owner's balance by the given `mintedAmount`. | ||
function mint(uint64 mintedAmount) public virtual onlyOwner { | ||
_mint(mintedAmount); | ||
} | ||
} |
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