Questions tagged [eosio.cdt]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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
11 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
0answers
10 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
0answers
11 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 ...
1
vote
1answer
29 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
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
18 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 ...
0
votes
1answer
29 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
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
93 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
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
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: ...
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
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
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.
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
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
107 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
73 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
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
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
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 ...
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
64 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
3answers
183 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 (...
3
votes
1answer
92 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
64 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
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 --...
0
votes
1answer
64 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 ...
0
votes
1answer
56 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 ...
0
votes
1answer
67 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
1answer
64 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 ...
0
votes
1answer
157 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?
2
votes
1answer
195 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("...
0
votes
1answer
141 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 { ...
0
votes
1answer
354 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&...
0
votes
2answers
424 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
2answers
323 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 ...
0
votes
0answers
74 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 ...
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
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 ...
1
vote
1answer
58 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
1answer
163 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
85 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 ...