Bonfida / token-vesting

A Vesting Contract for the Solana Blockchain
https://vesting.bonfida.org/
Other
257 stars 171 forks source link

Please how to get vesting info using getProgramAccounts #45

Closed oasisMystre closed 7 months ago

oasisMystre commented 7 months ago
  const accountInfo = await getProgramAccounts(
    connection,
    new PublicKey("HJbNNxXVtT4beZo4W15GmNKedp7MZ8tkdPcQurFarrQE"),
    32,
    TOKEN_VESTING_PROGRAM_ID,
  );

I have the following code. I want to be able to get all vesting info for a particular wallet address

Chocopieca commented 7 months ago

Draw information in the transaction history and crawl it by staking criteria ?

Пт, 22 марта 2024 г. в 01:13, Include caleb.fun @.***>:

const accountInfo = await getProgramAccounts( connection, new PublicKey("HJbNNxXVtT4beZo4W15GmNKedp7MZ8tkdPcQurFarrQE"), 32, TOKEN_VESTING_PROGRAM_ID, );

I have the following code. I want to be able to get all vesting info for a particular wallet address

— Reply to this email directly, view it on GitHub https://github.com/Bonfida/token-vesting/issues/45, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALTBUDSVIIBKBLW7KIRRS6TYZNSSHAVCNFSM6AAAAABFCLFJJSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIYDCMZWGQYTQNI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

dr497 commented 7 months ago

You can perform a getProgramAccounts request and filter on the destination_address using the token address of the user

Chocopieca commented 7 months ago

Thank you for answering

Пт, 22 марта 2024 г. в 06:53, DR497 @.***>:

You can perform a getProgramAccounts request and filter on the destination_address using the token address of the user

— Reply to this email directly, view it on GitHub https://github.com/Bonfida/token-vesting/issues/45#issuecomment-2014351872, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALTBUDWMAVIWO2IIEGLTSRLYZO2MRAVCNFSM6AAAAABFCLFJJSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJUGM2TCOBXGI . You are receiving this because you commented.Message ID: @.***>

oasisMystre commented 7 months ago

Got this and was able to crawl and decode seed from the transaction data.

Drawbacks

  1. I need to keep getting transaction hash and call the parsed transaction RPC call to be able to extract seed from instruction data.
  2. I don't know why the unlocked state is not kept in the contract info.

Please I need to know the rust version and Solona CLI that can run the project. Keep getting dependencies error .