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

fatcat: stake #379

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fatcat: stake #379

wants to merge 1 commit into from

Conversation

0x0ece
Copy link
Contributor

@0x0ece 0x0ece commented Jan 28, 2025

No description provided.

@0x0ece 0x0ece marked this pull request as draft January 28, 2025 02:19
@0x0ece 0x0ece force-pushed the fatcat-stake branch 2 times, most recently from 827e1d9 to 7694623 Compare January 28, 2025 05:23
@0x0ece 0x0ece marked this pull request as ready for review January 28, 2025 05:23
return false;
return (
//@ts-ignore
window?.phantom?.solana?.isPhantom && window?.phantom?.solana?.isConnected
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now means that Phantom adds ComputeBudget by itself (see where isPhantom is used). Let's try it for a bit, if we don't like it we can revert.

preInstructions.push(
// @ts-ignore
await this.base.program.methods
.toggleMaxLock(true)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I staked JUP and saw that this is added in the initial tx.
When I tried fatcat without this I was getting an error, so I assume default is false, i.e. this ix is needed on creation.

@@ -341,7 +341,7 @@ pub fn init_locked_voter_escrow_handler<'info>(ctx: Context<InitLockedVoterEscro
locker: ctx.accounts.locker.to_account_info(),
escrow: ctx.accounts.escrow.to_account_info(),
escrow_owner: ctx.accounts.vault.to_account_info(),
payer: ctx.accounts.vault.to_account_info(),
payer: ctx.accounts.signer.to_account_info(),
system_program: ctx.accounts.system_program.to_account_info(),
},
vault_signer_seeds,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if paid by signer we probably don't need vault_signer_seeds.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh right, I'll review them all

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I removed the seeds from new_escrow and new_vote. The others move assets so most likely require the seeds.

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.

2 participants