Implicitly charging commit and commit_and_undelegate fees by increasing spent CU #128
GabrielePicco
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
The current commit CPI includes a payer address (which is currently not used, but was planned to be part of some implementation of #122 )
Current commit cpi used from the clients to integrate in programs:
which requires to add 2 accounts to a wrapper instruction, going from
to
Additionally, we may need to add accounts depending on the implementation, as the charging isn't yet implemented.
Improvement proposal
fee_payer
by consuming CU in themagic_program
commit instruction. Every commit will cost an amount of CU, which will cost more lamports to thefee_payer
Benefits
This would simplify the integration, remove one accounts from the tx input and additionally reuse SVM standard CU charging instead of implementing something custom (e.g. charging trough a system_transfer)
Notes
Beta Was this translation helpful? Give feedback.
All reactions