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
1answer
13 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] => ...
0
votes
1answer
47 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
23 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
26 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/...
4
votes
2answers
117 views

How to calculate `action_mroot`

UPDATE #2: So per @conr2d's comment on his answer & @riccardo's elaboration, it turns out that the action_digest in the merkle function in the EOS code base is not using the action_digest within ...
0
votes
0answers
17 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
14 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
2answers
24 views

how do i use current_time_point() to store date in eos table

I have tried This way and its not getting store,infact its giving me error,please sugguest if im making any mistake. error: use of undeclared identifier 'current_time_point'; did you mean '...
0
votes
0answers
10 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); ...
1
vote
1answer
166 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
0answers
19 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?
1
vote
1answer
24 views

Wondering how to fix eosio.token transfer error in contract

I am developing an EOS dapp game When the user acts on the contract after Scatter authentication, the logic is to deposit the bet amount from the user to the contract account. But I get an eosio....
0
votes
0answers
17 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 ...
1
vote
0answers
6 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
29 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
6 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
40 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
61 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
25 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
26 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
27 views

EOS error while pushing transaction

I received an error while pushing a transaction onto the jungle test net
0
votes
0answers
26 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
48 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
220 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
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 ...
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
34 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
44 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
43 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
37 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
74 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
24 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
2answers
583 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
82 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
86 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
11 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
47 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
39 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
57 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
35 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
67 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
73 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
189 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
47 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
47 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
42 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', '...