Questions tagged [contract-development]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
4 views

How to interpret the contract?

LLVM was designed the way(Picture). And I want to know if i understand correctly. Smart Contract is byte code. So EOSIO need to interpret the byte code. EOSIO use WAVM converting to Middle End IR ...
0
votes
1answer
16 views

call to implicitly-deleted copy constructor

I'm unable to compile a small test contract and am hoping for guidance. I have a class called Account, in the following 2 files: // --- account.hpp #pragma once #include <string> #include &...
1
vote
0answers
14 views

How to retrieve tx object within contract

I'm trying to retrieve tx within contract, but I only can find tx_hash using read_transaction. Anybody can help me?
0
votes
1answer
30 views

multi_index table get const_iterator at a specific position

is there a better way than a loop to get the value/const_iterator at a specific position in multi_index table? current: auto idx = _table.get_index<"name"_n>(); const_iterator b; int count = ...
0
votes
0answers
19 views

How to get active key within smart-contract

I need to get account public key within smart contract. I tried to find public keys in system contracts, but unsuccessfully. Anybody knows how to do it?
0
votes
0answers
81 views

When deploying a contract what is important (overall contract/wasm size or amount of functions etc) to not get transaction took too long

when I try to deploy the system.contract I sometimes get transaction took too long with the new eosio version 1.8.1. Now I would like to know on which part of a contract do I need to pay attention ...
0
votes
0answers
51 views

env.is_feature_activated unresolvable while setting up eosio.system contract

I am following BIOS Boot Sequence. I want to set up my own private EOS network that's why I am setting up the EOSIO network. at step 1.12 I am not able to set the eosio.system contract it will give me ...
1
vote
1answer
36 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, ...
0
votes
1answer
23 views

template function in contract code with a lambda

This is more a C++ question than EOS contracts question but I am having trouble creating a template function for migrating tables to a different scope. I cannot get this to compile. template <...
1
vote
1answer
53 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/../...
1
vote
2answers
38 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 ...
0
votes
0answers
48 views

Regex validation on smart contracts

Is is possible to use regex validation in a smart contract?
2
votes
1answer
55 views

fatal error: 'future' file not found

I want to write a contract by using CPR library. Unfortunately I have an error: fatal error: 'future' file not found #include <future> I am using EOSIO cdt v1.5.0 on Ubuntu 18.04. I had the ...
1
vote
1answer
61 views

Makefile Compiler Error

I have been using this tutorial from Medium to build my first smart contract. I've come far, finally got a nodeos local node up and running and producing blocks on my Ubuntu VM. I've hit a snag though ...
2
votes
1answer
91 views

How to send a data from on contract to other?

https://developers.eos.io/eosio-home/docs/sending-an-inline-transaction-to-external-contract In above tutorial, I can see that 'addressbook' send notofication message to 'abcounter', but the data(...
0
votes
2answers
56 views

EOS CDT: where are the *.h and the *.cpp files stored in the filesystem, I need reference to them to compile

I'm trying to use the EOS CDT (contract development toolkit). I've downloaded and installed the repository from github, and used to following commands, as indicated from the eos.io development page. ...
1
vote
1answer
95 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 = ...
3
votes
1answer
219 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 ...
2
votes
1answer
107 views

Are EOS smart contract self executing? Can a contract monitor an external API call from a weather site and send a transaction if it's sunny?

Ethereum contracts require someone to execute the contract and are not self aware. Are EOS contracts self executing if some external thing happens like the weather changing when detected from a ...