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.

"contract binary not set. Can't deploy new instance." when deploying simple contract

See original GitHub issue
contract JudgeSubscriber {
    function judgeCallback(bytes32 uuid, address liar) external;
}

This interface throws contract binary not set. Can't deploy new instance. when deployed with deployer.deploy(JudgeSubscriber);

More info from @elenadimitrova from Gitter who reproduced it:

I can reproduce however I do get random failures on truffle migrate --reset sometimes it succeeds in deploying and sometimes it fails with contract binary not set and sometimes it gets stuck and testrpc emits numerous eth_getFilterChanges calls

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
DavidBurelacommented, Oct 20, 2016

During the last 2 weeks I have come across this error twice, and both times resolved it by doing a Google search and this issue comes up with the answer:

Check that you haven’t accidentally made your class abstract by having a method you didn’t implement

Maybe the error message should be updated to give a hint towards that.

3reactions
SeanAverycommented, Apr 28, 2017

Similar issue migrating ERC20 token standard contract.

contract ERC20Events {
    event Transfer(address indexed from, address indexed to, uint value);
    event Approval( address indexed owner, address indexed spender, uint value);
}

contract ERC20Stateless {
    function totalSupply() constant returns (uint supply);
    function balanceOf( address who ) constant returns (uint value);
    function allowance(address owner, address spender) constant returns (uint _allowance);
}
contract ERC20Stateful {
    function transfer( address to, uint value) returns (bool ok);
    function transferFrom( address from, address to, uint value) returns (bool ok);
    function approve(address spender, uint value) returns (bool ok);
}

contract ERC20 is ERC20Stateless, ERC20Stateful, ERC20Events {}

Yes, this an “abstract” contract as the methods are not implemented. I have attempted to add my Token.sol implementation onto the same file where the ERC20 standard is implemented; However, am still getting contract binary is not set error.

Has anyone had success migrating the ERC20 contract?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why my contract binary does 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 ...
Read more >
Cannot deploy HelloWorld contract to my network (testrpc)
Your truffle migrate command is showing nothing was deployed. Your output should look something like this: $ truffle migrate Using network ...
Read more >
How to Deploy Smart Contracts on Hedera – Part 1: A Simple…
You can deploy a smart contract on Hedera in four steps: Write the contract and compile to bytecode; Add the bytecode file to...
Read more >
Run Migrations - Truffle Suite
Deploy a specific contract, specified by the contract object, with optional constructor arguments. This is useful for singleton contracts, such that only one ......
Read more >
Creating and Deploying a Contract - Remix's documentation!
This contract is very basic. The goal is to quickly start to create and to interact with a sample contract. _images/a-file-explorer-new-file2.png.
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