Creating new transaction filter

+1 vote
Hello Devs,

I am deploying new transaction filter in netwok but it's throwing me parsing error and not getting deployed on chain can any body suggest me what to do now?

create txfilter filter4 "{}" "function filtertransaction()


var addressbalancechange=getfilterassetbalances("USD", true);

for (var address in addressbalancechange)

if (addressbalancechange[address]>1000)

return "Address "+address+" is receiving too much USD";

asked Feb 5, 2019 by kheteshrotangan

1 Answer

0 votes
You are using double quotes both to escape the last parameter, and also within the last parameter to denote a JavaScript string. This won't work since the quotes inside JavaScript will finish the parameter string. We recommend using single quotes to surround the last parameter and double quotes within the JavaScript.
answered Feb 5, 2019 by MultiChain