3

The hello world contract is not getting compiled in the EOS v1.3 and eosio.cdt. The wasm and abi file is getting created but goes undetected. https://github.com/EOSIO/eos/issues/5349

1 Answer 1

3

The problem here was that the path provided was relative, and Rohan was working with a docker container. When passing the path to your contract's directory when using docker, it should be an absolute path, and match the mounted path of your docker container.

cleos set contract helocode1234 /contracts/hello helo.wasm helo.abi -p helocode1234@active 

The docker image is presently not configured properly, as there is a client (cleos) that lives inside of the container. Most problems you will encounter of this nature while dealing with paths and a docker-based cleos relates to this particular issue.

Confusion surrounding this part of the stack will be addressed in a future release.

Old Answer:

Try this

cleos set contract helocode1234 ./helo helo.wasm helo.abi -p helocode1234@active 

If you call cleos without positionals it will return a help menu, or otherwise you can provide --help argument.

cleos set contract

returns

Positionals:
  account TEXT                The account to publish a contract for (required)
  contract-dir TEXT           The path containing the .wasm and .abi
  wasm-file TEXT              The file containing the contract WASM relative to contract-dir
  abi-file TEXT               The ABI for the contract relative to contract-dir
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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