Skip to main content

Address lists

Bloomr offers an unique feature that will prove very helpful to those who are willing to track an arbitrary large number of contracts, or of accounts: address lists.

They are lists of addresses (or of hashes) which will both usable in scripts and in filters (see Filtering).

Once created, via in your Bloomr admin panel, you can use an address list in a script like so:

const myList = getAddressList('my list name');

onTx(tx => {
// use it as you wish, either to modify it...
myList.add(tx.to);
myList.delete(tx.to);

// ...or to use it as a filter
if (myList.has(tx.to)) {
// ...
}
})

These address lists are also usable in filters, in which you can, for instance, filter all transactions that are targetting an address that is in an address list.

Address lists are shared by all scripts, meaning that you can use them to make scripts and filters interacting.

info

What makes it really interesting is that checking if an address list contains an address is FREE in Bloomr. Even when your address list contains millions of addresses.

Example use case 1: self-maintaining list of LPs

Suppose that you identified a contract that is called each time a new liquidity pool is created.

You could have:

  • An address list LPs
  • A script that tracks liquidity pools creations (with a filter on this LP creator contract), and adds new ones in the LPs address lists
  • Another script, which uses the LPs address list as filter, and which tracks LP prices changes, like in this example

... that way, you'll have a self-maintaining set of scripts to track all on-chain token prices !

Example use case 2: track your users balances

Suppose that you want to track balance changes for the users of your service.

  • You could have a my users address list.
  • Then, you could update this address list from your servers using our API when a user subscribes
  • And finally, you could run the script described in the Solidity section to track all balances for your users, with my users as a filter on the Transfer event (see Filtering section)