Skip to content

Commit

Permalink
Change storage layout for trusted signers
Browse files Browse the repository at this point in the history
  • Loading branch information
darunrs committed Dec 6, 2024
1 parent 1bf3ae1 commit 28aa2c2
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions lazer/contracts/evm/src/PythLazer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";

contract PythLazer is OwnableUpgradeable, UUPSUpgradeable {
TrustedSignerInfo[2] private deprecatedTrustedSigners;
uint256 public verification_fee;
TrustedSignerInfo[100] internal trustedSigners;
uint256 public verification_fee;

struct TrustedSignerInfo {
address pubkey;
Expand All @@ -22,16 +21,7 @@ contract PythLazer is OwnableUpgradeable, UUPSUpgradeable {
}

function migrate() public onlyOwner {
require(
trustedSigners.length >= deprecatedTrustedSigners.length,
"trustedSigners cannot be migrated to smaller array"
);

verification_fee = 1 wei;
for (uint8 i = 0; i < deprecatedTrustedSigners.length; i++) {
trustedSigners[i].pubkey = deprecatedTrustedSigners[i].pubkey;
trustedSigners[i].expiresAt = deprecatedTrustedSigners[i].expiresAt;
}
}

function _authorizeUpgrade(address) internal override onlyOwner {}
Expand Down

0 comments on commit 28aa2c2

Please sign in to comment.