File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -422,6 +422,13 @@ pub mod autocrat_v0 {
422422
423423 Ok ( ( ) )
424424 }
425+
426+ pub fn transfer_to ( ctx : Context < TransferTo > , lamports : u64 ) -> Result < ( ) > {
427+ * * ctx. accounts . dao_treasury . to_account_info ( ) . try_borrow_mut_lamports ( ) ? -= lamports;
428+ * * ctx. accounts . lamport_receiver . to_account_info ( ) . try_borrow_mut_lamports ( ) ? += lamports;
429+
430+ Ok ( ( ) )
431+ }
425432}
426433
427434#[ derive( Accounts ) ]
@@ -514,6 +521,14 @@ pub struct Auth<'info> {
514521 pub dao_treasury : Signer < ' info > ,
515522}
516523
524+ #[ derive( Accounts ) ]
525+ pub struct TransferTo < ' info > {
526+ #[ account( mut ) ]
527+ pub dao_treasury : Signer < ' info > ,
528+ /// CHECK: no r/w, just lamport add
529+ pub lamport_receiver : UncheckedAccount < ' info > ,
530+ }
531+
517532impl From < & ProposalInstruction > for Instruction {
518533 fn from ( ix : & ProposalInstruction ) -> Self {
519534 Self {
You can’t perform that action at this time.
0 commit comments