How to construct issuefrom with open = true?

+1 vote

Hi,

I want to create an asset that I can use with "issuemore" and "issuemorefrom", so based on the documentation, I issued this command on the node with admin rights:

issuefrom  1Gp59BoUUTj3Nc7cx7pNLd9nGTuPKHXPZwWDd8 1P9K34anJr4ghWedCNJpp8dFk5rD9sdGeAzwCB  {"name":"asset2","open":true} 1000000 0.001

However, when I checked on the assets, I see this:

    {
        "name" : "{name:asset2,open:true}",
        "issuetxid" : "603f2bdaeffed02aa273850ecac334ca23041b474b1455fb41c11f617ebcddb1",
        "assetref" : "7780-267-16224",
        "multiple" : 1000,
        "units" : 0.00100000,
        "open" : false,
        "details" : {
        },
        "issueqty" : 1000000.00000000,
        "issueraw" : 1000000000
    }

 

How should I write the issue command so that open:true?

Thank you!

 

 

asked Sep 22, 2016 by multichained

1 Answer

0 votes
 
Best answer
I'm not sure how you're accessing the API but you need to pass the second parameter as a JSON object with those two elements, rather than a string.
answered Sep 22, 2016 by MultiChain
selected Sep 26, 2016 by multichained
Also check you're on a recent version of MultiChain that supports this feature.
Hi,

I am using alpha v23.

I ran the command from the multichain-cli in the interactive mode in order to create an asset named "asset2" and open set to true as below:

MultiChain Core RPC client build 1.0 alpha 23 protocol 10005


Interactive mode

chain1: issuefrom 1Gp59BoUUTj3Nc7cx7pNLd9nGTuPKHXPZwWDd8 1P9K34anJr4ghWedCNJpp8dFk5rD9sdGeAzwCB  {"name":"asset2","open":true} 1000000 0.001


Is this possible on the cli in interactive mode? or do I need to test it out in the non-interactive mode? or do I need to use curl instead?

Thank you.
You need to put the JSON object in single quotes, i.e.

issuefrom 1Gp59BoUUTj3Nc7cx7pNLd9nGTuPKHXPZwWDd8 1P9K34anJr4ghWedCNJpp8dFk5rD9sdGeAzwCB '{"name":"asset2","open":true}' 1000000 0.001
Great! I missed the single quotes...

Thank you!!!
...