solmd
solmd copied to clipboard
Unclear error "Failed to compile"
When using a contract inheriting the ERC20Basic abstract contract, I get the error that it fails to compile. Compiling just the ERC20Basic contract works as intended. Any ideas?
Otherwise this tool is very useful mostly works great!
pragma solidity ^0.4.21;
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
Even if empty, this contract fails to compile according to solmd:
pragma solidity ^0.4.23;
import "./ERC20Basic.sol";
/**
* @title ERC20Handler
*/
contract ERC20Handler is ERC20Basic{
//
}
I managed to fix it:
The ERC20Handler contract was named "erc20handler.sol". After renaming it to mirror the contract name itself "ERC20Handler.sol" the error went away. Guess the compiler at some point expects the file to be identical to the contracts name.
Maybe add a warning or additional information for this? :) I leave the issue open for now, but can probably closed if this is intended.
Well... judging by the (absence of) responses to this issue, I can clearly say that this one has been abandoned...
Any idea of an appropriate tool for this purpose, which is also being maintained?
Looks abandoned. Switching to solidity-docgen.