<p>With Ardor 2.1.0e you can start a bundler which bundles only transactions with certain currency. Use CurrencyBundler filter with parameter the currency ID.</p>

<p>If you want to additionally filter only transactions sent to your account, you'll have to either write a new filter for that like</p>

<pre><code>public class RecipientBundler implements Bundler.Filter {

    @Override
    public boolean ok(Bundler bundler, ChildTransaction childTransaction) {
        return bundler.getAccountId() == childTransaction.getRecipientId();
    }

    @Override
    public String getName() {
        return "RecipientBundler";
    }

    @Override
    public String getDescription() {
        return "Only bundle the transactions sent to the bundler account";
    }

}
</code></pre>

<p>...or alternatively you can create the currency as controllable.</p>

<p>With 2.0.14 you'll have to write a filter like the one from above which checks both conditions - that the transaction is transferring your currency and that the transaction is transferring it to your account.</p>

<p>EDIT:
More details about the bundling in Ardor 2.1 can be found in <a href="https://nxtwiki.org/wiki/Bundling_v2.1" rel="nofollow noreferrer">nxtwiki</a></p>

CC BY-SA 4.0
2018-09-09T11:55:19.723Z
2018-09-11T12:34:49.440Z
2018-09-11T12:34:49.440Z
Petko Petkov
<p>I want to make a token that would be used as "gift card". So, when one person send it back to my account, I want to pay the transaction fees (in order to let people who haven't got ignis claim their gift).
So I need to set a bundler that only bundle, for free, transactions of this token to my account.
In testnet, 
this is the token: 8633185858724739856 (the ms currency GIFTZ@IGNIS)
this is my account: ARDOR-JHA7-XH2W-HMF4-CYQ7W
How should I configure the bundler?</p>

<ardor><ignis><bundler>
bundler configuration to accept 1 ms currency to 1 account (Ardor)
palheiro
# bundler configuration to accept 1 ms currency to 1 account (Ardor)

(Asked by: username_0 on 2018-09-08)

I want to make a token that would be used as "gift card". So, when one person send it back to my account, I want to pay the transaction fees (in order to let people who haven't got ignis claim their gift).
So I need to set a bundler that only bundle, for free, transactions of this token to my account.
In testnet,
this is the token: 8633185858724739856 (the ms currency GIFTZ@IGNIS)
this is my account: ARDOR-JHA7-XH2W-HMF4-CYQ7W
How should I configure the bundler?

**Tags:** ardor, ignis, bundler


---

## 1 answers

### Answer by username_1 on 2018-09-09. Score: 3 | Accepted answer

With Ardor 2.1.0e you can start a bundler which bundles only transactions with certain currency. Use CurrencyBundler filter with parameter the currency ID.

If you want to additionally filter only transactions sent to your account, you'll have to either write a new filter for that like

```
public class RecipientBundler implements Bundler.Filter {

    @Override
    public boolean ok(Bundler bundler, ChildTransaction childTransaction) {
        return bundler.getAccountId() == childTransaction.getRecipientId();
    }

    @Override
    public String getName() {
        return "RecipientBundler";
    }

    @Override
    public String getDescription() {
        return "Only bundle the transactions sent to the bundler account";
    }

}

```

...or alternatively you can create the currency as controllable.

With 2.0.14 you'll have to write a filter like the one from above which checks both conditions - that the transaction is transferring your currency and that the transaction is transferring it to your account.

EDIT:
More details about the bundling in Ardor 2.1 can be found in [nxtwiki](https://nxtwiki.org/wiki/Bundling_v2.1)


---

