9 votes
Accepted

How to get current time in different versions of EOSIO

Until eosio.cdt v1.6 You could use: eosio::current_time() now() From eosio.cdt v1.6 onwards You have to #include <eosio/system.hpp> and then you can use: eosio::current_time_point eosio::...
user avatar
3 votes
Accepted

How to pass specific eosio-cpp/eosio-ld options via cmake

cmake will compile source files into object files first and link them by linker, so you need to add -stack-size option to linker option. (When you run eosio-cpp in command-line, passing -stack-size to ...
user avatar
  • 2,270
3 votes
Accepted

EOSIO_ABI macro problem on MacOS, can't use for contract implementations

Problem solved ! I didn't go through the CHANGELOG for the latest 1.2 to 1.3 upgrade. It turns out, the EOSIO_ABI macro has been renamed EOSIO_DISPATCH and so, it seems there is no problem with ...
user avatar
3 votes

Error 3160009: No wast file found

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 ...
user avatar
  • 384
3 votes

eosiocpp -g generates empty abi file

I had this happen to me last night. Make sure the class name and your file names match. In other words, if you're compiling the hello contract, make sure the file names are hello.hpp and hello.cpp....
user avatar
  • 3,405
2 votes

eosiocpp -g generates empty abi file

I'm assuming you are using one of the new CDTs In my case the following command worked eosio-abigen hello.cpp --contract=hello --output=hello.abi
user avatar
  • 208
2 votes

eosiocpp -g generates empty abi file

When you're generating your ABI consider a few things: Use the new command eosio-cpp For example: eosio-cpp -I include -o my_contract.wasm my_contract.cpp -abigen Use the C++ 11 attributes included ...
user avatar
2 votes

eosiocpp -g generates empty abi file

You could use of the newest macros: Added ACTION macro which is simply a shortcut for [[eosio::action]] void. Added TABLE macro which is simply a shortcut for struct [[eosio::table]]. Added ...
user avatar
  • 121
2 votes

eosio-cpp: command not found

I needed to add read write permission to the eosio-cpp folder for non-sudo access. $ sudo chmod 755 /usr/local/eosio.cdt/bin/eosio-cpp and that solved it.
user avatar
2 votes

Unable to compile eosio.token

Well, what I learnt from EOS developers Telegram group: Update eosio.cdt. The latest version is 1.3.2 Also, although the tutorial says not to use abigen since abi is included...we need to use abigen ...
user avatar
  • 73
2 votes
Accepted

How to solve fatal error: 'eosiolib/types.hpp' file not found #include <eosiolib/types.hpp>?

With eosiocpp everything works fine because types.hpp is defined in the directory ...\eos\contracts\eosiolib. In eosio.cdt in ...\eosio.cdt\libraries\eosiolib there is only types.h and not types.hpp ...
user avatar
1 vote

contract compilation of 'eosio.bios' fails

If you want to build a single contract with eosio.cdt you would need to modify the code. Just use the build-script build.sh (located in the eosio.contracts-directory) to compile all system-contracts ...
user avatar
  • 1,844
1 vote

Unable to compile eosio.token

You need to download the hpp & cpp files: $ wget https://raw.githubusercontent.com/EOSIO/eosio.contracts/master/eosio.token/include/eosio.token/eosio.token.hpp $ wget https://raw....
user avatar
1 vote

How do I use C++11 on Mac?

To use this syntax, you need to be compiling with the latest version of eosio.cdt. When you build and compile eosio.cdt, it will install the appropriate clang compiler for you, and eosio-cpp will be ...
user avatar
1 vote
Accepted

How to use std::tuple with eosiocpp?

Multiple inheritance not supported for this particular case means that you can only have a tuple of single type. typedef std::tuple<double> location_t; According to this answer one is not able ...
user avatar
1 vote

How to create ricardian clauses in the ABI with eosiocpp

The eosiocpp compiler was the old deprecated way of compiling the c++ into wasm contracts. The new way uses a compiler called eosio-cpp, which is very confusing. With eosio.cdt, you can generate a ...
user avatar
1 vote

eosiocpp -g generates empty abi file

you need extra comments marked in hpp file to help eosiocpp generate concrete abi file. for actions, you need to add comment c++ //@abi action above its declaration. for multi_index table, you need ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible