You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### TL;DR
Added `token_type` field to the `HolderModel` struct and included it in the serialization function.
We need it to properly detect token types for NFTs handlers, specifically for further metadata resolutions.
### What changed?
- Added a new `TokenType` field to the `HolderModel` struct with JSON tag `token_type` and ClickHouse tag `token_type`
- Updated the `serializeHolder` function to populate the new `TokenType` field from the `holder.TokenType` value
### How to test?
1. Make a request to an endpoint that returns token holder data
2. Verify that the response now includes the `token_type` field in the JSON output
3. Check that the value matches the expected token type for the given token
### Why make this change?
This change enhances the token holder API response by including the token type information, which allows clients to distinguish between different token standards (e.g., ERC-20, ERC-721, ERC-1155) without having to make additional queries. This provides more complete information about tokens in a single response.
0 commit comments