Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c540d56d08
commit
96b06bd9fe
3 changed files with 181 additions and 0 deletions
24
onchain/script/backtesting/MockToken.sol
Normal file
24
onchain/script/backtesting/MockToken.sol
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
// 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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue