I am trying to compile OwnedRegistrar contract using Solidity. It's like

import "./owned.sol";
import "./Registrar.sol";

contract OwnedRegistrar is Registrar, owned {
          // ...

However solc does not produce a binary for this contract nor does it give any error message. Only binary for owned contract is given. Am I missing something? Do I need to run a separate link step somewhow? What could be reason for missing binary?

[~/code/wattcoin/websauna.wallet/websauna/wallet/ethereum/contracts]% solc ownedregistrar.sol --bin

======= OwnedRegistrar =======

======= Registrar =======

======= owned =======

Looks like some functions from Registrar contract were not implemented (mispelt) in OwnedRegistrar. Removing these functions from the parent contract hinted solc to build a concrete contract and give the code.

I don't still don't know if there is some compiler level way to detect this situation instead of manually going through functions one-by-one.

  • 1
    That's not a bad idea. Abstract contracts really should be labeled as such – Tjaden Hess Sep 16 '16 at 17:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.