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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

The tag has no usage guidance.

2
votes
1answer
31 views

Is “Smart Contract” supported by EOS ? Which Language?

What is the equivalent platform of Ethereum Smart Contract in EOS ? And by which programming languages we can develop a smart contract? Is there a specific language like Solidity in Ethereum? And is ...
5
votes
1answer
37 views

How does eosio support complex structure as the input of a contract's method?

AFAIK, the data type in Wasm only supports i32,i64,f32,f64, but when we use eosio contract, we can pass a string as a parameter. Anyone can tell me how eosio does that?
0
votes
1answer
24 views

recover_key in contract

Is there a specific sample code of using recover_key()? I got an error with recover_key() in contract. string msg="charlie"; checksum256 m_hash; sha256( const_cast<char*>(msg.c_str()), msg....
3
votes
2answers
70 views

What is needed to get the EOS ~1.1.4 tutorials working on Ubuntu 16.04 (having compiled from source)?

I've found lots of info for Dawn 3.0, but there's a note in the 1.1.0 release notes that acknowledges that the EOS Developer Portal tutorials (token, exchange, helloWorld) don't work and need updating,...
1
vote
1answer
26 views

Getting an unknown key error while transfer some EOS form one account to another

I have written an action transfer in my contract which is as below // @abi action void second::transfer( account_name from, account_name to, asset ...
3
votes
1answer
50 views

Passing the parameters in actions vector of transaction struct

In the below code, I am passing parameters to actions struct which takes account_name, action_name, permission vector and arguments. But while sending the account_name using N it is taking the exact ...
0
votes
1answer
37 views

how can i know if a name is account or contract?

How can i use cleos to get all rows from a table? It seems that cleos always only return 10 records? { "rows": [{ "buyer": "1111111111oo", "keys": 70, "award": 198185, "share_award": 0, "...
1
vote
0answers
36 views

How to use recover function in crypto.hpp to verify signature and public key

I want to sign some data in client using eosjs-ecc.sign() and result is a string like "SIG_K1_KcTmv..." I want to use the recover_key(const checksum256* digest, const char* sig, size_t siglen, char*...
1
vote
1answer
52 views

Why is action 'eosio::setcode' on the action blacklist in the mainnet?

Error 3130005: Action to execute is on the blacklist Error Details: action 'eosio::setcode' is on the action blacklist pending console output: in mainnet Why is this?
0
votes
2answers
38 views

print in contract not showing output in eosjs docker

i want to print some logs in eosjs docker version. But somehow it is not showing anything. I have set: # print contract's output to console (eosio::chain_plugin) contracts-console = true in the ...
0
votes
0answers
6 views

How to change cmake makefiles to use c source in contract

How can I use c code in my contract? Mainly how to change the cmake make file system to include a c file for my contract.
1
vote
1answer
48 views

Multi index can access data in contract but (RPC) cleos get table is empty

Here is the code I deployed it with the following command: cleos set contract . demo.wast demo.abi -p demo and query it with: cleos get table demo demo demos
0
votes
1answer
63 views

How should I get the data of the multi_index database?(about contract)

The return value of the action function can only be void type. I can't get data by return value. Now I have saved multiple objects in the multi_index database. I want to get them at once, what should ...
1
vote
2answers
55 views

The given contract doesnt' exist in the blockchain

I have got contract code below: #include <eosiolib/eosio.hpp> #include <eosiolib/print.hpp> using namespace std; using namespace eosio; class deneme: contract { // @abi table ...
1
vote
1answer
38 views

Error 3010008: No ABI found

I was able to push the contract to the jungle test net but i am unable to run the contract. i get this error: Error 3010008: No ABI found what am i doing wrong? thanks.
0
votes
1answer
36 views

How to get current price of a custom contract token via cleos

I want to know the current price of the CET token via cleos. I can get the supply details using cleos: $ cleos get currency stats eosiochaince CET { "CET": { "supply": "900100052.0000 CET", ...
0
votes
1answer
34 views

How to retrieve historical EOS supply?

I know $ cleos get currency stats eosio.token EOS reports the current supply in the blockchain, but how can I get the supply through time?
2
votes
2answers
164 views

How to send an action from one contract to another?

From contract A, I want to send an action to contract B. How to do that? There is SEND_INLINE_ACTION but that seems to need a pointer to the contract (usually *this), correct? Solution Using action....
0
votes
1answer
63 views

How to access multi-index from other contract?

Contract A created a multi-index table pets like pets(_self, _self); ... pets.emplace(user1,...); Now in contract B, I would like to update a row like pets(N(A), N(A)); ... pets.modify(pet, user1, ....
2
votes
1answer
60 views

How do you inherit an eosio contract?

I am trying to inherit the 'eosio.token' contract found in '/eos/contracts/eosio.token/' into my new class 'my.token' My CMakeLists.txt looks like file(GLOB ABI_FILES "*.abi") configure_file("${...
2
votes
1answer
65 views

Has the exchange contract deployed to the eos mainet?

Has the exchange contract deployed to the eos mainet? When will it be available ?
1
vote
1answer
49 views

Error 3070002: Runtime Error Processing WASM - i64.rem_u by 0

My contract deployed fine. However, when I try to call an action I get the following error: Error 3070002: Runtime Error Processing WASM Error Details: i64.rem_u by 0 And the log from the nodeos: ...
0
votes
0answers
45 views

Updating eosio.system contract to latest version

I see that 1.0.7 includes a few changes to the eosio.system contract. I have a multi-node testnet fully installed and running fine. Are there any steps needed to update the content of that eosio....
0
votes
1answer
153 views

How to add a “memo” to an action?

In an action in my contract, I want to attach some text to it, so that users can see the text in their transaction history using a block explore like eosflare.io. I see that eosio.token has a "memo" ...
2
votes
1answer
38 views

Is it safe to assume that a function can't be called directly if it is not defined in the ABI?

I'm writing a function in my contract that is supposed to run only if I receive a transfer notification from "eosio.token". The way I handle eosio.token transfer notification is similar to this (but ...
1
vote
1answer
37 views

Corrupted account name in nodeos log during action pushing

Have an issue with the action push: cleos --wallet-url "http://localhost:8889" push action contractx put '["test", "75c88c9593bec6b716f2cb9b60db79282b6f3389a39f3be9adef45e06b379b48"]' -p test Error ...
0
votes
2answers
73 views

in the system contract, what is required for require_auth(_self)

In the system contract (eosio_system.cpp) there are some functions which require require_auth( _self ); How is this auth level achieved by the 21 producers?
2
votes
2answers
80 views

Can a malicious contract consume users' ram?

Can an evil contract fill users' ram with junk data?
0
votes
1answer
36 views

Can a contract trigger events in the outside world?

Is it possible for a contract to somehow trigger an event which an external process may listen for? Or is polling the only practical way currently to determine an outcome in a contract?
1
vote
0answers
47 views

How to trigger the user account token stake or unstake automatically by using contract

Actually , I have a scenario that users need to stake his or her own certain tokens on a platform by using eosio contract without worrying the platform will take over the users's tokens. and some ...
1
vote
0answers
59 views

cleos set contract error Unexpected char '60' in “”

Two weeks ago I tried to use cleos subcommands and everything worked fine. I could set contract to the accounts I created using my own smart contract code. Now whenever I tried set contract or create ...
2
votes
1answer
279 views

“dice” contract “withdraw” action problem

I wonder if anyone experienced a similar problem and managed to resolve it. I'm testing the "dice" contract on my local tesnet. I've setup up all necessary contracts and could deposit assets to the "...
3
votes
3answers
62 views

How can a contract obtain and process variable data from the outside world?

Suppose I have a contract which depends on the current price of a real-world asset (like the price of gold). How would the contract obtain that price? How would I ensure that every time the contract ...
1
vote
0answers
50 views

EOS system contract is too large to execute in local machine!

When I set the eos system contract with mainnet-v1.0.3, it always give me a error, that the transaction is too long and give me the belong error {"now":"2018-06-14T08:16:44.376", "deadline":"2018-06-...
2
votes
2answers
49 views

How to emit specific messages after action is executed?

In solidity, we can emit many type messages when transaction finished, but in eos, I did't find it. I see the require_receipt api to notify the listeners the action but not the action result. Anyone ...
0
votes
1answer
35 views

where system_contract::claimrewards function is called

Recently I've done some researches in term of how BP earning reward functions implemented. Eventually, I found out that is system_contract::claimrewards however I can't find where it's called. I ...
7
votes
0answers
78 views

How do you properly change/add to the struct that is stored in a table as part of a contract upgrade?

Does this even work? Seems like I've broken my tables doing this but I have changed my contract pretty significantly. I'd imagine that someone may want to add a new "column" (member) to their "...
0
votes
1answer
47 views

Can't use fopen, fclose, and ifstream

Here's a screenshot of the problem. This happened when I use eosiocpp to compile my .cpp file into .wast. Does the compiler not allow file reading?
1
vote
0answers
50 views

Execute get_supply function within contract

I want to execute get_supply from currency.hpp. Here is the definition: asset get_supply( symbol_name symbol )const { accounts t( _contract, symbol ); return t.get(symbol).balance; ...
2
votes
1answer
88 views

ICO/Payment contact

Anyone is working on some ICO/Payment contacts? What I would like to learn are following functionalities within the contract: Payment, where the fee is split into 3 accounts. a) So user sends a fee ...
1
vote
1answer
85 views

set contract error

I tried to set contract with the promotion account, but kept getting this error: cleos set contract promotion car_promotion -p promotion Reading WAST/WASM from car_promotion/car_promotion.wasm... ...
0
votes
1answer
125 views

Ricardian contracts

At what level are Ricardian contracts implemented? Examples I see are in the constitution . Can these be applied at the application level? Eg. A derivation contract with the terms of contract ...
3
votes
1answer
132 views

How can a action be scheduled to execute at specific timestamp or block?

Is it possible to schedule and action defined in a contract to be automatically executed at a specific timestamp or block? I know it's possible to get a timestamp inside of a contract but, I'm not ...
1
vote
1answer
11 views

installed Local Enviroment get “unresolvable”: env.current_time error

as stated in the topic, i installed eosio new because i had a few problems with the older Version with actions in actions and now i get this error everytime i want to create a contract on the chain. ...
0
votes
1answer
105 views

Where is 'INLINE_ACTION_SENDER' macro defined?

I am trying to use INLINE_ACTION_SENDER to use an action from another contract but get the following error. error: use of undeclared identifier 'INLINE_ACTION_SENDER' How do I include this macro in ...
2
votes
1answer
220 views

How to calculate the RAM size of a contract in EOSIO and then i can know how much EOS i need to pay for every contract

How to calculate the RAM size of a contract in EOSIO ? i mean , is there any tool from EOSIO? and this tool could help me to know how much EOS i need to prepare for every contract.
9
votes
2answers
244 views

How to airdrop a new token to EOS holders?

If I'm developing a project on EOS that will require a new custom token I might want to do an airdrop of that token to existing EOS holders. Are there best practices on how to go about that? Roughly ...
1
vote
0answers
39 views

How to add third part libraries when developing smart contracts in EOS?

For example, if I want to add a random digital generator library, what can I do? I want to add all the source files into my contract directory?
4
votes
1answer
57 views

What libraries are supported by contracts?

What libraries can be used when writing a contract in C++? What are the limitations? If I have a library I normally use and like, how do I compile it for use by contracts?
0
votes
1answer
20 views

Validation for contract which has data which varies

How does the EOS contract system handle data which varies? This could be from using a true random number, or receiving real-world data like a token price. Every time the contract executes, different ...