@@ -512,6 +512,13 @@ pub fn handle_update_serum_fulfillment_config_status(
512512 Ok ( ( ) )
513513}
514514
515+ pub fn handle_delete_serum_fulfillment_config (
516+ _ctx : Context < DeleteSerumFulfillmentConfig > ,
517+ ) -> Result < ( ) > {
518+ msg ! ( "deleted serum fulfillment config" ) ;
519+ Ok ( ( ) )
520+ }
521+
515522pub fn handle_update_serum_vault ( ctx : Context < UpdateSerumVault > ) -> Result < ( ) > {
516523 let vault = & ctx. accounts . srm_vault ;
517524 validate ! (
@@ -610,6 +617,13 @@ pub fn handle_update_openbook_v2_fulfillment_config_status(
610617 Ok ( ( ) )
611618}
612619
620+ pub fn handle_delete_openbook_v2_fulfillment_config (
621+ _ctx : Context < DeleteOpenbookV2FulfillmentConfig > ,
622+ ) -> Result < ( ) > {
623+ msg ! ( "deleted openbook v2 fulfillment config" ) ;
624+ Ok ( ( ) )
625+ }
626+
613627pub fn handle_initialize_phoenix_fulfillment_config (
614628 ctx : Context < InitializePhoenixFulfillmentConfig > ,
615629 market_index : u16 ,
@@ -5370,13 +5384,25 @@ pub struct InitializeSerumFulfillmentConfig<'info> {
53705384
53715385#[ derive( Accounts ) ]
53725386pub struct UpdateSerumFulfillmentConfig < ' info > {
5387+ pub state : Box < Account < ' info , State > > ,
5388+ #[ account( mut ) ]
5389+ pub serum_fulfillment_config : AccountLoader < ' info , SerumV3FulfillmentConfig > ,
53735390 #[ account(
5374- has_one = admin
5391+ mut ,
5392+ constraint = admin. key( ) == state. admin || admin. key( ) == admin_hot_wallet:: id( )
53755393 ) ]
5394+ pub admin : Signer < ' info > ,
5395+ }
5396+
5397+ #[ derive( Accounts ) ]
5398+ pub struct DeleteSerumFulfillmentConfig < ' info > {
53765399 pub state : Box < Account < ' info , State > > ,
5377- #[ account( mut ) ]
5400+ #[ account( mut , close = admin ) ]
53785401 pub serum_fulfillment_config : AccountLoader < ' info , SerumV3FulfillmentConfig > ,
5379- #[ account( mut ) ]
5402+ #[ account(
5403+ mut ,
5404+ constraint = admin. key( ) == state. admin || admin. key( ) == admin_hot_wallet:: id( )
5405+ ) ]
53805406 pub admin : Signer < ' info > ,
53815407}
53825408
@@ -5949,13 +5975,25 @@ pub struct InitializeOpenbookV2FulfillmentConfig<'info> {
59495975
59505976#[ derive( Accounts ) ]
59515977pub struct UpdateOpenbookV2FulfillmentConfig < ' info > {
5978+ pub state : Box < Account < ' info , State > > ,
5979+ #[ account( mut ) ]
5980+ pub openbook_v2_fulfillment_config : AccountLoader < ' info , OpenbookV2FulfillmentConfig > ,
59525981 #[ account(
5953- has_one = admin
5982+ mut ,
5983+ constraint = admin. key( ) == state. admin || admin. key( ) == admin_hot_wallet:: id( )
59545984 ) ]
5985+ pub admin : Signer < ' info > ,
5986+ }
5987+
5988+ #[ derive( Accounts ) ]
5989+ pub struct DeleteOpenbookV2FulfillmentConfig < ' info > {
59555990 pub state : Box < Account < ' info , State > > ,
5956- #[ account( mut ) ]
5991+ #[ account( mut , close = admin ) ]
59575992 pub openbook_v2_fulfillment_config : AccountLoader < ' info , OpenbookV2FulfillmentConfig > ,
5958- #[ account( mut ) ]
5993+ #[ account(
5994+ mut ,
5995+ constraint = admin. key( ) == state. admin || admin. key( ) == admin_hot_wallet:: id( )
5996+ ) ]
59595997 pub admin : Signer < ' info > ,
59605998}
59615999
0 commit comments