-
Notifications
You must be signed in to change notification settings - Fork 65
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
NFT-event file append pulls back events that are not associated with the asset-identifier #354
Comments
Thanks for the time spent on this @timstackblock, I think it's time for us to take on #287. |
sure no problem @lgalabru will do |
@timstackblock This issue should be fixed currently in the |
sure let me take a look |
Please scroll to the bottom of the explorer page in the link below to see the MINT NFT events chainhooks should be pulling back https://explorer.hiro.so/txid/ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.redeeem-nft-v0?chain=testnet Here is the error I am getting when I run the predicate Chainhooks seems like it cannot pull back the mint events for the NFT it is getting 0 occurrences but the NFT events are present. There is also a strange new error I have pasted the predicate below so you can run it
|
Hey @timstackblock, I've found what's going on here. The asset id you are using is |
This predicate worked for me: {
"chain": "stacks",
"uuid": "c3c3bf08-2035-40bf-a5eb-0e4295911f8a",
"name": "nft event file",
"version": 1,
"networks": {
"testnet": {
"start_block": 20835,
"end_block": 20835,
"if_this": {
"scope": "nft_event",
"asset_identifier": "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.redeeem-nft-v0::redeeem-nft-v0",
"actions": ["mint"]
},
"then_that": {
"file_append": {
"path": "automate/tests/stacks-predicates/nft-event/nft-event-file-result.json"
}
}
}
}
}
|
What are you using to gauge how many records are "pulled back"? As I mentioned in this comment, when an "occurrence" is listed in the Chainhook output, this means that a block has at least on transaction that matches a predicate's criteria. Because of that one match, the whole block will be sent to the output file. So, for block 20836, since there is at least one event that match the specified predicate, the whole block is output to the file. Inside of that block is all of the transactions in the block with all of that transaction's events. So, that one block counts as one "occurrence", but the data within that occurrence has multiple matching events. Does that make sense? Maybe what is confusing is that we output |
Got it makes sense I was expecting to count events but the block for the event is being pulled back |
Awesome! Closing this one as being fixed by #364! |
### Description Address hirosystems/chainhook#354 and hirosystems/chainhook#358 #### Breaking change? N/A ### Checklist - [x] All tests pass - [ ] Tests added in this PR (if applicable) --------- Co-authored-by: Ludo Galabru <ludo@hiro.so>
Describe the bug
NFT-event file append pulls back events that are not associated with the asset-identifier asset_identifier": "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.redeeem-nft-v0",
I ran this predicate and only wanted to return mint events for "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.redeeem-nft-v0"
Here is the predicate file
I successfully got records for that asset identifier which is great but the file is very large and there are a lot of records for other NFTs that do not mat ch the asset identifier "ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.redeeem-nft-v0",
Here are screen shots this is the GOOD data
Here is the bad data the event type also seems to not filter for "MINT:" events and is pulling in data that is outside of the scope. You will see transfer data and you will see asset identifiers for "asset_class_identifier":"ST39HFKW38EPPPRQ1R52GK02WCN8314DQAP1P6AYE.test-wn::wolfs-pack-academy" the filtering seems to be broken.
Please let me know if you need more information
The text was updated successfully, but these errors were encountered: