root@iZ8vba3a56x4hi6y1glllgZ:/home/mc/multichain-2.0-beta-1# ./multichain-util create c
MultiChain 2.0 beta 1 Utilities (latest protocol 20006)
root@iZ8vba3a56x4hi6y1glllgZ:/home/mc/multichain-2.0-beta-1# ./multichaind c -daemon
root@iZ8vba3a56x4hi6y1glllgZ:/home/mc/multichain-2.0-beta-1# ./multichain-cli c create txfilter filter1 '{}' 'function filtertransaction(){var tx=getfiltertransaction();if (tx.vout.length<=2);return "<<<<<222222";}'
{"method":"create","params":["txfilter","filter1",{},"function filtertransaction(){var tx=getfiltertransaction();if (tx.vout.length<=2);return \"<<<<<222222\";}"],"id":"34131784-1546260530","chain_name":"c"}
5e584aa864586a8724d628a4ec494b213e7b7ec877f0c60f03bb55d008958b72
root@iZ8vba3a56x4hi6y1glllgZ:/home/mc/multichain-2.0-beta-1# ./multichain-cli c listaddresses
{"method":"listaddresses","params":[],"id":"57864117-1546260544","chain_name":"c"}
[
{
"address" : "1WqPocUrRwNe6DS1MM9yTUpjSZm8Y2jbmxRP9M",
"ismine" : true
}
]
root@iZ8vba3a56x4hi6y1glllgZ:/home/mc/multichain-2.0-beta-1# ./multichain-cli c approvefrom 1WqPocUrRwNe6DS1MM9yTUpjSZm8Y2jbmxRP9M filter1 true
{"method":"approvefrom","params":["1WqPocUrRwNe6DS1MM9yTUpjSZm8Y2jbmxRP9M","filter1",true],"id":"56866778-1546260581","chain_name":"c"}
error code: -26
error message:
Error: The transaction was rejected: 64: The transaction did not pass filter filter1: <<<<<222222