This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
Provide transaction fee payer and system program via sysvars #18588
Labels
stale
[bot only] Added to stale content; results in auto-close after a week.
When creating accounts inside an instruction, one needs to provide two additional accounts, which are often not otherwise used--the system program and payer--for the CPI to the system program
It would be convenient to be able to reference these
AccountInfo
s via sysvars, so that clients don't need to provide them in the transaction, and so that programs can abstract away this detail.For example, in Anchor, we have to define a set of accounts creating + initializing an account as follows
But it would be nice to only define the single relevant account.
The text was updated successfully, but these errors were encountered: