@@ -38,9 +38,7 @@ module pyth_lazer::pyth_lazer {
3838
3939 /// Initialize the Lazer contract with top authority and treasury. One-time operation.
4040 public entry fun initialize (
41- account: &signer ,
42- top_authority: address ,
43- treasury: address ,
41+ account: &signer , top_authority: address , treasury: address
4442 ) {
4543 // Initialize must be called by the contract account
4644 assert !(signer ::address_of (account) == @pyth_lazer , ENO_PERMISSIONS );
@@ -77,7 +75,7 @@ module pyth_lazer::pyth_lazer {
7775 let valid = false ;
7876 while (i < storage.trusted_signers.length ()) {
7977 let signer_info = vector ::borrow (&storage.trusted_signers, (i as u64 ));
80- if (signer_info.pubkey == trusted_signer
78+ if (& signer_info.pubkey == & trusted_signer
8179 && signer_info.expires_at > timestamp::now_seconds ()) {
8280 valid = true ;
8381 break
@@ -94,6 +92,7 @@ module pyth_lazer::pyth_lazer {
9492 EINVALID_SIGNATURE
9593 );
9694 }
95+
9796 /// Upsert a trusted signer's information or remove them
9897 public entry fun update_trusted_signer (
9998 account: &signer , trusted_signer: vector <u8 >, expires_at: u64
@@ -111,7 +110,7 @@ module pyth_lazer::pyth_lazer {
111110
112111 while (i < num_signers) {
113112 let signer_info = vector ::borrow (&storage.trusted_signers, (i as u64 ));
114- if (signer_info.pubkey == trusted_signer) {
113+ if (& signer_info.pubkey == & trusted_signer) {
115114 found = true ;
116115 break
117116 };
@@ -140,6 +139,7 @@ module pyth_lazer::pyth_lazer {
140139 let storage = borrow_global <Storage >(@pyth_lazer );
141140 storage.trusted_signers
142141 }
142+
143143 /// Signer pubkey getter
144144 public fun get_signer_pubkey (info: &TrustedSignerInfo ): vector <u8 > {
145145 info.pubkey
@@ -149,6 +149,4 @@ module pyth_lazer::pyth_lazer {
149149 public fun get_signer_expires_at (info: &TrustedSignerInfo ): u64 {
150150 info.expires_at
151151 }
152-
153-
154152}
0 commit comments