@@ -208,6 +208,17 @@ pub enum VoteInstruction {
208208 /// account is not reserved.
209209 /// 2. `[SIGNER]` Vote account withdraw authority
210210 UpdateCommissionCollector ( CommissionKind ) ,
211+
212+ /// Update the commission rate in basis points for the specified commission
213+ /// rate kind in a vote account.
214+ ///
215+ /// # Account references
216+ /// 0. `[WRITE]` Vote account to be updated with the new commission
217+ /// 1. `[SIGNER]` Vote account withdraw authority
218+ UpdateCommissionBps {
219+ commission_bps : u16 ,
220+ kind : CommissionKind ,
221+ } ,
211222}
212223
213224impl VoteInstruction {
@@ -547,6 +558,28 @@ pub fn update_commission_collector(
547558 )
548559}
549560
561+ #[ cfg( feature = "bincode" ) ]
562+ pub fn update_commission_bps (
563+ vote_pubkey : & Pubkey ,
564+ authorized_withdrawer_pubkey : & Pubkey ,
565+ kind : CommissionKind ,
566+ commission_bps : u16 ,
567+ ) -> Instruction {
568+ let account_metas = vec ! [
569+ AccountMeta :: new( * vote_pubkey, false ) ,
570+ AccountMeta :: new_readonly( * authorized_withdrawer_pubkey, true ) ,
571+ ] ;
572+
573+ Instruction :: new_with_bincode (
574+ id ( ) ,
575+ & VoteInstruction :: UpdateCommissionBps {
576+ kind,
577+ commission_bps,
578+ } ,
579+ account_metas,
580+ )
581+ }
582+
550583#[ cfg( feature = "bincode" ) ]
551584pub fn vote ( vote_pubkey : & Pubkey , authorized_voter_pubkey : & Pubkey , vote : Vote ) -> Instruction {
552585 let account_metas = vec ! [
0 commit comments