Questions tagged [contract-development]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
27 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
12 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
79 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
34 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
21 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
39 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
39 views

Regex validation on smart contracts

Is is possible to use regex validation in a smart contract?
1
vote
1answer
57 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
87 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
1answer
51 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
90 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
191 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
92 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 ...