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.

61 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
1answer
194 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 ...
3
votes
4answers
190 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
0answers
106 views

EOS mainnet replay speed too slow after about 20M blocks

while replay the node sync speed was fast in start but after about syncing 20M blocks the speed is very very slow. mongoDb and history plugins are enabled. nodeos is not utilizing above 1500 iops ...
2
votes
1answer
112 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 ...
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?
1
vote
1answer
15 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 ...
1
vote
1answer
41 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
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
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 ...
1
vote
0answers
7 views

what is the native?

eos/chain/apply_context.cpp 66 line i had been found the something where account_name newly was created like eosio.token, eosio.rex.... So, i found some hint controller.cpp // 321 Line #define ...
1
vote
0answers
26 views

How can EOSIO know the block number?

I have made my EOS world. If you follow the Nodeos biosboot manual (https://developers.eos.io/eosio-nodeos/docs/bios-boot-sequence), you would know eosio is to be BP. BP have to make a lot of blocks. ...
1
vote
1answer
43 views

EOS error while pushing transaction

I received an error while pushing a transaction onto the jungle test net
1
vote
1answer
80 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
2answers
167 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
8 views

How to build a macos homebrew bottle like eos at local machine?

Can anyone tell me that how can I use Homebrew in MacOS to compile the forked eosio tar file from GitHub to brew bottle package at local machine? Can give me the sample formula?
1
vote
0answers
29 views

cannot get latest state of table after modifying table in inline action

As shown with code below, I modify table in an inline action, and then want to get the latest data. But the data I get is not the latest. Why? void mycontract::myfunc() { action ( ...
1
vote
1answer
207 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
1answer
144 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
0answers
30 views

Is there a json schema file for eos that defines accounts, keys, transactions, blocks, etc

Is there a json schema file or data-model for eos that defines accounts, keys, transactions, blocks, etc...
1
vote
0answers
67 views

Transaction exception while pushing transaction

While calling the push transaction API with the following body { "signatures": ["SIG_K1_K5umBpyieHE6czvtDMEAVjypG5Zz5sYo4NKbUkqJfe562mX22aLGwwZsYSQJLhBZi5s3hvjg6zVfS3ZucM97Ji5KNXSm4a"], ...
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; ...
1
vote
0answers
36 views

Why EOSIO going to discard eosiocpp tool?

EOSIO introduced new eosio.cdt tool for contract development and there is many changes related to typedefs in this tool. Is eosio.cdt official by eos ? asking this because they have not mentioned ...
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-...
1
vote
0answers
165 views

Storing encrypted data on EOS blockchain

The following qa suggests that private data on the blockchain can be stored in an encrypted form: Can we add the permission to access the table? My question is whether there are any existing ...
1
vote
0answers
303 views

How to correctly use Docker to run eosio (including eosiocpp)?

I can get the basic quickstart working very easily but when I try to add smart contract I get a lot of conflicts. I have read an article here claiming - https://medium.com/@ekkis/eos-development-on-...
1
vote
0answers
26 views

Compiling eos software to get dlls

How can I compile EOS software on Linux or Windows to get dynamically linked libraries (DLLs) that I need in order to create an EOS wrapper to compile and deploy smart contracts from other programming ...
0
votes
0answers
2 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 ...
0
votes
0answers
8 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 ...
0
votes
0answers
14 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
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
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
1answer
36 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
0answers
20 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....
0
votes
0answers
16 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
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
59 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
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
31 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 ...
0
votes
1answer
52 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 ...
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
0answers
33 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(...
0
votes
0answers
19 views

EOS deferred transaction Error while running

I'm doing this but i'm getting an error, what should i improve? void mainloan::checkdaily(uint64_t loan_id) { auto itr = loan_table.find(loan_id); auto borrower = itr->borr_name; eosio::...
0
votes
0answers
17 views

Missing permission of account, but permission is given to acting account

I have account1 and account2. account1 has a contract with an action called update(): void mycontract::update(){ require_auth(get_self()); table_t t(get_self(),scope); auto r = t.find(index); ...
0
votes
0answers
21 views

Eosio 1.8 is released and live, but are the features activated as of today 2019 Oct 7?

I read that the eosio 1.8 is live, but much of the new features are not activated. Where can we see what 1.8 features are activated or pending activation?
0
votes
0answers
24 views

Resources for EOS Smart Contract Source Code

What are some educational EOS Smart Contract Examples like Elemental Battles? The best way to learn coding smart contracts and using EOS blockchain is to get some really good example references of ...
0
votes
1answer
44 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
0answers
26 views

eosjs sign data does not match with eosio assert_recover_key data

at client, I create a signature from seed like this. the key pair is [ '5KgLbwEy7d4qufeLqPnPL1YQU1tscJXCnpqTTn7REaZsjYBjDWr', 'EOS5Mk748B6ojrZdTHP8BoLBXyKjQzzthaqGa4v97vfiGEfbEM2Np'] import ...
0
votes
0answers
39 views

how can i convert fc::sha256 to hex?

I wanted to see a Transaction ID. And The type is fc::sha256. So I inserted some code : std::cout << "The transaction ID : " << trx->get_transaction().id() << std::endl; But ...
0
votes
0answers
53 views

How to solve the error - action's authorizing actor 'bob' does not exist

string data = "{\n" " \"compression\" : \"none\",\n" " \"transaction\" : {\n" " \"actions\" : [ {\n" " \"account\" : \"eosio\",\n" ...
0
votes
0answers
16 views

Private MultiNode Testnet: Undefined Reference to secp256k1_rangeproof_info Error

I run into issues while building eosio.contracts repo. The link stage of eosio.contracts fails with errors similar to ”undefined reference to secp256k1_rangeproof_info". I have eos v1.8.1, eosio.cdt ...