pragma solidity ^0.4.18;

contract MinInvest {

    function validPurchase() internal returns (bool) {
    bool moreThanMinimalInvestment = msg.value >= 0.1 ether; // change the value to whatever you need
    return super.validPurchase() && moreThanMinimalInvestment;

browser/Untitled.sol:7:12: TypeError: Member "validPurchase" not found or not visible after argument-dependent lookup in contract super MinInvest return super.validPurchase() && moreThanMinimalInvestment;

How do i add validPurchace?

1 Answer 1


Seems you missed the inheritance of your contract.

When using super.method() you are actually calling to already existing method in one of the contracts you've inherited from.

So, you just need to specify inheritance by contract MinInvest is <some-contract> {, where <some-contract> has method validPurchase().

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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