Page MenuHomePhabricator

[ecash-herald] Parse token ids for slp2
ClosedPublic

Authored by bytesofman on Jul 24 2023, 23:17.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC329402aee48b: [ecash-herald] Parse token ids for slp2
Summary

Add more detailed parsing for SLP2 txs

  • Had to upgrade ecash-script to get swapEndianness function
  • Wrote getSlpTwoToken script to manually parse token genesis info as this is not yet indexed
  • Added caching file for token info, can expand this to include common slp v1 or other tokens. Helpful for other tokens but necessary here as the chronik call won't get slp2 genesis info.
Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

improve script name, add to package.json

apps/ecash-herald/src/parse.js
393 ↗(On Diff #41573)

the upgraded ecash-script is a breaking change, consumeNextPush now returns {push, pushdata} instead of just push

apps/ecash-herald/test/parseTests.js
240 ↗(On Diff #41573)

breaking change in ecash-script upgrade

This revision is now accepted and ready to land.Jul 25 2023, 11:48
This revision was automatically updated to reflect the committed changes.