Questions tagged [eosio.cdt]

The tag has no usage guidance.

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

How to derive a uint from a string to use it as key/index in eosio table

I want to store json key-value pairs in an eosio table. The keys in the json are unique and that's why it would be perfect to use them as primary_key or secondary_id for querying the table later. The ...
1
vote
1answer
193 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 ...
0
votes
1answer
32 views

Smart contract redeem token action - Example

Do you have some example that shows how to design an action for a smart contract that when the user sends a REDEEMCODE action the smart contract will transfer some quantity of a custom token for the ...
0
votes
1answer
30 views

How much RAM saved / latency added from new KV Table

How much RAM do the KV Tables save / how much additional latency does this storage type add to the trx lifecycle? https://github.com/EOSIO/eos/releases/tag/v2.1.0
0
votes
0answers
2 views

any way to know inline action depth on blockchain explorer

the following error was encountered recently, any way to check the inline action depth of the transaction on blockchain explorer or other approach? max inline action depth per transaction reached
1
vote
1answer
15 views

confusion with contract names and account names in eosio testnet

When writing contracts, the contract class in file name_a.cpp is defined as follows: class[[eosio::contract("name_a")]] name_b : public contract {..} In my understanding the name of the ...
0
votes
1answer
21 views

is it possible to listen the return asset quantity of specified account?

is it possible to listen the return asset quantity of specified account in contract? e.g i use contract(A) to send asset of the specified account(B) to a DEX, can i listen the return asset quantity on ...
1
vote
0answers
101 views

eosio: assertion failure with message: datastream attempted to read past the end

Im getting this error "eosio: assertion failure with message: datastream attempted to read past the end" when i try to call transfer function from another mine smart contract. void simplenft:...
0
votes
0answers
13 views

Is there a C++ library just like eosjs?

I want to sign and send transactions (generally trigger any smart contract action) from a c++ external app. How can I do this? If my app was in javascript, that would be easy since I know that I can ...
0
votes
1answer
39 views

How to get timestamp of block in action logic like in ethereum

is there a way to find the time stamp of the block in which the transaction was mined like in solidity we can use block.timestamp. Can I have code examples of finding it.
3
votes
3answers
189 views

Set source file properties called with incorrect number of arguments

When attempting to compile a new contract, I am getting this error. I'm using eosio version 2.1 for this. CMake Error at /home/michael/eosio.cdt/build/lib/cmake/eosio.cdt/EosioCDTMacros.cmake:18 (...
1
vote
1answer
30 views

Can I make a http request from smart contract code?

I know that eosio has http plugins, which is why I'm thinking that maybe a http library is embedded to the eosio.hpp and that I can use it internally to send http requests. Is this possible? My goal ...
0
votes
0answers
12 views

recovery_key function failing to compile

so I'm trying to use the recovery_key function linked here: https://developers.eos.io/manuals/eosio.cdt/latest/group__crypto/?query=recover_key&page=1#function-recover_key Whenever I do use it ...
0
votes
0answers
16 views

How to link an external library to my eosio smart contract?

I normally use eosio-cpp to compile my smart contract, but recently I needed to use an external lib and link to it to build my project. I checked the docs here, but it basically shows how to use cmake ...
0
votes
0answers
19 views

Is ECDSA in EOS still viable?

I initially came from Ethereum and found out about ECDSA there. I'd like to do something similar at EOS. I have found this code: https://github.com/miguelmota/eos-ecverify but it doesn't compile when ...
0
votes
0answers
20 views

Is there a small C++ library or a simple gist/function just for signing transactions?

I'm building an app that consists of two services, one service will run on the edge and the other in the cloud. Obviously, I want the service on the edge to be lightweight since It will run on ...
3
votes
1answer
491 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
2answers
677 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.
0
votes
1answer
24 views

Signing and submission of transaction seperately

is there any way where we can have a user sign a transaction using their private key on the front end. And we get the signed transaction transfer it to our server over the internet and push the ...
0
votes
2answers
2k 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
1answer
30 views

Nested depth exceeded

kipping set abi because the new abi is the same as the existing abi Publishing contract... Error 3070002: Runtime Error Processing WASM Error Details: Nested depth exceeded pending console output: ...
0
votes
1answer
237 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 ...
1
vote
1answer
21 views

cdt1.8.1 compile issue

error encountered when compile the contracts with cdt 1.8.1, any idea? /usr/local/Cellar/eosio.cdt/1.8.1/opt/eosio.cdt/bin/../include/boost/pfr/detail/core17_generated.hpp:38:9: error: type 'swaps_row'...
0
votes
1answer
159 views

What is the difference between std::string and eosio::string?

Why should I use eosio::string over std::string? What are the use cases where it would make a difference?
0
votes
0answers
17 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 ...
0
votes
1answer
26 views

EOSIO Boot Not found

Hello im not able to find eosio.boot file and even not able to create my own network im following bios boot sequence please help to solve this issue thank you
1
vote
0answers
22 views

Build existing autoconf C project to include in smart contract

I'd like to include GNU's GMP library in my smart contract project. It's an autotools/autoconf project, how can I compile it as a standalone webassembly library and then include it in my smart ...
1
vote
0answers
110 views

Assertion failure with message: failed to allocate pages

Any help on this server error? I'm trying to fill in some gaps on a eosio python library, sending an assert sale action. {'code': 500, 'message': 'Internal Service Error', 'error': {'code': 3050003, ...
0
votes
1answer
76 views

Error 3080004 Transaction exceeded the current CPU usage limit imposed on the transaction

Hello i am trying to create eosio.system contract but its keep giving me this Error 3080004: Transaction exceeded the current CPU usage limit imposed on the transaction Error Details: transaction was ...
0
votes
1answer
33 views

Compiling smart contract not getting done

I have a setup of multi-node of 4 peers blockchain. Blockchain is running, few days before I deployed the smart contract and using it to save data on the blockchain. Now, I did some changes to the ...
0
votes
1answer
71 views

How do I record LOG in eosio smart contract?

I deployed and tested eosio smart contract. I want to record the logs of a smart contract using the web API. How can I do this? I searched but didn't get any satisfying answer. I tried to get logs by ...
0
votes
2answers
562 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
145 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
37 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 ...
0
votes
1answer
33 views

How to get timestamp through eosjs in seconds?

I want to get the timestamp of the block in Seconds but eosjs library returns it in an iso string format. Is there a way to receive timestamp in seconds or convert the string to seconds? Example: What ...
0
votes
1answer
379 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
0answers
14 views

getting error when i try to add permission to a user who is signing a smart contract action

here is what i am trying to do : users will sign a specific action which will take their username, permission_name, smart_contract_name, action_name, public_key i am trying to assign the user ...
1
vote
1answer
218 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: [*** ...
1
vote
1answer
65 views

Compile Error: fatal error: 'eosiolib/eosio.hpp' file not found

eosio.cdt version 1.6.2 OS: Debian GNU/Linux 10 Code Contract #include <eosio/eosio.hpp> using eosio::contract; using eosio::print; using eosio::name; CONTRACT hello : public contract { ...
3
votes
1answer
94 views

Returning values from actions

I am trying to return a value from an action as follows: [[eosio::action("test2")]] int test2(int x) { return x; } The code compiles correctly, and the ABI file shows the correct action ...
3
votes
1answer
43 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
0answers
16 views

Implement Shamir Secret Algorithm in smart contract

I need to implement Shamir's Secret algorithm in EOS smart contract. Looking for some open source libraries which will support EOS. I researched some here https://github.com/topics/shamir from which I ...
0
votes
0answers
67 views

No EOSIO.CDT location was specified

sudo ./build.sh No EOSIO.CDT location was specified. Is EOSIO.CDT installed in the default location? /usr/local/eosio.cdt (y/n) y Using EOSIO.CDT installation at: /usr/local/eosio.cdt =========== ...
0
votes
2answers
432 views

How to loop a multi_index table in a smart contract

I have very simple table items with the following structure: struct [[eosio::table]] item { uint64_t id; uint64_t state; string description; uint64_t primary_key() ...
0
votes
1answer
37 views

Which way is good to build eosio.cdt?

I am following this documentation, https://developers.eos.io/welcome/latest/getting-started/development-environment/install-the-CDT which is used for installing eosio cdt. It has two ways for doing ...
0
votes
1answer
18 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 --...
2
votes
1answer
126 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 ...
1
vote
1answer
496 views

How to uninstall CDT and reinstall?

On Ubuntu 16 / Windows with Linux Module. For reinstalling EOSIO, I'm just removing my eosio_1.5.0-1-ubuntu-16.04_amd64.deb Then: wget https://github.com/eosio/eos/releases/download/v1.5.0/eosio_1....
0
votes
1answer
65 views

How to check authorization for a particular account in EOS smart contract?

I want to write an EOS smart contract to manage users data. I need that only some admin account will able to add, update and delete users and the particular user can only update data. Can I check ...
0
votes
0answers
17 views

Failed with error: deadline 2020-05-12T09:41:54.343 exceeded by 73us

I am trying this to set eosio.system smart-contract using this command: cleos set contract eosio /home/varshakhandre14/contracts/newcontract/eosio.contracts/build/contracts/eosio.system/ I am ...