Questions tagged [eosio.cdt]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
28 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
0
votes
0answers
9 views

Private MultiNode Testnet: Undefined Reference to secp256k1_rangeproof_info Error

I run into issues while building eosio.contracts repo. The link stage of eosio.contracts fails with errors similar to ”undefined reference to secp256k1_rangeproof_info". I have eos v1.8.1, eosio.cdt ...
1
vote
1answer
16 views

How to include boost when building using eosio.cdt?

I'd like to use the multiprecision library, but i'm having problems including the header filer. CMakeLists: include(ExternalProject) cmake_minimum_required(VERSION 3.10) # if no cdt root is given ...
0
votes
1answer
7 views

What is the usage of intrinsic read_action_data to set more than one action data?

Working on eosio native testing for unit testing and find an example that only for setting only one action data value: intrinsics::set_intrinsic<intrinsics::read_action_data>( [](void* ...
0
votes
0answers
27 views

Search in multi_index table by multiple fields (compound search)

Here is defined a sample table with four fields, two of them (account and type) I am going to use in my compound search: struct [[eosio::table]] total { uint64_t id; uint64_t account; ...
0
votes
1answer
27 views

Add multiple permissions to account in EOS

When I try to set a single permission, it is working fine: cleos --url https://jungle2.cryptolions.io set account permission market active '{"threshold": 1,"keys": [{"key": "MARKET PUBLIC KEY","...
0
votes
0answers
69 views

Make a transfer from contract code on behalf of user [duplicate]

Installed: eosio: 1.7.3; eosio.cdt: 1.6.1 Implemented and locally deployed: sample market contract and eosio.token contract. In order to make an inline transfer from market contract in behalf of a ...
0
votes
0answers
19 views

Before install EOSIO, Why install the Graphviz?

To my knowledge, Graphviz shows the code graph tool. But I haven't found the code graph in 'eos' directory. So I want to know the reason. And How can I use the graphviz in EOSIO?
1
vote
1answer
43 views

How to create composite primary key?

I have a table of prices where I want to store 2 prices per cross defined like this: struct [[eosio::table]] _prices { symbol base; symbol quote; float value = 0.0; uint128_t ...
0
votes
0answers
24 views

How to return a record found?

suppose I have: struct [[eosio::table]] _test { asset supply; uint64_t primary_key() const { return supply.symbol.code().raw(); } }; typedef eosio::multi_index<name("test"), _test> ...
1
vote
2answers
64 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
1answer
89 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
40 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
51 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
46 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
72 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 ...
3
votes
1answer
58 views

Ricardian Contract

Does eosio also sign the transaction with the ricardian contract of user consent and/or how does the application proove that a party agreed on said ricardian contract? I have integrated the ricardian ...
2
votes
1answer
67 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
158 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 ...
4
votes
2answers
287 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
78 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
188 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
96 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
37 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
75 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
63 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
49 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
18 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
1answer
56 views

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

In the new version of eosio we declare the constructor as : addressbook(name receiver, name code, datastream<const char *> ds) : contract(receiver, code, ds){} How does datastream ds work here ...
0
votes
1answer
89 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
177 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
2answers
167 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
108 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
98 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
114 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
246 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
73 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
287 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
101 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
176 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
96 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 ...
3
votes
1answer
141 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
178 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
349 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
204 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
390 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
155 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
33 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 ...