Questions tagged [asset]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
124 views

solved - contract to transfer multiple tokens

I tried to create a function to transfer multiple tokens on one transaction. code. token.cpp void token::transfers(const name &from, const name &to, ...
Wesley Dias's user avatar
1 vote
0 answers
283 views

Using Swift SDK to Encode and Mint Atomic Assets?

I've been trying to solve this for weeks but I'm new to this. Atomic Assets use C++ variants to hold asset data. I've tried a range of ways to create structs and enums that can be encoded into ...
Scott-HighlyHybrid's user avatar
0 votes
1 answer
265 views

What is the maximum number of decimal places that can be stored in an asset?

When creating new eosio::asset objects, what is the maximum precision that can be stored in the asset?
Phillip Hamnett - EOS42's user avatar
2 votes
1 answer
77 views

Symbol prints wrong value

I have a method like this: void token::test(asset qty) { print("\n", qty); print("\n", qty.symbol); } and the output I get is something like this: 10.00000000 XXX 8,XXX3 why the 3? ...
ekkis's user avatar
  • 515
0 votes
2 answers
86 views

Asset instantiation woes

if I declare an asset: asset a(10, symbol("TST", 0); and I print it: a.print(); I get pretty much what I'd expect: TST the format's not quite right (10 TST would have been better), but ...
ekkis's user avatar
  • 515
3 votes
1 answer
596 views

How to pass a 'symbol_name' into an action?

Does anyone know how to pass an assets symbol_name in as an argument to an action? I have been trying the following: .abi "types": [{ "new_type_name": "symbol_name", "type": "uint64" }] and .cpp ...
Magic Man Xpress's user avatar
4 votes
2 answers
519 views

Custom struct abi serialization

I am trying to understand, how the string "100000000.000 SYS" is serialized into struct asset from eosio.token example ( cleos push action eosio.token create '[ "eosio", "1000000000.0000 SYS", 0, 0, 0]...
Taras Shchybovyk's user avatar
1 vote
1 answer
57 views

Does EOS have builtin pegged asset like bitshares does?

In bitshares there are builtin support for pegged asset, like bitUSD, bitCNY etc, does EOS have any of such mechanism?
fluter's user avatar
  • 217