0

After setting up the "embark-create-react-dapp-template", I didn't see a folder for contracts. So I've created one under the root level of the project (just like in the demo). But then when I executed "embark run" I got the following:

Blockchain node is ready
Ethereum node detected..
Error while loading the content of EventCrowdTokenImpl.sol
loading solc compiler...
compiling solidity contracts...
EventCrowdTokenImpl has no code associated
did you mean "EventCrowdToken"?
deploying contracts
Executing pre-deploy actions...
Pre-deploy actions done. Deploying contracts
finished deploying contracts
Deployment Done

I can tell that my solidity files and contracts.js are fine since they did work in the normal deployment (without embark-create-react-dapp-template).

Note: I've updated the solc to the latest version since my contracts are on 0.5.0 . I'm not sure if that's the reason of the issue.

The error message didn't provide much details for me to investigate further.

I would appreciate if you would give me direction on how to solve it or ways to investigate further. Many thanks.

0

Is the contract artifact being created correctly for that contract? It should be in src/embarkArtifacts/contracts/EventCrowdTokenImpl.js.

If not, try embark build --contracts-only and see what happens.

  • The issue was from the .sol file itself. Thank you emizzle for looking at the issue. – Rockman Al-Mutawa May 21 at 19:16
0

I see two possible problems.

  1. The contract folder might be wrongly named. It needs to have the same name as in embark.json(by default, it is contracts/)
  2. Your contract config seems a bit off:
EventCrowdTokenImpl has no code associated
did you mean "EventCrowdToken"?

You probably configured your contract as EventCrowdTokenImpl, but the actual name of the class seems to be EventCrowdToken, so you would need to rename it in the config.

There might be something else, but it's hard to debug without seeing what your files look like.

0

I've found the issue. The 'import' in solidity contract was referring to a file that wasn't available in the folder. It wasn't highlighted by my editor.

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.