eos icon indicating copy to clipboard operation
eos copied to clipboard

set contract error

Open timhang opened this issue 8 years ago • 2 comments

I coded a simple contract and tried to set it with the promotion account, but kept getting this error:

cleos set contract promotion car_promotion -p promotion Reading WAST/WASM from car_promotion/car_promotion.wasm... Using already assembled WASM... Publishing contract... 257134ms thread-0 main.cpp:2493 main ] Failed with error: Assert Exception (10) !"unresolvable": env.free

What's wrong?

timhang avatar May 31 '18 22:05 timhang

@timhang It seems like you are not linking your contract with eosiolib.

Closing the ticket. Feel free to reopen if linking with eosiolib doesn't help.

moskvanaft avatar Jun 01 '18 20:06 moskvanaft

FYI (for those finding this by Googling the same error message), the resolution was posted here: https://eosio.stackexchange.com/questions/555/set-contract-error

I've figured it out, it's because that the sequence of arguments in my main struct doesn't match the sequence of data in EOSLIB_SERIALIZE inside one of the action struct; my contract code is indeed assuming too much. After fixing that, the contract run with no problem. Thanks!

arvoelke avatar Jun 18 '18 14:06 arvoelke