-
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.
test: test files with Zama gateway/fhevm config
- Loading branch information
1 parent
36cd7da
commit 36841f2
Showing
3 changed files
with
59 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause-Clear | ||
pragma solidity ^0.8.24; | ||
|
||
import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | ||
import { Ownable2Step, Ownable } from "@openzeppelin/contracts/access/Ownable2Step.sol"; | ||
|
||
/** | ||
* @title ERC20Mintable | ||
* @notice This contract is an ERC20 token that is mintable by the owner. | ||
*/ | ||
contract ERC20Mintable is ERC20, Ownable2Step { | ||
/// @dev override number of decimals | ||
uint8 private immutable _DECIMALS; | ||
|
||
constructor( | ||
string memory name_, | ||
string memory symbol_, | ||
uint8 decimals_, | ||
address owner_ | ||
) ERC20(name_, symbol_) Ownable(owner_) { | ||
_DECIMALS = decimals_; | ||
} | ||
|
||
/** | ||
* @notice Returns the number of decimals. | ||
*/ | ||
function decimals() public view override returns (uint8) { | ||
return _DECIMALS; | ||
} | ||
|
||
/** | ||
* @notice Mint tokens. | ||
* @param amount Amount of tokens to mint. | ||
*/ | ||
function mint(uint256 amount) public onlyOwner { | ||
_mint(msg.sender, amount); | ||
} | ||
} |
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,12 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause-Clear | ||
pragma solidity ^0.8.24; | ||
|
||
import { EncryptedERC20Wrapped } from "../../../token/ERC20/EncryptedERC20Wrapped.sol"; | ||
import { DefaultFHEVMConfig } from "../../DefaultFHEVMConfig.sol"; | ||
import { DefaultGatewayConfig } from "../../DefaultGatewayConfig.sol"; | ||
|
||
contract TestEncryptedERC20Wrapped is DefaultFHEVMConfig, DefaultGatewayConfig, EncryptedERC20Wrapped { | ||
constructor(address erc20_) EncryptedERC20Wrapped(erc20_) { | ||
// | ||
} | ||
} |
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,9 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause-Clear | ||
pragma solidity ^0.8.24; | ||
|
||
import { EncryptedWETH } from "../../../token/ERC20/EncryptedWETH.sol"; | ||
import { DefaultFHEVMConfig } from "../../DefaultFHEVMConfig.sol"; | ||
import { DefaultGatewayConfig } from "../../DefaultGatewayConfig.sol"; | ||
|
||
/* solhint-disable no-empty-blocks*/ | ||
contract TestEncryptedWETH is DefaultFHEVMConfig, DefaultGatewayConfig, EncryptedWETH {} |