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

program: add fuel sweep account #1449

Merged
merged 16 commits into from
Feb 7, 2025
Merged

Conversation

wphan
Copy link
Member

@wphan wphan commented Jan 29, 2025

Adds a FuelSweep account that can be permissionlessly created for users whose fuel amounts are approaching u32 max.

new instructions:

  • permissionless
    • initialize_fuel_overflow to create a new FuelOverflow account
    • sweep_fuel to sweep fuel accumulated in UserStats to the user's FuelOverflow account
  • admin
    • reset_fuel_season to zero out UserStats and optional FuelOverflow accounts and emit a log, essentially snapshotting a user's fuel for the season

programs/drift/src/instructions/user.rs Show resolved Hide resolved
programs/drift/src/state/user.rs Outdated Show resolved Hide resolved
programs/drift/src/state/user.rs Outdated Show resolved Hide resolved
programs/drift/src/state/user.rs Outdated Show resolved Hide resolved
@crispheaney crispheaney merged commit 0eacedf into master Feb 7, 2025
6 of 9 checks passed
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