Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

-4
votes
0answers
8 views

EOS.IO will implement the most complicated hard fork upgrade in history

What does the popularity of hard forks mean? Author: Cyborg of EOSForce Foreword EOS.IO development team Block.one released the EOSIO version of 1.8.0-rc2 on May 15, 2019. It is the most important ...
0
votes
1answer
16 views

EOS Block Producer Claim Reward

I have followed Bios boot sequence tutorial from eosio and setup a private eos blockchain. The problem is the block producers i have created , when i tried to claim reward it shows "cannot claim ...
0
votes
0answers
6 views

EOS token payment gateway

I was trying to create an API which integrates with nodeos on my server, rpc calls can be made by the web api for the purpose of a payment gateway for eos . My question is how to integrate an API with ...
0
votes
1answer
23 views

What does FC_REFLECT do?

In most of the system contracts of EOSIO, I found FC_REFLECT function repeatedly used. What does this function actually do? I wonder if any of you can tell the answer for this. Thanks in advance.
1
vote
1answer
19 views

What exactly the merkle function is returning?

In the below file, https://github.com/EOSIO/eos/blob/v1.7.4/libraries/chain/merkle.cpp, what do ids.front() mean?; what exactly this function Merkle is returning? Could you please explain what this ...
-2
votes
0answers
7 views

What does pack, unpack, to_variant, from_variant functions do in EOS implementation code?

I have been trying to understand the EOS implementation code of the latest version therein https://github.com/EOSIO/eos/tree/v1.7.4/ I am always struck when I see functions like pack, unpack, ...
2
votes
1answer
36 views

What is the meaning of “scope” in a Smart Contract?

Since I have read the tutorial. I don't understanding the following: Note that scopes are used to logically separate tables within a multi-index (see the eosio.token contract multi-index for an ...
0
votes
1answer
30 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 ...
0
votes
0answers
16 views

EOS Multi-Host(multiple instances on aws) Multi-Node Private Blockchain Setup

How can i setup multi-node eos private blockchain on multiple aws instances being the nodes(voters,delegates) of the private blockchain.I followed the https://developers.eos.io/eosio-nodeos/docs/bios-...
2
votes
0answers
25 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 ...
0
votes
1answer
60 views

Why is [[eosio::on_notify(“eosio.token::transfer”)]] not working?

Network: kylin testnet. I transferred eos to this contract, but it the "deposit" function was not called. What do I miss?
0
votes
0answers
20 views

how can I get sorted table rows by using getTableRows()?

my contract: user.hpp: struct [[eosio::table]] user{//[[eosio::table]] // uint64_t id; // string username; // uint64_t id; //rank ...
0
votes
0answers
18 views

How to validate public key in eos using java?

As there are function in eosjs-ecc library to validate keys in JavaScript: const ecc = require('eosjs-ecc') const pubkey = 'EOSXXXXXXXXXXXXXXXXXXXXXX' const wif = '5HXXXXXXXXXXXXXXXXXXXXXXXX' ...
0
votes
0answers
21 views

Error while pushing a transaction using python?

after successfully signed the transaction, when i try to push it using the pyton api from the eos developers portal, i got the following error {'code': 500, 'message': 'Internal Service Error', '...
0
votes
0answers
39 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
44 views

How to unlock my wallet using nodejs?

The code given below is my nodejs code forunlocking my wallet name "seek".I got this API from eos developers portal,but don't know how to pass input data(wallet name and password) into it.Please help ...
2
votes
0answers
27 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
0answers
25 views

error while compiling code in eosstudio?

Recentlty, i tried a eosio IDE named eosstudio,which is pretty impresive.The problem i face while compiling my code is given in the picture.then I got an advice from a telegram channel that,chenge the ...
1
vote
2answers
82 views

Is there any IDE for eos smart contract?

Is there any IDE for compiling eos smart contract? for example ethereum have remix to compile and run solidity based smart contract.
0
votes
1answer
52 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){...
0
votes
1answer
23 views

Any python api for getting account name by inputting public key?

Is there any python api for getting account name by inputting public key? I have got this code from developers portal, but I don't know how to use it. import requests url = "http://host/:port/v1/...
0
votes
1answer
21 views

Is there a library for encryption/decryption in EOS? [duplicate]

I want to perform some encryption on a given message, so I am wondering if there is a library that I can use in EOS? And I have checked the post Cryptographic Operations in Smart Contracts?, but the ...
0
votes
0answers
30 views

Regex validation on smart contracts

Is is possible to use regex validation in a smart contract?
0
votes
0answers
7 views

Some brew formula sample to build the eosio source code then output the bottle file?

I forked the EOSIO source code from GitHub, My arch is MacOs Mojave then I want to build it on my local machine meanwhile output the bottle file locally, would anyone else give me some formula sample ...
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?
0
votes
0answers
55 views

/eosio.cdt/bin/wasm-ld: error: ios.obj: undefined symbol: std::uncaught_exception() while using eosio-cpp

WHAT I AM USING CDT: eosio.cdt-1.4.1 WHAT I AM DOING I am getting this error while trying to compile a contract: /usr/local/eosio.cdt/bin/wasm-ld: error: ios.obj: undefined symbol: std::...
1
vote
1answer
15 views

Is it possible that contract can pay the cpu/net for its users in the future?

Is it possible that contract can pay the cpu/net for its users in the future? It will greatly reduce the gap between users and eos I think.
1
vote
0answers
27 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 ( ...
2
votes
1answer
66 views

How to have real-time communication in dapp?

How would a real-time 1v1 game work on the EOS Blockchain? I've noticed that many of the games/gambling dapps on EOS are mostly player vs. blockchain, like EOSBet. Could I have real-time updates to ...
3
votes
1answer
39 views

What “[[eosio::contract(”somecontract“)]]” means in eos code?

For example, in the contract "eosio.token.hpp", in the line 20: class [[eosio::contract("eosio.token")]] token : public contract { Is that a special grammar defined in eos.io? What does it mean? ...
0
votes
1answer
50 views

Passing the action name having return type to EOSIO_DISPATCH in EOSIO smart contract

I have following EOSIO smart contract: #include <eosiolib/eosio.hpp> #include <eosiolib/print.hpp> using namespace eosio; class random : public contract { public: using contract::...
3
votes
2answers
190 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
0answers
59 views

Getting “code”:404,“message”:“Not Found” error while creating a wallet address in node js

Here is my node.js code as described here var request = require("request"); var options = { method: 'POST', url: 'http://127.0.0.1:8888/v1/wallet/create', headers: { 'content-type': 'application/...
0
votes
1answer
63 views

Does permission_level (_self) means that only contract can use this method?

If yes, then how do I make sure that anyone or any specified address can call a method? If not then what is the usage of permission_level (_self ...)? action{ permission_level{_self, "active"_n}...
1
vote
1answer
147 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 ...
1
vote
1answer
63 views

Max inline action depth per transaction reached on simple EOS transfer action call?

I am seeing the error Error 3040000: Transaction exception Ensure that your transaction satisfy the contract's constraint! Error Details: max inline action depth per transaction reached after a ...
2
votes
1answer
107 views

Fixing a smart contract written in old version of eosio.cdt

I am using Ubuntu 18.04 LTS first of all. So I am trying to look up how to start building an EOS dApp, starting with this example on Github. Here is the link: https://github.com/eosasia/eos-todo I ...
1
vote
3answers
131 views

Cannot read string data from table row. But when I put “” data, it works

//@abi action void testhand() { gamecurrents gamecurrenttable(_self, _self); auto existing = gamecurrenttable.find( _self ); if(existing == gamecurrenttable.end()) { ...
0
votes
2answers
114 views

I have got “cannot modify objects in table of another contract” when trying to modify a table in my transfer function

I saw some contract implement a handler which will be triggered when receiving EOS token via eosio.token::transfer. I tried to have the same transfer handler and change some row of my table. But I ...
1
vote
2answers
67 views

How refund if I undelegate cpu with serveral times?

If delegate some cpu form accountnum11 to accountnum12, then I want to undelegate with the below command: cleos system undelegatebw accountnum11 accountnum12 '0.0000 EOS' '10.0000 EOS'. In normal ...
1
vote
3answers
46 views

What is different between 'build eosio from source' and 'using pre-build binary'

setting eos with pre-build binary is super fast with less errors. What is good thing with building from source?
1
vote
2answers
98 views

Error for below code of scatter!

I am trying to call contract by scatter but i met with below error Error is Cannot read property 'find' of undefined Any other way to call contract and suggestions appretiated! function gets() { ...
2
votes
1answer
56 views

Not able to find account on jungle test net 2.0

Jungle test has been update to jungle 2.0, I have some accounts on previous version . My question is Do I have to create all accounts again because API endpoints are changed a bit? Anybody have any ...
0
votes
2answers
137 views

Unable to resolve contract folder on ubuntu 18.04

My test contract cpp file is in /home/boby/hackathon/contracts/test/ folder, when I run cleos set contract bob /home/boby/hackathon/contracts/test/ -p bob@active I get an error unable ...
1
vote
0answers
21 views

How to deploy my samrt contract on testnet in EOS [duplicate]

I have successfully pushed the transaction and deployed the smart contract on private net, I want to know How to deploy it on testnet. I have created the account on Jungle testnet.. Kindly tell me ...
2
votes
1answer
86 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 ...
1
vote
2answers
47 views

How can I create an EOS block producer?

I am entering into EOS development and seek advice from experts on how to produce EOS blocks and what are the rewards? Also, will a regular development device be sufficient to build such a producer?
1
vote
1answer
107 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
90 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
2answers
93 views

Can I use uint256_t in EOS smart contracts?

I want to use uint256_t in my EOS smart contract but I am getting following error unknown type name 'uint256_t'; did you mean 'uint16_t'? I thought EOS supports uint256_t as I read it in some EOS ...