Questions tagged [eosiocpp]

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

Filter by
Sorted by
Tagged with
1 vote
2 answers
274 views

EOS Block Producer Schedule

I have followed the Boot Bios sequence of eosio and setup a eos private blockchain. The problem is my even though i have created also Block producers and also voted for them still the blocks are ...
0 votes
1 answer
12 views

Alternative to std::ifstream for eosio contract

I'm watching for an alternative to "std::ifstream" because "#include " can't include as header in a contract. My code is: std::istream& operator>>(std::istream& str, ...
0 votes
1 answer
276 views

How can i convert a time_point to a string?

I want to convert a time_point variable to a string using eos studio. I need to insert a time_point variable in a string in order to creare the object of my smart contract.
0 votes
0 answers
20 views

Error unlinkable block jungle4 testnet fullnode

Iam trying to build a jungle4 testnet fullnode but when it reachs certain blocks, there are info about block number not accepted from mandelAPI:9876 with error unlinkable block ...
0 votes
1 answer
232 views

How can I create a table in an .hpp for a general contract? (Using the CDT)

THE STRUCTURE OF MY PROJECT I am working in mycontract.cpp, which imports myheader.hpp WHAT I WANT I want to create a table in myheader.hpp, for a generic contract, "IN THEORY" as follows: struct [...
3 votes
1 answer
569 views

How to create ricardian clauses in the ABI with eosiocpp

I couldn't find any information on how to automatically include the ricardian clauses in the abi. I always get the error: abi_generator.hpp:68 ricardian_contracts ] Warning, no ricardian ...
0 votes
1 answer
69 views

Inline action with 2 permissions/authorizations

I have 3 accounts: Contract Account. Storage Account. Recipient Account. I made a smart contract to give out tokens from Storage Account to the Recipient Account using a claim function from the ...
0 votes
0 answers
28 views

How to test my static Public function using Hydra

The heading really explains it all, I am writing a smart contract for which in its header file I have defined two static public functions, which I want to test using Hydra testing library can anyone ...
1 vote
1 answer
83 views

How do I use C++11 on Mac?

I tried the hello world sample contract, and when it came time to compile, I got this error: hello.cpp:10:10: error: expected ']' [[eosio:action]] ^ ...
0 votes
1 answer
45 views

dApps: How to run transactions from web app in decentralized way?

I'm thinking about the way how to build truly decentralized web applications. Smart contracts looks like the good idea how to run server logic. To be able to push transactions (actions) from web ...
3 votes
1 answer
73 views

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

I'm typically using CMake to compile my contracts, like described here. How can I pass specific eosio-cpp/eosio-ld options (specifically -stack-size) described here?
0 votes
1 answer
29 views

contract compilation of 'eosio.bios' fails

I am trying to setup Local Multi-Node Testnet using the version 2.0.7. Clone the sysytem contracts from the repo as follows. git clone https://github.com/EOSIO/eosio.contracts --branch master --...
1 vote
0 answers
41 views

unordered map in eosio-cpp

I want to have an unordered_map inside a table so that I can have O(1) entry and retrieval. Can someone please link me to a snippet which implements that? I am new to cpp.
0 votes
1 answer
89 views

Understanding EOSIO voting mechanism and decay

I have a question on eosio-voting and decay. Suppose there are only 21 block-producers (registered) and only 10 users having equally eos-token. These users now voting for each block-producers, it mean ...
0 votes
1 answer
37 views

what are supported STL types in tables?

What are the supported STL types in tables? I'm specifically curious about std::pair
1 vote
1 answer
805 views

On method call: "assertion failure with message: read"

I am calling a method that is completely commented out. I am calling it from EOStudio and from command line tools. Is this a bug or does someone know how to fix this? assertion failure with message: ...
3 votes
6 answers
671 views

eosiocpp -g generates empty abi file

I have created smart contract inside the /build/contracts and running this comman generates empty abi file. eosiocpp -g eosio.test.abi eosio.test.cpp tried both hpp and cpp but same result.
0 votes
1 answer
267 views

Casting checksum256 type to uint64_t type

I have a checksum256 type, I want to reach its specific elements as an integer. Ex cheksum256 myvar = 3dd6a4a0c86763d2a6fc1d5544eb58f3953b7cd03882e700b420fa0a89129f66; I want myvar[0] and myvar[2] ...
5 votes
2 answers
2k 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
2 answers
134 views

How to interface EOSIO smart contract with android dapp [duplicate]

I have been going through this To do Dapp tutorial how can I interface/build an android app for this?.
2 votes
2 answers
784 views

Unable to compile eosio.token

I'm following the https://developers.eos.io/eosio-home/docs/token-contract block one tutorial using the latest eosio/eos-dev docker image (v1.4.0). I have some issues when I compile eosio.token.cpp ...
2 votes
2 answers
841 views

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

After installing eosio.cdt 1.4.1, I am receiving this error from the compilation of my code where is included the header file eosiolib/types.hpp: fatal error: 'eosiolib/types.hpp' file not found #...
2 votes
2 answers
134 views

How to use std::tuple with eosiocpp?

I am trying to use typedef std::tuple<double, double> location_t; to create a simple tuple with latitude and longitude, but eosiocpp gives me 2018-09-02T12:54:47.310 thread-0 main.cpp:105 ...
1 vote
1 answer
129 views

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

I have been fighting a bit with the EOSIO_ABI macro in C++. I am trying to implement a very simple Ping/Pong contract using the latest eosio.cdt tools installed on my machine. When I try to compile ...
1 vote
0 answers
65 views

Why can eosiocpp not do normal operations on std::vector<std::string>?

I have two types: struct typeA { std::vector<std::string> vec; } struct typeB { std::vector<std::string> vec; } but I can't seem to get the 2 vecs to mix as eosiocpp seems to be ...
3 votes
1 answer
316 views

Error 3160009: No wast file found

The hello world contract is not getting compiled in the EOS v1.3 and eosio.cdt. The wasm and abi file is getting created but goes undetected. https://github.com/EOSIO/eos/issues/5349
1 vote
0 answers
180 views

eosio-cpp Compile error: undefined symbol: apply [duplicate]

Compile error: undefined symbol: apply I got the exact same problem as above but the alternative command doesn't work for me. I don't have eosiocpp instead of eosio-cpp. Can anybody please help me? ...
0 votes
1 answer
192 views

Contract Table Query Exception

As i was following eosio developers documentation #include <eosiolib/eosio.hpp> #include <eosiolib/print.hpp> using namespace eosio; using namespace std; class addressbook : public ...
2 votes
2 answers
846 views

eosio-cpp: command not found

Is there an alias or PATH that we need to set for eosio-cpp to be accessible? Here's what I'm seeing: ~/eos/contracts/youvote $ eosio-cpp --help eosio-cpp: command not found I can access it via: ~/...