Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
2 votes
1 answer
191 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 ...
msc's user avatar
  • 145
0 votes
1 answer
107 views

check (within smart contract) if an account is a proxy

How can I verify within a smart contract that an account is a proxy? I know that there is a function is_account, which verifies that a name is an existing account. Is there a way to check if an ...
KrisKoin's user avatar
3 votes
1 answer
496 views

How can i burn the tokens i create with eosio.token

I want to burn the tokens i created for some reasons, I found the method "retire" in eosio.token. But, this method only change the supply of the token, the maximum supply is still the same as it is ...
Harry Ma's user avatar
  • 555
1 vote
2 answers
242 views

How to pass a map into an action

I'm trying to pass a map into action, but there is serialization error: Error: expected object containing data: undefined There is a function signature: void init(uint64_t id, const map<uint8_t, ...
Mikky Snowman's user avatar
4 votes
3 answers
1k views

`env.is_feature_activated` error when set contract

I'm trying to set up my eos enviroment. When I post the system contracts I get this error msg: Error 3070000: WASM Exception Error Details: env.is_feature_activated unresolveable enviroment: ubuntu ...
KrisKoin's user avatar
1 vote
1 answer
142 views

Is it possible to set up a smart contract with multiple .cpp and .hpp files?

If we want to make our smart contract code modular, and keep each class, contract, and table in its own file, is it possible to do this, and if so, how?
Phillip Hamnett - EOS42's user avatar
1 vote
1 answer
73 views

Can smart contract trigger some action on specified timestamp and change certain account balances?

Imagine I have a poll with specified timestamp for the end. At that point in time votes should be tallied and voters token balances should be adjusted in both directions (increase and decrease). How ...
Tigran Sahakyan's user avatar
1 vote
1 answer
339 views

what does the same_payer mean in eosio contract?

user_stakes.modify(sk,same_payer,[&](auto &s){ The variable same_payer confused me sometime, so, what does the same_payer mean in eosio contract ?
Harry Ma's user avatar
  • 555
0 votes
0 answers
96 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 ...
vladich's user avatar
  • 11
1 vote
0 answers
28 views

Hide information in the blockchain

Lets say I want to create a player vs player game with a battlefield and moving armies, the movement and data about the armies and where is it going is put on the blockchain. My question is how to ...
Saxtheowl's user avatar
  • 408
2 votes
1 answer
2k views

assertion failure with message: no balance object found

This error message occurs when trying to do a transfer: assertion failure with message: no balance object found What causes it and how can it be avoided?
Phillip Hamnett - EOS42's user avatar
0 votes
1 answer
67 views

Unable to publish to Kylin

I have been developing against a local node, for which I created a key-pair. Now that it's time to publish to the testnet, I've imported said private key into Scatter and linked it to the account to ...
ekkis's user avatar
  • 515
1 vote
1 answer
177 views

no member named 'check' in namespace 'eosio'

I am trying to build a contract and receiving this error: In file included from /usr/opt/eosio.cdt/1.6.1/bin/../include/eosiolib/contracts/eosio/system.hpp:6:[0K /usr/opt/eosio.cdt/1.6.1/bin/../...
eosioAlabama's user avatar
1 vote
2 answers
207 views

How to get a contract to accept tokens as payment

I keep getting the following error: transaction declares authority '{"actor":"test2","permission":"active"}', but does not have signatures for it under a provided delay of 0 ms, provided permissions [...
cryptosig's user avatar
  • 111
0 votes
2 answers
128 views

Is there a way to issue tokens infinitely?

I want to design a system where token supply can grow infinitely. Is it possible not to fix total supply at the token creation moment?
Tigran Sahakyan's user avatar
1 vote
1 answer
484 views

Transfer tokens inside a smart contract from an account to another account

I need to write a simple function that would send tokens using a different account action. Exactly the same situation as in these questions: one and two But I have to use not eosio.token contract but ...
Dim's user avatar
  • 21
1 vote
1 answer
100 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 ...
Vijay Sugali's user avatar
3 votes
1 answer
511 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 ...
T Eom's user avatar
  • 88
0 votes
3 answers
282 views

Can not find `eosio/eosio.hpp` while compiling with eosio-cpp

I used the documentation provided by EOSI. I made all the required installation as suggested in the docs. While writing the hello world contract, I face this issue when running the following command ...
Arvind Kalra's user avatar
7 votes
1 answer
705 views

How to debug eosio::on_notify("eosio.token::transfer") actions?

I'm working on a contract that will run an action when receiving tokens. The following code does not run when the account receives EOS or JUNGLE tokens on the Jungle Testnet. #include "./test.hpp" .....
marijn's user avatar
  • 71
1 vote
1 answer
113 views

How to delete record on EOS if I forget table structure

I issue an EOS token for fun half a year ago and I'm planning to release my EOS ram recently. The problem is that I forget the table structure I made before and I overwrite the contract and there is ...
michaelfaust's user avatar
0 votes
2 answers
100 views

Can I use Timers?

I know that there's no timer in other smart contracts and even this is not possible in regular blockchains. But, EOS uses C++, and they already did lots stuffs which makes smart contracts more usable. ...
user3194's user avatar
0 votes
1 answer
477 views

eosio-cpp command not found error?

When I am trying to run hello world smart contract using a command eosio-cpp -abigen -o hello.wasm hello.cpp shown an error eosio-cpp: command not found?
Prema's user avatar
  • 1
0 votes
2 answers
92 views

Ico smart contract update

I would like to update this code, because it is CDT 1.2. I would like to update for CDT 1.5 or CDT 1.6. What do I need to change? #include <eosiolib/eosio.hpp> #include <eosiolib/currency....
Efraim's user avatar
  • 1
1 vote
2 answers
175 views

Contract compilation fails during elemental battles tutorial

I have followed the elemental battles tutorial until lesson 2 step 4, and at the end of it, the tutorial instructs to compile the existing code with eosio-cpp -o destination.abi source.cpp -abigen (...
LemmeTestThat's user avatar
0 votes
1 answer
31 views

EOS Token contract audit issue

My token contract was done by a third party vendor that did not share source code of the token contract with me. Can you help me on how to find the code, so that I can submit it to you for audit ...
Su Lee's user avatar
  • 1
0 votes
2 answers
826 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?
Shane's user avatar
  • 1
0 votes
1 answer
34 views

Acting on upon a receipt of a token, using v1.6 c++ libraries

Let's say I wanted to act upon receipt of a token and/or a message to a smart contract. Previous versions of EOS used the apply function to do this, however as of v1.6 things have changed to pure cpp ...
cryptosig's user avatar
  • 111
0 votes
0 answers
95 views

Time point to string

I am currently trying to get the current time using time_point_sec(now()); Does someone know how to convert that to a std::string?
Tachyon's user avatar
  • 131
1 vote
2 answers
970 views

Using find on multi index table

I have a table defined as the following: struct [[ eosio::table, eosio::contract("voting") ]] identity { uint64_t key; key256 identityHash; time_point_sec createdAt; uint64_t ...
Tachyon's user avatar
  • 131
1 vote
0 answers
74 views

Get symbol & contract from asset

I currently have an asset property that stores a value, i.e. 100 EOS which could also be another token like 100 TLOS. Is there a way to extract the symbol and possibly the token contract from that ...
Tachyon's user avatar
  • 131
3 votes
3 answers
146 views

What are the advantages and disadvantages of using multiple smart contracts?

I have noticed many EOS contract programmers choose to have a token contract and a separate smart contract for other things to do with those tokens. What are the advantages and disadvantages to this ...
cryptosig's user avatar
  • 111
0 votes
1 answer
118 views

read datastream of length 29 over by -4

enum house_status: uint64_t { NEW = 10, FULL = 20, ONGOING = 30, OVER = 40 }; struct [[eosio::table, eosio::contract("game")]] house{ uint64_t id; uint64_t owner_player_id; ...
lijianwei's user avatar
1 vote
1 answer
161 views

Serialization Error Processing WASM while following hello.cpp tutorial

I am following along the tutorial on the EOS website at https://developers.eos.io/eosio-home/docs/your-first-contract At the first smart contract development section, I cannot manage to publish the ...
LemmeTestThat's user avatar
1 vote
2 answers
51 views

How do I confirm that the person sending an action is the same as a user in the parameter?

Specific example from a contract: ... void hi(name user){ // verification here, require_auth(user)? print(user); } ... I've tried require_auth(user) but that seems to always fail unless the user ...
requires_verification's user avatar
0 votes
1 answer
76 views

Is there a way to call a multisig approval programmatically from within a contract?

Following scenario: There's an action which requires 3 signatures - two are 'normal accounts' and the third one is like 'system or robot', which does some verifications from within the smart contract....
KrisKoin's user avatar
0 votes
1 answer
44 views

How is memory aligned in the EOSIO smart contract consensus memory?

Are there any memory savings if I declare a table record that has, say, a 64-bit integer (occupies 8 bytes) and a 16-bit integer (occupies 2 bytes)? Or is it aligned at 64 bits and said record would ...
Fabiana Cecin's user avatar
3 votes
1 answer
124 views

Ricardian Contract

Does eosio also sign the transaction with the ricardian contract of user consent and/or how does the application proove that a party agreed on said ricardian contract? I have integrated the ricardian ...
Farhan-TroonTechnologies's user avatar
0 votes
1 answer
103 views

How do I access a contract class variable from an extern “C” function "void apply()"?

In some scenarios, It's convenient to configure the conditions for monitoring some certain transactions by using this method extern "C" { void apply(uint64_t receiver, uint64_t code, uint64_t ...
Harry Ma's user avatar
  • 555
0 votes
0 answers
21 views

Can I deploy a contract from within a contract? [duplicate]

We can create accounts from contract code: https://github.com/angelol/smart_account_creator and we can query things about accounts: https://github.com/nsjames/Account-Has-Code is there a way to ...
Utgarda's user avatar
  • 101
2 votes
1 answer
107 views

Is it possible to create new contract from another?

Ethereum has a opportunity to create new contract from another. Does eosio has the same? I found a code with new account creation, but I didn't find nothing about setting code and abi from contract.
harriton's user avatar
1 vote
1 answer
53 views

Is it possible to lock publish contract with set permission?

Is it possible to setup a lock (multisig) for the command cleos set contract ? in order to request one or more signatures to deploy a contract ? cleos set action permission eosio eosio set ...
KrisKoin's user avatar
2 votes
1 answer
244 views

CPU-Usage Optimization

I'm trying to figure out how to optimize one of my smart contracts for less billed CPU-usage. There are typically different methods to optimize performance of algorithms but I'm not clear about if a ...
cmadh's user avatar
  • 1,929
2 votes
1 answer
405 views

Why does using available_primary_key() as scope for a table result in this behaviour?

Scenario: Two tables, each using uint64_t as a primary key Table A rows need to reference rows in Table B Why? Relational database data duplication reasoning etc etc Both table's primary keys are ...
Jason Bert's user avatar
1 vote
2 answers
146 views

Why actions can't have return values?

I can't understand why actions can't return values. A simple use case is for adding records in multi_index. I need to return the primary key to link that to my off-chain data.
Katalyo's user avatar
  • 11
1 vote
1 answer
397 views

on_notify not being fired on local or jungle testnet

I'm using the following contract on both my local and jungle testnets, the on_notify methods are not being fired. Everything appears to be in order, I'm hoping I've missed something obvious. I ...
Jason Bert's user avatar
1 vote
1 answer
1k views

Duplicate symbol WASM compilation error when using header/hpp for contract

I'm looking to use a hpp file as an interface for multiple contracts. I've created a test contract and receiving a WASM compilation error. I based the test contract on the format used by eosio.token....
Jason Bert's user avatar
0 votes
1 answer
61 views

Is there a library for encryption/decryption in EOS? [duplicate]

I want to perform some encryption on a given message, so I am wondering if there is a library that I can use in EOS? And I have checked the post Cryptographic Operations in Smart Contracts?, but the ...
Sean's user avatar
  • 1
0 votes
3 answers
338 views

Smart contract - find on two columns

I am currently writing a blog PoC on EOS. I would like the ability to delete a post. Now deleting by the ID alone is simple, I have it implemented as follows: whisper::post_index posts(_code, _code....
Tachyon's user avatar
  • 131
0 votes
1 answer
71 views

Stake EOS and then unstake

Is there any documentation on staking or unstaking EOS using smart contracts? I basically want to provide an escrow service where the seller needs to stake the value of the item and the buyer stakes ...
Tachyon's user avatar
  • 131

1 2 3
4
5
13