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 numerouseth_getFilterChangescalls
btw I ended up not deploying this contract and just imported it for use in other contracts, but will just log the possible bug here
Your contract is an abstract contract and will therefore have no binary.
You need to give the function judgeCallback a definition or else the
solidity compiler won't produce a binary for it.
On Aug 9, 2016 7:01 AM, "zweicoder" [email protected] wrote:
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 https://github.com/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—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ConsenSys/truffle/issues/231, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFp1ZgmK9tOY5vTWWh6N-fsZpBY3r7Qks5qeIgXgaJpZM4JgG6b
.
The TestRPC's filter changes is a separate issue I've seen as well.
On Aug 9, 2016 7:01 AM, "zweicoder" [email protected] wrote:
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 https://github.com/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—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ConsenSys/truffle/issues/231, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFp1ZgmK9tOY5vTWWh6N-fsZpBY3r7Qks5qeIgXgaJpZM4JgG6b
.
ok thanks for the info!
I'm going to close this one for housekeeping purposes. If you run into any more issues please open a new ticket!
I just had this error too, @tcoulter. I wouldn't doubt I've got an abstract contract on my hands. Any idea if there's a way to get an error saying _which_ method isn't implemented?
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.
I got this error with Truffle 3.1.1 after running truffle test
The error message was coming from Function.new while deploying a contract through inheritance.
The error stopped after running truffle migrate
If you have one function that is an abstract function in your contract.
function addr(string _name) constant returns (address o_owner)
The whole contract is compiled as an abstract contract, so you will get this error message.
It might be like me, that you never ment to write an abstract contract, but a but fast copy pasting of some code, and simsallabim, you have some abstract functions without thinking about it.
So either add functions bodies to them or remove them.
Then your contract will compile.
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?
I get this error after updating a contract and running tests. I need to remove the build folder and recompile the contracts and then run the tests to fix.
This is still happening intermittently - not sure what causes it. All methods are implemented and all constructors are properly called.
Ok the issue for me was that I had an interface defined in a contract that had the same name as one of my contracts. The interface was being compiled and I expected the contract to be compiled. I've suffixed all my interfaces with Interface and this has solved the issue.
@pizza-r0b sounds like this can stay closed, as a duplicate of #1087
Thanks for sharing findings of your investigation!
Most helpful comment
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:
Maybe the error message should be updated to give a hint towards that.