@@ -5,8 +5,9 @@ import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
55import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol " ;
66
77contract PythLazer is OwnableUpgradeable , UUPSUpgradeable {
8- TrustedSignerInfo[2 ] public trustedSigners ;
8+ TrustedSignerInfo[2 ] private deprecatedTrustedSigners ;
99 uint256 public verification_fee;
10+ TrustedSignerInfo[200 ] internal trustedSigners;
1011
1112 struct TrustedSignerInfo {
1213 address pubkey;
@@ -16,10 +17,18 @@ contract PythLazer is OwnableUpgradeable, UUPSUpgradeable {
1617 function initialize (address _topAuthority ) public initializer {
1718 __Ownable_init (_topAuthority);
1819 __UUPSUpgradeable_init ();
20+
21+ verification_fee = 1 wei ;
1922 }
2023
2124 function migrate () public onlyOwner {
25+ require (trustedSigners.length >= deprecatedTrustedSigners.length , "trustedSigners cannot be migrated to smaller array " );
26+
2227 verification_fee = 1 wei ;
28+ for (uint8 i = 0 ; i < deprecatedTrustedSigners.length ; i++ ) {
29+ trustedSigners[i].pubkey = deprecatedTrustedSigners[i].pubkey;
30+ trustedSigners[i].expiresAt = deprecatedTrustedSigners[i].expiresAt;
31+ }
2332 }
2433
2534 function _authorizeUpgrade (address ) internal override onlyOwner {}
@@ -104,6 +113,6 @@ contract PythLazer is OwnableUpgradeable, UUPSUpgradeable {
104113 }
105114
106115 function version () public pure returns (string memory ) {
107- return "0.1.0 " ;
116+ return "0.1.1 " ;
108117 }
109118}
0 commit comments