diff --git a/.storage-layouts-normalized/contracts/colony/Colony.sol:Colony.json b/.storage-layouts-normalized/contracts/colony/Colony.sol:Colony.json index 48766fa83c..b22d40a278 100644 --- a/.storage-layouts-normalized/contracts/colony/Colony.sol:Colony.json +++ b/.storage-layouts-normalized/contracts/colony/Colony.sol:Colony.json @@ -770,9 +770,20 @@ "label": "uint256", "numberOfBytes": "32" } + }, + { + "contract": "contracts/colony/Colony.sol:Colony", + "label": "deprecated", + "offset": 0, + "slot": "2", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } } ], - "numberOfBytes": "64" + "numberOfBytes": "96" } } }, @@ -1335,7 +1346,7 @@ }, { "contract": "contracts/colony/Colony.sol:Colony", - "label": "localSkills", + "label": "DEPRECATED_localSkills", "offset": 0, "slot": "37", "type": { @@ -1353,6 +1364,51 @@ "numberOfBytes": "1" } } + }, + { + "contract": "contracts/colony/Colony.sol:Colony", + "label": "localSkills", + "offset": 0, + "slot": "38", + "type": { + "encoding": "mapping", + "key": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "label": "mapping(uint256 => struct ColonyDataTypes.LocalSkill)", + "numberOfBytes": "32", + "value": { + "encoding": "inplace", + "label": "struct ColonyDataTypes.LocalSkill", + "members": [ + { + "contract": "contracts/colony/Colony.sol:Colony", + "label": "exists", + "offset": 0, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + }, + { + "contract": "contracts/colony/Colony.sol:Colony", + "label": "deprecated", + "offset": 1, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + } + ], + "numberOfBytes": "32" + } + } } ] } \ No newline at end of file diff --git a/.storage-layouts-normalized/contracts/colony/ColonyArbitraryTransaction.sol:ColonyArbitraryTransaction.json b/.storage-layouts-normalized/contracts/colony/ColonyArbitraryTransaction.sol:ColonyArbitraryTransaction.json index cecaf0fb53..4ff8a22299 100644 --- a/.storage-layouts-normalized/contracts/colony/ColonyArbitraryTransaction.sol:ColonyArbitraryTransaction.json +++ b/.storage-layouts-normalized/contracts/colony/ColonyArbitraryTransaction.sol:ColonyArbitraryTransaction.json @@ -770,9 +770,20 @@ "label": "uint256", "numberOfBytes": "32" } + }, + { + "contract": "contracts/colony/ColonyArbitraryTransaction.sol:ColonyArbitraryTransaction", + "label": "deprecated", + "offset": 0, + "slot": "2", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } } ], - "numberOfBytes": "64" + "numberOfBytes": "96" } } }, @@ -1335,7 +1346,7 @@ }, { "contract": "contracts/colony/ColonyArbitraryTransaction.sol:ColonyArbitraryTransaction", - "label": "localSkills", + "label": "DEPRECATED_localSkills", "offset": 0, "slot": "37", "type": { @@ -1353,6 +1364,51 @@ "numberOfBytes": "1" } } + }, + { + "contract": "contracts/colony/ColonyArbitraryTransaction.sol:ColonyArbitraryTransaction", + "label": "localSkills", + "offset": 0, + "slot": "38", + "type": { + "encoding": "mapping", + "key": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "label": "mapping(uint256 => struct ColonyDataTypes.LocalSkill)", + "numberOfBytes": "32", + "value": { + "encoding": "inplace", + "label": "struct ColonyDataTypes.LocalSkill", + "members": [ + { + "contract": "contracts/colony/ColonyArbitraryTransaction.sol:ColonyArbitraryTransaction", + "label": "exists", + "offset": 0, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + }, + { + "contract": "contracts/colony/ColonyArbitraryTransaction.sol:ColonyArbitraryTransaction", + "label": "deprecated", + "offset": 1, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + } + ], + "numberOfBytes": "32" + } + } } ] } \ No newline at end of file diff --git a/.storage-layouts-normalized/contracts/colony/ColonyDomains.sol:ColonyDomains.json b/.storage-layouts-normalized/contracts/colony/ColonyDomains.sol:ColonyDomains.json index b4810fb556..d3bf27e9dc 100644 --- a/.storage-layouts-normalized/contracts/colony/ColonyDomains.sol:ColonyDomains.json +++ b/.storage-layouts-normalized/contracts/colony/ColonyDomains.sol:ColonyDomains.json @@ -770,9 +770,20 @@ "label": "uint256", "numberOfBytes": "32" } + }, + { + "contract": "contracts/colony/ColonyDomains.sol:ColonyDomains", + "label": "deprecated", + "offset": 0, + "slot": "2", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } } ], - "numberOfBytes": "64" + "numberOfBytes": "96" } } }, @@ -1335,7 +1346,7 @@ }, { "contract": "contracts/colony/ColonyDomains.sol:ColonyDomains", - "label": "localSkills", + "label": "DEPRECATED_localSkills", "offset": 0, "slot": "37", "type": { @@ -1353,6 +1364,51 @@ "numberOfBytes": "1" } } + }, + { + "contract": "contracts/colony/ColonyDomains.sol:ColonyDomains", + "label": "localSkills", + "offset": 0, + "slot": "38", + "type": { + "encoding": "mapping", + "key": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "label": "mapping(uint256 => struct ColonyDataTypes.LocalSkill)", + "numberOfBytes": "32", + "value": { + "encoding": "inplace", + "label": "struct ColonyDataTypes.LocalSkill", + "members": [ + { + "contract": "contracts/colony/ColonyDomains.sol:ColonyDomains", + "label": "exists", + "offset": 0, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + }, + { + "contract": "contracts/colony/ColonyDomains.sol:ColonyDomains", + "label": "deprecated", + "offset": 1, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + } + ], + "numberOfBytes": "32" + } + } } ] } \ No newline at end of file diff --git a/.storage-layouts-normalized/contracts/colony/ColonyExpenditure.sol:ColonyExpenditure.json b/.storage-layouts-normalized/contracts/colony/ColonyExpenditure.sol:ColonyExpenditure.json index e67c83a8db..8dee3d7dd0 100644 --- a/.storage-layouts-normalized/contracts/colony/ColonyExpenditure.sol:ColonyExpenditure.json +++ b/.storage-layouts-normalized/contracts/colony/ColonyExpenditure.sol:ColonyExpenditure.json @@ -770,9 +770,20 @@ "label": "uint256", "numberOfBytes": "32" } + }, + { + "contract": "contracts/colony/ColonyExpenditure.sol:ColonyExpenditure", + "label": "deprecated", + "offset": 0, + "slot": "2", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } } ], - "numberOfBytes": "64" + "numberOfBytes": "96" } } }, @@ -1335,7 +1346,7 @@ }, { "contract": "contracts/colony/ColonyExpenditure.sol:ColonyExpenditure", - "label": "localSkills", + "label": "DEPRECATED_localSkills", "offset": 0, "slot": "37", "type": { @@ -1353,6 +1364,51 @@ "numberOfBytes": "1" } } + }, + { + "contract": "contracts/colony/ColonyExpenditure.sol:ColonyExpenditure", + "label": "localSkills", + "offset": 0, + "slot": "38", + "type": { + "encoding": "mapping", + "key": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "label": "mapping(uint256 => struct ColonyDataTypes.LocalSkill)", + "numberOfBytes": "32", + "value": { + "encoding": "inplace", + "label": "struct ColonyDataTypes.LocalSkill", + "members": [ + { + "contract": "contracts/colony/ColonyExpenditure.sol:ColonyExpenditure", + "label": "exists", + "offset": 0, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + }, + { + "contract": "contracts/colony/ColonyExpenditure.sol:ColonyExpenditure", + "label": "deprecated", + "offset": 1, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + } + ], + "numberOfBytes": "32" + } + } } ] } \ No newline at end of file diff --git a/.storage-layouts-normalized/contracts/colony/ColonyFunding.sol:ColonyFunding.json b/.storage-layouts-normalized/contracts/colony/ColonyFunding.sol:ColonyFunding.json index 0124a6e3d4..2ba1c31e74 100644 --- a/.storage-layouts-normalized/contracts/colony/ColonyFunding.sol:ColonyFunding.json +++ b/.storage-layouts-normalized/contracts/colony/ColonyFunding.sol:ColonyFunding.json @@ -770,9 +770,20 @@ "label": "uint256", "numberOfBytes": "32" } + }, + { + "contract": "contracts/colony/ColonyFunding.sol:ColonyFunding", + "label": "deprecated", + "offset": 0, + "slot": "2", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } } ], - "numberOfBytes": "64" + "numberOfBytes": "96" } } }, @@ -1335,7 +1346,7 @@ }, { "contract": "contracts/colony/ColonyFunding.sol:ColonyFunding", - "label": "localSkills", + "label": "DEPRECATED_localSkills", "offset": 0, "slot": "37", "type": { @@ -1353,6 +1364,51 @@ "numberOfBytes": "1" } } + }, + { + "contract": "contracts/colony/ColonyFunding.sol:ColonyFunding", + "label": "localSkills", + "offset": 0, + "slot": "38", + "type": { + "encoding": "mapping", + "key": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "label": "mapping(uint256 => struct ColonyDataTypes.LocalSkill)", + "numberOfBytes": "32", + "value": { + "encoding": "inplace", + "label": "struct ColonyDataTypes.LocalSkill", + "members": [ + { + "contract": "contracts/colony/ColonyFunding.sol:ColonyFunding", + "label": "exists", + "offset": 0, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + }, + { + "contract": "contracts/colony/ColonyFunding.sol:ColonyFunding", + "label": "deprecated", + "offset": 1, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + } + ], + "numberOfBytes": "32" + } + } } ] } \ No newline at end of file diff --git a/.storage-layouts-normalized/contracts/colony/ColonyRewards.sol:ColonyRewards.json b/.storage-layouts-normalized/contracts/colony/ColonyRewards.sol:ColonyRewards.json index 8ea84d7908..bc29e4ae55 100644 --- a/.storage-layouts-normalized/contracts/colony/ColonyRewards.sol:ColonyRewards.json +++ b/.storage-layouts-normalized/contracts/colony/ColonyRewards.sol:ColonyRewards.json @@ -770,9 +770,20 @@ "label": "uint256", "numberOfBytes": "32" } + }, + { + "contract": "contracts/colony/ColonyRewards.sol:ColonyRewards", + "label": "deprecated", + "offset": 0, + "slot": "2", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } } ], - "numberOfBytes": "64" + "numberOfBytes": "96" } } }, @@ -1335,7 +1346,7 @@ }, { "contract": "contracts/colony/ColonyRewards.sol:ColonyRewards", - "label": "localSkills", + "label": "DEPRECATED_localSkills", "offset": 0, "slot": "37", "type": { @@ -1353,6 +1364,51 @@ "numberOfBytes": "1" } } + }, + { + "contract": "contracts/colony/ColonyRewards.sol:ColonyRewards", + "label": "localSkills", + "offset": 0, + "slot": "38", + "type": { + "encoding": "mapping", + "key": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "label": "mapping(uint256 => struct ColonyDataTypes.LocalSkill)", + "numberOfBytes": "32", + "value": { + "encoding": "inplace", + "label": "struct ColonyDataTypes.LocalSkill", + "members": [ + { + "contract": "contracts/colony/ColonyRewards.sol:ColonyRewards", + "label": "exists", + "offset": 0, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + }, + { + "contract": "contracts/colony/ColonyRewards.sol:ColonyRewards", + "label": "deprecated", + "offset": 1, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + } + ], + "numberOfBytes": "32" + } + } } ] } \ No newline at end of file diff --git a/.storage-layouts-normalized/contracts/colony/ColonyRoles.sol:ColonyRoles.json b/.storage-layouts-normalized/contracts/colony/ColonyRoles.sol:ColonyRoles.json index 5aa0104c12..1704317f0d 100644 --- a/.storage-layouts-normalized/contracts/colony/ColonyRoles.sol:ColonyRoles.json +++ b/.storage-layouts-normalized/contracts/colony/ColonyRoles.sol:ColonyRoles.json @@ -770,9 +770,20 @@ "label": "uint256", "numberOfBytes": "32" } + }, + { + "contract": "contracts/colony/ColonyRoles.sol:ColonyRoles", + "label": "deprecated", + "offset": 0, + "slot": "2", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } } ], - "numberOfBytes": "64" + "numberOfBytes": "96" } } }, @@ -1335,7 +1346,7 @@ }, { "contract": "contracts/colony/ColonyRoles.sol:ColonyRoles", - "label": "localSkills", + "label": "DEPRECATED_localSkills", "offset": 0, "slot": "37", "type": { @@ -1353,6 +1364,51 @@ "numberOfBytes": "1" } } + }, + { + "contract": "contracts/colony/ColonyRoles.sol:ColonyRoles", + "label": "localSkills", + "offset": 0, + "slot": "38", + "type": { + "encoding": "mapping", + "key": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "label": "mapping(uint256 => struct ColonyDataTypes.LocalSkill)", + "numberOfBytes": "32", + "value": { + "encoding": "inplace", + "label": "struct ColonyDataTypes.LocalSkill", + "members": [ + { + "contract": "contracts/colony/ColonyRoles.sol:ColonyRoles", + "label": "exists", + "offset": 0, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + }, + { + "contract": "contracts/colony/ColonyRoles.sol:ColonyRoles", + "label": "deprecated", + "offset": 1, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + } + ], + "numberOfBytes": "32" + } + } } ] } \ No newline at end of file diff --git a/.storage-layouts-normalized/contracts/colony/ColonyStorage.sol:ColonyStorage.json b/.storage-layouts-normalized/contracts/colony/ColonyStorage.sol:ColonyStorage.json index 2fad267b5a..0e353b88a3 100644 --- a/.storage-layouts-normalized/contracts/colony/ColonyStorage.sol:ColonyStorage.json +++ b/.storage-layouts-normalized/contracts/colony/ColonyStorage.sol:ColonyStorage.json @@ -770,9 +770,20 @@ "label": "uint256", "numberOfBytes": "32" } + }, + { + "contract": "contracts/colony/ColonyStorage.sol:ColonyStorage", + "label": "deprecated", + "offset": 0, + "slot": "2", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } } ], - "numberOfBytes": "64" + "numberOfBytes": "96" } } }, @@ -1335,7 +1346,7 @@ }, { "contract": "contracts/colony/ColonyStorage.sol:ColonyStorage", - "label": "localSkills", + "label": "DEPRECATED_localSkills", "offset": 0, "slot": "37", "type": { @@ -1353,6 +1364,51 @@ "numberOfBytes": "1" } } + }, + { + "contract": "contracts/colony/ColonyStorage.sol:ColonyStorage", + "label": "localSkills", + "offset": 0, + "slot": "38", + "type": { + "encoding": "mapping", + "key": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "label": "mapping(uint256 => struct ColonyDataTypes.LocalSkill)", + "numberOfBytes": "32", + "value": { + "encoding": "inplace", + "label": "struct ColonyDataTypes.LocalSkill", + "members": [ + { + "contract": "contracts/colony/ColonyStorage.sol:ColonyStorage", + "label": "exists", + "offset": 0, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + }, + { + "contract": "contracts/colony/ColonyStorage.sol:ColonyStorage", + "label": "deprecated", + "offset": 1, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + } + ], + "numberOfBytes": "32" + } + } } ] } \ No newline at end of file diff --git a/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetwork.sol:ColonyNetwork.json b/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetwork.sol:ColonyNetwork.json index dcca4403a8..43c45f5651 100644 --- a/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetwork.sol:ColonyNetwork.json +++ b/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetwork.sol:ColonyNetwork.json @@ -378,7 +378,7 @@ }, { "contract": "contracts/colonyNetwork/ColonyNetwork.sol:ColonyNetwork", - "label": "deprecated", + "label": "DEPRECATED_deprecated", "offset": 1, "slot": "3", "type": { diff --git a/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkAuction.sol:ColonyNetworkAuction.json b/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkAuction.sol:ColonyNetworkAuction.json index 0881a97e7c..1812851e6c 100644 --- a/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkAuction.sol:ColonyNetworkAuction.json +++ b/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkAuction.sol:ColonyNetworkAuction.json @@ -378,7 +378,7 @@ }, { "contract": "contracts/colonyNetwork/ColonyNetworkAuction.sol:ColonyNetworkAuction", - "label": "deprecated", + "label": "DEPRECATED_deprecated", "offset": 1, "slot": "3", "type": { diff --git a/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkDeployer.sol:ColonyNetworkDeployer.json b/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkDeployer.sol:ColonyNetworkDeployer.json index 914f22f94d..7fb79ad881 100644 --- a/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkDeployer.sol:ColonyNetworkDeployer.json +++ b/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkDeployer.sol:ColonyNetworkDeployer.json @@ -378,7 +378,7 @@ }, { "contract": "contracts/colonyNetwork/ColonyNetworkDeployer.sol:ColonyNetworkDeployer", - "label": "deprecated", + "label": "DEPRECATED_deprecated", "offset": 1, "slot": "3", "type": { diff --git a/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkENS.sol:ColonyNetworkENS.json b/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkENS.sol:ColonyNetworkENS.json index a8fc4c27d2..75279a954a 100644 --- a/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkENS.sol:ColonyNetworkENS.json +++ b/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkENS.sol:ColonyNetworkENS.json @@ -378,7 +378,7 @@ }, { "contract": "contracts/colonyNetwork/ColonyNetworkENS.sol:ColonyNetworkENS", - "label": "deprecated", + "label": "DEPRECATED_deprecated", "offset": 1, "slot": "3", "type": { diff --git a/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkExtensions.sol:ColonyNetworkExtensions.json b/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkExtensions.sol:ColonyNetworkExtensions.json index 8fa7c942d5..ee28e7b452 100644 --- a/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkExtensions.sol:ColonyNetworkExtensions.json +++ b/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkExtensions.sol:ColonyNetworkExtensions.json @@ -378,7 +378,7 @@ }, { "contract": "contracts/colonyNetwork/ColonyNetworkExtensions.sol:ColonyNetworkExtensions", - "label": "deprecated", + "label": "DEPRECATED_deprecated", "offset": 1, "slot": "3", "type": { diff --git a/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkMining.sol:ColonyNetworkMining.json b/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkMining.sol:ColonyNetworkMining.json index dca38f681a..5b54957cde 100644 --- a/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkMining.sol:ColonyNetworkMining.json +++ b/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkMining.sol:ColonyNetworkMining.json @@ -378,7 +378,7 @@ }, { "contract": "contracts/colonyNetwork/ColonyNetworkMining.sol:ColonyNetworkMining", - "label": "deprecated", + "label": "DEPRECATED_deprecated", "offset": 1, "slot": "3", "type": { diff --git a/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkSkills.sol:ColonyNetworkSkills.json b/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkSkills.sol:ColonyNetworkSkills.json index 64564306dd..50f4099485 100644 --- a/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkSkills.sol:ColonyNetworkSkills.json +++ b/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkSkills.sol:ColonyNetworkSkills.json @@ -378,7 +378,7 @@ }, { "contract": "contracts/colonyNetwork/ColonyNetworkSkills.sol:ColonyNetworkSkills", - "label": "deprecated", + "label": "DEPRECATED_deprecated", "offset": 1, "slot": "3", "type": { diff --git a/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkStorage.sol:ColonyNetworkStorage.json b/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkStorage.sol:ColonyNetworkStorage.json index d1f183ad6a..3a616e1cf4 100644 --- a/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkStorage.sol:ColonyNetworkStorage.json +++ b/.storage-layouts-normalized/contracts/colonyNetwork/ColonyNetworkStorage.sol:ColonyNetworkStorage.json @@ -378,7 +378,7 @@ }, { "contract": "contracts/colonyNetwork/ColonyNetworkStorage.sol:ColonyNetworkStorage", - "label": "deprecated", + "label": "DEPRECATED_deprecated", "offset": 1, "slot": "3", "type": { diff --git a/.storage-layouts-normalized/contracts/testHelpers/FunctionsNotAvailableOnColony.sol:FunctionsNotAvailableOnColony.json b/.storage-layouts-normalized/contracts/testHelpers/FunctionsNotAvailableOnColony.sol:FunctionsNotAvailableOnColony.json index c9857d8439..24a785490f 100644 --- a/.storage-layouts-normalized/contracts/testHelpers/FunctionsNotAvailableOnColony.sol:FunctionsNotAvailableOnColony.json +++ b/.storage-layouts-normalized/contracts/testHelpers/FunctionsNotAvailableOnColony.sol:FunctionsNotAvailableOnColony.json @@ -770,9 +770,20 @@ "label": "uint256", "numberOfBytes": "32" } + }, + { + "contract": "contracts/testHelpers/FunctionsNotAvailableOnColony.sol:FunctionsNotAvailableOnColony", + "label": "deprecated", + "offset": 0, + "slot": "2", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } } ], - "numberOfBytes": "64" + "numberOfBytes": "96" } } }, @@ -1335,7 +1346,7 @@ }, { "contract": "contracts/testHelpers/FunctionsNotAvailableOnColony.sol:FunctionsNotAvailableOnColony", - "label": "localSkills", + "label": "DEPRECATED_localSkills", "offset": 0, "slot": "37", "type": { @@ -1353,6 +1364,51 @@ "numberOfBytes": "1" } } + }, + { + "contract": "contracts/testHelpers/FunctionsNotAvailableOnColony.sol:FunctionsNotAvailableOnColony", + "label": "localSkills", + "offset": 0, + "slot": "38", + "type": { + "encoding": "mapping", + "key": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "label": "mapping(uint256 => struct ColonyDataTypes.LocalSkill)", + "numberOfBytes": "32", + "value": { + "encoding": "inplace", + "label": "struct ColonyDataTypes.LocalSkill", + "members": [ + { + "contract": "contracts/testHelpers/FunctionsNotAvailableOnColony.sol:FunctionsNotAvailableOnColony", + "label": "exists", + "offset": 0, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + }, + { + "contract": "contracts/testHelpers/FunctionsNotAvailableOnColony.sol:FunctionsNotAvailableOnColony", + "label": "deprecated", + "offset": 1, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + } + ], + "numberOfBytes": "32" + } + } } ] } \ No newline at end of file diff --git a/.storage-layouts-normalized/contracts/testHelpers/NoLimitSubdomains.sol:NoLimitSubdomains.json b/.storage-layouts-normalized/contracts/testHelpers/NoLimitSubdomains.sol:NoLimitSubdomains.json index a5d491b66e..6b1c66e44e 100644 --- a/.storage-layouts-normalized/contracts/testHelpers/NoLimitSubdomains.sol:NoLimitSubdomains.json +++ b/.storage-layouts-normalized/contracts/testHelpers/NoLimitSubdomains.sol:NoLimitSubdomains.json @@ -770,9 +770,20 @@ "label": "uint256", "numberOfBytes": "32" } + }, + { + "contract": "contracts/testHelpers/NoLimitSubdomains.sol:NoLimitSubdomains", + "label": "deprecated", + "offset": 0, + "slot": "2", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } } ], - "numberOfBytes": "64" + "numberOfBytes": "96" } } }, @@ -1335,7 +1346,7 @@ }, { "contract": "contracts/testHelpers/NoLimitSubdomains.sol:NoLimitSubdomains", - "label": "localSkills", + "label": "DEPRECATED_localSkills", "offset": 0, "slot": "37", "type": { @@ -1353,6 +1364,51 @@ "numberOfBytes": "1" } } + }, + { + "contract": "contracts/testHelpers/NoLimitSubdomains.sol:NoLimitSubdomains", + "label": "localSkills", + "offset": 0, + "slot": "38", + "type": { + "encoding": "mapping", + "key": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "label": "mapping(uint256 => struct ColonyDataTypes.LocalSkill)", + "numberOfBytes": "32", + "value": { + "encoding": "inplace", + "label": "struct ColonyDataTypes.LocalSkill", + "members": [ + { + "contract": "contracts/testHelpers/NoLimitSubdomains.sol:NoLimitSubdomains", + "label": "exists", + "offset": 0, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + }, + { + "contract": "contracts/testHelpers/NoLimitSubdomains.sol:NoLimitSubdomains", + "label": "deprecated", + "offset": 1, + "slot": "0", + "type": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + } + } + ], + "numberOfBytes": "32" + } + } } ] } \ No newline at end of file diff --git a/.storage-layouts-normalized/contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase.json b/.storage-layouts-normalized/contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase.json deleted file mode 100644 index 7ec149a4c0..0000000000 --- a/.storage-layouts-normalized/contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase.json +++ /dev/null @@ -1,432 +0,0 @@ -{ - "storage": [ - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "authority", - "offset": 0, - "slot": "0", - "type": { - "encoding": "inplace", - "label": "contract DSAuthority", - "numberOfBytes": "20" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "owner", - "offset": 0, - "slot": "1", - "type": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "resolver", - "offset": 0, - "slot": "2", - "type": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "colony", - "offset": 0, - "slot": "3", - "type": { - "encoding": "inplace", - "label": "contract IColony", - "numberOfBytes": "20" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "deprecated", - "offset": 20, - "slot": "3", - "type": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "metatransactionNonces", - "offset": 0, - "slot": "4", - "type": { - "encoding": "mapping", - "key": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder00", - "offset": 0, - "slot": "5", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder01", - "offset": 0, - "slot": "6", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder02", - "offset": 0, - "slot": "7", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder03", - "offset": 0, - "slot": "8", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder04", - "offset": 0, - "slot": "9", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder05", - "offset": 0, - "slot": "10", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder06", - "offset": 0, - "slot": "11", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder07", - "offset": 0, - "slot": "12", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder08", - "offset": 0, - "slot": "13", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder09", - "offset": 0, - "slot": "14", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder10", - "offset": 0, - "slot": "15", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder11", - "offset": 0, - "slot": "16", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder12", - "offset": 0, - "slot": "17", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder13", - "offset": 0, - "slot": "18", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder14", - "offset": 0, - "slot": "19", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder15", - "offset": 0, - "slot": "20", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder16", - "offset": 0, - "slot": "21", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder17", - "offset": 0, - "slot": "22", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder18", - "offset": 0, - "slot": "23", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder19", - "offset": 0, - "slot": "24", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder20", - "offset": 0, - "slot": "25", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder21", - "offset": 0, - "slot": "26", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder22", - "offset": 0, - "slot": "27", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder23", - "offset": 0, - "slot": "28", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder24", - "offset": 0, - "slot": "29", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder25", - "offset": 0, - "slot": "30", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder26", - "offset": 0, - "slot": "31", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder27", - "offset": 0, - "slot": "32", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder28", - "offset": 0, - "slot": "33", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder29", - "offset": 0, - "slot": "34", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder30", - "offset": 0, - "slot": "35", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - }, - { - "contract": "contracts/testHelpers/testExtensions/TestExtensionBase.sol:TestExtensionBase", - "label": "placeholder31", - "offset": 0, - "slot": "36", - "type": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - ] -} \ No newline at end of file diff --git a/contracts/colony/Colony.sol b/contracts/colony/Colony.sol index 63c5cd90b9..0c7ff32c3a 100755 --- a/contracts/colony/Colony.sol +++ b/contracts/colony/Colony.sol @@ -233,13 +233,23 @@ contract Colony is BasicMetaTransaction, Multicall, ColonyStorage, PatriciaTreeP require(rootLocalSkill != 0, "colony-local-skill-tree-not-initialised"); uint256 newLocalSkill = IColonyNetwork(colonyNetworkAddress).addSkill(rootLocalSkill); - localSkills[newLocalSkill] = true; + localSkills[newLocalSkill] = LocalSkill({ exists: true, deprecated: false }); emit LocalSkillAdded(msgSender(), newLocalSkill); } function deprecateLocalSkill(uint256 _localSkillId, bool _deprecated) public stoppable auth { - if (IColonyNetwork(colonyNetworkAddress).deprecateSkill(_localSkillId, _deprecated)) { + LocalSkill storage localSkill = localSkills[_localSkillId]; + + if (localSkill.exists && localSkill.deprecated != _deprecated) { + localSkill.deprecated = _deprecated; + + emit LocalSkillDeprecated(msgSender(), _localSkillId, _deprecated); + } else if (DEPRECATED_localSkills[_localSkillId] && _deprecated) { + // Handle local skills created prior to colonyNetwork#1280 + localSkills[_localSkillId] = LocalSkill({ exists: true, deprecated: _deprecated }); + delete DEPRECATED_localSkills[_localSkillId]; + emit LocalSkillDeprecated(msgSender(), _localSkillId, _deprecated); } } @@ -248,6 +258,10 @@ contract Colony is BasicMetaTransaction, Multicall, ColonyStorage, PatriciaTreeP return rootLocalSkill; } + function getLocalSkill(uint256 _localSkillId) public view returns (LocalSkill memory localSkill) { + localSkill = localSkills[_localSkillId]; + } + function verifyReputationProof( bytes memory key, bytes memory value, diff --git a/contracts/colony/ColonyDataTypes.sol b/contracts/colony/ColonyDataTypes.sol index eec16d6ef3..5afb227e68 100755 --- a/contracts/colony/ColonyDataTypes.sol +++ b/contracts/colony/ColonyDataTypes.sol @@ -318,10 +318,12 @@ interface ColonyDataTypes { struct Domain { uint256 skillId; uint256 fundingPotId; + bool deprecated; } struct LocalSkill { bool exists; + bool deprecated; } // Deprecated Task and Payment events diff --git a/contracts/colony/ColonyDomains.sol b/contracts/colony/ColonyDomains.sol index 29789c53fd..fa6518fef5 100644 --- a/contracts/colony/ColonyDomains.sol +++ b/contracts/colony/ColonyDomains.sol @@ -101,9 +101,9 @@ contract ColonyDomains is ColonyStorage { uint256 _domainId, bool _deprecated ) public stoppable authDomain(_permissionDomainId, _childSkillIndex, _domainId) { - if ( - IColonyNetwork(colonyNetworkAddress).deprecateSkill(domains[_domainId].skillId, _deprecated) - ) { + if (domains[_domainId].deprecated != _deprecated) { + domains[_domainId].deprecated = _deprecated; + emit DomainDeprecated(msgSender(), _domainId, _deprecated); } } @@ -132,7 +132,11 @@ contract ColonyDomains is ColonyStorage { fundingPots[fundingPotCount].associatedTypeId = domainCount; // Create a new domain with the given skill and new funding pot - domains[domainCount] = Domain({ skillId: _skillId, fundingPotId: fundingPotCount }); + domains[domainCount] = Domain({ + skillId: _skillId, + fundingPotId: fundingPotCount, + deprecated: false + }); emit DomainAdded(msgSender(), domainCount); emit FundingPotAdded(fundingPotCount); diff --git a/contracts/colony/ColonyStorage.sol b/contracts/colony/ColonyStorage.sol index 2eb80e3bee..850d8c653e 100755 --- a/contracts/colony/ColonyStorage.sol +++ b/contracts/colony/ColonyStorage.sol @@ -111,7 +111,8 @@ contract ColonyStorage is ColonyDataTypes, ColonyNetworkDataTypes, DSMath, Commo mapping(address => uint256) metatransactionNonces; // Storage slot 35 uint256 rootLocalSkill; // Storage slot 36 - mapping(uint256 => bool) localSkills; // Storage slot 37 + mapping(uint256 => bool) DEPRECATED_localSkills; // Storage slot 37 + mapping(uint256 => LocalSkill) localSkills; // Storage slot 38 // Constants @@ -124,10 +125,7 @@ contract ColonyStorage is ColonyDataTypes, ColonyNetworkDataTypes, DSMath, Commo // Modifiers modifier domainNotDeprecated(uint256 _id) { - require( - !IColonyNetwork(colonyNetworkAddress).getSkill(domains[_id].skillId).deprecated, - "colony-domain-deprecated" - ); + require(!domains[_id].deprecated, "colony-domain-deprecated"); _; } @@ -299,8 +297,16 @@ contract ColonyStorage is ColonyDataTypes, ColonyNetworkDataTypes, DSMath, Commo } function isValidLocalSkill(uint256 skillId) internal view returns (bool) { - Skill memory skill = IColonyNetwork(colonyNetworkAddress).getSkill(skillId); - return localSkills[skillId] && !skill.deprecated && !skill.DEPRECATED_globalSkill; + if (localSkills[skillId].exists) { + return !localSkills[skillId].deprecated; + } + + if (DEPRECATED_localSkills[skillId]) { + Skill memory skill = IColonyNetwork(colonyNetworkAddress).getSkill(skillId); + return (!skill.DEPRECATED_deprecated && !skill.DEPRECATED_globalSkill); + } + + return false; } function domainExists(uint256 domainId) internal view returns (bool) { diff --git a/contracts/colony/IColony.sol b/contracts/colony/IColony.sol index ffd4e774e0..8d5cf44b2e 100644 --- a/contracts/colony/IColony.sol +++ b/contracts/colony/IColony.sol @@ -349,6 +349,11 @@ interface IColony is ColonyDataTypes, IRecovery, IBasicMetaTransaction, IMultica /// @return rootLocalSkill The root local skill id function getRootLocalSkill() external view returns (uint256 rootLocalSkill); + /// @notice Get the local skill + /// @param localSkillId Id for the local skill + /// @return localSkill The local skill + function getLocalSkill(uint256 localSkillId) external view returns (LocalSkill memory localSkill); + /// @notice Add a colony domain, and its respective local skill under skill with id `_parentSkillId`. /// New funding pot is created and associated with the domain here. /// @param _permissionDomainId The domainId in which I have the permission to take this action diff --git a/contracts/colonyNetwork/ColonyNetworkDataTypes.sol b/contracts/colonyNetwork/ColonyNetworkDataTypes.sol index e51e9259b9..942a9045fd 100755 --- a/contracts/colonyNetwork/ColonyNetworkDataTypes.sol +++ b/contracts/colonyNetwork/ColonyNetworkDataTypes.sol @@ -198,8 +198,8 @@ interface ColonyNetworkDataTypes { uint256[] children; // `true` for a global skill reused across colonies or `false` for a skill mapped to a single colony's domain bool DEPRECATED_globalSkill; - // `true` for a global skill that is deprecated - bool deprecated; + // `true` for a skill that is deprecated NB: deprecation is now stored locally on colonies + bool DEPRECATED_deprecated; } struct ENSRecord { diff --git a/contracts/colonyNetwork/ColonyNetworkSkills.sol b/contracts/colonyNetwork/ColonyNetworkSkills.sol index d8b3f7ea40..17c83c4b5f 100644 --- a/contracts/colonyNetwork/ColonyNetworkSkills.sol +++ b/contracts/colonyNetwork/ColonyNetworkSkills.sol @@ -38,22 +38,8 @@ contract ColonyNetworkSkills is ColonyNetworkStorage, Multicall, CallWithGuards return skillCount; } - function deprecateSkill( - uint256 _skillId, - bool _deprecated - ) public stoppable allowedToAddSkill returns (bool) { - require( - skills[_skillId].nParents == 0, - "colony-network-deprecate-local-skills-temporarily-disabled" - ); - bool changed = skills[_skillId].deprecated != _deprecated; - skills[_skillId].deprecated = _deprecated; - return changed; - } - - /// @notice @deprecated - function deprecateSkill(uint256 _skillId) public stoppable { - deprecateSkill(_skillId, true); + function deprecateSkill(uint256 _skillId, bool _deprecated) public stoppable { + revert("colony-network-deprecate-skill-disabled"); } function initialiseRootLocalSkill() public stoppable calledByColony returns (uint256) { diff --git a/contracts/colonyNetwork/IColonyNetwork.sol b/contracts/colonyNetwork/IColonyNetwork.sol index 98d79843b3..dd4c754399 100644 --- a/contracts/colonyNetwork/IColonyNetwork.sol +++ b/contracts/colonyNetwork/IColonyNetwork.sol @@ -97,19 +97,13 @@ interface IColonyNetwork is ColonyNetworkDataTypes, IRecovery, IBasicMetaTransac /// @return _skill The Skill struct function getSkill(uint256 _skillId) external view returns (Skill memory _skill); - /// @notice Set deprecation status for a skill + /// @notice DEPRECATED Set deprecation status for a skill + /// @dev Deprecated and will revert if called /// @param _skillId Id of the skill /// @param _deprecated Deprecation status - /// @dev Currently disabled, and will error if called even by a colony /// @return _changed Whether the deprecated state was changed function deprecateSkill(uint256 _skillId, bool _deprecated) external returns (bool _changed); - /// @notice Mark a skill as deprecated which stops new tasks and payments from using it. - /// @dev This function is deprecated and will be removed in a future release - /// @dev Currently disabled, and will error if called even by a colony - /// @param _skillId Id of the skill - function deprecateSkill(uint256 _skillId) external; - /// @notice Initialise the local skills tree for a colony /// @return _rootLocalSkillId The root local skill function initialiseRootLocalSkill() external returns (uint256 _rootLocalSkillId); diff --git a/contracts/testHelpers/NoLimitSubdomains.sol b/contracts/testHelpers/NoLimitSubdomains.sol index ac3208e302..0b165a9863 100644 --- a/contracts/testHelpers/NoLimitSubdomains.sol +++ b/contracts/testHelpers/NoLimitSubdomains.sol @@ -46,7 +46,11 @@ contract NoLimitSubdomains is ColonyStorage { fundingPots[fundingPotCount].associatedTypeId = domainCount; // Create a new domain with the given skill and new funding pot - domains[domainCount] = Domain({ skillId: _skillId, fundingPotId: fundingPotCount }); + domains[domainCount] = Domain({ + skillId: _skillId, + fundingPotId: fundingPotCount, + deprecated: false + }); emit DomainAdded(msg.sender, domainCount); emit FundingPotAdded(fundingPotCount); diff --git a/docs/interfaces/icolony.md b/docs/interfaces/icolony.md index 7531146bab..5cd4211ed1 100644 --- a/docs/interfaces/icolony.md +++ b/docs/interfaces/icolony.md @@ -612,6 +612,23 @@ Get the assigned `_token` payouts of pot with id `_potId`. |---|---|---| |payout|uint256|Funding pot payout amount +### ▸ `getLocalSkill(uint256 localSkillId):LocalSkill localSkill` + +Get the local skill + + +**Parameters** + +|Name|Type|Description| +|---|---|---| +|localSkillId|uint256|Id for the local skill + +**Return Parameters** + +|Name|Type|Description| +|---|---|---| +|localSkill|LocalSkill|The local skill + ### ▸ `getNonRewardPotsTotal(address _token):uint256 amount` Get the total amount of tokens `_token` minus amount reserved to be paid to the reputation and token holders as rewards. diff --git a/docs/interfaces/icolonynetwork.md b/docs/interfaces/icolonynetwork.md index b803d3ee0c..f18d89975a 100644 --- a/docs/interfaces/icolonynetwork.md +++ b/docs/interfaces/icolonynetwork.md @@ -393,24 +393,11 @@ Set the deprecation of an extension in a colony. Can only be called by a Colony. |_deprecated|bool|Whether to deprecate the extension or not -### ▸ `deprecateSkill(uint256 _skillId)` - -Mark a skill as deprecated which stops new tasks and payments from using it. - -*Note: This function is deprecated and will be removed in a future release* - -**Parameters** - -|Name|Type|Description| -|---|---|---| -|_skillId|uint256|Id of the skill - - ### ▸ `deprecateSkill(uint256 _skillId, bool _deprecated):bool _changed` -Set deprecation status for a skill +DEPRECATED Set deprecation status for a skill -*Note: Currently disabled, and will error if called even by a colony* +*Note: Deprecated and will revert if called* **Parameters** diff --git a/scripts/deployOldUpgradeableVersion.js b/scripts/deployOldUpgradeableVersion.js index 1bd45cc51b..7181271a29 100644 --- a/scripts/deployOldUpgradeableVersion.js +++ b/scripts/deployOldUpgradeableVersion.js @@ -362,14 +362,8 @@ module.exports.deployOldUpgradeableVersion = async (contractName, interfaceName, await exec(`${cmdBase} && npm run provision:token:contracts`); } else { console.log("Installing the network..."); - let packageManagerCommand; - if (fs.existsSync(`./colonyNetwork-${versionTag}/pnpm-lock.yaml`)) { - packageManagerCommand = "pnpm"; - } else { - packageManagerCommand = "npm"; - } - - await exec(`cd colonyNetwork-${versionTag} && ${packageManagerCommand} install`); + const installCmd = `${fs.existsSync(`./colonyNetwork-${versionTag}/pnpm-lock.yaml`) ? "pnpm" : "npm"} install`; + await exec(`${cmdBase} && ${installCmd}`); } } else { versionUsesTruffle = fs.existsSync(`./colonyNetwork-${versionTag}/truffle.js`); @@ -388,7 +382,7 @@ module.exports.deployOldUpgradeableVersion = async (contractName, interfaceName, }; async function deployViaTruffle(versionTag, cmdBase, interfaceName, implementationNames) { - console.log("Deploying upgradable version..."); + console.log("Deploying upgradable version via truffle..."); await exec(`cp ./scripts/setupOldUpgradeableVersion.js ./colonyNetwork-${versionTag}/scripts/setupOldUpgradeableVersion.js`); const network = hre.__SOLIDITY_COVERAGE_RUNNING ? "coverage" : "development"; @@ -406,17 +400,16 @@ async function deployViaTruffle(versionTag, cmdBase, interfaceName, implementati } async function deployViaHardhat(versionTag, cmdBase, interfaceName, implementationNames) { - console.log("Deploying upgradable version..."); + console.log("Deploying upgradable version via hardhat..."); await exec(`cp ./scripts/setupOldUpgradeableVersionHardhat.js ./colonyNetwork-${versionTag}/scripts/setupOldUpgradeableVersionHardhat.js`); - const network = hre.__SOLIDITY_COVERAGE_RUNNING ? "coverage" : "development"; + // Hardhat coverage runs on port 8545, so we we can hard-code the network const res = await exec( `${cmdBase} ` + `&& INTERFACE_NAME=${interfaceName} IMPLEMENTATION_NAMES=${implementationNames.join( ",", - )} npx hardhat run ./scripts/setupOldUpgradeableVersionHardhat.js ` + - `--network ${network}`, + )} npx hardhat run ./scripts/setupOldUpgradeableVersionHardhat.js --network development`, { maxBuffer: 1024 * 5000 }, ); diff --git a/scripts/setupOldUpgradeableVersionHardhat.js b/scripts/setupOldUpgradeableVersionHardhat.js index cff164aa09..4ed6c183a3 100644 --- a/scripts/setupOldUpgradeableVersionHardhat.js +++ b/scripts/setupOldUpgradeableVersionHardhat.js @@ -1,4 +1,3 @@ -// Input: /* globals artifacts */ const Resolver = artifacts.require("./Resolver"); @@ -24,6 +23,7 @@ async function main() { await setupEtherRouter("colony", interfaceName, deployedImplementations, resolver); console.log(resolver.address); // This returns the address to the caller + process.exit(0); } main(); diff --git a/test/contracts-network/colony-expenditure.js b/test/contracts-network/colony-expenditure.js index 4d053b032f..913564b02d 100644 --- a/test/contracts-network/colony-expenditure.js +++ b/test/contracts-network/colony-expenditure.js @@ -314,7 +314,7 @@ contract("Colony Expenditure", (accounts) => { ); }); - it.skip("should not allow owners to update a slot skill with a deprecated local skill", async () => { + it("should not allow owners to update a slot skill with a deprecated local skill", async () => { await colony.deprecateLocalSkill(localSkillId, true); await checkErrorRevert(colony.setExpenditureSkills(expenditureId, [SLOT0], [localSkillId], { from: ADMIN }), "colony-not-valid-local-skill"); @@ -324,6 +324,57 @@ contract("Colony Expenditure", (accounts) => { await checkErrorRevert(colony.setExpenditureSkills(expenditureId, [SLOT0], [100], { from: ADMIN }), "colony-not-valid-local-skill"); }); + it("should allow colonies to deprecate 'old' local skills", async () => { + const { OldInterface } = await deployColonyVersionGLWSS4(colonyNetwork); + await deployColonyVersionHMWSS(colonyNetwork); + await downgradeColony(colonyNetwork, colony, "glwss4"); + + // Make the colonyNetwork the old version + await deployColonyNetworkVersionGLWSS4(); + + const colonyNetworkAsEtherRouter = await EtherRouter.at(colonyNetwork.address); + const latestResolver = await colonyNetworkAsEtherRouter.resolver(); + + await downgradeColonyNetwork(colonyNetwork, "glwss4"); + + // Add two local skills + const oldColony = await OldInterface.at(colony.address); + await oldColony.addLocalSkill(); + const localSkillId2 = await colonyNetwork.getSkillCount(); + await oldColony.addLocalSkill(); + const localSkillId3 = await colonyNetwork.getSkillCount(); + + // Deprecate localSkillId2 in the old way + await colony.deprecateLocalSkill(localSkillId2, true); + + // Upgrade to current version + await colonyNetworkAsEtherRouter.setResolver(latestResolver); + await upgradeColonyOnceThenToLatest(colony); + + // Deprecate localSkillId3 in the new way + await colony.deprecateLocalSkill(localSkillId3, true); + + const localSkill = await colony.getLocalSkill(localSkillId3); + expect(localSkill.exists).to.be.true; + expect(localSkill.deprecated).to.be.true; + + // Both are deprecated + await colony.makeExpenditure(1, UINT256_MAX, 1); + expenditureId = await colony.getExpenditureCount(); + + await checkErrorRevert(colony.setExpenditureSkills(expenditureId, [SLOT0], [localSkillId2]), "colony-not-valid-local-skill"); + await checkErrorRevert(colony.setExpenditureSkills(expenditureId, [SLOT0], [localSkillId3]), "colony-not-valid-local-skill"); + }); + + it("should not allow owners to deprecate a skill that doesn't exist", async () => { + const fakeLocalSkillId = 10000; + await colony.deprecateLocalSkill(fakeLocalSkillId, true); + + const fakeLocalSkill = await colony.getLocalSkill(fakeLocalSkillId); + expect(fakeLocalSkill.exists).to.be.false; + expect(fakeLocalSkill.deprecated).to.be.false; + }); + it("should not allow owners to set a (now defunct) global skill, either deprecated or undeprecated", async () => { const { OldInterface } = await deployColonyVersionGLWSS4(colonyNetwork); await deployColonyVersionHMWSS(colonyNetwork); diff --git a/test/contracts-network/colony-network-recovery.js b/test/contracts-network/colony-network-recovery.js index f86fd8d2d1..24208347fe 100644 --- a/test/contracts-network/colony-network-recovery.js +++ b/test/contracts-network/colony-network-recovery.js @@ -189,7 +189,6 @@ contract("Colony Network Recovery", (accounts) => { await checkErrorRevert(colonyNetwork.initialise(ADDRESS_ZERO, 1), "colony-in-recovery-mode"); await checkErrorRevert(colonyNetwork.addSkill(1), "colony-in-recovery-mode"); await checkErrorRevert(colonyNetwork.deprecateSkill(1, true), "colony-in-recovery-mode"); - await checkErrorRevert(colonyNetwork.deprecateSkill(1), "colony-in-recovery-mode"); await checkErrorRevert(colonyNetwork.setFeeInverse(1), "colony-in-recovery-mode"); await checkErrorRevert(colonyNetwork.setPayoutWhitelist(ADDRESS_ZERO, true), "colony-in-recovery-mode"); await checkErrorRevert(colonyNetwork.claimMiningReward(ADDRESS_ZERO), "colony-in-recovery-mode"); diff --git a/test/contracts-network/colony.js b/test/contracts-network/colony.js index 176f6bd4e5..ebc1939eb5 100755 --- a/test/contracts-network/colony.js +++ b/test/contracts-network/colony.js @@ -21,7 +21,7 @@ const { fundColonyWithTokens, setupColony, } = require("../../helpers/test-data-generator"); -const { deployColonyVersionGLWSS4, deployColonyVersionHMWSS } = require("../../scripts/deployOldUpgradeableVersion"); +const { downgradeColony, deployColonyVersionGLWSS4, deployColonyVersionHMWSS } = require("../../scripts/deployOldUpgradeableVersion"); const { expect } = chai; chai.use(bnChai(web3.utils.BN)); @@ -183,20 +183,41 @@ contract("Colony", (accounts) => { await expectEvent(tx, "LocalSkillAdded", [accounts[0], skillCount]); }); - it.skip("should allow root users to deprecate local skills", async () => { + it("should allow root users to deprecate local skills", async () => { await colony.addLocalSkill(); const skillCount = await colonyNetwork.getSkillCount(); + await checkErrorRevert(colony.deprecateLocalSkill(skillCount, true, { from: USER1 }), "ds-auth-unauthorized"); + const tx = await colony.deprecateLocalSkill(skillCount, true); await expectEvent(tx, "LocalSkillDeprecated", [accounts[0], skillCount, true]); }); - it("should revert when trying to deprecate a local skill", async () => { + it("should not be able to deprecate a skill on the network", async () => { + await deployColonyVersionHMWSS(colonyNetwork); + await downgradeColony(colonyNetwork, colony, "hmwss"); + + const version = await colony.version(); + expect(version).to.eq.BN(14); + + await checkErrorRevert(colony.deprecateLocalSkill(0, true), "colony-network-deprecate-skill-disabled"); + }); + + it("should not emit events when repeatedly deprecating a local skill", async () => { await colony.addLocalSkill(); const skillCount = await colonyNetwork.getSkillCount(); - const tx = colony.deprecateLocalSkill(skillCount, false); - await checkErrorRevert(tx, "colony-network-deprecate-local-skills-temporarily-disabled"); + // First deprecation + let tx = await colony.deprecateLocalSkill(skillCount, true); + await expectEvent(tx, "LocalSkillDeprecated", [accounts[0], skillCount, true]); + + // Re-deprecate (no event) + tx = await colony.deprecateLocalSkill(skillCount, true); + await expectNoEvent(tx, "LocalSkillDeprecated"); + + // Un-deprecate + tx = await colony.deprecateLocalSkill(skillCount, false); + await expectEvent(tx, "LocalSkillDeprecated", [accounts[0], skillCount, false]); }); }); @@ -231,7 +252,7 @@ contract("Colony", (accounts) => { }); }); - describe.skip("when deprecating domains", () => { + describe("when deprecating domains", () => { it("should log the DomainDeprecated event", async () => { await colony.addDomain(1, UINT256_MAX, 1); await expectEvent(colony.deprecateDomain(1, 0, 2, true), "DomainDeprecated", [USER0, 2, true]); @@ -245,6 +266,38 @@ contract("Colony", (accounts) => { await checkErrorRevert(colony.makeExpenditure(1, 0, 2), "colony-domain-deprecated"); await checkErrorRevert(colony.moveFundsBetweenPots(1, UINT256_MAX, 1, UINT256_MAX, 0, 1, 2, 100, token.address), "colony-domain-deprecated"); }); + + it("should only allow authorized users to deprecate domains", async () => { + await colony.addDomain(1, UINT256_MAX, 1); + const domainId = await colony.getDomainCount(); + + // Non-authorized user should not be able to deprecate + await checkErrorRevert(colony.deprecateDomain(1, 0, domainId, true, { from: USER1 }), "ds-auth-unauthorized"); + + // Root user should be able to deprecate + await expectEvent(colony.deprecateDomain(1, 0, domainId, true, { from: USER0 }), "DomainDeprecated", [USER0, domainId, true]); + }); + + it("should not re-emit events when repeatedly deprecating a domain", async () => { + await colony.addDomain(1, UINT256_MAX, 1); + const domainId = await colony.getDomainCount(); + + // Deprecate the domain for the first time + const tx1 = await colony.deprecateDomain(1, 0, domainId, true); + await expectEvent(tx1, "DomainDeprecated", [USER0, domainId, true]); + + // Attempt to deprecate the domain again + const tx2 = await colony.deprecateDomain(1, 0, domainId, true); + await expectNoEvent(tx2, "DomainDeprecated"); + + // Undeprecate the domain + const tx3 = await colony.deprecateDomain(1, 0, domainId, false); + await expectEvent(tx3, "DomainDeprecated", [USER0, domainId, false]); + + // Deprecate the domain once more + const tx4 = await colony.deprecateDomain(1, 0, domainId, true); + await expectEvent(tx4, "DomainDeprecated", [USER0, domainId, true]); + }); }); describe("when bootstrapping the colony", () => { diff --git a/test/extensions/one-tx-payment.js b/test/extensions/one-tx-payment.js index c7a9d47dc7..45b5a1a25e 100644 --- a/test/extensions/one-tx-payment.js +++ b/test/extensions/one-tx-payment.js @@ -612,17 +612,40 @@ contract("One transaction payments", (accounts) => { expect(await colony.hasUserRole(oneTxPayment.address, 1, ARBITRATION_ROLE)).to.be.false; }); - it("a colony can still upgrade even if Voting Reputation not installed", async () => { + it("a colony can still upgrade even if OneTxPayment not installed", async () => { await colony.uninstallExtension(ONE_TX_PAYMENT); expect(await colony.version()).to.eq.BN(13); await colony.upgrade(14); expect(await colony.version()).to.eq.BN(14); }); - it("a colony can still upgrade even if Voting Reputation is more up-to-date than we might expect", async () => { + it("a colony can still upgrade even if OneTxPayment is more up-to-date than we might expect", async () => { await colony.uninstallExtension(ONE_TX_PAYMENT); await colony.installExtension(ONE_TX_PAYMENT, 6); await colony.upgrade(14); }); + + it("can call getDomain() without an error", async () => { + await colony.uninstallExtension(ONE_TX_PAYMENT); + await colony.installExtension(ONE_TX_PAYMENT, 6); + const oneTxPaymentAddress = await colonyNetwork.getExtensionInstallation(ONE_TX_PAYMENT, colony.address); + oneTxPayment = await OneTxPayment.at(oneTxPaymentAddress); + + await colony.setUserRoles(1, UINT256_MAX, oneTxPayment.address, 1, ROLES); + await token.mint(colony.address, INITIAL_FUNDING); + await colony.claimColonyFunds(token.address); + + await upgradeColonyOnceThenToLatest(colony); + // Confirm this colony has the new domain structure + const domain = await colony.getDomain(1); + expect(domain.deprecated).to.be.false; + await colony.deprecateDomain(1, UINT256_MAX, 1, true); + const deprecatedDomain = await colony.getDomain(1); + expect(deprecatedDomain.deprecated).to.be.true; + + // Undeprecate + await colony.deprecateDomain(1, UINT256_MAX, 1, false); + await oneTxPayment.makePaymentFundedFromDomain(1, UINT256_MAX, 1, UINT256_MAX, [USER1], [token.address], [10], 1, 0); + }); }); });