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

state of an account at a particular slot/block #3127

Open
degenSumi opened this issue Oct 10, 2024 · 2 comments
Open

state of an account at a particular slot/block #3127

degenSumi opened this issue Oct 10, 2024 · 2 comments

Comments

@degenSumi
Copy link

hey,

I am trying to get the historical state of a token account so that we can track an users balance historically,
however i can't find links in this answer in a related question:

Hi @leoluk, we have created an AccountsDb plugin framework enabling replicating accounts data to external data stores such as db or Kafka on top of which one can build applications serving clients with accounts data an offloading the core validator. We have an reference implementation with PostgreSQL. You can get more info in https://github.com/lijunwangs/solana/tree/master/accountsdb-plugin-interface and https://github.com/lijunwangs/solana/tree/master/accountsdb-plugin-postgres. This enables one to persist the historical data for accounts. Please check it out and let me know if you have any questions/suggestions.

@degenSumi
Copy link
Author

degenSumi commented Oct 10, 2024

i am getting the same data for these two requests:

let oldInfo = await connection.getAccountInfo(new PublicKey("CYwvrMNTYzS9bXftriexXmcgRavXfNo8octro6Yjzv7h"), {
    minContextSlot: 0
});

console.log(oldInfo)
let accounInfo = await connection.getAccountInfo(new PublicKey("CYwvrMNTYzS9bXftriexXmcgRavXfNo8octro6Yjzv7h"), {
    minContextSlot: 294756213
});
console.log(accountInfo);

@Alexandr-zarea
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants