Skip to main content

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
0 votes
1 answer
22 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, ...
Eosio's user avatar
  • 1
0 votes
1 answer
81 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 ...
Jesseeeee's user avatar
0 votes
0 answers
29 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 ...
Taaha Waseem's user avatar
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 ...
gojihos207's user avatar
3 votes
1 answer
77 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?
cmadh's user avatar
  • 1,929
0 votes
1 answer
30 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 --...
cmr's user avatar
  • 135
0 votes
1 answer
292 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.
claudia's user avatar
1 vote
0 answers
42 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.
Vishal Singh's user avatar
0 votes
1 answer
96 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 ...
Sham Gir's user avatar
  • 128
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
errolflynn's user avatar
1 vote
1 answer
844 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: ...
errolflynn's user avatar
1 vote
2 answers
290 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 ...
Ridham CPP's user avatar
0 votes
1 answer
270 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] ...
Mali's user avatar
  • 3
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?
Phillip Hamnett - EOS42's user avatar
0 votes
1 answer
236 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 [...
Riccardo Persiani's user avatar
1 vote
2 answers
137 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?.
ovicko's user avatar
  • 133
2 votes
2 answers
866 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 #...
Riccardo Persiani's user avatar
1 vote
1 answer
134 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 ...
Grégory Saive - evias's user avatar
1 vote
0 answers
67 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 ...
Chrysm_Seal's user avatar
2 votes
2 answers
788 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 ...
mounibec's user avatar
1 vote
1 answer
86 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]] ^ ...
philipkd's user avatar
  • 111
3 votes
1 answer
320 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
rohan agarwal's user avatar
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? ...
rubang's user avatar
  • 11
0 votes
1 answer
193 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 ...
Swapna's user avatar
  • 85
2 votes
2 answers
859 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: ~/...
Gunnar Pope's user avatar
2 votes
2 answers
137 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 ...
Vivienne Fosh's user avatar
3 votes
1 answer
572 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 ...
cmichel - LearnEOS.dev's user avatar
3 votes
6 answers
673 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.
Dominic's user avatar
  • 131