Closed spoonincode closed 6 years ago
same error here on Mac / master using the "currency" contract I'm trying to follow the tutorial steps: https://github.com/EOSIO/eos#singlenode
I also tried by using eosiocpp to generate the .wast file from the source code in /contracts/currency but it throws exactly the same error.
$ cleos set contract currency currency.wast currency.abi
Reading WAST...
Assembling WASM...
2370762ms thread-0 main.cpp:1186 main ] Failed with error: Assert Exception (10)
!"error parsing wast": Error parsing WebAssembly text file:
:1:1: expected '('
{
^
cleos set contract currency ./currency -p currency ./currency is a contract directory.
that worked like a charm! thanks!
when I typed that commands, error has occured like
File is actually a directory: ../../contracts/currency ERROR: ValidationError: wast-file=../../contracts/currency Create or update the contract on an account Usage: cleos set contract [OPTIONS] account wast-file [abi-file]
I'm using mac and the branch is f6f8c66505cb6469e0c2e6027a03f72f1c9fd1a9.
Furthermore, if the filenames of the ABI and WAST don't match their parent directory's name, cleos won't find them.
Repro: 1) mkdir /cleosIssue 2) put myContract.wast and myContract.abi into /cleosIssue 3) cleos set contract foo /cleosIssue myContract.wast myContract.abi Expected: Cleos would find the wast and abi just fine Actual: Cleos cannot find them, the only resolution is to rename /cleosIssue to /myContract (which is fine in practice, but the -h message implies that this is not supposed to be necessary)
Seems like for the wast file and abi file, it's relative path to current dir instead of contract dir, because the following works:
./cleos set contract eosio ~/eos/build/contracts/eosio.bios ~/eos/build/contracts/eosio.bios /eosio.bios.wast ~/eos/build/contracts/eosio.bios /eosio.bios.abi
I would have expected this to work..