9 votes

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::...
Phillip Hamnett - EOS42's user avatar
5 votes

How do I pass an iterator?

I had the same question and ended up figuring it out by reading the multi_index.hpp from eosio.cdt code and wanted to share my solution. Instead of using auto, declare the type by using myindex::...
Caleb McElroy's user avatar
3 votes

atomicassets mintasset in contract

The very kind and helpful includenull has answered my question on the wax discord but I'll post the answer here for anyone who had the same issues. action( permission_level(get_self(), "active&...
Jesseeeee's user avatar
2 votes

Why does the -abigen option in eosio.cdt not work?

The solution to my problem was that the wasm file had to exactly match the name of the contract in the attributes of the contract class. So as my file was called mycontract.wasm, I had to have the ...
Phillip Hamnett - EOS42's user avatar
2 votes

ABI file not generated

I wasn't getting an abi file, but it was compiling fine. I finally noticed that I had the file named: widgets.cpp but the class was widget. Watch out for missing "S"s. Ran again and the abi ...
gofly's user avatar
  • 33
2 votes

What exactly the merkle function is returning?

You have multiple questions in this post, in the future you should try to have a more focused question. ".front()" is a vector function. From the documentation: std::vector::front() Returns a ...
James Mart's user avatar
2 votes

COMPILATION ERROR error: non-type template argument is not a constant expression

"requestLoan" isn't a valid name for an EOSIO table; it only supports lower-case names using alpha characters. https://developers.eos.io/eosio-cpp/docs/naming-conventions#section-table-names-structs-...
guruprakash gupta's user avatar
1 vote

Can I make a http request from smart contract code?

It turns out we can't, because HTTP is not deterministic. Check this discussion.
basilisk's user avatar
  • 131
1 vote

COMPILATION ERROR error: static_assert failed "Something went wrong. Please report this issue to the github

Change std::make_tuple(itr) to std::make_tuple(*itr). The type of itr is const_iterator and it's not serializable.
conr2d's user avatar
  • 2,320
1 vote

Can we store date on eosio table?

Yes. You can either convert the data to a uint64_t as you have showed above, or you can use the time_point types: time_point time_point_sec block_timestamp_type I believe of the above, ...
netuoso - EOS Titan's user avatar
1 vote

Defining symbols for a contract at compile time - how?

I'd start by removing the quotes from "__CONTRACT__". Anything in quotes is a string literal, and should not get replaced. If you need the quotes right there, try specifying the quoted string on the ...
Gassa's user avatar
  • 598
1 vote

Contract compilation fails during elemental battles tutorial

Okay, I have find the solution, it was a classic header include problems, so you just have to add -I. at the end like eosio-cpp -o cardgame.wasm cardgame.cpp -abigen -I. more information about the ...
Saxtheowl's user avatar
  • 408
1 vote

Serialization Error Processing WASM while following hello.cpp tutorial

The problem you are describing definitely appears to be related to your VM only having one core. Please double check that your VM has 2 or more cores allocated to it, and that you have restarted your ...
Sandwich's user avatar
  • 384
1 vote

Issue while compiling smart contract - eosio.cdt

I have solved the issue by using below commands sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-4.9 sudo apt-get install --only-upgrade libstdc++6
Muhzin's user avatar
  • 510
1 vote

How to avoid "Warning, empty ricardian clause file" warnings?

Probably not. It looks like what you said should work, but if it's not, I don't see another flag that would do that. -w | - Suppress all warnings They (the warnings) were there at the beginning, ...
Nat's user avatar
  • 3,425
1 vote

eosio-cpp -abigen hello.cpp -o hello.wasm

solved and it was because of the virtual machine. https://github.com/EOSIO/eosio.cdt/issues/123
idnotbe's user avatar
  • 71

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