@@ -139,7 +139,7 @@ impl WormholeContract {
139
139
self . governance_chain_id . set ( U256 :: from ( governance_chain_id) ) ;
140
140
self . governance_contract . set ( governance_contract) ;
141
141
142
- self . store_gs ( 0 , initial_guardians, 0 ) ?;
142
+ self . store_gs ( 4 , initial_guardians, 0 ) ?;
143
143
144
144
self . initialized . set ( true ) ;
145
145
Ok ( ( ) )
@@ -376,22 +376,6 @@ impl WormholeContract {
376
376
Ok ( ( ) )
377
377
}
378
378
379
- fn store_guardian_set ( & mut self , set_index : u32 , guardians : Vec < Address > , expiration_time : u32 ) -> Result < ( ) , WormholeError > {
380
- if guardians. is_empty ( ) {
381
- return Err ( WormholeError :: InvalidInput ) ;
382
- }
383
-
384
- self . guardian_set_sizes . setter ( U256 :: from ( set_index) ) . set ( U256 :: from ( guardians. len ( ) ) ) ;
385
- self . guardian_set_expiry . setter ( U256 :: from ( set_index) ) . set ( U256 :: from ( expiration_time) ) ;
386
-
387
- for ( i, guardian) in guardians. iter ( ) . enumerate ( ) {
388
- let key = self . compute_gs_key ( set_index, i as u8 ) ;
389
- self . guardian_keys . setter ( key) . set ( * guardian) ;
390
- }
391
-
392
- Ok ( ( ) )
393
- }
394
-
395
379
fn verify_signature (
396
380
& self ,
397
381
hash : & FixedBytes < 32 > ,
@@ -620,7 +604,7 @@ mod tests {
620
604
let guardians = current_guardians ( ) ;
621
605
let governance_contract = Address :: from_slice ( & GOVERNANCE_CONTRACT . to_be_bytes :: < 32 > ( ) [ 12 ..32 ] ) ;
622
606
contract. initialize ( guardians, CHAIN_ID , GOVERNANCE_CHAIN_ID , governance_contract) . unwrap ( ) ;
623
- contract. store_guardian_set ( 4 , current_guardians ( ) , 0 ) ;
607
+ contract. store_gs ( 4 , current_guardians ( ) , 0 ) ;
624
608
contract
625
609
}
626
610
0 commit comments