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
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
-
The contract dir contract-dir TEXT fixed it for me. I was not using docker. Btw documentation on developers.eos.io/eosio-cleos/v1.3.0/… doesn't have this dir in it– KristianCommented Nov 28, 2018 at 12:39