In EthereumJ, I have two contracts i deployed them individually,first one was deployed but for the second i got error as in that i was calling function of first one and example i have second is first ,means i am inheriting first one but it showed me error Identifier not found or not unique for first. (I tried with geth it was working fine.)

  • Please, could you make your question a little more clear ? Try explaining each step on a new line and name your contract A and B for easy identification. – Nicolas Massart Jun 27 '16 at 11:39
  • I wrote two contracts A and B ,in which B inherited A .I tried all the possible inheritance with geth console like single,multiple,multilevel etc all worked well as i was expecting by deploying them individually to geth.Now i am working with java i wanted to check same here,so i am deploying here individually suppose A gets deployed now when it's turn of B (it's written B is A )so it shows me error A not found.I wanted same thing with java too . – Gagan Jun 27 '16 at 11:49
  • Could you use the edit button to improve your question rather than posting additional comments? Also, the title is misleading, how does contract inheration depend on clients like EthereumJ? Please clarify what you are exactly looking for. – Afr Jun 28 '16 at 9:31

You should import parent contract/interface like: import 'IERC20.sol';

If you already have import, make sure the path is correct. I had to remove leading ./ before the file name to make it work at some point.

And then you will have to deploy only one contract. The one witch actually implements the interface, the bytecode of any parent contract will be included in the child to be deployed.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.