(2) Settler: Intent lifecycle#48
Merged
GuidoDipietro merged 3 commits intosolana/settlerfrom Jan 6, 2026
Merged
Conversation
PedroAraoz
requested changes
Dec 23, 2025
Member
PedroAraoz
left a comment
There was a problem hiding this comment.
I would update the imports to make them a bit shorter and reduce verbosity
from: Box<Account<'info, crate::whitelist::accounts::GlobalSettings>>,
to: Box<Account<'info, WhitelistSettings>>,
the same with the errors as we discussed offline.
PedroAraoz
requested changes
Jan 2, 2026
packages/svm/programs/settler/src/instructions/create_intent.rs
Outdated
Show resolved
Hide resolved
| bump | ||
| )] | ||
| /// This PDA must be uninitialized | ||
| pub fulfilled_intent: SystemAccount<'info>, |
Member
There was a problem hiding this comment.
are we doing something with this account?
Member
Author
There was a problem hiding this comment.
We check this in a future instruction to validate that a given intent has not already been executed on-chain.
I.e., this is our on-chain proof that a given intent was fulfilled.
PedroAraoz
approved these changes
Jan 6, 2026
Rebased onto solana/settler after squash merge of solana/1-whitelist. Includes all changes from solana/2-settler-intent-lifecycle branch.
5dd1f58 to
5de59bb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Settler program, with instructions pertinent to the lifecycle of an
IntentPDA.Includes Rust program, Typescript SDK, and Typescript tests.
Instructions
Following are instructions for creation, extension, and deletion of an
Intent.Additionally, the
initializeandset_paused_stateinstructions were added to manage the Settler program's global state.initializeSets global state, defining the Whitelist program to be used and the paused state.
This program doesn't have an admin.
set_paused_statePauses or unpauses program. The admin of the defined Whitelist program can execute this action.
create_intentInitializes an
IntentPDA with all its fields.NOTE: Some of these fields might not be necessary to have on-chain (or a hash might be enough). I have simply added them all until the Settler's first iteration is done and I can remove what is not necessary, as it is easier to remove than to add here. For now, we are assuming that we need all the fields.
Technical debt: Check that the Intent hash is correct.
extend_intentAdds more
data,max_fees, oreventsto anIntentPDA in case we ran out of space in thecreate_intentcall.Solana transactions have a limited size of
1232bytes, so we can only pass in that many bytes (even less since there's other overhead) as instruction parameters. For this reason,Intents have an intermediate state withis_final=falsewhere they can still be extended by theintent_creatorwith more data added in further transactions, non-atomically.claim_stale_intentIf an
Intentexpired (deadline is in the past), theintent_creatorcan close the PDA and reclaim the rent, as this account is now useless.State
IntentPDA defining an Intent with all its fields.
NOTE: This account will be reduced in a future iteration, with fields that aren't necessary on-chain being removed.
FulfilledIntentA minimal on-chain proof that an
Intentexisted and was executed, to save as much rent as possible.When an
Intentis executed, it is closed, rent goes back to the creator, and this PDA is initialized in its place.SettlerSettingsGlobal state of the program.
NOTE: Some files might have content from future PRs given this series of PRs come from a larger PR that was split (#41). I have tried to keep this to a minimum but bear this in mind.