Stack Exchange Network

Stack Exchange network consists of 174 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.

0
votes
1answer
8 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
21 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
31 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
19 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 ...
0
votes
0answers
19 views

Unlocking wallet with file inside bash script

I'm running a forked EOS blockchain. During my eosio_install.sh I create the default wallet and store it into a temp .ini file: cleos wallet create --file walletkey.ini -n default During a launcher ...
0
votes
1answer
21 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 ...
0
votes
1answer
24 views

can a deferred transaction makes the initial transaction fail

Imagine a user sent me some eosio.token to my contract when i receive the notification, i start a new deferred transaction that can fails later. So my question is can that deferred transaction makes ...
0
votes
0answers
17 views

what is hex_data under actions

when retrieving blockdata from nodejs - lets say eos.getblock(36460275) I get something like this for actions: { account: 'bingobetgame', name: 'procaction', authorization: [Array], ...
2
votes
1answer
67 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
65 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
53 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
32 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
31 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
52 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
34 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
89 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
51 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
39 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
48 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
60 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
1answer
50 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 ...
1
vote
1answer
27 views

How do I get my transaction Id to sign the transaction?

While signing the transaction there are 3 parameters that we need to pass, 1) txn 2) keys 3) id How Can I get my id and also what should be the structure of the transaction parameter, Kindly help
1
vote
0answers
17 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
39 views

Transaction exception while pushing transaction

While calling the push transaction API with the following body { "signatures": ["SIG_K1_K5umBpyieHE6czvtDMEAVjypG5Zz5sYo4NKbUkqJfe562mX22aLGwwZsYSQJLhBZi5s3hvjg6zVfS3ZucM97Ji5KNXSm4a"], ...
1
vote
1answer
49 views

In the eosio.token contract, why are the structs private?

In my contract, I'd like to be able to check how much EOS an account has. For that, I'd write some C++ code like this: token::accounts the_table("eosio.token"_n, "useraccount1"_n.value); auto it = ...
2
votes
1answer
73 views

No able to sign the transaction

I have followed the documentation and followed the mentioned steps, However I am not able to sign the transaction, I guess that's because I don't know on which port Keosd is running, also kindly send ...
2
votes
1answer
36 views

About Updation of contract

I have 2 questions about updation of contract and multi-indexed tables? 1)Can i update contract as if i want to change ram payer for multi indexed tables can i change it after deploying contract ? ...
1
vote
1answer
49 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; ...
2
votes
1answer
136 views

How can multisig trigger an action in contract other than eosio.token contract?

Other than eosio.token contract how can we call the inline actions in contract from multisig contract. For example, I have a contracts namely mltisigmetup(with action meetup). Now I need a ...
5
votes
1answer
78 views

eosio multisig exec problem

For multisig transaction, 1. Firstly I have created two accounts(partner1 and partner2) with same key(EOS....HoCF) cleos create account eosio partner1 EOS8FE********HoCF cleos create account ...
0
votes
0answers
30 views

Why should target_block_cpu_usage_pct be less than 10000?

I noticed that eosriobrazil's proposal to upgrade target_block_cpu_usage_pct from 10% to 20% has been implemented on EOS mainnet. My understanding is that this parameter sets a threshold after which ...
3
votes
1answer
97 views

Why smart contract function fails with “Error 3090004: Missing required authority”?

WHAT I WANT From the contract mycontract I want to call a function function1. The function function1 calls another function of mycontract called function2. The function function2 calls an action of ...
1
vote
0answers
28 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 ...
3
votes
2answers
75 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 ...
3
votes
1answer
180 views

Whats the use of EOSLIB_SERIALIZE?

I understand that it is used for serialization and deserialization of a struct but why does anybody want to serialize/deserialize the struct? What's the use case?
1
vote
1answer
30 views

Can EOS assure privacy?

In ethereum (public network), the data is all open access. Functions can be controlled via function modifiers. But anyone can view data stored in the contract. Is this the same in EOS? Once data is ...
3
votes
1answer
207 views

Error 3160009: No wast file found

The hello world contract is not getting compiled in the EOS v1.3 and eosio.cdt. The wasm and abi file is getting created but goes undetected. https://github.com/EOSIO/eos/issues/5349
0
votes
1answer
97 views

Contract Table Query Exception

As i was following eosio developers documentation #include <eosiolib/eosio.hpp> #include <eosiolib/print.hpp> using namespace eosio; using namespace std; class addressbook : public ...
1
vote
0answers
69 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
2answers
21 views

Who are the founders of EOS and are any of them anonymous like satoshi?

Was EOS created by 1 person or a team of people and are they all public?
2
votes
1answer
116 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
31 views

Low-Latency Block Production

It is possible to spawn your network by forking EOS source code and running the appropriate contracts. By extension, it is possible to set specific blockchain configuration in such scenario. For ...
4
votes
3answers
52 views

What would happen when a block producer fails to produce its blocks when it's his turn?

How would the next scheduled BP handle this mess?
1
vote
0answers
83 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 ...
0
votes
0answers
21 views

Remove ram functions from system contract?

I want to remove whole ram functionality from the default eosio.system contract. I want to set up a private network without trading ram How can I do that??
0
votes
0answers
37 views

How blockproducers validate transaction?

How blockproducers authenticate or validate transaction ? Which algorithm used to do that ?(other than dpos) i know that there is synchronization for transaction(for blockproducer's side) but what ...
3
votes
2answers
100 views

Meaning of N() function in multi_index

What is the role of N() in defining tables using multi_index. The primary key function does not return string. Why so? e.g. string primary_key() const {return Some_String_Object}. This throws an error....
0
votes
1answer
73 views

RAM Usage Exceeded Error - EOS transaction

I received this error since I had multiple transfers to other accounts, is there a workaround for this so that I can continue sending tokens out? "code":500,"message":"Internal Service Error","...
9
votes
1answer
281 views

Compile Rust to WebAssembly for EOS Smart Contract?

So I'm familiar with the fact that the supported language for EOS smart contracts is C++. However, the EOS docs mention that even the C++ needs to compile down to WebAssembly. So my question is, ...