Questions tagged [eosio-code]

Questions relating to the official eosio code--for instance, this may include questions about particular functions or data structures, certain files or contracts, compilation or building problems, related libraries, scripts, binaries, or similar.

Filter by
Sorted by
Tagged with
1
vote
1answer
34 views

I have doubts about intercontract communication

I have read that: In order to call an inline action, that is to call an action of contract A from contract B, there is a need to set some special permission. In this case, the Ram payer for the ...
1
vote
1answer
13 views

Eos-sharp jungle Error 3090003 when trying to call external smart contract

I’m trying to achieve something quite simple. I try to call eosio.token transfer from one of my smartContract (lomtaxjungle dopurchase), but after severals days i still don’t manage to do it. From ...
0
votes
1answer
90 views

Error while signing a transaction using nodejs wallet API?

I am building an eosdapp using nodejs code.I got the wallet api from the developers portal,but when i run the code i get the following error. {"code":500,"message":"Internal Service Error","error":{"...
0
votes
1answer
29 views

Where in the code are eosio.prods permission set

where can I find the code in which eosio.prods permission are set? I couldn't find it in system_contract or producer_plugin. thx for any help!!
0
votes
1answer
13 views

How to integrate Restfull API with smart contract using c#?

I am new to EOSIO. I referred eos.io for learning. Now I need to learn how to integrate API with a smart contract. I am willing to do this in c#. I got answers mostly for eosjs which is used in nodejs,...
0
votes
2answers
9 views

No member name in namespace 'block-signing_authority' in eosio

I am having issues compling the eosio.system contract with the new eosio 2.0 upgrades I keep generating the same error below. What could be the cause of this error ? include/eosio.system/eosio....
0
votes
0answers
8 views

EOSIO calculate transaction_mroot

As a general task i am trying to reverse engineer the production of a Block. With the help of EOSJS i was able to make a transaction from scratch and i can de/serialize it and sign it and so on. Now i ...
1
vote
1answer
126 views

Failing EOSIO manual build, Could NOT find WASM (missing: WASM_CLANG WASM_LLC WASM_LLVM_LINK)

I tried to follow instruction from https://developers.eos.io/eosio-nodeos/docs/manually-build for manual build but kept failing the cmake step. cmake -DBINARYEN_BIN=~/binaryen/bin -DWASM_ROOT=~/wasm-...
0
votes
1answer
27 views

Setting eosio.code permission for contract account in eosjs

I am trying to set the eosio.code permission for my contract on account kbo2byvpkbiy (private blockchain). The reason I want to do this is calling eosio.token/transfer from within this contract. All ...
0
votes
1answer
36 views

How is dpos_proposed_irreversible_blocknum aka PLIB computed?

How is dpos_proposed_irreversible_blocknum aka Pre-LIB (Last Irreversible Block) computed? Is it by counting 15 blocks or by counting 15 signatures? For example: In an unfortunate scenario, out of 4 ...
3
votes
1answer
180 views

What is the reason for appearance of “misaligned reference”?

I have written a big contract with a lot of template functions and can find a place, which causes 2018-11-19T08:14:11.454 thread-0 binaryen.hpp:608 translate_one ] misaligned ...
0
votes
2answers
60 views

Calling Action on EOS blockchain with Flutter App throwing Exeception Unknown type : float32 or float64

Hey I'm working on a Eosio blockchain dapp, so for front end I'm using flutter. We have a package Eosdart for connecting flutter to eos blockchain. Everything was good till here, but the problem ...
1
vote
1answer
188 views

Runtime Error Processing WASM in ``` std::stof```?

[[eosio::action]] void hi(){ string strNum; strNum.push_back('3'); float currNum = std::stof(strNum);// print("currNum=",currNum); } ...
1
vote
2answers
1k views

How do I fix the error “include errors detected. Please update your includePath”

Im following along with the getting started guide and I got up to the first contract section in 2.1, I made the hello directory and cd into it, I touched hello.cpp and then opened it in VS Code, once ...
0
votes
0answers
13 views

Does anyone used EOSIO-java to connect to EOSIO?

I am trying to connect Java to EOSIO using eosio-java example. tried with gradle and maven in java, with the below example https://github.com/EOSIO/eosio-java#installation Two classes are not found....
1
vote
2answers
439 views

What is eosio.code permission?

I have seen that some contract need eosio.code permission to deploy contract. So, i have few questions regarding eosio.code that are as below What is eosio.code permission? Do we need to add ...
0
votes
0answers
10 views

Eosio-java unable to download all the maven required dependencies

I am trying the eosio-java example. I am using the below dependencies and repository. Only eosiojava and eosiojavasoftkeysignatureprovider are successful.I knew other two dependencies are specific to ...
4
votes
3answers
683 views

How to set up a private blockchain using EOS?

I have read that it is possible to set up a private blockchain using EOS. Can anyone help me to understand how to set up a private chain using EOS. Thanks in advance
0
votes
2answers
34 views

(eosio v2.0.2) contract prints are not shown, even using nodeos with --contracts-console parameter

simple contract compiled using eosio.cdt v1.7.0: #include <eosiolib/contracts/eosio/eosio.hpp> #include <eosiolib/core/eosio/print.hpp> using namespace eosio; CONTRACT eventhandler : ...
0
votes
2answers
448 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
41 views

multi_index table get const_iterator at a specific position

is there a better way than a loop to get the value/const_iterator at a specific position in multi_index table? current: auto idx = _table.get_index<"name"_n>(); const_iterator b; int count = ...
1
vote
1answer
123 views

If I issue an EOS token, how do I afford the running fee?

I got a question about how to afford the cost of emplace action... code in eosio.token like : statstable.emplace( _self, [&]( auto& s ) { s.supply.symbol = maximum_supply.symbol; ...
3
votes
4answers
183 views

Is LevelDB used in EOS?

I know Ethereum uses leveldb. When I checked into EOS I could not find that much out. I thought when I tested I did see leveldb. Can someone confirm how the immutable data is stored? EDIT I think ...
2
votes
2answers
42 views

Problems with [[eosio::on_notify…]

Thanks in advance for any help. I can't seem to get on_notify to work (attempting to trigger for any tokens sent to the contract, but for the example I've tested both * and eosio.token) The method: ...
0
votes
1answer
48 views

how can you use the ONLY_BILL_FIRST_AUTHORIZER feature for updateauth?

when i try to put 2 authorities to updateauth i get this error Error: updateauth action should only have one declared authorization so how can i use another accounts cpu to change my keys not using ...
0
votes
1answer
62 views

How to create an API for EOSIO smart contract action?

// @abi action [[eosio::action]] void create(name user,string doctor_name,string doctor_contact,string doctor_address,string patient_problem,string patient_description,string patient_solution){...
2
votes
1answer
268 views

What is the use of eosio-code?

Some major questions I have: What does eosio-code mean? When do we require eosio-code? Why it is not mentioned in the official EOSIO developer's documentation?
0
votes
1answer
44 views

how to create a unique user name using public or private key in nodejs?

Like BTC, ETH etc has address, do EOS has address or username etc, I am using below code to generate the public and private key, we do transaction in bitcoin,ethereum etc with a unique address sample ...
1
vote
1answer
40 views

EOS error while pushing transaction

I received an error while pushing a transaction onto the jungle test net
1
vote
2answers
152 views

EOS Block Producer Schedule

I have followed the Boot Bios sequence of eosio and setup a eos private blockchain. The problem is my even though i have created also Block producers and also voted for them still the blocks are ...
1
vote
0answers
24 views

Is it possible to let caller to pay for the cpu of an inline deferred transaction of a contract?

For example, A send a transaction t1 that will call the contract action act1, act1 will send a deferred transaction t2. Is it possilbe that let A pay for the cpu instead of the contract account?
1
vote
0answers
32 views

How to pass in a public key as a string to an action?

I see that public_key is public_key = std::variant<ecc_public_key, ecc_public_key, webauthn_public_key> While ecc_public_key is std::array<char, 33> How would I create a public key ...
1
vote
1answer
75 views

Is it possible to deploy contract via curl?

Using command line i am deploying smart contract "eosio.token". cleos -u http://127.0.0.1:8888 set contract eosio.token ./eosio.token -p eosio.token Is it possible to deploy smart contract using ...
1
vote
1answer
141 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
15 views

Send_transaction function is it used?

I found a strange function(send_transaction) in eos. The function is used in 1.7 version. But It looks like doesn't used in 1.8 version. And the function is duplicated of the push_transaction. ...
0
votes
0answers
120 views

eosio.contract unit_test error “critical check validate()” when added new global table and bps change

i get the an error from the eosio.contract unit_test as follow: /eosio/1.8/include/eosio/testing/tester.hpp(364): fatal error: in "eosio_system_tests/vote_producers_in_and_out": critical check ...
2
votes
1answer
95 views

Why does using available_primary_key() as scope for a table result in this behaviour?

Scenario: Two tables, each using uint64_t as a primary key Table A rows need to reference rows in Table B Why? Relational database data duplication reasoning etc etc Both table's primary keys are ...
0
votes
1answer
36 views

Unable to creating Eos account with nodejs using eosjs library

I have no idea where am i making mistake? please help. const express = require('express'); const path= require('path'); const app =express(); const { Api, JsonRpc, RpcError } = require('eosjs'); ...
0
votes
1answer
23 views

Function not giving expected output Eos smart contract

My contract .Cpp part void mainloan::adduwr(name acc_name, double interest, uint64_t loan_amount ) { print("Adding underwriter", acc_name); // require_auth( _self ); uwr_table.emplace(get_self(...
0
votes
1answer
28 views

Convert String to double (flaot32/float64) in EOSIO [duplicate]

serialize support for float types is not added in flutter and thats why i have to come to this way,so if anyone have any working example for this,ill be really thankful for that. I have tried this ...
0
votes
0answers
16 views

A non-producing block, create account stuck

I am having a non-producing node for my chain. But when I run the command cleos create account eosio myaccount PUB_KEY PUB_KEY But it stuck somewhere. No output for a long time. I have put --print-...
0
votes
0answers
14 views

Error 3090003: Provided keys, permissions, and delays do not satisfy declared authorizations [duplicate]

I am trying to create an account with different creator NOT EOSIO. I have configured node config.ini producer-name = sunny signature-provider = PUB_KEY=KEY:PRIVATE_KEY Error 3090003: Provided keys, ...
0
votes
0answers
28 views

Unvote a producer

I am working on eosio.system contract, I run my own local chain, in which I elect 5 block-producers and they start to produce block. Now let suppose I want to kick-out any block-producer from my ...
4
votes
2answers
153 views

How to calculate `action_mroot`

UPDATE #3 for future action_mroot calculators: The two critical bits of info needed to do this (that are neither easy to find nor documented) are: There exists an extra action (which has a receipt) ...
0
votes
1answer
31 views

Understanding EOSIO voting mechanism and decay

I have a question on eosio-voting and decay. Suppose there are only 21 block-producers (registered) and only 10 users having equally eos-token. These users now voting for each block-producers, it mean ...
0
votes
1answer
121 views

How can we retrieve table data with secondary Index in EOS table

this is my table struct [[eosio::table]] payment_made { uint64_t pay_id; uint64_t loan_id; uint64_t pay_amunt; time_point_sec pay_date_req; time_point_sec pay_date_approve; ...
0
votes
1answer
21 views

Unknown action hashit in contract eosio

stdClass Object ( [code] => 500 [message] => Internal Service Error [error] => stdClass Object ( [code] => 3050000 [name] => action_validate_exception [what] => Action validate exception [details] => ...
1
vote
1answer
302 views

Code examples for ONLY_BILL_FIRST_AUTHORIZER

Can someone please add code example or describe how to only bill first authorizer? I have tried but can't get it to work. Thanks!
0
votes
1answer
127 views

Invalid packed transaction

I am trying RPC API. Here is the code which I am using on cmd for testing a dummy transaction. curl --request POST --url http://localhost:8080/v1/chain/push_transaction --header 'accept: application/...
0
votes
0answers
31 views

Problem in deferred transaction function

I have added the problem statement as a comment in code so please read the commented line in code. void mainloan::checkdaily(uint64_t loan_id) { require_auth(_self); auto itr = loan_table.find(...