Hot answers tagged

2 votes

how to implement a 48-char-long symbol token with balances like "10.0000 custom.name.of.the.token"?

Yes, your approach is good. Only issue is efficiency. Your tokens will be processed using more CPU than the regular eosio.token contract tokens due to the extra steps to match by the secondary key. ...
user avatar
  • 1,686
1 vote

no member named 'print' in 'std::__1::basic_string<char>'

As the compiler indicates .../include/eosiolib/print.hpp:237:9: error: no member named 'print' in 'std::__1::basic_string' t.print(); ... after check the the source code of print.hpp inline void ...
user avatar
1 vote

Can we typecast string to use it as a id in table?

eosio::name is uint64_t internally and encodes string with BASE32. If you are sure that your tableid will contain chars in range of [.1-5a-z] and its length won't exceed 12 (or 13th-char only can have ...
user avatar
  • 2,255
1 vote
Accepted

Cannot read string data from table row. But when I put "" data, it works

I have tried your code and i also have coded in updated version of eosio compiler i.e, eosio.cdt my code to modify table data is look like this void tablecheck::updatedata ( capi_name user , string ...
user avatar
  • 957
1 vote

How do I create a Multi-Index DB secondary index from a String?

As of eosio.cdt v1.5.0, you can not make a secondary index from a string. The types of secondary indices allowed are: uint64_t secondary_1; uint128_t secondary_2; checksum256 ...
user avatar
1 vote

Stored vector of strings in table implicitly converting to vector of unsigned char, why?

When describing a vector in your ABI file, simply append the type with [] in pt 2.3 of documentation https://developers.eos.io/eosio-home/docs
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible