GithubHelp home page GithubHelp logo

Comments (9)

gituser avatar gituser commented on June 1, 2024 1

I agree on this, there should be similar mechanism for filtering as in original history plugin or some sort of. To be able to filter transactions on certain token, receiver and sender.

from history-tools.

alexander-a-semin avatar alexander-a-semin commented on June 1, 2024 1

Same as history plugin, but at least code and receiver account name.

from history-tools.

gituser avatar gituser commented on June 1, 2024 1

@tbfleming adding similar filter-on as in deprecated history plugin should be a good start!

from history-tools.

alexander-a-semin avatar alexander-a-semin commented on June 1, 2024 1

@tbfleming is there any forecast for the implementation of the feature?

from history-tools.

alexander-a-semin avatar alexander-a-semin commented on June 1, 2024

Add filtering capability is the most important feature for out team and for EOSIO future. Please, do it ASAP.

from history-tools.

tbfleming avatar tbfleming commented on June 1, 2024

Let's expand on this a bit. What kinds of things should it support filtering on?

from history-tools.

tbfleming avatar tbfleming commented on June 1, 2024

I'm working on this now. Here's a snippet describing it which will go into the documentation:

Transaction filters

--fill-trx creates a set of transaction filtering rules. It has the following syntax:

--fill-trx include:status:receiver:act_account:act_name

It ignores whitespace within the pattern.

Field May be empty? Description
include No "+" to pass a matching action, or "-" to not pass
status Yes Transaction status. May be one of: executed, soft_fail, hard_fail, delayed, expired
receiver Yes The account which originally received the action, or the account which received a copy (require_recipient).
act_account Yes The account which received the original. This is called code or first_receiver in the CDT.
act_name Yes The name of the action

--fill-trx may be specified multiple times. This creates a list of rules. The filter checks an action against each rule in order. As soon as it finds a rule which matches the action it stops. The action passes if include is +. The action doesn't pass if include is -. If no rules match, then the action doesn't pass.

The filler writes a transaction to the database if any of the transaction's actions pass the filter. When this happens, it writes all actions in the transaction, including ones that didn't pass.

Transaction filter examples

  • Include all transactions. Includes deferred transactions which haven't executed
    yet or have failed. This is the default if no --fill-trx is provided:
--fill-trx "+:        :            :            :"
  • Include all executed transactions. Excludes deferred transactions which haven't executed
    yet or have failed:
--fill-trx "+:executed:            :            :"
  • Include all executed transactions, but exclude some spam:
--fill-trx "-:        :blocktwitter:blocktwitter:"
--fill-trx "+:executed:            :            :"
  • Include all executed transfers. Includes all token contracts.
--fill-trx "+:executed:            :            :transfer"
  • Include all executed transfers. Includes only eosio.token.
--fill-trx "+:executed:            :eosio.token :transfer"
  • Include all executed transfers which notify specific accounts. Includes all token contracts.
--fill-trx "+:executed:myaccount1  :            :transfer"
--fill-trx "+:executed:myaccount2  :            :transfer"
  • Include all executed transfers which notify specific accounts. Only includes eosio.token.
--fill-trx "+:executed:myaccount1  :eosio.token :transfer"
--fill-trx "+:executed:myaccount2  :eosio.token :transfer"

from history-tools.

tbfleming avatar tbfleming commented on June 1, 2024

It's now in the develop branch

from history-tools.

alexander-a-semin avatar alexander-a-semin commented on June 1, 2024

@tbfleming Thanks a lot !

from history-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.