Getting error on ERC20Wrapper tutorial
My Contract:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Wrapper.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";
contract WXBTCVotesWrapper is ERC20, ERC20Wrapper, ERC20Votes {
constructor(IERC20 wrappedToken)
ERC20("Wrapped xBTC", "wxBTC")
ERC20Permit("Wrapped xBTC")
ERC20Wrapper(wrappedToken)
{}
function _afterTokenTransfer(address from, address to, uint256 amount)
internal
override(ERC20, ERC20Votes)
{
super._afterTokenTransfer(from, to, amount);
}
function _mint(address to, uint256 amount)
internal
override(ERC20, ERC20Votes)
{
super._mint(to, amount);
}
function _burn(address account, uint256 amount)
internal
override(ERC20, ERC20Votes)
{
super._burn(account, amount);
}
function decimals() public view virtual override(ERC20, ERC20Wrapper) returns (uint8) {
return 18; // Replace with your desired implementation
}
}
Error:
"
from solidity:
TypeError: Referenced declaration is neither modifier nor base class.
--> contracts/wxBTC.sol:10:8:
|
10 | ERC20Permit("Wrapped xBTC")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
"