Truffle: Error: Attempting to run transaction which calls a contract function

Created on 7 Aug 2018  路  5Comments  路  Source: trufflesuite/truffle

Not sure where this originates, probably web3. Looks like this is a ganache error that's under investigation.

Attempting to run transaction which calls a contract function, but recipient address 0xcad2ad49baf2459b06cf754eaa389ea79fe90bd3 is not a contract address.

This seems to be thrown when you inherit from an abstract contract and forget to implement one of its methods.

error better needs reproduced

Most helpful comment

Here's a situation where I got that error:

I'd written in a file test/A.js something like

it ("calls stuff", () => {
    contract.callStuff()
})

and as a result another file test/B.js would give that error. After fixing A.js to

it ("calls stuff", async () => {
    await contract.callStuff()
})

the problem disappeared. So it can be... almost anything. Fun times with Truffle.

All 5 comments

@haydenyoung in gitter added that they saw this error under another condition too:

What ended up solving the problem was that I was missing a constructor in the child contract which calls the parent contract's constructor. Implementing this fixed the problem.

Here's a situation where I got that error:

I'd written in a file test/A.js something like

it ("calls stuff", () => {
    contract.callStuff()
})

and as a result another file test/B.js would give that error. After fixing A.js to

it ("calls stuff", async () => {
    await contract.callStuff()
})

the problem disappeared. So it can be... almost anything. Fun times with Truffle.

So, it's been a year. What's going on here? Are the errors still bad? Looks like there's a couple different underlying situations that could use better error reporting.

If anyone can give us some specific reproduction steps, we can take a look at improving the experience here. Thanks all!

And now it's been a year and a month :)

Going once? Going twice?

Thanks all 馃檱

Gone!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hefgi picture hefgi  路  3Comments

timothywangdev picture timothywangdev  路  3Comments

Katsu1991 picture Katsu1991  路  3Comments

arunmitteam picture arunmitteam  路  3Comments

ysfAskri picture ysfAskri  路  4Comments