What is amount in case of mosaic transfer

Hi,

What is the amount mentioned in the mosaic transfer? On nembex explorer, it’s showing it as to quantity and on nemtool is shows the amount as 0 even if it’s calculated from API response then it should be 1.

example,

{
“timeStamp”: 83163971,
"amount": 1000000,
“signature”: “05961cc8d0b55cc87a96f8c9dbcfda8b6188dc1f05c565e0c542d53992c35a03734986e67233d53caf6aa24978bcb55b45abe91a412a3c124ddf5c13e19e0f0d”,
“fee”: 100000,
“recipient”: “NDUJFAEVV6MUJNHMQBWINYQTFIKNTV7JQD7ZE4WR”,
mosaics”: [
{
"quantity": 3,
“mosaicId”: {
“namespaceId”: “nemket.nemket2017”,
“name”: “entry”
}
},
{
"quantity": 1,
“mosaicId”: {
“namespaceId”: “nemket.nemket2017”,
“name”: “lottery”
}
}
],
“type”: 257,
“deadline”: 83250371,
“message”: {},
“version”: 1744830466,
“signer”: “83ea57df975db23a383bd1a89ecca9a5a5ba84d78a12248d678c539b5bd67279”
}

If mosaic array is not empty then amount is multiplier. If you want send exactly what in mosaic array amount should be 1000000, if you will set 0 then you send nothing 0 * quantities_in_mosaic_array.
If you will set 2000000 you will double quantities in mosaic array.

It means from the above example amount is 1000000 then these 2 quantities of mosaics are transferred.

If the amount is 0, then 0 quantities of mosaics are transferred event if quantity with 1/2… exists in mosaics.

How these mosaics quantity is calculated in XEM? User who created it can set it? or how?

Means 1 quantity of mosaic = How much XEMs/Amount?

How these mosaics quantity is calculated in XEM? User who created it can set it? or how?
Means 1 quantity of mosaic = How much XEMs/Amount?

I’m not sure what you mean. Transaction sender is deciding how many mosaics want send

Ok. Let me elaborate more on what I want.

I’ve only concern with how much amount/fees deducted from the sender’s account and how much added to the recipient’s account.

So, from the above response, my assumption is,

Deposit :
For 1st mosaic - 1000000 * 3 = 3000000
For 2nd mosaic - 1000000 * 1= 1000000
3000000+1000000 = 4000000
4000000 amount or 4000000/1000000 = 4 XEMs are deducted from signer’s account [83ea57df975db23a383bd1a89ecca9a5a5ba84d78a12248d678c539b5bd67279]

Credit :
4000000 amount or 4000000/1000000 = 4 XEMs are credited to recipient’s account [NDUJFAEVV6MUJNHMQBWINYQTFIKNTV7JQD7ZE4WR].

Fee deposited from signer’s account [ 83ea57df975db23a383bd1a89ecca9a5a5ba84d78a12248d678c539b5bd67279 ] =100000 or 1 XEM

Fee credited to harvester’s account [ ABCDEF…] = 100000 or 1 XEM

Please correct me if I’m wrong somewhere.

  • when mosaic array is not empty amount is multiplier
  • when mosaic array is empty amount is amount of XEM sent

In your example

Amount: 1000000

mosaics ”: [
{
"quantity": 3,
“mosaicId”: {
“namespaceId”: “nemket.nemket2017”,
“name”: “entry”
}
},
{
"quantity": 1,
“mosaicId”: {
“namespaceId”: “nemket.nemket2017”,
“name”: “lottery”
}
}
],

So you sending exactly what is in mosaic array because amount = 1000000/1000000 = 1

So you sent:

  • 3 nemket.nemket2017:entry and
  • 1 nemket.nemket2017:lottery

Thank you so much. This is what I want!

And if the amount is 2000000, then 2000000/1000000 = 2
So from above,

  • 3*2 = 6 nemket.nemket2017:entry and
  • 1*2 = 2 nemket.nemket2017:lottery

yes, that’s correct

Thanks!