Questions tagged [eosio.cdt]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
17 views

Cannot deploy contract containing KV Map API

I am following the example on how to use KV-Map-API from the official page, but when I call cleos set contract ... I get following error message: Error 3070003: Serialization Error Processing WASM ...
Bazinga's user avatar
0 votes
0 answers
35 views

General Tips on Smart Contract Development? ( Business Logic + Token )

Currently developing an eosio based token with some semi intricate business logic that frequently modifies aspects of the token contract( staking, supply, etc ) based on a variety of factors including ...
DaCryptonaut's user avatar
0 votes
1 answer
72 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 ...
DaCryptonaut's user avatar
0 votes
1 answer
55 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?
Jesseeeee's user avatar
0 votes
0 answers
88 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 ...
bigbadboii's user avatar
1 vote
1 answer
41 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 ...
sam's user avatar
  • 13
0 votes
1 answer
105 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 ...
basilisk's user avatar
  • 131
2 votes
1 answer
107 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 ...
basilisk's user avatar
  • 131
0 votes
0 answers
52 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 ...
basilisk's user avatar
  • 131
0 votes
0 answers
33 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 ...
Jesseeeee's user avatar
0 votes
1 answer
68 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 ...
Igor Medeiros's user avatar
0 votes
1 answer
34 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 ...
James Cai's user avatar
1 vote
0 answers
665 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:...
Plamen Pla's user avatar
0 votes
1 answer
67 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 ...
Taaha Waseem's user avatar
0 votes
1 answer
53 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: ...
James Cai's user avatar
1 vote
1 answer
32 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'...
James Cai's user avatar
0 votes
0 answers
28 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
132 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.
Taaha Waseem's user avatar
0 votes
1 answer
39 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
Nat's user avatar
  • 3,425
1 vote
0 answers
34 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 ...
Guillermo Rodriguez's user avatar
1 vote
0 answers
272 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, ...
Couch's user avatar
  • 11
0 votes
1 answer
267 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 ...
Awais Sakhi's user avatar
0 votes
1 answer
35 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
Awais Sakhi's user avatar
0 votes
1 answer
73 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 ...
Varsh's user avatar
  • 307
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
0 votes
1 answer
120 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 ...
Mr.SsS's user avatar
  • 135
1 vote
0 answers
21 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 ...
niksad8's user avatar
  • 11
1 vote
1 answer
187 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 { ...
Cyber Peach's user avatar
3 votes
3 answers
512 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 (...
Michael Nash's user avatar
3 votes
1 answer
230 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 ...
Phillip Hamnett - EOS42's user avatar
3 votes
1 answer
73 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
65 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 ...
Varsh's user avatar
  • 307
0 votes
1 answer
29 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
120 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 ...
Varsh's user avatar
  • 307
0 votes
0 answers
68 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 ...
Varsh's user avatar
  • 307
0 votes
1 answer
99 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 ...
Varsh's user avatar
  • 307
0 votes
1 answer
105 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 ...
Varsh's user avatar
  • 307
0 votes
1 answer
134 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 ...
kei101's user avatar
  • 3
1 vote
1 answer
238 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?
Phillip Hamnett - EOS42's user avatar
2 votes
1 answer
297 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("...
ekkis's user avatar
  • 515
0 votes
1 answer
236 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 { ...
Tigran Sahakyan's user avatar
0 votes
1 answer
524 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&...
vladich's user avatar
  • 11
0 votes
2 answers
668 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() ...
vladich's user avatar
  • 11
0 votes
2 answers
415 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 ...
Paul-Alexandre Tessier's user avatar
0 votes
0 answers
81 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 ...
parth Kaloliya pk's 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
Bhaskar's user avatar
  • 31
1 vote
1 answer
206 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 ...
Michael Fletcher's user avatar
1 vote
1 answer
70 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* ...
Farhan-TroonTechnologies's user avatar
0 votes
1 answer
187 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","...
vladich's user avatar
  • 11
0 votes
0 answers
96 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 ...
vladich's user avatar
  • 11