solana-labs / solana-accountsdb-plugin-postgres

94 stars 111 forks source link

Store `amount` and `owner` (not program) of token account #61

Open muhitrhn opened 1 year ago

muhitrhn commented 1 year ago

Is it possible to store amount and owner of token account in spl_token_owner_index table and update it same way the items of account table is kept up to date? @lijunwangs

lijunwangs commented 1 year ago

It is possible. But since we already have the information, you can just join the two tables: spl_token_owner_index and account table.

muhitrhn commented 1 year ago

Hmm could do that but the amount of tokens in the token account is not exposed in a column. Will it take too much space in database if all the accounts are stored with their deserialized data?