question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remix doesn't recognize auto generated functions as a valid abstract interface implementation

See original GitHub issue

Hey,

In the following example -

contract AbstractToken {
    function totalSupply() external constant returns (uint256 totalSupply);
}

contract Token is AbstractToken {
    uint256 public totalSupply = 0;
}

Remix won’t allow the user to create an instance of Token (“This contract does not implement all functions and thus cannot be created”), even though the auto generated compiler function for totalSupply matches the abstract interface signature.

Was tested on solidity 0.4.11

Note that solc actually compiles Token with no error.

See https://github.com/ethereum/solidity/issues/2254

Edit: the issue is also valid when the abstract parent is an interface instead of a contract.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
masonforestcommented, Nov 1, 2017

Also make sure you’re deploying Token and not AbstractToken. I ran into that too…

screen shot 2017-10-31 at 6 59 35 pm
0reactions
Aniket-Enggcommented, Oct 1, 2020

Closing it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The compiler doesn't recognize auto generated functions as a valid ...
Remix doesn't recognize auto generated functions as a valid abstract interface implementation ethereum/remix-project#246.
Read more >
Remix doesn't recognize auto generated functions as a valid ...
Remix doesn't recognize auto generated functions as a valid abstract interface implementation.
Read more >
REMIX:This contract does not implement all functions and thus ...
solidity - REMIX:This contract does not implement all functions and thus cannot be created - Ethereum Stack Exchange. Stack Overflow for Teams ...
Read more >
Why an abstract class implementing an interface can miss the ...
So, as long as an implementation is not provided for an abstract class, objects cannot be created for IAnything. So this is absolutely...
Read more >
Abstract Methods and Classes (The Java™ Tutorials ...
Abstract classes are similar to interfaces. You cannot instantiate them, and they may contain a mix of methods declared with or without an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found