Asset transfer script rejected - mismatch in input/output quantities

+1 vote

I am getting below error whenever I do  "sendrawtransaction" transaction.

chain5: signrawtransaction 010000000135bb1b3e7560f5406f2e2363f50cbddc2e60a6381893a7136ff26b9922917c42010000006b4830450221008f75eb34bcda6f9f2f7147e59ea9297106760b628af30016caecd8f8b3bc0581022001b355547054b8f749eff21e4b504d6967e72367441b4dbc8b339123e327b6470121029df263f19db4d607f716fc53503848bfb80056f6c150f6f2b71eba25f0267739ffffffff0100000000000000003b21023eccedf466b23d97a7d46edbfc517f9ae06730d35cbb229b71424a0f21f11c29ac1673706b711d0000000901000008f20a000000000000007500000000
{"method":"signrawtransaction","params":["010000000135bb1b3e7560f5406f2e2363f50cbddc2e60a6381893a7136ff26b9922917c42010000006b4830450221008f75eb34bcda6f9f2f7147e59ea9297106760b628af30016caecd8f8b3bc0581022001b355547054b8f749eff21e4b504d6967e72367441b4dbc8b339123e327b6470121029df263f19db4d607f716fc53503848bfb80056f6c150f6f2b71eba25f0267739ffffffff0100000000000000003b21023eccedf466b23d97a7d46edbfc517f9ae06730d35cbb229b71424a0f21f11c29ac1673706b711d0000000901000008f20a000000000000007500000000"],"id":1,"chain_name":"chain5"}

{
    "hex" : "010000000135bb1b3e7560f5406f2e2363f50cbddc2e60a6381893a7136ff26b9922917c42010000006b4830450221008f75eb34bcda6f9f2f7147e59ea9297106760b628af30016caecd8f8b3bc0581022001b355547054b8f749eff21e4b504d6967e72367441b4dbc8b339123e327b6470121029df263f19db4d607f716fc53503848bfb80056f6c150f6f2b71eba25f0267739ffffffff0100000000000000003b21023eccedf466b23d97a7d46edbfc517f9ae06730d35cbb229b71424a0f21f11c29ac1673706b711d0000000901000008f20a000000000000007500000000",
    "complete" : true
}
chain5: sendrawtransaction 010000000135bb1b3e7560f5406f2e2363f50cbddc2e60a6381893a7136ff26b9922917c42010000006b4830450221008f75eb34bcda6f9f2f7147e59ea9297106760b628af30016caecd8f8b3bc0581022001b355547054b8f749eff21e4b504d6967e72367441b4dbc8b339123e327b6470121029df263f19db4d607f716fc53503848bfb80056f6c150f6f2b71eba25f0267739ffffffff0100000000000000003b21023eccedf466b23d97a7d46edbfc517f9ae06730d35cbb229b71424a0f21f11c29ac1673706b711d0000000901000008f20a000000000000007500000000
{"method":"sendrawtransaction","params":["010000000135bb1b3e7560f5406f2e2363f50cbddc2e60a6381893a7136ff26b9922917c42010000006b4830450221008f75eb34bcda6f9f2f7147e59ea9297106760b628af30016caecd8f8b3bc0581022001b355547054b8f749eff21e4b504d6967e72367441b4dbc8b339123e327b6470121029df263f19db4d607f716fc53503848bfb80056f6c150f6f2b71eba25f0267739ffffffff0100000000000000003b21023eccedf466b23d97a7d46edbfc517f9ae06730d35cbb229b71424a0f21f11c29ac1673706b711d0000000901000008f20a000000000000007500000000"],"id":1,"chain_name":"chain5"}

error code: -26
error message:
64: Asset transfer script rejected - mismatch in input/output quantities

Please help !!

asked Sep 26, 2016 by Rajasekhar

1 Answer

+1 vote

The total quantity of each asset across the inputs of a transaction must match the total quantity across all the outputs. The easiest way to ensure this is the case is to provide too much assets in the inputs, then call appendrawchange to add an extra output containing all the leftover asset quantities.

answered Sep 26, 2016 by MultiChain
...