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
0
votes
0answers
3 views

Erorr : assertion failure with message: unable to find key on push action eosio init

I have read other answers regarding this error but this case is different. I have created a private network on which i deployed eosio.token contract on a account with name other than eosio.token (...
0
votes
2answers
76 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
0answers
4 views

What is purpose of eos flag --enable-stale-production?

I am trying to setup a private eos network but when i unset flag --enable-stale-flags node does not start producing blocks what is exactly the purpose of this flag In which cases this flag should be ...
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
203 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
0answers
17 views

eosio-explorer can't see block and transactions,postgreSQL light is red

I want to build a local blcokchain explorer. I used the offical eosio-explorer, but it didn't work. The postgreSQL light always red. I can't search the block form number or transactions. I can use the ...
1
vote
1answer
214 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); } ...
0
votes
0answers
4 views

How to replace EOS as core system token with some other(created) token for private network

Is it possible to replace eos with some other token created from eosio.token contract and make it core system token
0
votes
1answer
15 views

Can we make txs free of cost/without staking on privately deployed eos network

I want to deploy a private eos network on which users don't have to stake or pay ram or network or cpu is that possible if yes how so ? do I have to tweak code in eosio.system contracts Also what are ...
0
votes
1answer
22 views

EOS Node Build Help

I'm new to development so hopefully someone can point out what I may have done wrong. I'm trying to set up an EOS node using Ubuntu VirtualBox on my Windows machine. I have installed everything ...
0
votes
2answers
673 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
50 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 = ...
0
votes
1answer
19 views

How to reduce block production speed in private Network Setup

I setup an eos private network which is creating block at speed of 500ms per block is it possible to reduce it to 2sec per block or more The problem is most of the blocks gets produced with 0 txs in ...
1
vote
1answer
134 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
197 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 ...
0
votes
1answer
69 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
275 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?
4
votes
3answers
818 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
1answer
54 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
47 views

EOS error while pushing transaction

I received an error while pushing a transaction onto the jungle test net
1
vote
2answers
169 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 ...
0
votes
0answers
21 views

How to catch Error in EOS smart contract?

I am writing a smart contract to add, erase data and write logs accordingly. Below is my smart contract: #include <eosio/eosio.hpp> #include <eosio/print.hpp> #include <eosio/system....
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....
1
vote
1answer
84 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
148 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 ...
1
vote
1answer
128 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
52 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 ...
2
votes
1answer
122 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 ...
1
vote
1answer
43 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
16 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
94 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
21 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
0answers
14 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 ...
0
votes
2answers
76 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
2answers
2k 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
26 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
519 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
17 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 ...
0
votes
2answers
46 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 : ...
2
votes
2answers
52 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: ...
1
vote
0answers
25 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
36 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 ...
0
votes
1answer
19 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
123 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 ...
0
votes
1answer
44 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
26 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
49 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
19 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
16 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, ...