Decimal value in primary_fungible_store::transfer_with_ref #151
Replies: 2 comments 4 replies
-
The decimal should be considered after getting value from the If you have provided 100000000 as the For example, if you have a Fungible Asset with symbol of "MOON" with decimal of 8, and you want to transfer 1.5MOON, the right value for the |
Beta Was this translation helpful? Give feedback.
4 replies
-
Thank you @0xjunha for helping me to resolve this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I have created a fungible digital asset 0x4 standard using primary_fungible_store::create_primary_store_enabled_fungible_asset with decimals as 8. How do I provide the amount in octas in primary_fungible_store::transfer_with_ref(&transfer_ref, from_address, to, amount); The amount seems to be always taking the integer part. how to provide the decimal/offset values in octas?
I'm expecting to give 100000000 in amount to represent asset worth 1
& 150000000 in amount to represent asset worth 1.5 in
primary_fungible_store::transfer_with_ref(&transfer_ref, from_address, to, amount). Is this possible?
When I tested it was considering 100000000 amount as worth 100000000.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions