New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow regex for contains
based chainhooks
#348
Comments
This is a WIP feature. @ludo and @MicaiahReid, Please assign it back to me once the feature is developed and is ready for doc updates. |
### Description This PR introduces the ability to match on a `print_event`'s values with a regex string rather than just with the previous `contains` field. Fixes #348 ### Example This allows the following new `if_this` condition for a stacks predicate: ```JSON { "scope": "print_event", "contract_identifier": "ST3AXH4EBHD63FCFPTZ8GR29TNTVWDYPGY0KDY5E5.loan-data", "regex": "... some regex to match on the event data" } ``` --- ### Checklist - [x] All tests pass - [x] Tests added in this PR (if applicable)
Hey @LakshmiLavanyaKasturi, this feature is ready to document now! I've added a test that demonstrates the new |
## [1.1.0](v1.0.0...v1.1.0) (2023-10-10) ### Features * allow matching with regex for stacks print_event ([#380](#380)) ([131809e](131809e)), closes [#348](#348) * augment predicate status returned by GET/LIST endpoints ([#397](#397)) ([a100263](a100263)), closes [#396](#396) [#324](#324) [#390](#390) [#402](#402) [#403](#403) * introduce "data_handler_tx" ([ee486f3](ee486f3)) ### Bug Fixes * build error ([85d4d91](85d4d91)) * build errors ([b9ff1aa](b9ff1aa)) * build errro ([be0c229](be0c229)) * bump retries and delays ([aff3690](aff3690)) * chainhook not being registered ([5a809c6](5a809c6)) * ensure that the parent block was previously received. else, fetch it ([2755266](2755266)) * migrate to finer zmq lib ([4eb5a07](4eb5a07)) * prevent panic when scanning from genesis block ([#408](#408)) ([1868a06](1868a06)) * remove event_handlers ([6fecfd2](6fecfd2)) * retrieve blocks until tip ([5213f5f](5213f5f)) * revisit approach ([67a34dc](67a34dc)) * use crossbeam channels ([ea33553](ea33553)) * workflow ([d434c93](d434c93))
🎉 This issue has been resolved in version 1.1.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
## [1.1.0](v1.0.0...v1.1.0) (2023-10-10) ### Features * allow matching with regex for stacks print_event ([#380](#380)) ([131809e](131809e)), closes [#348](#348) * augment predicate status returned by GET/LIST endpoints ([#397](#397)) ([a100263](a100263)), closes [#396](#396) [#324](#324) [#390](#390) [#402](#402) [#403](#403) * introduce "data_handler_tx" ([ee486f3](ee486f3)) ### Bug Fixes * build error ([85d4d91](85d4d91)) * build errors ([b9ff1aa](b9ff1aa)) * build errro ([be0c229](be0c229)) * bump retries and delays ([aff3690](aff3690)) * chainhook not being registered ([5a809c6](5a809c6)) * ensure that the parent block was previously received. else, fetch it ([2755266](2755266)) * migrate to finer zmq lib ([4eb5a07](4eb5a07)) * prevent panic when scanning from genesis block ([#408](#408)) ([1868a06](1868a06)) * remove event_handlers ([6fecfd2](6fecfd2)) * retrieve blocks until tip ([5213f5f](5213f5f)) * revisit approach ([67a34dc](67a34dc)) * use crossbeam channels ([ea33553](ea33553)) * workflow ([d434c93](d434c93))
When creating a chainhook that listens for a print_event, it'd be great to be able to use regex to define the condition for
contains
.Example: I'd like to create a print_event predicate that only listens for
stack-extend
orstack-increase
but excludestack-aggregation-*
The text was updated successfully, but these errors were encountered: