skynetcap / serum-data

Open Book Market Data interface on Solana
https://openserum.io
MIT License
38 stars 8 forks source link

Feature: Remove String usage when passing around pubkeys. [SRM-43] #36

Closed skynetcap closed 2 years ago

skynetcap commented 2 years ago

Background: In the codebase, "Solana addresses" such as token mint, exist in both String format at the custom Pubkey class with a very inconsistent mix.

E.g. Most maps use String as the Key for <"Address", Value> mappings, presumably due to lack of confidence in Pubkey's hashCode implementation.

Feature Idea: Change every KV map to use Pubkey class instead of String for the key, and any other similar String usage.

In combination with this ticket, create some tests in SolanaJ to test Pubkey hashing, if anything needs to be changed at the library level.

Additional Solution Notes: Linear: SRM-43