Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy stage #243

Merged
merged 4 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
246 changes: 246 additions & 0 deletions .openzeppelin/goerli.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,16 @@
"address": "0xAE2C84c48272F5a1746150ef333D5E5B51F68763",
"txHash": "0x7aa677a741c4b779346c8b179b0f3f47007dd94d90c7073b47a826ba969b86a5",
"kind": "uups"
},
{
"address": "0xd6b633304Db2DD59ce93753FA55076DA367e5b2c",
"txHash": "0x48e42568ba5cea62bddf9f00d348623677ed38fb083acd760f830f454f290500",
"kind": "uups"
},
{
"address": "0xcDc4423E9ffa9542d4CdDf42a70859C84859d2A9",
"txHash": "0x964e728e77bd4afa121c93bfd55076c36a5de0b764214dbb9ee574fa1976a9ad",
"kind": "uups"
}
],
"impls": {
Expand Down Expand Up @@ -6642,6 +6652,242 @@
}
}
}
},
"4520774aa64c18c9ddf1ef74c95a2ccf9bb21a0078a21ea1067552fdbd846048": {
"address": "0x74C82BD3F46Ab4F2A98635eaEa1f84E1BA5BE98c",
"txHash": "0x8d83beee85106b30f181eaa1abe432a4d75230e10965422d43bb8678f2cbdba9",
"layout": {
"solcVersion": "0.8.18",
"storage": [
{
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "t_uint8",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63",
"retypedFrom": "bool"
},
{
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "t_bool",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68"
},
{
"label": "__gap",
"offset": 0,
"slot": "1",
"type": "t_array(t_uint256)50_storage",
"contract": "ERC1967UpgradeUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:169"
},
{
"label": "__gap",
"offset": 0,
"slot": "51",
"type": "t_array(t_uint256)50_storage",
"contract": "UUPSUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:111"
},
{
"label": "__gap",
"offset": 0,
"slot": "101",
"type": "t_array(t_uint256)50_storage",
"contract": "ContextUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36"
},
{
"label": "_owner",
"offset": 0,
"slot": "151",
"type": "t_address",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22"
},
{
"label": "__gap",
"offset": 0,
"slot": "152",
"type": "t_array(t_uint256)49_storage",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94"
},
{
"label": "_pendingOwner",
"offset": 0,
"slot": "201",
"type": "t_address",
"contract": "Ownable2StepUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:27"
},
{
"label": "__gap",
"offset": 0,
"slot": "202",
"type": "t_array(t_uint256)49_storage",
"contract": "Ownable2StepUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:70"
},
{
"label": "ssvNetwork",
"offset": 0,
"slot": "251",
"type": "t_contract(ISSVViews)4181",
"contract": "SSVNetworkViews",
"src": "contracts/SSVNetworkViews.sol:19"
},
{
"label": "private__gap",
"offset": 0,
"slot": "252",
"type": "t_array(t_uint256)50_storage",
"contract": "SSVNetworkViews",
"src": "contracts/SSVNetworkViews.sol:23"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_uint256)49_storage": {
"label": "uint256[49]",
"numberOfBytes": "1568"
},
"t_array(t_uint256)50_storage": {
"label": "uint256[50]",
"numberOfBytes": "1600"
},
"t_bool": {
"label": "bool",
"numberOfBytes": "1"
},
"t_contract(ISSVViews)4181": {
"label": "contract ISSVViews",
"numberOfBytes": "20"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
}
}
},
"3f9800ada4d2a9cecd5dbe695c48130fa7bc0dcdc84b9b238164a16c6a2802fe": {
"address": "0xEcd38CFb1c04C73AEa71350c742dD2A6613861C8",
"txHash": "0x6926c384301d3c540df529e49f0e253be4e178eaba77e9b46d99bc717b990313",
"layout": {
"solcVersion": "0.8.18",
"storage": [
{
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "t_uint8",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63",
"retypedFrom": "bool"
},
{
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "t_bool",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68"
},
{
"label": "__gap",
"offset": 0,
"slot": "1",
"type": "t_array(t_uint256)50_storage",
"contract": "ERC1967UpgradeUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:169"
},
{
"label": "__gap",
"offset": 0,
"slot": "51",
"type": "t_array(t_uint256)50_storage",
"contract": "UUPSUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:111"
},
{
"label": "__gap",
"offset": 0,
"slot": "101",
"type": "t_array(t_uint256)50_storage",
"contract": "ContextUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36"
},
{
"label": "_owner",
"offset": 0,
"slot": "151",
"type": "t_address",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22"
},
{
"label": "__gap",
"offset": 0,
"slot": "152",
"type": "t_array(t_uint256)49_storage",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94"
},
{
"label": "_pendingOwner",
"offset": 0,
"slot": "201",
"type": "t_address",
"contract": "Ownable2StepUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:27"
},
{
"label": "__gap",
"offset": 0,
"slot": "202",
"type": "t_array(t_uint256)49_storage",
"contract": "Ownable2StepUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:70"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_uint256)49_storage": {
"label": "uint256[49]",
"numberOfBytes": "1568"
},
"t_array(t_uint256)50_storage": {
"label": "uint256[50]",
"numberOfBytes": "1600"
},
"t_bool": {
"label": "bool",
"numberOfBytes": "1"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
}
}
}
}
}
2 changes: 1 addition & 1 deletion contracts/test/SSVNetworkValidatorsPerOperator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity 0.8.18;
import "../SSVNetwork.sol";


contract SSVNetworkValidatorsPerOperator is SSVNetwork {
contract SSVNetworkValidatorsPerOperatorUpgrade is SSVNetwork {

function initializev2(uint32 validatorsPerOperatorLimit_) external reinitializer(_getInitializedVersion() + 1) {
SSVStorageProtocol.load().validatorsPerOperatorLimit = validatorsPerOperatorLimit_;
Expand Down
12 changes: 12 additions & 0 deletions contracts/upgrades/stage/SSVNetworkValidatorsPerOperator.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.18;

import "../../SSVNetwork.sol";


contract SSVNetworkValidatorsPerOperator is SSVNetwork {

function initializev2(uint32 validatorsPerOperatorLimit_) external reinitializer(_getInitializedVersion() + 1) {
SSVStorageProtocol.load().validatorsPerOperatorLimit = validatorsPerOperatorLimit_;
}
}
2 changes: 1 addition & 1 deletion test/validators/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ describe('Register Validator Tests', () => {
it('Surpassing max number of validators per operator reverts "ExceedValidatorLimit"', async () => {
await helpers.registerValidatorsRaw(2, 50, minDepositAmount, [8, 9, 10, 11]);

const SSVNetworkValidatorsPerOperator = await ethers.getContractFactory("SSVNetworkValidatorsPerOperator");
const SSVNetworkValidatorsPerOperator = await ethers.getContractFactory("SSVNetworkValidatorsPerOperatorUpgrade");
const ssvNetwork = await upgrades.upgradeProxy(ssvNetworkContract.address, SSVNetworkValidatorsPerOperator, {
kind: 'uups',
call: {
Expand Down
Loading