Questions tagged [smart-contract]

Anything related to decentralized application (dApp) development, concepts, and possibilities with smart contracts, or technical questions for the development of smart contracts.

Filter by
Sorted by
Tagged with
2
votes
1answer
126 views

How to prevent cheating in a turn-based-game on blockchain?

I want to create game where p1 and p2 take actions in turns but neither p1 nor p2 should be able to see the action, the other is doing till the end of the game. If I would do it like in a normal Web-...
2
votes
1answer
95 views

How do you stream data from an input file when writing contracts on EOS?

I emulated the tic.tac.toe tutorial code and made a simple contract that allows me to add and remove car information. However, I can only push action one at a time and this only allows me to add/...
2
votes
2answers
979 views

Can not find <eosiolib/eosio.hpp> when compiling with eosiocpp

I am trying to compile the Hello World Tutorial, using the following command: eosiocpp -o hello.wast hello.cpp However, this does not work, giving the error: hello.cpp:1:10: fatal error: 'eosiolib/...
2
votes
2answers
710 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....
1
vote
1answer
232 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 ...
1
vote
2answers
183 views

Transferring EOS within Smart Contract

I'm building a Smart Contract that transfers EOS from my contract account to end user accounts. I can not seem to find up to date and correct syntax for transferring EOS using eosio.token from within ...
1
vote
2answers
619 views

No matching constructor for initialization AddressBook example

Dependencies: EOSIO.CDT (Contract Development Toolkit) Version : 1.3.1 My code: #include <eosiolib/eosio.hpp> #include <eosiolib/print.hpp> using namespace eosio; CONTRACT ...
1
vote
2answers
122 views

Passing a string to an action?

I have an action that needs to operate on a string: void token::MyAction(std::string key); so I would expect I can make the call like this: cleos push action MyAccount MyAction '["burn"]' -p ...
1
vote
2answers
92 views

Is there a BP with available smart-contracts that we can simply run without submitting?

Submitting a smart contracts to different BPs gives me different errors. Would there be a BP with ready-to-run smart-contracts (which are found in a /contracts directory) that can be executed by EOS ...
1
vote
0answers
38 views

EOS smart contract upgrading/recompiling, variables and symbol mappings

EOS allows to reset the contract code payload, unlike some other blockchains: https://www.reddit.com/r/eos/comments/91aqjx/how_many_contracts_can_an_account_have_on_the_eos/e2ww4la/ How the code ...
0
votes
1answer
51 views

Is there any API in EOS Smart Contract to decrypt message? [duplicate]

I would like to create a smart contract that would be able to decrypt some symmetrically encrypted message. Here is the scenario: Party "A" sends a message encrypted with key "123456" to ...
0
votes
0answers
75 views

Exception Details: 3080006 deadline_exception: Transaction took too long

I'm getting this error and have read all there is to read on the net (which isn't much) about it. mostly I see others complaining about this error when they run an action for the first time in my ...

1
2