Page MenuHomePhabricator

[ecash-herald] Parse NFTs and agora oneshot txs
ClosedPublic

Authored by bytesofman on Wed, Oct 30, 18:45.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Commits
rABCe242cfdf72d7: [ecash-herald] Parse NFTs and agora oneshot txs
Summary

Parse SLP1 NFT activity and agora ONESHOT activity, following the model started by agora partial parsing.

Also patches a bug in a flag variable. Tbh, getting these test mocks correct is quite time consuming, and I do not think the benefit of splitting that change out from this diff is worth the impact. Discovered in this implementation so should live here.

Going forward, will try to make these changes smaller. think this would be too crazy since "same thing as partials" ... but didn't quite work out that way.

Test Plan

npm test, review screenshots

image.png (649×578 px, 83 KB)

image.png (682×578 px, 154 KB)

image.png (544×578 px, 96 KB)

image.png (266×513 px, 37 KB)

Diff Detail

Repository
rABC Bitcoin ABC
Branch
herald-daily-nfts
Lint
Lint Errors
SeverityLocationCodeMessage
Errorapps/ecash-herald/src/parse.js:2200ESLINTno-unused-vars
Unit
No Test Coverage
Build Status
Buildable 30928
Build 61359: Build Diffecash-herald-tests
Build 61358: arc lint + arc unit

Event Timeline

bytesofman edited the summary of this revision. (Show Details)
bytesofman edited the test plan for this revision. (Show Details)
emack requested changes to this revision.Thu, Oct 31, 04:44
emack added a subscriber: emack.
emack added inline comments.
apps/ecash-herald/src/parse.js
2370–2387 ↗(On Diff #50563)

what's the difference between NONE and UNKNOWN tx types?

also these two blocks are basically identical

This revision now requires changes to proceed.Thu, Oct 31, 04:44
bytesofman marked an inline comment as done.
bytesofman added inline comments.
apps/ecash-herald/src/parse.js
2370–2387 ↗(On Diff #50563)

I don't really know. Both types are possible coming from ChronikClient, and both are unexpected. Even though the types are "possible" ... also it's possible it could never happen, and that this type of token doesn't ever use these cases. Would need to dig deeper into the chronik indexing to find out.

I handle them differently because, if these txs come up, I would like to know the difference. I think it's useful to keep for debugging purposes.

Always on the lookout for weird or edge case txs. An app like herald that processes every tx every day is a good way to collect them.

This revision is now accepted and ready to land.Thu, Oct 31, 12:05
This revision was automatically updated to reflect the committed changes.
bytesofman marked an inline comment as done.