Closed eliquinox closed 5 years ago
Please use wasm file instead. wast file was deprecated. We will update the documents in the near future.
The tutorial is already updated to support the latest eosio.cdt
@andriantolie I'm having an issue with the latest version of the address book (and EOS 1.4.x), are you able to run the complete code block from the bottom of the tutorial with the latest version of EOS and CDT?
Which code block do you mean? and what error message that you get?
@andriantolie Sorry didn't see the notification on the response! It's an issue when I try to compile a contract outside of Docker using the CDT since the CDT uses 1.3.x code. When I want to migrate my contracts from 1.3.x to 1.4.x I'm running into a few errors running this command:
eosio-cpp -o addressbook.wasm addressbook.cpp --abigen
Things like this, pretty sure it's entirely related to the CDT being on 1.3.x
class [[eosio::contract]] addressbook : public eosio::contract { ^ addressbook14x.cpp:11:71: error: no matching constructor for initialization of 'eosio::contract' addressbook(name receiver, name code, datastream<const char*> ds): contract(receiver, code, ds) {}
To recreate brew install the CDT and copy the addressbook.cpp tutorial code (https://developers.eos.io/eosio-home/docs/data-persistence) then try to compile.
I tried to copy the addressbook.cpp tutorial code just now and I have no problem compiling it with CDT.
Looking at your error message, seems like you are missing the constructor. Remember that the necessary contract constructor for eosio.cdt is different with the deprecated eosiocpp. It is addressbook(name receiver, name code, datastream<const char*> ds)
instead of addressbook(account_name self)
. I would suggest you to recheck your constructor!
Let me know if you still have any problem.
@andriantolie I uninstalled the Brew version of the CDT and built it from scratch which fixed the problem, looks like the Homebrew version is out of date like I suggested.
Thanks for the response :)
Following the addressbook tutorial on Ubuntu and eos 1.3.0:
https://developers.eos.io/eosio-home/docs/data-persistence
Getting the error quoted above when trying to set the contract, looks like the tutorial / software is out of sync. How can I set the contract?
Much appreciated