This commit is contained in:
Tim Olson
2023-08-19 18:13:43 -04:00
commit e76bc70297
8 changed files with 167 additions and 0 deletions

22
src/IERC20Metadata.sol Normal file
View File

@@ -0,0 +1,22 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.7.6;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
// the version of OpenZeppelin required by Uniswap v3 doesn't have IERC20Metadata yet, so we copy it here.
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}

17
src/MockERC20.sol Normal file
View File

@@ -0,0 +1,17 @@
import "openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./IERC20Metadata.sol";
contract MockERC20 is ERC20, IERC20Metadata {
constructor(string name, string symbol, uint8 decimals)
ERC20(name, symbol)
{
_setupDecimals(decimals);
}
function mint(address account, uint256 amount) external {
_mint(account, amount);
}
}