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

Upstream add bank with bump #242

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lmvdz
Copy link

@lmvdz lmvdz commented Aug 27, 2024

I had issues with creating a bank_with_seed via CPI.
The bumps that I was generating on my program (before CPI) were not matching the bumps stored on the bank (post CPI).
I've added an extra function to support passing explicit bumps to be stored on the bank.

In the bellow image you can see that I am printing out each bump that is received via CPI.
The line lv {liquidity_vault_key}, bump {computed_bump_during_instruction} shows what the bump should be (matches what I am sending through CPI). This is found using Pubkey::find_program_address()
image

The following bumps are available to be explicitly set.

liquidity_vault_bump
liquidity_vault_authority_bump

insurance_vault_bump
insurance_vault_authority_bump

fee_vault_bump
fee_vault_authority_bump

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

Successfully merging this pull request may close these issues.

1 participant