I'm working on a Dutch Auction style ICO contract and I'm currently trying to migrate an early stage of my ERC20 contract to test the basic features (does it have the correct name, symbol, and decimals). The contract compiles but I can't migrate it since it is an "abstract contract". My token contract inherits from ERC20Detailed, the Open Zeppelin contract, which in turn inherits from the IERC20 interface contract. What can I do to fix this? I tried having my Token contract also inherit from ERC20 the base contract but it said the identifier was already declared. I see the possible responses from the Truffle terminal output but I'm curious why my implementation won't work and would love some more help understanding Solidity interfaces and abstract contracts.
What can I do to fix this? I tried having my Token contract also inherit from ERC20 the base contract but it said the identifier was already declared.
pragma solidity ^0.5.8;
import "node_modules/openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol";
contract Token is ERC20Detailed{
constructor(string memory _name, string memory _symbol, uint8 _decimals)
ERC20Detailed(_name, _symbol, _decimals)
public
{
}
}
Output from Bash terminal
"Token" is an abstract contract or an interface and cannot be deployed. * Import abstractions into the '.sol' file that uses them instead of deploying them separately. * Contracts that inherit an abstraction must implement all its method signatures exactly. * A contract that only implements part of an inherited abstraction is also considered abstract.