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.

Should fail when trying to create an instance of an abstract contract (solc 0.6)

See original GitHub issue

Expected Behavior

Creating an abstract contract should fail.

Current Behavior

Returns an address for created contract but calls to that contract fail.

Sorry for not being too detailed with this issue submissions but I’m assuming it’s easy to reproduce and might even be that Solidity 0.6 features aren’t yet implemented.

Your Environment

  • Version used: Ganache CLI v6.9.1 (ganache-core: 2.10.2)
  • Version of Truffle/Remix/Other tools used: using etherlime for compilation and deployment
  • NodeJS Version: v10.12.0
  • Operating System and version (include distro if Linux): OSX Catalina

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
haltman-atcommented, Jan 3, 2022

OK, I couldn’t reproduce this with latest Truffle/Ganache. I got an error as expected:

  1) Contract: Test
       should deploy successfully (not really):
     Error: Test error: contract binary not set. Can't deploy new instance.
This contract may be abstract, not implement an abstract parent's methods completely
or not invoke an inherited contract's constructor correctly

      at Function.new (/home/sniffnoy/truffle/truffle/packages/contract/lib/contract/constructorMethods.js:48:13)
      at Context.<anonymous> (test/test.js:5:19)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)

Is it OK if we close this, then?

0reactions
haltman-atcommented, Jan 3, 2022

Hm, that’s odd. That shouldn’t work. I’ll try this out later and see if I can reproduce it on latest Truffle/Ganache. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error "Trying to create an instance of an abstract contract." for ...
This is an issue with how constructor's inheritance and constructor parameters work. In your case, MyAdvancedToken inherits from token, ...
Read more >
Explicit keyword for abstract contracts · Issue #649 - GitHub
I think having an explicit keyword could aid error reporting. Should it be called abstract contract or interface though?
Read more >
Contracts — Solidity 0.8.17 documentation
Contracts in Solidity are similar to classes in object-oriented languages. They contain persistent data in state variables, and functions that can modify these ......
Read more >
Solidity Documentation - Read the Docs
Solidity is an object-oriented, high-level language for implementing smart contracts. Smart contracts are programs.
Read more >
Ethereum and Solidity development quick guide - ftsrg
The purpose of this document is to give a brief introduction into developing smart contracts for the Ethereum blockchain using the Solidity ...
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