harb/onchain/script/backtesting/MockToken.sol

25 lines
610 B
Solidity
Raw Normal View History

// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.19;
import { ERC20 } from "@openzeppelin/token/ERC20/ERC20.sol";
/**
* @title MockToken
* @notice Minimal ERC20 with open mint for backtesting only. No access control.
*/
contract MockToken is ERC20 {
uint8 private _dec;
constructor(string memory name, string memory symbol, uint8 decimals_) ERC20(name, symbol) {
_dec = decimals_;
}
function decimals() public view override returns (uint8) {
return _dec;
}
function mint(address to, uint256 amount) external {
_mint(to, amount);
}
}