unable to send the asset from address to another in single node

+1 vote

Listaddresses:

testchain: getaddresses

{"method":"getaddresses","params":[],"id":1,"chain_name":"testchain"}

[
    "1UksywJLY5zjSKnyuqUKjNPv1JkvfUMBR8dMsq",
    "1KpxsYx3oBc9bM42YsbELVYxgGYthZMnpbj58Q"
]

Both the addresses has send and receive permissions

Below asset created for address 1KpxsYx3oBc9bM42YsbELVYxgGYthZMnpbj58Q.

"name" : "INDIA",
        "issuetxid" : "146f13a6caec9fe43082e7ee9e5583c78696e4fc04394cf0ff9b8b0fb39135c7",
        "assetref" : "1434-266-28436",
        "multiple" : 100,
        "units" : 0.01000000,
        "open" : false,
        "details" : {
        },
        "issueqty" : 2000.00000000,
        "issueraw" : 200000
    }

Getting below errors while sending the asset

1. testchain: sendassetfrom 1KpxsYx3oBc9bM42YsbELVYxgGYthZMnpbj58Q 1UksywJLY5zjSKnyuqUKjNPv1JkvfUMBR8dMsq 0.01 "{\"1434-266-28436\":100}"                   
{"method":"sendassetfrom","params":["1KpxsYx3oBc9bM42YsbELVYxgGYthZMnpbj58Q","1UksywJLY5zjSKnyuqUKjNPv1JkvfUMBR8dMsq","0.01",{"1434-266-28436":100}],"id":1,"chain_name":"testchain"}

error code: -8
error message:
Issue transaction with this name not found: 0.01


2. testchain: sendassetfrom 1KpxsYx3oBc9bM42YsbELVYxgGYthZMnpbj58Q 1UksywJLY5zjSKnyuqUKjNPv1JkvfUMBR8dMsq 0.01 1434-266-28436 100                           
{"method":"sendassetfrom","params":["1KpxsYx3oBc9bM42YsbELVYxgGYthZMnpbj58Q","1UksywJLY5zjSKnyuqUKjNPv1JkvfUMBR8dMsq","0.01",1434,100],"id":1,"chain_name":"testchain"}

error code: -3
error message:
Invalid amount

asked Sep 16, 2016 by Rajasekhar

1 Answer

0 votes

This is just a matter of getting the parameter ordering right for the sendassetfrom call. Following your examples, you want something like:

sendassetfrom 1KpxsYx3oBc9bM42YsbELVYxgGYthZMnpbj58Q 1UksywJLY5zjSKnyuqUKjNPv1JkvfUMBR8dMsq 1434-266-28436 100

answered Sep 19, 2016 by MultiChain
...