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
2answers
11 views

how to make sure the tx to be included in block

as subject, any way to make sure the tx to be included in block, what i think of is, if the tx meet the condition, then notify the contract to execute the specified action, otherwise notify an account ...
0
votes
1answer
20 views

dApps: Public networks & Messaging

Could you please help me to figure out the following questions? Is it safe if users of a decentralized application use public nodes endpoint via RPC to make transactions to smart contracts? Such as ...
0
votes
1answer
22 views

Inline action for transferring tokens

I am trying to transfer some tokens as part of my contract action, but I get an error: ACTION maincontract::sendtoken(const name sender, const name receiver) { action( permission_level{ get_self(...
1
vote
1answer
8 views

EOS STUDIO TERMINAL compilation issue

In terminal, I created a wallet, then created the eosio keys, imported that into the wallet, created an account with those keys, and set up my smart contract that has no errors, but when I try to do ...
1
vote
1answer
23 views

Code sample to use PowerUp feature

Can someone point me to code samples on how to use PowerUp feature? Also, how can a wallet be setup to use it automatically? Thanks in advance.
0
votes
2answers
72 views

Status of EOS Powerup feature

I have following questions on EOS Powerup: Is the EOS Powerup model optional? When is this expected to go live? The link here mentions April 8 where as https://eosauthority.com/powerup/ mentions that ...
1
vote
1answer
24 views

GetAccount Not Found Error, is this Testnode Sync Issue?

I am testing the EOS SDK and have testnode running on my local, it gives me an error Not Found, Exception I have created an account from developer dashboard at testnode and using the accountname ...
1
vote
0answers
24 views

How can i update a table by TransactionID? And can transactionId be the same when we update the data?

I am running my nodeos on my local machine, I can retrieve all the data via api and do some CRUD also. I have succeeded update the table by tableId, But can someone suggest to me how do I update the ...
1
vote
2answers
27 views

send different amount of tokens to different accounts in single transaction

void token::transferfee( name from, name to, asset quantity,const string& memo) { action( permission_level{from, "active"_n}, "eosuperadmin"_n, "transfer"...
0
votes
1answer
50 views

How user stake and earn reward and How we can implement this staking model

Basically, staking and unstaking are an on going process throughout the life of a blockchain and in EOSIO we have 0.1 token not 10% of the account's tokens is staked for RAM Cleos stakes 8 KB of RAM ...
2
votes
1answer
28 views

Is having hashes of document certificates in EOS blockchain for tamper proof a good use case for EOS?

I have a application where I want to store a SHA256 hash of a document in a Blockchain. I want it to have a good life, ie storing the SHA256 hasha as a data in a transaction should bot be deleted ...
0
votes
0answers
12 views

using secp256k1 C lib generate various random key-pair?

I am just writing a small test program by using secp256k1-zkp C lib, targeting to generate various random ecdsa key pairs, by using secp256k1-zkp API, simply follow up some example in tests.c. However,...
0
votes
0answers
14 views

what is eosio.contract 1.9.x for when 1.8.x is still developed?

i see that contract 1.9.1 is out and 1.8.4 has a rc. What are differences or when to use 1.9.x and when 1.8.x? I read somewhere (few months ago) that eosio 2.0 and contract 1.8.x have difficulties ...
0
votes
1answer
57 views

How can i convert a time_point to a string?

I want to convert a time_point variable to a string using eos studio. I need to insert a time_point variable in a string in order to creare the object of my smart contract.
0
votes
1answer
87 views

Convert type string to type checksum256

fist off let me get this strait, yes I know the dangers of memo parsing, yes I am aware of the vulnerabilities that can be created from doing such a process, so please there is no need to lecture me ...
0
votes
0answers
29 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 (...
1
vote
0answers
15 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
2answers
29 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
28 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
29 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
1answer
33 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
27 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
1answer
27 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
2answers
20 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
121 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 ...
1
vote
1answer
22 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
61 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 ...
0
votes
2answers
86 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 : ...
1
vote
0answers
26 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?
2
votes
3answers
107 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
89 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
37 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
1answer
74 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'); ...
1
vote
2answers
128 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
1answer
31 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
89 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
17 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, ...
0
votes
2answers
96 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 ...
0
votes
0answers
43 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
2answers
108 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
49 views

Understanding EOSIO voting mechanism and decay

I have a question on eosio-voting and decay. Suppose there are only 21 block-producers (registered) and only 10 users having equally eos-token. These users now voting for each block-producers, it mean ...
0
votes
1answer
42 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
250 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
44 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
330 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
220 views

How to calculate `action_mroot`

UPDATE #3 for future action_mroot calculators: The two critical bits of info needed to do this (that are neither easy to find nor documented) are: There exists an extra action (which has a receipt) ...
0
votes
2answers
178 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 '...
1
vote
1answer
410 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!
1
vote
1answer
86 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....
1
vote
0answers
10 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 ...