Cannot create an asset via RPC

+1 vote

$addr = "1ZGADSt8YgXLP2x1gZ8QLATTQGszp2htEBfE81";
$ass = $_GET["asset"];
$a = 'curl -s --user multichainrpc:PASSWORD --data-binary \'';
$b = '{"jsonrpc": "1.0", "id":"curltest", "method": "issue", "params":["';
$c = '", "';
$d = '", 1000, 1';
$e = '] }\' -H "content-type: text/plain;" http://127.0.0.1:6298/';
$cmd = $a  . $b . $addr . c . $ass  . $d . $e;

Calling it from remote in a PHP file,

The raw result is

{"result":null,"error":{"code":-5,"message":"Invalid address"},"id":"curltest"}

Invalid address.
What am I doing wrong?

asked Aug 23, 2016 by Zenech

1 Answer

0 votes

The best way to debug this kind of thing is to issue the command in multichain-cli, and make a copy of the JSON payload output in the first line. Then get your own code to outputs its JSON payload to some place you can copy from. Then compare the two copies.

answered Aug 24, 2016 by MultiChain
...