Skip to content

Commit

Permalink
test: test files with Zama gateway/fhevm config
Browse files Browse the repository at this point in the history
  • Loading branch information
PacificYield committed Nov 29, 2024
1 parent 36cd7da commit 36841f2
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
38 changes: 38 additions & 0 deletions contracts/test/token/ERC20/TestERC20Mintable.sol
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);
}
}
12 changes: 12 additions & 0 deletions contracts/test/token/ERC20/TestEncryptedERC20Wrapped.sol
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_) {
//
}
}
9 changes: 9 additions & 0 deletions contracts/test/token/ERC20/TestEncryptedWETH.sol
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 {}

0 comments on commit 36841f2

Please sign in to comment.