sendasset command is not working

+1 vote
Hi
I have created to block chain and also added the asset into the both the chains. I have also added the addmultisigaddress in both the chains. Below are the details of my blockchains.

Chain 1details
-----------------------------------------------------------------------------
Chain Name: testchain
Addresses:

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

[
    "1FaNZ3SzrB2hwN4TtDsyp5Rb6PmKDjxKBbbjb8",
    "4Z1p4sa5aAidDeqNmcK4LeHuAJ7XcUhk3cDgQM",
    "13ySwhHi91SmJcqRt2TSBThQ3L8uU7FV5mC77i"
]
asset details:

[
    {
        "name" : "coins",
        "assetref" : "11627-267-51091",
        "qty" : 1000000.00000000
    }
]

Chain 2 details
-----------------------------------------------------------------------------------------------------

Chain Name: testchain1
address:

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

[
    "1VcZ3hwwjXMoe4WgdkqA7kuzNL9P8YjaiDLU4D",
    "48ZKf33ioA8kcC8jGFcBhEdLUoGjjHPr4zMb2X",
    "1BSMPJi5rxwdYmx42Rjg8dHjW5sbwwKnBfJami"
]

asset details:

{"method":"getaddressbalances","params":["1VcZ3hwwjXMoe4WgdkqA7kuzNL9P8YjaiDLU4D"],"id":1,"chain_name":"testchain1"}

[
    {
        "name" : "coins",
        "assetref" : null,
        "qty" : 1000000.00000000
    }
]

I have try below command to send the asset from testchain to testchain1

multichain-cli testchain sendasset "1BSMPJi5rxwdYmx42Rjg8dHjW5sbwwKnBfJami" "coins" 100

multichain-cli testchain sendasset "48ZKf33ioA8kcC8jGFcBhEdLUoGjjHPr4zMb2X" "coins" 100

multichain-cli testchain sendasset "1VcZ3hwwjXMoe4WgdkqA7kuzNL9P8YjaiDLU4D" "coins" 100

multichain-cli testchain sendasset "1VcZ3hwwjXMoe4WgdkqA7kuzNL9P8YjaiDLU4D" 11627-267-51091 100

But every time i got below result.

{"method":"sendassettoaddress","params":["1BSMPJi5rxwdYmx42Rjg8dHjW5sbwwKnBfJami","11627-267-51091",100],"id":1,"chain_name":"testchain"}

error code: -5
error message:
Invalid address

Thank you in advance for your help.
asked Dec 15, 2016 by ankitjain7133

1 Answer

0 votes

To prevent user error, each blockchain uses a different namespace for its blockchain addresses, unless you explicitly set things up otherwise. So you can't use an address created on one chain with another one. If you want the same addressing scheme, you need to make blockchains which have the same values for these parameters:

address-pubkeyhash-version

address-scripthash-version

private-key-version

address-checksum-value

answered Dec 15, 2016 by MultiChain
...