Two weeks ago I tried to use cleos subcommands and everything worked fine. I could set contract to the accounts I created using my own smart contract code. Now whenever I tried set contract or create account, it kept giving this error. I tried changing the config files and rebuilding eos but the program still doesn't seem to work. What can I do here?
1 Answer
The reason you're getting this error is because you're using the wrong flags to generate the ".abi" and ".wast" files.
Ensure you are using the "-g" flag to generate the ".abi" file and the "-o" flag to generate the ".wast" or ".wasm".
The commands you should run are:
eosiocpp -o AccountPhoto.wast AccountPhoto.cpp
eosiocpp -g AccountPhoto.abi AccountPhoto.cpp
Also, you may want to consider switching to the EOSIO.CDT package, which now uses eosio-cpp. The abi and wasm files are also generated in one command (instead of two).
sudo make install
from the build directory once the build is complete.