<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>MultiChain Developer Q&amp;A - Recent questions tagged transaction-filters</title>
<link>https://www.multichain.com/qa/tag/transaction-filters</link>
<description>Powered by Question2Answer</description>
<item>
<title>how to upgrade stream filters code? And how to delete existing filter?</title>
<link>https://www.multichain.com/qa/19313/how-upgrade-stream-filters-code-how-delete-existing-filter</link>
<description>how to update filters code which is already created and s there any way to delete the filter?</description>
<guid isPermaLink="true">https://www.multichain.com/qa/19313/how-upgrade-stream-filters-code-how-delete-existing-filter</guid>
<pubDate>Wed, 15 Apr 2020 14:04:29 +0000</pubDate>
</item>
<item>
<title>Error code: -26 error message:16: bad-txns-input-duplicate</title>
<link>https://www.multichain.com/qa/19143/error-code-26-error-message-16-bad-txns-input-duplicate</link>
<description>&lt;p&gt;Hello, multichain, I want to use a transaction filter: approve asset transfer&amp;nbsp;which is mentioned in Github link below:&lt;/p&gt;&lt;p&gt;Link:&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/MultiChain/smart-filter-examples/blob/master/transaction-filters/approve-asset-transfer.js&quot;&gt;https://github.com/MultiChain/smart-filter-examples/blob/master/transaction-filters/approve-asset-transfer.js&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Basically this filter is used to check whether the transaction is pre-approved or not. and for making an approval they have given steps in the above github link.&lt;/p&gt;&lt;p&gt;Basically first I created DemoAsset1 with quantity 100 in the address: 1KB85GgVgHE8fw6tMMeQ7DYS9fkY192yq8ey1V then I followed below steps&lt;/p&gt;&lt;p&gt;step1: to send an approval&amp;nbsp;&lt;/p&gt;&lt;p&gt;Command:&lt;/p&gt;&lt;p&gt;sendfrom &quot;1KB85GgVgHE8fw6tMMeQ7DYS9fkY192yq8ey1V&quot; &quot;1KB85GgVgHE8fw6tMMeQ7DYS9fkY192yq8ey1V&quot; '{&quot;DemoAsset1&quot;:100,&lt;strong&gt;&quot;data&quot;:{&quot;json&quot;:{&quot;type&quot;:&quot;approval&quot;,&quot;maxraw&quot;:1000,&quot;expiry&quot;:1586083567}&lt;/strong&gt;}}'&lt;/p&gt;&lt;p&gt;Address 1KB5G.. already had an asset with the name: DemoAsset1 but I wanted to add inline metadata i.e.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color:#FFFF00&quot;&gt;&quot;data&quot;:{&quot;json&quot;:{&quot;type&quot;:&quot;approval&quot;,&quot;maxraw&quot;:1000,&quot;expiry&quot;:1586083567&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color:#FFFFFF&quot;&gt;&amp;nbsp;-Necessity for adding &quot;data&quot; attribute was that in the github link provided above, filter code is checking for thr type:&quot;approval&quot;. The transaction with type approval can only pass that filter code.&amp;nbsp;&amp;nbsp;That is why it was important for me to add this inline metadata&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color:#FFFFFF&quot;&gt;So for adding inline meta data I used first above mentioned command &quot;sendfrom&quot; where you can see from-address and to-address is same. that means I'm sending DemoAsset1 to the same address but including inline meta data i.e. &quot;data&quot; attribute.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color:#FFFFFF&quot;&gt;Step 2:&amp;nbsp; command:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;createrawsendfrom &quot;1KB85GgVgHE8fw6tMMeQ7DYS9fkY192yq8ey1V&quot; &quot;{\&quot;&lt;span style=&quot;background-color:#FFFF00&quot;&gt;1SF9LjmCqsA3NtVVPUe54wYwyGt6NnAG21ufU9&lt;/span&gt;\&quot;: {\&quot;DemoAsset1\&quot;:5}}&quot;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Using above command now I am trying to send amount 5of DemoAsset1 from&amp;nbsp;1KB85GgV...address to&amp;nbsp;&lt;span style=&quot;background-color:#FFFFFF&quot;&gt;1SF9..address. Yet I have not signed the transaction. now in output I'm getting one tx-hex.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color:#FFFFFF&quot;&gt;Step3:&lt;/span&gt;&amp;nbsp;Command:&lt;/p&gt;&lt;p&gt;appendrawtransaction&lt;br&gt;&quot;010000000180699ec087e795406692b37696e4a6ca6430dd79d29fe71995d8750c7248d2040000000000ffffffff0200000000000000003776a914bac7060886d618cf2ead989a6d65b449e071497588ac1c73706b71784b4999c545a9b3494f7bdf06fa06c032000000000000007500000000000000003776a9148678ce5ac500e4f06bacdb58d7397319baed19be88ac1c73706b71784b4999c545a9b3494f7bdf06fa06c0b6030000000000007500000000&quot; &quot;[{\&quot;txid\&quot;:\&quot;&lt;span style=&quot;background-color:#FFFF00&quot;&gt;04d248720c75d89519e79fd279dd3064caa6e49676b392664095e787c09e6980&lt;/span&gt;\&quot;,\&quot;vout\&quot;:&lt;span style=&quot;background-color:#FFFF00&quot;&gt;0&lt;/span&gt;}]&quot; &quot;{\&quot; 1KB85GgVgHE8fw6tMMeQ7DYS9fkY192yq8ey1V\&quot;:{\&quot;DemoAsset1\&quot;:5}}&quot;&lt;/p&gt;&lt;p&gt;In above command using &lt;strong&gt;appendrawtransaction&lt;/strong&gt;&amp;nbsp;I'm appending highlighted txid and vout to the above transaction which was created using &lt;strong&gt;createrawtransaction.&amp;nbsp;&lt;/strong&gt;&amp;nbsp;Added txid and vout is the txid of DemoAsset1. I got that txid and vout by using command &lt;strong&gt;listunspent.&lt;/strong&gt;&amp;nbsp; O/P: I got another long tx-hex code.&lt;/p&gt;&lt;p&gt;Step 4:&amp;nbsp;&amp;nbsp;&lt;strong&gt;signrawtransaction&lt;/strong&gt; above-long-tx-hex&lt;/p&gt;&lt;p&gt;o/p: Long-tx-hex.&lt;/p&gt;&lt;p&gt;Step 5:&amp;nbsp; Now to send raw transaction I finally took last step:&lt;/p&gt;&lt;p&gt;&lt;strong&gt;sendrawtransaction long-tx-hex(got in step 4)&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;After attempting step 5. I got the error mentioned in the question.&amp;nbsp;&lt;span style=&quot;font-size:14px&quot;&gt;&lt;span style=&quot;background-color:#FF8C00&quot;&gt;Error code: -26 error message:16: bad-txns-input-duplicate .&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color:#FFFFFF&quot;&gt;i'm attaching here the decoded raw transaction after step 3:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;I want to share UTXO but characters limit is not allowing me.&amp;nbsp; So I will ask relatable question with the title&lt;/p&gt;&lt;p&gt;&quot;&lt;span style=&quot;background-color:#FFFF00&quot;&gt;Error code: -26 error message:16: bad-txns-input-duplicate part 2&lt;/span&gt;&quot; please refer to this question too for understanding this error fully.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/19143/error-code-26-error-message-16-bad-txns-input-duplicate</guid>
<pubDate>Sun, 05 Apr 2020 17:04:38 +0000</pubDate>
</item>
<item>
<title>Please Provide Example of 4 steps of &quot;To use an approval&quot; of transaction-filter github code: To use an approval&quot;</title>
<link>https://www.multichain.com/qa/18926/please-provide-example-approval-transaction-filter-approval</link>
<description>&lt;p&gt;Sir the ways you mentioned are not helpful&lt;/p&gt;&lt;p&gt;Referer this code:&lt;/p&gt;&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/MultiChain/smart-filter-examples/blob/master/transaction-filters/approve-asset-transfer.js&quot;&gt;https://github.com/MultiChain/smart-filter-examples/blob/master/transaction-filters/approve-asset-transfer.js&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Here they have mentioned steps &quot;to use an approval&quot; in which the commands which are mentioned are:&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:rgb(106, 115, 125); font-family:sfmono-regular,consolas,liberation mono,menlo,monospace; font-size:12px&quot;&gt;createrawsendfrom &lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span style=&quot;color:rgb(106, 115, 125); font-family:sfmono-regular,consolas,liberation mono,menlo,monospace; font-size:12px&quot;&gt;appendrawtransaction, there is no syntax given in any links provided by multichain and the links which you have mentioned in my previous question.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:rgb(106, 115, 125); font-family:sfmono-regular,consolas,liberation mono,menlo,monospace; font-size:12px&quot;&gt;You may say the other commands are similar so I should refer that, so I would like to tell you that I have already referred and tried executing that and accordingly I also tried above commands but I'm facing syntax issue that is why I wanted proper guidance. If you could provide me that 4 steps example with syntax then I would really appreciate it.&lt;/span&gt;&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/18926/please-provide-example-approval-transaction-filter-approval</guid>
<pubDate>Sat, 21 Mar 2020 10:30:32 +0000</pubDate>
</item>
<item>
<title>Can you please provide me an example of &quot;To use an approval&quot; steps:</title>
<link>https://www.multichain.com/qa/18904/can-you-please-provide-me-an-example-of-use-an-approval-steps</link>
<description>&lt;p&gt;&lt;span style=&quot;background-color:rgb(250, 250, 250); font-family:helvetica,arial,sans-serif; font-size:12px&quot;&gt;Can you please give me an example of those 4 steps?? I know the commands are given but if any demo example you can give consisting of those 4 steps would be really helpful for me. Please I request you.&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span style=&quot;background-color:rgb(250, 250, 250); font-family:helvetica,arial,sans-serif; font-size:12px&quot;&gt;In that code link it is said that first, we need to send approval, so please provide me the example where you first send approval using &quot;sendfrom&quot; command and then those 4 steps.&lt;/span&gt;&lt;br&gt;&lt;span style=&quot;background-color:rgb(250, 250, 250); font-family:helvetica,arial,sans-serif; font-size:12px&quot;&gt;Sender address you can take :1KB85GgVgHE8fw6tMMeQ7DYS9fkY192yk8uy1V&lt;/span&gt;&lt;br&gt;&lt;span style=&quot;background-color:rgb(250, 250, 250); font-family:helvetica,arial,sans-serif; font-size:12px&quot;&gt;Receiver address you can take :1MB85GgVgHE8fw6tMMeQ7DYS9fkY192yk8uy1V&lt;/span&gt;&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/18904/can-you-please-provide-me-an-example-of-use-an-approval-steps</guid>
<pubDate>Thu, 19 Mar 2020 16:45:32 +0000</pubDate>
</item>
<item>
<title>Github transaction filter example: Approve Asset Transfer, I'm not able to understand this code?</title>
<link>https://www.multichain.com/qa/18808/github-transaction-filter-example-approve-transfer-understand</link>
<description>&lt;p&gt;Code link:&amp;nbsp;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/MultiChain/smart-filter-examples/blob/master/transaction-filters/approve-asset-transfer.js&quot;&gt;https://github.com/MultiChain/smart-filter-examples/blob/master/transaction-filters/approve-asset-transfer.js&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Error:&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color:rgb(255, 187, 204); font-family:source sans pro,calibri,candara,arial,sans-serif; font-size:15px&quot;&gt;Filter code blocked this transaction with the reason: (time taken 0.001472 seconds)&lt;/span&gt;&lt;br&gt;&lt;span style=&quot;background-color:rgb(255, 187, 204); font-family:source sans pro,calibri,candara,arial,sans-serif; font-size:15px&quot;&gt;Address 1KB85GgVgHyters6tMMeQ7DYS9fkY192yq8ey1V did not include sufficient USD spending approvals in this transaction false undefined&lt;/span&gt;&lt;/p&gt;&lt;p&gt;I'm trying to understand GitHub transaction filter example- approve asset transfer.&lt;/p&gt;&lt;p&gt;If I have understood it correctly, that code is processing an only pre-approved transaction. pre-approved transactions are those whom&amp;nbsp;approvals are given by the address with low-1 permissions. And that approvals are provided by the command:&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:rgb(106, 115, 125); font-family:sfmono-regular,consolas,liberation mono,menlo,monospace; font-size:12px&quot;&gt;sendfrom &amp;lt;approver-address&amp;gt; &amp;lt;approvee-address&amp;gt; {&quot;data&quot;:{&quot;json&quot;:{&quot;type&quot;:&quot;approval&quot;,&quot;maxraw&quot;:&amp;lt;rawqty&amp;gt;,&quot;expiry&quot;:&amp;lt;expiry&amp;gt;}}}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#6a737d; font-family:sfmono-regular,consolas,liberation mono,menlo,monospace&quot;&gt;&lt;span style=&quot;font-size:12px&quot;&gt;So I gave approvals using the above command and I set max raw quantity and expiry as last block time. And then I tried to run this code. But still, I'm getting the above error. To identify that my approval is set properly, I'm checking variable like&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;for (var inputnum=0; inputnum&amp;lt;tx.vin.length; inputnum++) {&lt;/p&gt;&lt;p&gt;var spentoutput=getfiltertxinput(inputnum);&lt;/p&gt;&lt;p&gt;if (&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; outputisapproval(spentoutput) &amp;amp;&amp;amp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (spentoutput.scriptPubKey.addresses[0]==address)&amp;amp;&amp;amp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (spentoutput.data[0].json.expiry &amp;gt;= getlastblockinfo().time)&lt;/p&gt;&lt;p&gt;) {&lt;/p&gt;&lt;p&gt;requiredraw-=spentoutput.data[0].json.maxraw; /* we can use this approval */&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;if (requiredraw&amp;gt;0)&lt;/p&gt;&lt;p&gt;return &quot;Address &quot;+address+&quot; did not include sufficient USD spending approvals in this transaction &quot;+hasapproval+&quot; &quot;+&lt;span style=&quot;background-color:#FFFF00&quot;&gt;spentoutput.data;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;why spentoutput.data is returned as undefined even when I have given approvals:&lt;/p&gt;&lt;p&gt;command:&lt;/p&gt;&lt;p&gt;sendfrom &lt;span style=&quot;background-color:rgb(255, 187, 204); color:rgb(51, 51, 51); font-family:source sans pro,calibri,candara,arial,sans-serif; font-size:15px&quot;&gt;1KB85GgVgHyters&lt;/span&gt;&lt;span style=&quot;background-color:rgb(255, 187, 204); color:rgb(51, 51, 51); font-family:source sans pro,calibri,candara,arial,sans-serif; font-size:15px&quot;&gt;6tMMeQ7DYS9fkY192yq8ey1V&amp;nbsp; &lt;/span&gt;&amp;nbsp; 192ruBtNjWSXUQi2xpWmka5M14rUbNNxzxTbcb '{&quot;data&quot;:{&quot;json&quot;:{&quot;type&quot;:&quot;approval&quot;,&quot;maxraw&quot;:10000000,&quot;expiry&quot;:1584258634}}}'&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Please resolve my doubt asap.&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/18808/github-transaction-filter-example-approve-transfer-understand</guid>
<pubDate>Sun, 15 Mar 2020 10:16:57 +0000</pubDate>
</item>
<item>
<title>How to create transaction filters?</title>
<link>https://www.multichain.com/qa/17721/how-to-create-transaction-filters</link>
<description>Hello everyone,&lt;br /&gt;
&lt;br /&gt;
I am a beginner. Currently I have started to learn Multichain's transaction filter. But when i read the documentation i am not able to understand that how do i start creating transaction filters? Where it should be located? How it is processed by every node?&lt;br /&gt;
&lt;br /&gt;
It would be really great if someone can explain me its each step for How to create transaction filters? Where to create? How to process or run that transaction filters?&lt;br /&gt;
&lt;br /&gt;
Please help me with this asap.</description>
<guid isPermaLink="true">https://www.multichain.com/qa/17721/how-to-create-transaction-filters</guid>
<pubDate>Fri, 24 Jan 2020 05:15:14 +0000</pubDate>
</item>
<item>
<title>Max value in max-std-element-size ?</title>
<link>https://www.multichain.com/qa/15171/max-value-in-max-std-element-size</link>
<description>I'm trying to set it to 150KB but everything above 100KB fails. &lt;br /&gt;
&lt;br /&gt;
I need to create a 102KB Transaction Filter and would like how I can work around that?&lt;br /&gt;
&lt;br /&gt;
Sorry for the short description, I'm from mobile.</description>
<guid isPermaLink="true">https://www.multichain.com/qa/15171/max-value-in-max-std-element-size</guid>
<pubDate>Wed, 21 Aug 2019 18:17:58 +0000</pubDate>
</item>
<item>
<title>forcing a transaction to go through an external API before sending</title>
<link>https://www.multichain.com/qa/14225/forcing-transaction-to-through-external-api-before-sending</link>
<description>Is it possible to use transaction filters to make a sending transaction go through an external API, to get a success or fail for it to progress or fail the transaction?.. It would send the receiver address to an external API, check that address to meet criteria and then return yes or no response that could be acted upon by the transaction filter...perhaps with a timeout if nothing received within say 10 seconds..</description>
<guid isPermaLink="true">https://www.multichain.com/qa/14225/forcing-transaction-to-through-external-api-before-sending</guid>
<pubDate>Tue, 28 May 2019 17:02:37 +0000</pubDate>
</item>
<item>
<title>Creating new transaction filter</title>
<link>https://www.multichain.com/qa/12742/creating-new-transaction-filter</link>
<description>Hello Devs,&lt;br /&gt;
&lt;br /&gt;
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?&lt;br /&gt;
&lt;br /&gt;
create txfilter filter4 &amp;quot;{}&amp;quot; &amp;quot;function filtertransaction()&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
var addressbalancechange=getfilterassetbalances(&amp;quot;USD&amp;quot;, true);&lt;br /&gt;
&lt;br /&gt;
for (var address in addressbalancechange)&lt;br /&gt;
&lt;br /&gt;
if (addressbalancechange[address]&amp;gt;1000)&lt;br /&gt;
&lt;br /&gt;
return &amp;quot;Address &amp;quot;+address+&amp;quot; is receiving too much USD&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
}&amp;quot;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/12742/creating-new-transaction-filter</guid>
<pubDate>Tue, 05 Feb 2019 08:59:00 +0000</pubDate>
</item>
<item>
<title>reject transaction filter working before approvefrom is executed</title>
<link>https://www.multichain.com/qa/11361/reject-transaction-filter-working-before-approvefrom-executed</link>
<description>&lt;p&gt;&lt;span style=&quot;font-size:16px&quot;&gt;I tried to deploy the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:rgb(36, 41, 46); font-family:-apple-system,system-ui,segoe ui,helvetica,arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol; font-size:16px&quot;&gt;reject-all-transactions.js given in the code examples. The filter was compiled and then when I tried to run the approvefrom true for the filter it just doesn't allow it. The filter is working already for the approvefrom command only. It doesn't apply to other transactions. Attaching my code execution below.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;testingsmartfilters: getfiltercode rejectfilter&lt;/p&gt;&lt;p&gt;{&quot;method&quot;:&quot;getfiltercode&quot;,&quot;params&quot;:[&quot;rejectfilter&quot;],&quot;id&quot;:&quot;31237136-1540182035&quot;,&quot;chain_name&quot;:&quot;testingsmartfilters&quot;}&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;function filtertransaction() { return 'All transactions rejected' }&lt;/p&gt;&lt;p&gt;testingsmartfilters: listtxfilters&lt;/p&gt;&lt;p&gt;{&quot;method&quot;:&quot;listtxfilters&quot;,&quot;params&quot;:[],&quot;id&quot;:&quot;62675408-1540182044&quot;,&quot;chain_name&quot;:&quot;testingsmartfilters&quot;}&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;[&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;name&quot; : &quot;firstfilter&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;createtxid&quot; : &quot;a72e6bcb8e49cc07c81b694d22d85ffb4be591d27b09ae6581fb9eea18626718&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;filterref&quot; : &quot;47-265-11943&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;language&quot; : &quot;javascript&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;codelength&quot; : 139,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;for&quot; : [&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;compiled&quot; : true,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;approved&quot; : true&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; },&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;name&quot; : &quot;rejectfilter&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;createtxid&quot; : &quot;2aed8e513fc295af15010bd39409f26a7033017dfad98c5b53c4dc051959ba6d&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;filterref&quot; : &quot;71-265-60714&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;language&quot; : &quot;javascript&quot;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;codelength&quot; : 67,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;for&quot; : [&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;compiled&quot; : true,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;approved&quot; : false&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;]&lt;/p&gt;&lt;p&gt;testingsmartfilters: approvefrom 1KHCUryUcu8MBcvwiF5zgxePbVfm18JJv4 rejectfilter false&lt;/p&gt;&lt;p&gt;{&quot;method&quot;:&quot;approvefrom&quot;,&quot;params&quot;:[&quot;1KHCUryUcu8MBcvwiF5zgxePbVfm18JJv4&quot;,&quot;rejectfilter&quot;,false],&quot;id&quot;:&quot;84112443-1540182070&quot;,&quot;chain_name&quot;:&quot;testingsmartfilters&quot;}&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;2e28c4b7d7d823d169183ca02194ebdab2c06b186004094436ef6680c4d3fa4d&lt;/p&gt;&lt;p&gt;testingsmartfilters: approvefrom 1KHCUryUcu8MBcvwiF5zgxePbVfm18JJv4 rejectfilter true&lt;/p&gt;&lt;p&gt;{&quot;method&quot;:&quot;approvefrom&quot;,&quot;params&quot;:[&quot;1KHCUryUcu8MBcvwiF5zgxePbVfm18JJv4&quot;,&quot;rejectfilter&quot;,true],&quot;id&quot;:&quot;47671806-1540182074&quot;,&quot;chain_name&quot;:&quot;testingsmartfilters&quot;}&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;error code: -26&lt;/p&gt;&lt;p&gt;error message:&lt;/p&gt;&lt;p&gt;Error: The transaction was rejected: 64: The transaction did not pass filter rejectfilter (txid 2aed8e513fc295af15010bd39409f26a7033017dfad98c5b53c4dc051959ba6d): All transactions rejected&lt;/p&gt;&lt;p&gt;testingsmartfilters:&lt;/p&gt;&lt;/blockquote&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/11361/reject-transaction-filter-working-before-approvefrom-executed</guid>
<pubDate>Mon, 22 Oct 2018 04:32:47 +0000</pubDate>
</item>
<item>
<title>Issues when applying tx filters</title>
<link>https://www.multichain.com/qa/11316/issues-when-applying-tx-filters</link>
<description>&lt;p&gt;Hi team (possible this is a duplication, as previous one I asked w/o being a member, sr for any inconvenience),&lt;/p&gt;&lt;p&gt;I've been trying to test the latest tx filters by using this &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/MultiChain/smart-filter-examples/blob/master/transaction-filters/limit-asset-transfer.js&quot;&gt;script&lt;/a&gt;&amp;nbsp;to limit asset for USD, but I had some issues, as below:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;The filter actually filtered out the tx in the strange behaviour, as given, if value &amp;gt; 1000 it will be error, but even when I put 100 or 500, it also rejected the tx&lt;/li&gt;&lt;li&gt;When I approved the tx filters, the blockchain stopped producing new blocks (check with block height), all attempts to start again the chain are not successful&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Here are the commands I've used:&lt;/div&gt;&lt;div&gt;&lt;table border=&quot;1&quot; cellspacing=&quot;1&quot; cellpadding=&quot;1&quot; style=&quot;width:500px&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;multichain-cli test1 issuefrom 1Cr6VxbSQ5TMfegbUSgY4t1F2ing2QH2yVLgAd 1Cr6VxbSQ5TMfegbUSgY4t1F2ing2QH2yVLgAd '{&quot;name&quot;:&quot;USD&quot;,&quot;open&quot;:true}' 50000 0.01 0 '{&quot;origin&quot;:&quot;us&quot;, &quot;stage&quot;:&quot;01&quot;, &quot;purpose&quot;:&quot;parts prepayment&quot;}'&lt;/p&gt;&lt;p&gt;multichain-cli test1 sendasset 1bND5DeePFNmrWBoeaVn4z6WJiYSQv9jMwSwY7 USD 3000&lt;/p&gt;&lt;p&gt;multichain-cli test1 create txfilter testfilter '{&quot;for&quot;:&quot;USD&quot;}' 'function outputtoaddressbalancechange(output, spent, addressbalancechange) { if (output.assets) { for (var assetnum=0; assetnum&amp;lt;output.assets.length; assetnum++) { if (output.assets[assetnum].name==&quot;USD&quot;) { for (var addressnum=0; addressnum&amp;lt;output.scriptPubKey.addresses.length; addressnum++) { var address=output.scriptPubKey.addresses[addressnum]; if (!addressbalancechange.hasOwnProperty(address)) addressbalancechange[address]=0; var rawchange=spent ? -output.assets[assetnum].raw : output.assets[assetnum].raw; addressbalancechange[address]+=rawchange; } } } } } function filtertransaction() { var tx=getfiltertransaction(); var addressbalancechange={}; for (var inputnum=0; inputnum&amp;lt;tx.vin.length; inputnum++) { outputtoaddressbalancechange(getfiltertxinput(inputnum), true, addressbalancechange); } for (var outputnum=0; outputnum&amp;lt;tx.vout.length; outputnum++) { outputtoaddressbalancechange(tx.vout[outputnum], false, addressbalancechange); } for (var address in addressbalancechange) if (addressbalancechange[address]&amp;gt;1000) return &quot;Address &quot;+address+&quot; is receiving too much USD&quot;; }'&lt;/p&gt;&lt;p&gt;multichain-cli test1 approvefrom 1bND5DeePFNmrWBoeaVn4z6WJiYSQv9jMwSwY7 testfilter true&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Do you have any reasons for the strange behavior from the chain?&lt;/p&gt;&lt;p&gt;Thank you for your support,&lt;/p&gt;&lt;p&gt;Best,&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/11316/issues-when-applying-tx-filters</guid>
<pubDate>Mon, 15 Oct 2018 12:42:39 +0000</pubDate>
</item>
<item>
<title>Smart Filters and JSON-RPC APIs</title>
<link>https://www.multichain.com/qa/11280/smart-filters-and-json-rpc-apis</link>
<description>Is it possible to use in Smart Filters the standard Multichain APIs, other than those explicitly listed in the page &amp;quot;Working with Smart Filters&amp;quot; (getassetinfo, getblockinfo,...)?&lt;br /&gt;
&lt;br /&gt;
Thanks.</description>
<guid isPermaLink="true">https://www.multichain.com/qa/11280/smart-filters-and-json-rpc-apis</guid>
<pubDate>Tue, 09 Oct 2018 17:53:33 +0000</pubDate>
</item>
<item>
<title>So... Smart Filters!</title>
<link>https://www.multichain.com/qa/11043/so-smart-filters</link>
<description>Once a smart filter (transaction-filter) is approved, is it applied to all transactions on that blockchain from that block onwards?&lt;br /&gt;
&lt;br /&gt;
Please define a callback in layman's terms.&lt;br /&gt;
&lt;br /&gt;
Can one smart filter reference another?&lt;br /&gt;
&lt;br /&gt;
Thanks</description>
<guid isPermaLink="true">https://www.multichain.com/qa/11043/so-smart-filters</guid>
<pubDate>Thu, 13 Sep 2018 22:25:13 +0000</pubDate>
</item>
</channel>
</rss>