Cannot issuemorefrom

+1 vote

Hi!

I've created an asset on version 1.0-alpha21 using CLI


local2: issuefrom 1YzSmPJeC6JpGQFU4N5Si9Xs7TuMjLgCyHWvmN 1YzSmPJeC6JpGQFU4N5Si9Xs7TuMjLgCyHWvmN foobar 1 1 0
{"method":"issuefrom","params":["1YzSmPJeC6JpGQFU4N5Si9Xs7TuMjLgCyHWvmN","1YzSmPJeC6JpGQFU4N5Si9Xs7TuMjLgCyHWvmN","foobar",1,1,0],"id":1,"chain_name":"local2"}

45aca7661855344e3b0abb99ed6fabc9828a2c7969803ac09e5250fa25414134


But when i've tried to do "issuemorefrom" i got this error message:


local2: issuemorefrom 1YzSmPJeC6JpGQFU4N5Si9Xs7TuMjLgCyHWvmN 1YzSmPJeC6JpGQFU4N5Si9Xs7TuMjLgCyHWvmN foobar 99
{"method":"issuemorefrom","params":["1YzSmPJeC6JpGQFU4N5Si9Xs7TuMjLgCyHWvmN","1YzSmPJeC6JpGQFU4N5Si9Xs7TuMjLgCyHWvmN","foobar",99],"id":1,"chain_name":"local2"}

error code: -32600
error message:
API is not supported for this protocol version


Same thing happends via RPC


>>> s.issuemorefrom('1YzSmPJeC6JpGQFU4N5Si9Xs7TuMjLgCyHWvmN','1YzSmPJeC6JpGQFU4N5Si9Xs7TuMjLgCyHWvmN','foobar',99)
{u'id': 3, u'result': None, u'error': {u'message': u'API is not supported for this protocol version', u'code': -32600}}


The node was create with alpha21 version

 

Update: same error message if i try to do issuemore:


local2: issue 1YzSmPJeC6JpGQFU4N5Si9Xs7TuMjLgCyHWvmN barbar 1
{"method":"issue","params":["1YzSmPJeC6JpGQFU4N5Si9Xs7TuMjLgCyHWvmN","barbar",1],"id":1,"chain_name":"local2"}

9bd5590c1a1bf482f5ff85c3ac7b88b7df357f9e6278410e19c599e29f90f221
local2: issuemore 1YzSmPJeC6JpGQFU4N5Si9Xs7TuMjLgCyHWvmN barbar 99
{"method":"issuemore","params":["1YzSmPJeC6JpGQFU4N5Si9Xs7TuMjLgCyHWvmN","barbar",99],"id":1,"chain_name":"local2"}

error code: -32600
error message:
API is not supported for this protocol version


 

asked Jul 1, 2016 by reiven
edited Jul 1, 2016 by reiven

1 Answer

0 votes

If you want to be able to perform follow-on issuance, you need to create the asset as open, passing something like this instead of the name parameter to the issue or issuefrom calls:

{"name":"foobar","open":true}

But it looks like your blockchain might also be using too old a protocol to support that, so you need to create a new chain.

answered Jul 3, 2016 by MultiChain
Great, the chain i was using was cloned from old one, so protocol version now is correct.
But, i can do issuemore but i cannot find a way yo add extra metadata to the asset

>>> s.issue('1Bzs7G4LXsJ5nx4cCkDQ94TDxmnKeGHfaUGjHb',{'name':'zaabar','open': True} ,1,1,0,{'Metadata': 'This is a Hash'})
u'503eae3826f61b334aa95e256502974ef9e81bdf2027cccf2cc201175aa1c816'
 {u'assetref': u'111-266-15952',
  u'details': {u'Metadata': u'This is a Hash'},
  u'issueqty': 1.0,
  u'issueraw': 1,
  u'issuetxid': u'503eae3826f61b334aa95e256502974ef9e81bdf2027cccf2cc201175aa1c816',
  u'multiple': 1,
  u'name': u'zaabar',
  u'open': True,
  u'units': 1.0}]

>>> s.issuemore('1Bzs7G4LXsJ5nx4cCkDQ94TDxmnKeGHfaUGjHb', 'zaabar', 9 )
u'47d4aa727a32406380a030b1e7f5d198a4c3fdff89293af23e7f162fcd913eb9'

 {u'assetref': u'111-266-15952',
  u'details': {u'Metadata': u'This is a Hash'},
  u'issueqty': 10.0,
  u'issueraw': 10,
  u'issuetxid': u'503eae3826f61b334aa95e256502974ef9e81bdf2027cccf2cc201175aa1c816',
  u'multiple': 1,
  u'name': u'zaabar',
  u'open': True,
  u'units': 1.0}]

>>> s.issuemore('1Bzs7G4LXsJ5nx4cCkDQ94TDxmnKeGHfaUGjHb', 'zaabar', 0, 0, {'Metadata2': 'SecondHash'} )
u'9c08abe4df8c38cc4586de0e9c50c00f08f1811e2280fddfe163cf634ed64337'
 {u'assetref': u'111-266-15952',
  u'details': {u'Metadata': u'This is a Hash'},
  u'issueqty': 10.0,
  u'issueraw': 10,
  u'issuetxid': u'503eae3826f61b334aa95e256502974ef9e81bdf2027cccf2cc201175aa1c816',
  u'multiple': 1,
  u'name': u'zaabar',
  u'open': True,
  u'units': 1.0}]

Thanks!
If you want to see all the metadata you need to call listassets with verbose=true.
Using CLI how should the verbose parameter need to be used?

nulocal: listassets sarasa3 verbose=true
error: Error parsing JSON:verbose=true
nulocal: listassets sarasa3 verbose:true
error: Error parsing JSON:verbose:true
nulocal: listassets sarasa3 {verbose:true}
error: Error parsing JSON:{verbose:true}
nulocal: listassets sarasa3 {'verbose':true}
error: Error parsing JSON:{verbose:true}
nulocal: listassets sarasa3 {"verbose":true}
error: Error parsing JSON:{verbose:true}
nulocal: listassets sarasa3 ({"verbose":true})
error: Error parsing JSON:({verbose:true})
nulocal: listassets sarasa3 ({"verbose"=true})
error: Error parsing JSON:({verbose=true})

Also, using RPC the call is not returning the complete data

>>> pprint(s.listassets('Testing2',{'verbose':True}))
[{u'assetref': u'231-266-63234',
  u'details': {u'Metadata1': u'First'},
  u'issueqty': 1.0,
  u'issueraw': 1,
  u'issuetxid': u'02f73a500165f624b92a23ffc646beefa40abcf43f7cce50a1f9fc80ba1c56dc',
  u'multiple': 1,
  u'name': u'Testing2',
  u'open': True,
  u'units': 1.0}]

BUT! Using Multichain explorer to see the assets, works fine
All the APIs are document at this page:

http://www.multichain.com/developers/json-rpc-api/

You just pass the word 'true' (without quotes) in the appropriate position.
...