Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [eosio.cdt]

The tag has no usage guidance.

0
votes
1answer
40 views

Why is [[eosio::on_notify(“eosio.token::transfer”)]] not working?

Network: kylin testnet. I transferred eos to this contract, but it the "deposit" function was not called. What do I miss?
1
vote
1answer
17 views

error: no type named 'transaction' in namespace 'eosio'

During the tutorial on https://developers.eos.io/eosio-home/docs at the last step (step 2.9, the section about deferred transactions) when trying to compile the code, I get this error: [*** ...
0
votes
0answers
28 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, ...
0
votes
1answer
27 views

How do you define uuid indexes in contract tables?

I would get table entries by uuid. how can I convert string format 16cadf15-dda7-4be2-8026-c3c7875322d0 to an indexable eosio type ( uint64_t, uint128_t, uint256_t, double or long double). Or even ...
1
vote
1answer
58 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 ...
2
votes
0answers
38 views

Ricardian Contract

Does eosio also sign the transaction with ricardian contract of user consent or/and how application can proof the validity that a party agree on said ricardian contract? I have integrated the ...
2
votes
0answers
45 views

CPU-Usage Optimization

I'm trying to figure out how to optimize one of my smart contracts for less billed CPU-usage. There are typically different methods to optimize performance of algorithms but I'm not clear about if a ...
1
vote
1answer
89 views

on_notify not being fired on local or jungle testnet

I'm using the following contract on both my local and jungle testnets, the on_notify methods are not being fired. Everything appears to be in order, I'm hoping I've missed something obvious. I ...
3
votes
2answers
137 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?
0
votes
1answer
42 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 ...
0
votes
3answers
127 views

Custom dispatcher new CDT

I'm having compilation issues when creating a custom dispatcher. I'm getting issues when calling EOSIO_DISPATCH. Is it related to changes in new CDT? class [[eosio::contract("mycontract")]] ...
0
votes
2answers
77 views

Multi_index issues

I'm getting a lot of errors related to multi_index after updating to the newest eosio.cdt. Here is part of my code related to hash. struct st_hash { capi_checksum256 hash; uint64_t expiration; ...
1
vote
1answer
34 views

How to compile uint with single quotes?

When I compile my code I get this error: warning: missing terminating ' character const static uint32_t default_max_block_cpu_usage = 200'000; /// max block cpu usage in ...
1
vote
1answer
62 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
46 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::...
1
vote
0answers
39 views

Command 'nodeos' not found

Till yesterday nodeos on my machine was working fine, today I installed eosjs after that eosio commands giving errors. Just like nodeos command giving following error: Command 'nodeos' not found, ...
2
votes
1answer
16 views

fatal error: 'future' file not found

I want to write a contract by using CPR library. Unfortunately I have an error: fatal error: 'future' file not found #include <future> I am using EOSIO cdt v1.5.0 on Ubuntu 18.04. I had the ...
1
vote
0answers
39 views

what is receiver account for and what is ds, in new version of eosio contract's constructor declaration

In new version of eosio we declare the constructor as : addressbook(name receiver, name code, datastream<const char *> ds) : contract(receiver, code, ds){} My question is how ds work here and ...
0
votes
1answer
62 views

Indexing a table by asset symbol — how to find?

suppose I declare: struct [[eosio::table]] tst { asset component; uint64_t primary_key() const { return component.symbol.code().raw(); } }; where I mean to keep a list of assets. ...
1
vote
0answers
18 views

What is the function of the braces?

in the symbol.hpp of the CDT I see the following definition: constexpr symbol_code code() const { return symbol_code{value >> 8}; } but I need a little help to understand... the method ...
0
votes
3answers
137 views

unknown type name `account_name` in current version of eosio.token contract?

I'm attempting to follow this guide, which seems official: https://developers.eos.io/eosio-home/docs/token-contract which uses the v1.4.0 branch of the EOSIO contracts when I follow the steps, the ...
0
votes
1answer
37 views

can a deferred transaction makes the initial transaction fail

Imagine a user sent me some eosio.token to my contract when i receive the notification, i start a new deferred transaction that can fails later. So my question is can that deferred transaction makes ...
0
votes
2answers
115 views

How to do arithmetic with asset amount particulary decimals

How do I compute a percentage of an amount? I tried multiplying by 10000 and after dividing afterward but I get an error when sending that amount.
2
votes
1answer
103 views

Fixing a smart contract written in old version of eosio.cdt

I am using Ubuntu 18.04 LTS first of all. So I am trying to look up how to start building an EOS dApp, starting with this example on Github. Here is the link: https://github.com/eosasia/eos-todo I ...
0
votes
1answer
77 views

Failed to get existing code hash, continue without duplicate check… on set contract

Update 12/17/18: I solved this by updating my CDT to latest. Still unsure what the issue was. OS: Windows with Linux/Ubuntu Sub Module Nodeos: v1.5 CDT: v1.3.2 So I'm trying to set a simple ...
0
votes
1answer
80 views

How can I tell what version I am running with cleos version client?

cleos version client returns a foreign language to me. Build version: 59626f1e Is there a way I can ascertain what version I'm on from that? Is there another way of doing it besides that?
1
vote
0answers
220 views

how to convert a hex string to checksum256

I'm having a hard time figuring out how to convert a hex string into a checksum256/capi_checksum256 (or vice versa), any help?
1
vote
0answers
57 views

Can't build or install eosio.cdt

I can't seem to install or build from source following the tutorials on eos.io. Trying to install from package results in a huge list of errors that look like: E: Release 'eosio.cdt-1.3.2.x86_64.deb' ...
2
votes
2answers
226 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 ...
1
vote
1answer
84 views

How can i solve the error: iostreams currently clash with eosio::datastream?

I am trying to compile some code which compiled successfully with the old compiler eosiocpp, but with the new eosio-cpp gives me: eosio.cdt/1.4.0/bin/../include/libcxx/iostream:13:2: error: "iostreams ...
1
vote
2answers
151 views

keosd not found

After installing eosio.cdt, eos/build/programs/ directory is not found. I cant find programs directory inside build folder. My intention is to run keosd manually. Why programs directory is not formed ...
1
vote
1answer
83 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 ...
2
votes
1answer
126 views

eosio.cdt 1.3.2 indexed_by error: non-type template argument is not a constant expression

I'm trying to shift my contract and build it with the latest CDT, v1.3.2. The transition docs say to use the new ""_n name constructor but it doesn't appear to be working. I have: typedef ...
3
votes
2answers
150 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
2answers
304 views

Multi_index query with new CDT

Because name is no longer a uint64_t type I created my struct like this: struct [[eosio::table]] game { uint64_t id; //auto increment name host; name guest= name("none"); name ...
2
votes
1answer
195 views

Samples with eosio.cdt v1.3.0? multi_index with secondary indexes and get_index

Has anyone been successful getting a contract which uses secondary indexes to compile against the latest versions of the CDT (1.3.2)? I'm having trouble and don't see any updated samples which use ...
1
vote
2answers
350 views

No matching constructor for initialization AddressBook example

Dependencies: EOSIO.CDT (Contract Development Toolkit) Version : 1.3.1 My code: #include <eosiolib/eosio.hpp> #include <eosiolib/print.hpp> using namespace eosio; CONTRACT ...
1
vote
1answer
141 views

multi_index in eos with AddressBook example

I building AddressBook by link https://developers.eos.io/eosio-home/docs/data-persistence, Dependencies: EOSIO.CDT (Contract Development Toolkit) Version : 1.3.1 Here is my code: #include &...
1
vote
0answers
30 views

Why EOSIO going to discard eosiocpp tool?

EOSIO introduced new eosio.cdt tool for contract development and there is many changes related to typedefs in this tool. Is eosio.cdt official by eos ? asking this because they have not mentioned ...