@@ -4,6 +4,7 @@ use ephemeral_rollups_sdk::cpi::DelegateConfig;
44
55declare_id ! ( "3vAK9JQiDsKoQNwmcfeEng4Cnv22pYuj1ASfso7U4ukF" ) ;
66
7+ const DEFAULT_VALIDATOR_IDENTITY : Pubkey = pubkey ! ( "tEsT3eV6RFCWs1BZ7AXTzasHqTtMnMLCB2tjQ42TDXD" ) ;
78pub const TEST_PDA_SEED : & [ u8 ] = b"test-pda" ;
89pub const TEST_PDA_SEED_OTHER : & [ u8 ] = b"test-pda-other" ;
910
@@ -12,6 +13,7 @@ pub const TEST_PDA_SEED_OTHER: &[u8] = b"test-pda-other";
1213pub mod test_delegation {
1314 use super :: * ;
1415 use anchor_lang:: system_program:: { transfer, Transfer } ;
16+ use ephemeral_rollups_sdk:: types:: DelegateAccountArgs ;
1517
1618 pub fn initialize ( ctx : Context < Initialize > ) -> Result < ( ) > {
1719 let counter = & mut ctx. accounts . counter ;
@@ -36,7 +38,10 @@ pub mod test_delegation {
3638 ctx. accounts . delegate_pda (
3739 & ctx. accounts . payer ,
3840 & [ TEST_PDA_SEED ] ,
39- DelegateConfig :: default ( ) ,
41+ DelegateConfig {
42+ commit_frequency_ms : DelegateAccountArgs :: default ( ) . commit_frequency_ms ,
43+ validator : Some ( DEFAULT_VALIDATOR_IDENTITY ) ,
44+ } ,
4045 ) ?;
4146 Ok ( ( ) )
4247 }
@@ -46,12 +51,18 @@ pub mod test_delegation {
4651 ctx. accounts . delegate_pda (
4752 & ctx. accounts . payer ,
4853 & [ TEST_PDA_SEED ] ,
49- DelegateConfig :: default ( ) ,
54+ DelegateConfig {
55+ commit_frequency_ms : DelegateAccountArgs :: default ( ) . commit_frequency_ms ,
56+ validator : Some ( DEFAULT_VALIDATOR_IDENTITY ) ,
57+ } ,
5058 ) ?;
5159 ctx. accounts . delegate_pda_other (
5260 & ctx. accounts . payer ,
5361 & [ TEST_PDA_SEED_OTHER ] ,
54- DelegateConfig :: default ( ) ,
62+ DelegateConfig {
63+ commit_frequency_ms : DelegateAccountArgs :: default ( ) . commit_frequency_ms ,
64+ validator : Some ( DEFAULT_VALIDATOR_IDENTITY ) ,
65+ } ,
5566 ) ?;
5667 msg ! (
5768 "Delegated {:?}, owner {:?}" ,
0 commit comments