How to decode/tally the vout in the decoded output of sendassettoaddress transactions

+1 vote

I had performed an asset transaction which went perfectly. When I decode the raw transaction, there are 2 vout's , the second vout doesn't mention the assets. In my understanding, the remaining assets quantity should be mentioned. Please guide me.

{
    "txid" : "1bde42060dccb6e59c17fbe0e53e05e46268338b55ae3b88070a086855a6a391",
    "version" : 1,
    "locktime" : 0,
    "vin" : [
        {
            "txid" : "2ea7e007be3c412546e430c8c6f8665284dfc7e459d166b06890888c2cef2099",
            "vout" : 0,
            "scriptSig" : {
                "asm" : "3045022100baea32ed64a024f3a657de512fde986cce91c98c4f660d710011196a20f4f0d60220732fb5c18a5521ad1ecdea8c48e39d8b9f0f0cf88176cb74fdca2e0b853a9e2d01 03708c774004436db533515ddc028578719b6eb93af8a059842ab8e0965303b8b7",
                "hex" : "483045022100baea32ed64a024f3a657de512fde986cce91c98c4f660d710011196a20f4f0d60220732fb5c18a5521ad1ecdea8c48e39d8b9f0f0cf88176cb74fdca2e0b853a9e2d012103708c774004436db533515ddc028578719b6eb93af8a059842ab8e0965303b8b7"
            },
            "sequence" : 4294967295
        }
    ],
    "vout" : [
        {
            "value" : 0.00000000,
            "n" : 0,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 92506ffe0ad6560975be1876666a934e0d873d46 OP_EQUALVERIFY OP_CHECKSIG 73706b711900000009010000ad430100000000000000 OP_DROP",
                "hex" : "76a91492506ffe0ad6560975be1876666a934e0d873d4688ac1673706b711900000009010000ad43010000000000000075",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "1LmxJiRXvErD5rnDTSrJdeJNTSRfFt3s7EJnhj"
                ]
            },
            "assets" : [
                {
                    "name" : "vc",
                    "genesistxid" : "ad43b910292c723fd7342fc56c7d2b2d6d75a4c29d626079301d584a82c64fbf",
                    "assetref" : "25-265-17325",
                    "qty" : 1.00000000,
                    "raw" : 1
                }
            ],
            "permissions" : [
            ]
        },
        {
            "value" : 0.00000000,
            "n" : 1,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 67b7ef4e21e0ca4b98826d665af0e1057df65596 OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a91467b7ef4e21e0ca4b98826d665af0e1057df6559688ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "1F23iM7tR7EKezK2ehoBPgrFQfgek7dvFLcUiF"
                ]
            },
            "assets" : [ 
            ],

            "permissions" : [
            ]
        }
    ],
    "data" : [
    ]
}

 

 

asked Dec 29, 2015 by Mohit Kumar Sethi

1 Answer

+1 vote
It looks like, in this case, there was no need for the second output to contain any assets, because the input contained exactly the correct quantity (1 unit) of assets, without requiring any change.

Even if there is no need for change, MultiChain always adds a second output back to the sender, since this will ensure the sender has a unspent output containing their address. In a permissioned blockchain where sending is restricted by address, this ensures that the sender can sign more transactions in future. This ability needs to be preserved even if the sender has no assets remaining because they may want to send a pure metadata transaction.
answered Dec 29, 2015 by MultiChain
...