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
10 views

I wants to know about same_payer in EOS

I am new to EOS and term same_payer is confusing me, can anyone explain to me what is it signify in the below line? statstable.modify( st, same_payer, [&]( auto& s ) { s.supply += ...
1
vote
0answers
5 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 ...
0
votes
1answer
27 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
2 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
1answer
27 views

Deferred transaction on EOS [duplicate]

Is it 100% sure that deferred transaction will run on what delay is defined? Is there any possibility that deferred transaction failed to run on defined day? If it fails what is the alternative? ...
0
votes
1answer
42 views

Can we store date on eosio table?

Is there any direct datatype in eosio to store date? and if not then how can we store dates in eosio table? void mainloan::paymentConfirm(uint64_t pay_id,uint64_t pay_date,double pay_amunt,name from ...
1
vote
0answers
24 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. ...
0
votes
0answers
8 views

what is maxium tps eos.io can gives in private setup / fork [duplicate]

I am Setting up EOS private Multi-Host Network, was wondering what is maximum TPS eos.io can give in private setup/fork.
0
votes
1answer
15 views

EOS Application Specific Chains

With the cost of RAM for provisioning users with accounts and storing data, the main chain feels expensive. As a solution I'd like to explore the setting up of application specific chains which start ...
0
votes
0answers
20 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 ...
1
vote
1answer
25 views

EOS error while pushing transaction

I received an error while pushing a transaction onto the jungle test net
0
votes
0answers
25 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" ...
1
vote
1answer
40 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 ...
0
votes
2answers
117 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
0answers
13 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 ...
0
votes
0answers
22 views

How efficient is the EOSIO software for distributed locking, relative to other database software?

I am researching the best software for distributed locking purposes, and came across this article: https://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html I think the Redlock ...
0
votes
1answer
32 views

Create test account using EOSIO

I am new with EOSIO. I have created account using cleos command. cleos create account eosio bob YOUR_PUBLIC_KEY cleos create account eosio alice YOUR_PUBLIC_KEY It's successfully created. But, I ...
0
votes
1answer
40 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","...
1
vote
1answer
32 views

How to add a key in an EOS contract table

Below I have created a table, the full_name, birth_year, nationality and ipfs_hash are all not unique values. Do I need one of them to be unique? Much like a database can I ask for a field to "auto ...
1
vote
1answer
33 views

RPC Wallet integration API throwing an error

I am new with blockchain services. I have created wallet using command line. curl -X POST http://127.0.0.1:8888/v1/wallet/create -d '"WalletTest" It's created successfully. But, I'm trying to ...
0
votes
0answers
73 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 ...
0
votes
0answers
14 views

Where is the code for validating incoming blocks in the EOS repo?

I am trying to get the exhaustive list of validation checks a node performs when it hears about a new block. I am wading through the code to get this list. I assume that other nodes validate the ...
1
vote
1answer
13 views

Should a contracts class be labelled `public contract` or `public eosio::contract`

In the Address Book example I notice the contract structure is #include <eosio/eosio.hpp> using namespace eosio; class [[eosio::contract("addressbook")]] addressbook : public eosio::contract {...
0
votes
0answers
20 views

Before install EOSIO, Why install the Graphviz?

To my knowledge, Graphviz shows the code graph tool. But I haven't found the code graph in 'eos' directory. So I want to know the reason. And How can I use the graphviz in EOSIO?
0
votes
1answer
217 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 ...
1
vote
2answers
60 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
1answer
63 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
9 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
36 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
33 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
1answer
53 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
33 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
51 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
65 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
137 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
43 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
37 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
33 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
1answer
75 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
64 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
1answer
45 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
29 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
108 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
55 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
27 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
33 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
39 views

Regex validation on smart contracts

Is is possible to use regex validation in a smart contract?
0
votes
0answers
8 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
79 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::...