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

Unanswered Questions

256 questions with no upvoted or accepted answers
5
votes
1answer
38 views

Where should tables be created? In the contract or in each action?

In the simple blog dapp (https://github.com/EOSIO/eosio-project-demux-example) the table (for posts) was defined in the contract but is not instantiated as a field. What are the advantages/...
4
votes
0answers
43 views

Using “native” wat/wasm function in smart-contract

I have to do some heavy computation in my smart-contract, like say a+b. Fortunately, I have written some very efficient implementation in "native" (web)assembly, like: File add.wast: (module (func ...
4
votes
1answer
46 views

Is it possible to see a smart contract code hash from within a smart contract?

I would like to check the code hash of an account from within my smart contract. Is this possible?
4
votes
1answer
73 views

How to make transaction atomic in EOS?

As we known, if a transaction fails, the results of all actions in the transaction must be rolled back. For example, account user1 (only has 80 EOS) submit a transaction that do following tasks: ...
4
votes
2answers
109 views

Custom struct abi serialization

I am trying to understand, how the string "100000000.000 SYS" is serialized into struct asset from eosio.token example ( cleos push action eosio.token create '[ "eosio", "1000000000.0000 SYS", 0, 0, 0]...
3
votes
1answer
46 views

EOS in eosio.ram Account

Can someone tell me the difference between the four numbers below? eos_node_maurice1@eos-node-maurice1:~$ cleos get currency balance eosio.token eosio.ram EOS **2289406.8264 EOS** eos_node_maurice1@...
3
votes
3answers
84 views

How to add “time lock” to the EOS tokens

I have issued some tokens base on eosio.token in jungle testnet, and I am able to transfer the tokens between accounts. Now if I want to enforce some control to the tokens sent ( for example, time ...
3
votes
1answer
65 views

Why do failed transactions not consume CPU?

In other blockchains, even if your transaction fails, you are still taxed gas or other scarce resource in order to compensate nodes for processing your transaction and defend against spam. On the ...
3
votes
0answers
68 views

How to tell if a transaction was initiated by account or contract code

My goal is to get a list of account names of human users of a dApp, from the output of cleos get actions <dApp account name> -j Is there any way to determine, from a transaction's initial ...
3
votes
1answer
80 views

Where is my RAM currently allocated to?

Is there a way I can check where my RAM is currently allocated to / being used for? And how can I re-use it for other things?
3
votes
0answers
68 views

How to add a unit test for a new contract

I am currently on eosio v1.1 but will be upgrading to v1.2 shortly. I am trying to create a new unit test for my contract. The existing unittest work when I run the following cd eos/build/unittest ...
3
votes
1answer
113 views

eosio.contract cannot compile with error code 1 of eosio.wasmsdk by Clion

We are compile the eosio.contract v1.2.0 using Clion by following that: Dependencies: eosio v1.1.2 eosio.wasmsdk v1.1.0 Cannot get compiler information: Compiler exited with error code 1: /usr/...
3
votes
0answers
30 views

How many peers should I connect for a node?

How many peers should we connect for a single node? If we connect to many node, will the network be very high and decrease the sync speed? Or if we only need to connect to 2-3 nodes which may lose ...
3
votes
0answers
37 views

EOSJS how to query the top voters

I can get some unsorted voters by using await eos.getTableRows({ json: true, code: 'eosio', scope: 'eosio', table: 'voters', // tableKey, // lowerBound, // upperBound, ...
3
votes
1answer
261 views

How to set up chain of permission levels for a user?

This is a great answer that describes the ways you can handle user permission levels for inline actions. According to that answer: This can be done a few ways (ordered from most risky for the user ...

15 30 50 per page