Skip to content

Commit

Permalink
Update task to upgrade contract
Browse files Browse the repository at this point in the history
  • Loading branch information
evercoinx committed Dec 19, 2024
1 parent 6c56cbe commit 36eae39
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 371 deletions.
351 changes: 0 additions & 351 deletions .openzeppelin/mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -901,357 +901,6 @@
},
"namespaces": {}
}
},
"7aa9a5e2eb11ea69d2b30a835773f1afb3c02101178b924b5631b928abbf3bc1": {
"address": "0xA5Fdb8D80621AA2DE1Ac5600EF9997cb88D1fEA0",
"txHash": "0xdc76cba2b21fed5aeaa4be955807e15a0d00076abc65bb70e287cdb0659ca08b",
"layout": {
"solcVersion": "0.8.7",
"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": "ContextUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40"
},
{
"label": "_balances",
"offset": 0,
"slot": "51",
"type": "t_mapping(t_address,t_uint256)",
"contract": "ERC20Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:40"
},
{
"label": "_allowances",
"offset": 0,
"slot": "52",
"type": "t_mapping(t_address,t_mapping(t_address,t_uint256))",
"contract": "ERC20Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:42"
},
{
"label": "_totalSupply",
"offset": 0,
"slot": "53",
"type": "t_uint256",
"contract": "ERC20Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44"
},
{
"label": "_name",
"offset": 0,
"slot": "54",
"type": "t_string_storage",
"contract": "ERC20Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:46"
},
{
"label": "_symbol",
"offset": 0,
"slot": "55",
"type": "t_string_storage",
"contract": "ERC20Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:47"
},
{
"label": "__gap",
"offset": 0,
"slot": "56",
"type": "t_array(t_uint256)45_storage",
"contract": "ERC20Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:376"
},
{
"label": "__gap",
"offset": 0,
"slot": "101",
"type": "t_array(t_uint256)50_storage",
"contract": "ERC165Upgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41"
},
{
"label": "_roles",
"offset": 0,
"slot": "151",
"type": "t_mapping(t_bytes32,t_struct(RoleData)23_storage)",
"contract": "AccessControlUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:57"
},
{
"label": "__gap",
"offset": 0,
"slot": "152",
"type": "t_array(t_uint256)49_storage",
"contract": "AccessControlUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:260"
},
{
"label": "_paused",
"offset": 0,
"slot": "201",
"type": "t_bool",
"contract": "PausableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29"
},
{
"label": "__gap",
"offset": 0,
"slot": "202",
"type": "t_array(t_uint256)49_storage",
"contract": "PausableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116"
},
{
"label": "validatorRegistry",
"offset": 0,
"slot": "251",
"type": "t_contract(IValidatorRegistry)13524",
"contract": "MaticX",
"src": "contracts/MaticX.sol:34"
},
{
"label": "stakeManager",
"offset": 0,
"slot": "252",
"type": "t_contract(IStakeManager)13379",
"contract": "MaticX",
"src": "contracts/MaticX.sol:35"
},
{
"label": "maticToken",
"offset": 0,
"slot": "253",
"type": "t_contract(IERC20Upgradeable)1482",
"contract": "MaticX",
"src": "contracts/MaticX.sol:36"
},
{
"label": "treasury",
"offset": 0,
"slot": "254",
"type": "t_address",
"contract": "MaticX",
"src": "contracts/MaticX.sol:37"
},
{
"label": "version",
"offset": 0,
"slot": "255",
"type": "t_string_storage",
"contract": "MaticX",
"src": "contracts/MaticX.sol:38"
},
{
"label": "feePercent",
"offset": 0,
"slot": "256",
"type": "t_uint16",
"contract": "MaticX",
"src": "contracts/MaticX.sol:39"
},
{
"label": "instantPoolOwner_deprecated",
"offset": 2,
"slot": "256",
"type": "t_address",
"contract": "MaticX",
"src": "contracts/MaticX.sol:40"
},
{
"label": "instantPoolMatic_deprecated",
"offset": 0,
"slot": "257",
"type": "t_uint256",
"contract": "MaticX",
"src": "contracts/MaticX.sol:41"
},
{
"label": "instantPoolMaticX_deprecated",
"offset": 0,
"slot": "258",
"type": "t_uint256",
"contract": "MaticX",
"src": "contracts/MaticX.sol:42"
},
{
"label": "userWithdrawalRequests",
"offset": 0,
"slot": "259",
"type": "t_mapping(t_address,t_array(t_struct(WithdrawalRequest)12868_storage)dyn_storage)",
"contract": "MaticX",
"src": "contracts/MaticX.sol:43"
},
{
"label": "fxStateRootTunnel",
"offset": 0,
"slot": "260",
"type": "t_contract(IFxStateRootTunnel)12846",
"contract": "MaticX",
"src": "contracts/MaticX.sol:44"
},
{
"label": "polToken",
"offset": 0,
"slot": "261",
"type": "t_contract(IERC20Upgradeable)1482",
"contract": "MaticX",
"src": "contracts/MaticX.sol:45"
},
{
"label": "reentrancyGuardStatus",
"offset": 0,
"slot": "262",
"type": "t_uint256",
"contract": "MaticX",
"src": "contracts/MaticX.sol:46"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_struct(WithdrawalRequest)12868_storage)dyn_storage": {
"label": "struct IMaticX.WithdrawalRequest[]",
"numberOfBytes": "32"
},
"t_array(t_uint256)45_storage": {
"label": "uint256[45]",
"numberOfBytes": "1440"
},
"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_bytes32": {
"label": "bytes32",
"numberOfBytes": "32"
},
"t_contract(IERC20Upgradeable)1482": {
"label": "contract IERC20Upgradeable",
"numberOfBytes": "20"
},
"t_contract(IFxStateRootTunnel)12846": {
"label": "contract IFxStateRootTunnel",
"numberOfBytes": "20"
},
"t_contract(IStakeManager)13379": {
"label": "contract IStakeManager",
"numberOfBytes": "20"
},
"t_contract(IValidatorRegistry)13524": {
"label": "contract IValidatorRegistry",
"numberOfBytes": "20"
},
"t_mapping(t_address,t_array(t_struct(WithdrawalRequest)12868_storage)dyn_storage)": {
"label": "mapping(address => struct IMaticX.WithdrawalRequest[])",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_bool)": {
"label": "mapping(address => bool)",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_mapping(t_address,t_uint256))": {
"label": "mapping(address => mapping(address => uint256))",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_uint256)": {
"label": "mapping(address => uint256)",
"numberOfBytes": "32"
},
"t_mapping(t_bytes32,t_struct(RoleData)23_storage)": {
"label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)",
"numberOfBytes": "32"
},
"t_string_storage": {
"label": "string",
"numberOfBytes": "32"
},
"t_struct(RoleData)23_storage": {
"label": "struct AccessControlUpgradeable.RoleData",
"members": [
{
"label": "members",
"type": "t_mapping(t_address,t_bool)",
"offset": 0,
"slot": "0"
},
{
"label": "adminRole",
"type": "t_bytes32",
"offset": 0,
"slot": "1"
}
],
"numberOfBytes": "64"
},
"t_struct(WithdrawalRequest)12868_storage": {
"label": "struct IMaticX.WithdrawalRequest",
"members": [
{
"label": "validatorNonce",
"type": "t_uint256",
"offset": 0,
"slot": "0"
},
{
"label": "requestEpoch",
"type": "t_uint256",
"offset": 0,
"slot": "1"
},
{
"label": "validatorAddress",
"type": "t_address",
"offset": 0,
"slot": "2"
}
],
"numberOfBytes": "96"
},
"t_uint16": {
"label": "uint16",
"numberOfBytes": "2"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
},
"namespaces": {}
}
}
}
}
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,13 @@ upgrade-validatorregistry-ethereum-prod:

# Upgrade the MaticX contract
upgrade-maticx-localhost:
$(BIN_HARDHAT) upgrade-contract --network $(NETWORK_LOCALHOST) --name MaticX --contract $(LOCALHOST_MATIC_X) --unsafe true
$(BIN_HARDHAT) upgrade-contract --network $(NETWORK_LOCALHOST) --name MaticX --contract $(LOCALHOST_MATIC_X)
upgrade-maticx-sepolia:
$(BIN_HARDHAT) upgrade-contract --network $(NETWORK_SEPOLIA) --name MaticX --contract $(SEPOLIA_MATIC_X) --unsafe true
$(BIN_HARDHAT) upgrade-contract --network $(NETWORK_SEPOLIA) --name MaticX --contract $(SEPOLIA_MATIC_X)
upgrade-maticx-ethereum-preprod:
$(BIN_HARDHAT) upgrade-contract --network $(NETWORK_ETHEREUM) --name MaticX --contract $(ETHEREUM_PREPROD_MATIC_X) --unsafe true
$(BIN_HARDHAT) upgrade-contract --network $(NETWORK_ETHEREUM) --name MaticX --contract $(ETHEREUM_PREPROD_MATIC_X)
upgrade-maticx-ethereum-prod:
$(BIN_HARDHAT) upgrade-contract --network $(NETWORK_ETHEREUM) --name MaticX --contract $(ETHEREUM_PROD_MATIC_X) --unsafe true
$(BIN_HARDHAT) upgrade-contract --network $(NETWORK_ETHEREUM) --name MaticX --contract $(ETHEREUM_PROD_MATIC_X)

# Verify the ValidatorRegistry proxy contract
verify-validatorregistry-sepolia:
Expand Down
Loading

0 comments on commit 36eae39

Please sign in to comment.