Questions tagged [eosio-cpp]

Questions about the new eosio-cpp compiler tool. These are different from the deprecated Version eosiocpp.

Filter by
Sorted by
Tagged with
0
votes
0answers
27 views

eosio::print abnormal behaviour

Using eosio::print changes the behaviour of my contract. uint64_t generateID(std::string str) { uint64_t ret_val = 0; eosio::checksum256 digest = eosio::sha256(str.c_str(), ...
2
votes
1answer
64 views

How do I pass an iterator?

suppose I have a table: struct [[eosio::table]] _stuff { symbol curr; // other stuff uint64_t primary_key() const { return curr.code().raw(); } }; typedef eosio::multi_index<name("...
0
votes
1answer
34 views

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

Getting an error when the code reaches this particular function. Is there something obvious I am missing here? Kindly Note this is Deferred transaction Please ask if anything else is required from ...
0
votes
1answer
27 views

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

what is causing this error while im compiling ? struct [[eosio::table]] requestForLoan{ uint64_t req_id; name borr_name; uint64_t borr_id; name uwr_name; uint64_t uwr_id;...
0
votes
1answer
68 views

Can we store date on eosio table?

Is there any direct datatype in eosio to store date? and if not then how can we store dates in eosio table? void mainloan::paymentConfirm(uint64_t pay_id,uint64_t pay_date,double pay_amunt,name from ...
0
votes
2answers
293 views

error: unable to handle compilation, expected exactly one compiler job in ''

I am not able to compile, getting error: unable to handle compilation, expected exactly one compiler job in '' not able to compile a simple hello world smart contract
1
vote
1answer
26 views

Defining symbols for a contract at compile time - how?

supposing I have a contract declaration in file t.cpp as follows: class [[eosio::contract("__CONTRACT__")]] token : public contract { I would expect to be able to compile it like this: $ eosio-cpp -...
1
vote
1answer
42 views

What exactly the merkle function is returning?

In the below file, https://github.com/EOSIO/eos/blob/v1.7.4/libraries/chain/merkle.cpp, what do ids.front() mean?; what exactly this function Merkle is returning? Could you please explain what this ...
0
votes
3answers
85 views

Can not find `eosio/eosio.hpp` while compiling with eosio-cpp

I used the documentation provided by EOSI. I made all the required installation as suggested in the docs. While writing the hello world contract, I face this issue when running the following command ...
1
vote
2answers
112 views

Contract compilation fails during elemental battles tutorial

I have followed the elemental battles tutorial until lesson 2 step 4, and at the end of it, the tutorial instructs to compile the existing code with eosio-cpp -o destination.abi source.cpp -abigen (...
0
votes
0answers
93 views

ABI file not generated

I have compiled a smart contract using eosio-cpp -o addbook.wasm addbook.cpp --abigen command. Compilation was successfull and wasm file got generated. But I cant find abi. eosio-cpp version is, ...
1
vote
1answer
95 views

Serialization Error Processing WASM while following hello.cpp tutorial

I am following along the tutorial on the EOS website at https://developers.eos.io/eosio-home/docs/your-first-contract At the first smart contract development section, I cannot manage to publish the ...
4
votes
2answers
596 views

How to get current time in different versions of EOSIO

Depending on which version of EOSIO you use, there are different options available for finding the current time. What are they?
1
vote
1answer
147 views

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

When trying to compile my contract, I use the -abigen flag in order to auto-generate the necessary ABI file. This did not work, and gave no errors or warnings. The code to compile the contract is as ...
1
vote
1answer
97 views

Issue while compiling smart contract - eosio.cdt

I have installed eosio.cdt in Ubuntu system by using commands from EOS Developers Portal wget https://github.com/EOSIO/eosio.cdt/releases/download/v1.4.1/eosio.cdt-1.4.1.x86_64.deb sudo apt install ./...
0
votes
0answers
87 views

/eosio.cdt/bin/wasm-ld: error: ios.obj: undefined symbol: std::uncaught_exception() while using eosio-cpp

WHAT I AM USING CDT: eosio.cdt-1.4.1 WHAT I AM DOING I am getting this error while trying to compile a contract: /usr/local/eosio.cdt/bin/wasm-ld: error: ios.obj: undefined symbol: std::...
0
votes
0answers
15 views

Printing action parms to stdout

I am trying to create an action that prints the contents of any struct (TABLE) being used in my code. Something with a signature like ACTION printtbl(const std::string& tname,const std::tuple&...
0
votes
1answer
150 views

How to include external library to smart contract?

I am trying to add libcryptopp library to my contract but when I try to compile with eosio-cpp I get an error that header files cannot be found. This is my code: #include <eosiolib/eosio.hpp> #...
1
vote
1answer
926 views

How to avoid “Warning, empty ricardian clause file” warnings?

When executing eosio-cpp -I include -o eosio.token.wasm src/eosio.token.cpp --abigen over the eosio.token smart contract I get the following warnings: Warning, empty ricardian clause file Warning, ...
3
votes
2answers
198 views

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

Ubuntu 18.04.1 on VMware (Windows 10 64bit) EOSIO v1.4.1 eosio.cdt-1.3.2 i just run the compiler like this : win@ubuntu:~/eos$ eosio-cpp -abigen hello.cpp -o hello.wasm then, the ...
1
vote
0answers
25 views

Compiling eos software to get dlls

How can I compile EOS software on Linux or Windows to get dynamically linked libraries (DLLs) that I need in order to create an EOS wrapper to compile and deploy smart contracts from other programming ...