createrawsendfrom to issue asset

+1 vote

thank you first for sample, I have a question to issue new asset via creatrawsendfrom  command. I tried but failed with error parsing JSON in  "data":{"json":{"start":0,"end":1000}} . Could share the correct command to issue new asset for track-asset-units. Besides, could I use "issuemore" on existing token to track? or still need a new asset?

 

related to an answer for: inline data for NFT token
asked May 15 by anonymous

1 Answer

0 votes

Take a look at this page: https://www.multichain.com/developers/raw-transactions/

You can see the regular form of createrawsendfrom for issuing an asset in the "Issuing assets" section. But you need to make some changes:

  • Change {"issue":{"raw":3000}} to {"issue":{"raw":3000}, "data":{"json":{"start":0,"end":1000}}} with of course all the quantities you want.
  • Have assets be set only to a single output, not two.
answered May 18 by MultiChain
Parsing error: '{"19ejqgoWpSCqJBqPaqDJbwuRT3Bcv1tiBs1fJA":{"issue":{"raw":2000},"data":{"json":{"start":0,"end":2000}}}} '[{"create":"asset","name":"trynft1","multiple":10,"open":true,"details":{"origin":"bizex","stage":"one"}}]' send

I still got an error as above msg. Would you suggest? Besides, when tracing the token, is it only available with smart filter on new issue asset? could it use in exiting token by sending it with data:json:start & end ?
Please post the full API command submitted and error received.

The smart filter code in our example does not allow unit tracking to be applied to an already-issued asset. But you can of course always change the code.
pls check my command step below,

1. go to interactive mode with "multichain-cli"

2. "listpermissions issue" to get the issuer address

3. issue new token with serial numbers,
createrawsendfrom 1V9UtMjSsFfmLGyg8SRPx5nUsjCY3xuBpXSnhD  '{"19ejqgoWpSCqJBqPaqDJbwuRT3Bcv1tiBs1fJA":{"issue":{"raw":2000},"data":{"json":{"start":0,"end":2000}}}} '[{"create":"asset","name":"trynft1","multiple":10,"open":true,"details":{"origin":"bizex","stage":"one"}}]' send

4. got a Parsing error as following,
Parsing error:  '{"19ejqgoWpSCqJBqPaqDJbwuRT3Bcv1tiBs1fJA":{"issue":{"raw":2000},"data":{"json":{"start":0,"end":2000}}}} '[{"create":"asset","name":"trynft1","multiple":10,"open":true,"details":{"origin":"bizex","stage":"one"}}]' send
  
besides, with different transactions to trace the same asset, it can use "issuemore" cmd by raw transaction. does that mean we can't at first announce the qty of the new issued traceable  asset , and depends on real transaction happened to count the total numbers.
You missed the closing single quote after the second parameter.

I didn't understand the last question I'm afraid.
...