Im building defi token Im developing it with reference cource in which the educator is using openzeppelin version 4.8.3 in which ERC20Mock contract takes 4 parameters , but right now there is only version 5.0.2 of openzepplin is available in which ERC20Mock.sol takes only 2 parameters.
Here is the HelperConfig script code that Patrick used:
import { ERC20Mock } from "@openzeppelin/contracts/mocks/ERC20Mock.sol";
vm.startBroadcast();
MockV3Aggregator ethUsdPriceFeed = new MockV3Aggregator(DECIMALS, ETH_USD_PRICE);
ERC20Mock wethMock = new ERC20Mock("WETH", "WETH", msg.sender, 1000e8);
MockV3Aggregator btcUsdPriceFeed = new MockV3Aggregator(DECIMALS, BTC_USD_PRICE);
ERC20Mock wbtcMock = new ERC20Mock("WBTC", "WBTC", msg.sender, 1000e8);
vm.stopBroadcast();
And this is the ERC20Mock.sol contract in the latest latest openzeppelin v5.0.2
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {ERC20} from "../../token/ERC20/ERC20.sol";
contract ERC20Mock is ERC20 {
constructor() ERC20("ERC20Mock", "E20M") {}
function mint(address account, uint256 amount) external {
_mint(account, amount);
}
function burn(address account, uint256 amount) external {
_burn(account, amount);
}
}
Can someone help me figure out how i can resolve this issue ?