I am trying to write a Smart Contract to generate Staking Rewards for an existing Cryptocurrency But I've been getting this error
Contract "Stakeable" should be marked as abstract
How do I fix this?
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
// import "@openzeppelin/contracts/access/Ownable.sol";
// import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract Stakeable is ERC20, Ownable{
using SafeMath for uint256;
string private constant _name = "Schrodinger";
string private constant _symbol = "Kitty Dinger";
/**
* @notice We usually require to know who are all the stakeholders.
*/
address[] internal stakeholders;
/**
* @notice The stakes for each stakeholder.
*/
mapping(address => uint256) internal stakes;
/**
* @notice The accumulated rewards for each stakeholder.
*/
mapping(address => uint256) internal rewards;
/**
* @notice The constructor for the Staking Token.
* @param _owner The address to receive all tokens on construction.
* @param _supply The amount of tokens to mint on construction.
*/
constructor(string memory name_, string memory symbol_, address _owner, uint256 _supply)
{
name_ = _name;
symbol_ = _symbol;
_mint(_owner, _supply);
}
SafeMatch
library anymore. Solidity is checking over/underflows automatically. In case you would like to turn it off for some part, useunchecked { ... }