Comments (9)
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.
Same as history plugin, but at least code and receiver account name.
from history-tools.
@tbfleming adding similar filter-on
as in deprecated history plugin should be a good start!
from history-tools.
@tbfleming is there any forecast for the implementation of the feature?
from history-tools.
Add filtering capability is the most important feature for out team and for EOSIO future. Please, do it ASAP.
from history-tools.
Let's expand on this a bit. What kinds of things should it support filtering on?
from history-tools.
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.
It's now in the develop branch
from history-tools.
@tbfleming Thanks a lot !
from history-tools.
Related Issues (20)
- catch_and_close Stream overrun HOT 9
- catch_and_close w/ Bad variant index HOT 5
- How to build this project in centos?
- action_trace in the table transaction_trace is messy code
- hex string has incorrect length & stuck at switch forks at block HOT 3
- How to decode transaction_trace.act.data v1.0.0 HOT 1
- transaction_trace.account_ram_delta in v1.0.0
- New Issue to test Automation's Github/Jira integration HOT 4
- no data in the block_info table
- No rocksdb in build. Removed from CMake HOT 3
- Performance improvement for fill-pg
- what's your plan to support eosio 2.0.x completely?
- add https server functionality HOT 2
- query descending order HOT 12
- Building on mac HOT 1
- Double Data In Table Not Unpacking Properly HOT 3
- Wasm-ql Query Lumps Strings Into Last Structs Key
- How to use it? HOT 4
- The binary link is broken
- Does the balance-snapshot example work? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from history-tools.