Questions tagged [eosio.cdt]

The tag has no usage guidance.

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

Iterating a table by primary key greater than x and secondary key == y

How does one go about iterating a table for the next largest primary key in a table that also has a specific secondary value? Values to iterate with: uint64_t last_key_known == 1652645054; name ...
user avatar
  • 11
0 votes
1 answer
20 views

Is there a way to convert an object to JSON in the smart contract?

I want to convert a series of data/object/struct into a json text before saving it into my table. Is this possible?
user avatar
0 votes
0 answers
36 views

Error 3070003: Serialization Error Processing WASM while set contract eosio.system

set contract: cleos set contract eosio ./eosio.system -p eosio@active I get : Error 3070003: Serialization Error Processing WASM Publishing contract... Error 3070003: Serialization Error Processing ...
user avatar
0 votes
0 answers
14 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 ...
user avatar
  • 111
0 votes
0 answers
7 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
user avatar
1 vote
1 answer
35 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 ...
user avatar
  • 13
0 votes
1 answer
62 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 ...
user avatar
  • 111
0 votes
0 answers
16 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 ...
user avatar
1 vote
1 answer
68 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 ...
user avatar
  • 111
0 votes
0 answers
30 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 ...
user avatar
  • 111
0 votes
0 answers
21 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 ...
user avatar
0 votes
0 answers
29 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 ...
user avatar
  • 111
0 votes
1 answer
52 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 ...
user avatar
0 votes
1 answer
26 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 ...
user avatar
1 vote
0 answers
337 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:...
user avatar
0 votes
1 answer
44 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 ...
user avatar
0 votes
1 answer
35 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: ...
user avatar
1 vote
1 answer
26 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'...
user avatar
0 votes
0 answers
22 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 ...
user avatar
0 votes
1 answer
69 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.
user avatar
0 votes
1 answer
31 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
user avatar
  • 3,405
1 vote
0 answers
26 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 ...
user avatar
1 vote
0 answers
179 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, ...
user avatar
  • 11
0 votes
1 answer
138 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 ...
user avatar
0 votes
1 answer
31 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
user avatar
0 votes
1 answer
55 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 ...
user avatar
  • 293
0 votes
1 answer
43 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 ...
user avatar
0 votes
1 answer
61 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 ...
user avatar
  • 25
1 vote
0 answers
20 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 ...
user avatar
  • 11
1 vote
1 answer
123 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 { ...
user avatar
3 votes
3 answers
287 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 (...
user avatar
3 votes
1 answer
139 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 ...
user avatar
3 votes
1 answer
55 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?
user avatar
  • 1,794
0 votes
1 answer
54 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 ...
user avatar
  • 293
0 votes
1 answer
24 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 --...
user avatar
  • 135
0 votes
1 answer
91 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 ...
user avatar
  • 293
0 votes
0 answers
35 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 ...
user avatar
  • 293
0 votes
1 answer
76 views

how to save data in mongodb from eos smart contract?

I am getting the actions log data using an action constructor in a smart contract. I need to save this data in MongoDB from the smart contract. How can I do this? I didn't get exactly my required ...
user avatar
  • 293
0 votes
1 answer
90 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 ...
user avatar
  • 293
0 votes
1 answer
87 views

Check public keys on contract level

Is it meanwhile possible to check the public key of an account name on contract level? (Not with Cleos) Example: The contract contains some public keys (not the account names). If a user performs a ...
user avatar
  • 3
0 votes
1 answer
204 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?
user avatar
2 votes
1 answer
243 views

How do I pass an iterator?

suppose I have a table: struct [[eosio::table]] _stuff { symbol curr; // other stuff uint64_t primary_key() const { return curr.code().raw(); } }; typedef eosio::multi_index<name("...
user avatar
  • 495
0 votes
1 answer
184 views

Store enum value in table

I have a simple enum (or enum class, neither one is working ) enum vote_option { upvote = 0, downvote and a table which will store a value of that enum type. struct [[eosio::table]] poll { ...
user avatar
0 votes
1 answer
450 views

How to upgrade a multi_index table in a smart contract

I have initially the following multi_index table: struct [[eosio::table]] plastict { uint64_t id; uint64_t type; uint64_t primary_key() const { return id; } }; typedef eosio::multi_index&...
user avatar
  • 11
0 votes
2 answers
531 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() ...
user avatar
  • 11
0 votes
2 answers
371 views

Do SHA256 with CDT 1.6

I have a problem, when I was in the 1.3 version of eosio.CDT I successfully reproduce the same SHA256 in my contract and with multiple external method. It work like the dice contract. You generate in ...
user avatar
0 votes
0 answers
75 views

env.is_feature_activated unresolvable while setting up eosio.system contract

I am following BIOS Boot Sequence. I want to set up my own private EOS network that's why I am setting up the EOSIO network. at step 1.12 I am not able to set the eosio.system contract it will give me ...
user avatar
0 votes
2 answers
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
user avatar
  • 31
1 vote
1 answer
174 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 ...
user avatar
1 vote
1 answer
64 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* ...
user avatar