Try to use sendwithmetadatafrom and asset instead of native currency Error: value too small

+4 votes

Hi,

I am trying to send an asset and metadata in a transaction but with the following command I get the error message: Transaction output value too small

sendwithmetadatafrom "1ES1z2bh7pjwUJiW2sMoXDhTYke6jetfZC" "1BFVrkc7paB2fXHAPawyzBfuVX4RFQY6XH" '{"12842-301-47350":10}' 48656C6C6F20576F726C64210A

when I use the same command but this time sending the native currency it works:

sendwithmetadatafrom "1ES1z2bh7pjwUJiW2sMoXDhTYke6jetfZC" "1BFVrkc7paB2fXHAPawyzBfuVX4RFQY6XH" 1 48656C6C6F20576F726C64210A

How can I send an asset with meta data? 

Thanks

asked Jan 3, 2017 by anonymous

1 Answer

+1 vote

It sounds like you have a native currency set up with your MultiChain blockchain, and so you need to send some of the native currency together with the asset you want to send, to be valid according to your blockchain's rules for minimum native currency quantities in outputs. So the format would be:

sendwithmetadatafrom 1ES1z2bh7pjwUJiW2sMoXDhTYke6jetfZC 1BFVrkc7paB2fXHAPawyzBfuVX4RFQY6XH '{"12842-301-47350":10, "":0.001}' 48656C6C6F20576F726C64210A

The "" above indicates a quantity of the native blockchain currency, and you should replace 0.001 with the minimum output quantity, as specified in your blockchain parameters (minimum-per-output divided by  native-currency-multiple). An easy way to retrieve those is using getblockchainparams.

 

answered Jan 4, 2017 by MultiChain
...