Skip to content
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

Provide standard middlewares for Blockchain primitive types #19

Open
2 tasks
MHHukiewitz opened this issue Jan 25, 2023 · 0 comments
Open
2 tasks

Provide standard middlewares for Blockchain primitive types #19

MHHukiewitz opened this issue Jan 25, 2023 · 0 comments
Labels
enhancement New feature or request usability Impacts the user/dev experience

Comments

@MHHukiewitz
Copy link
Member

When parsing non-javascript primitives, such as larger-than-52-bytes integers, we resort to types such as BN from bn.js (or sometimes bignumber.js in Ethereum's SDK).

Besides parsing from buffer-layout, IDL, or ABI, we need to

  • unify between very similar types (like BN and BigNumber)
  • define a common middleware that handles SerDe for these types between microservices

https://borsh.io/ (then 'Specification') gives a good overview of what types we are talking about in Solana (and also Near and similar chains).

The most important culprit here is still BN, so I would also consider this issue to be mostly done when BNs are being correctly serialized and then deserialized as a BN into the indexer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request usability Impacts the user/dev experience
Projects
None yet
Development

No branches or pull requests

1 participant