Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options questions only not deleted user 1870
0 votes
1 answer
340 views

Indexing a table by asset symbol -- how to find?

suppose I declare: struct [[eosio::table]] tst { asset component; uint64_t primary_key() const { return component.symbol.code().raw(); } }; where I mean to keep a list of assets. … when it's time to find a record in the table I want to do something like: void token::find(char *symbol) { tst t(_self, _self.value); auto o = t.find(symbol); but this results in an error: …
ekkis's user avatar
  • 515
0 votes
2 answers
383 views

Erasing records with for loops

if I want to erase a table: orderbook b(_self, _self.value); auto m = b.get_index<name("idxprod")>(); for (auto &i : m) { m.erase(i); } I get the error: Error 3160005: The table operation is …
ekkis's user avatar
  • 515
4 votes
1 answer
359 views

How to sort a table?

I'm following this explanation https://developers.eos.io/eosio-cpp/v1.1.0/docs/multi-index-table-tutorial using v1.5.0 of the CDT. … Here's what I've got: struct [[eosio::table]] order_struct { name cust; asset qty; uint32_t ts; uint64_t primary_key() const { return ts; } uint64_t matches() const …
ekkis's user avatar
  • 515