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

Feature/0.8 diamond version #222

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ node_modules/
!.env*.default
.vscode/*
!.vscode/settings.json.default
.idea/
*.iml

cache/
artifacts/
Expand Down
10,779 changes: 5,746 additions & 5,033 deletions extendedArtifacts/Diamantaire.json

Large diffs are not rendered by default.

13,865 changes: 8,285 additions & 5,580 deletions extendedArtifacts/Diamond.json

Large diffs are not rendered by default.

11,966 changes: 6,787 additions & 5,179 deletions extendedArtifacts/DiamondCutFacet.json

Large diffs are not rendered by default.

77 changes: 77 additions & 0 deletions extendedArtifacts/DiamondInit.json

Large diffs are not rendered by default.

2,370 changes: 1,438 additions & 932 deletions extendedArtifacts/DiamondLoupeFacet.json

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions extendedArtifacts/IDiamondCut.json

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions extendedArtifacts/IDiamondLoupe.json

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions extendedArtifacts/IERC165.json

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions extendedArtifacts/IERC173.json

Large diffs are not rendered by default.

30 changes: 17 additions & 13 deletions extendedArtifacts/LibDiamond.json

Large diffs are not rendered by default.

529 changes: 471 additions & 58 deletions extendedArtifacts/OwnershipFacet.json

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions extendedArtifacts/Proxied.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"contractName": "Proxied",
"sourceName": "solc_0.7/proxy/Proxied.sol",
"sourceName": "solc_0.8/proxy/Proxied.sol",
"abi": [],
"bytecode": "0x",
"deployedBytecode": "0x",
Expand All @@ -13,13 +13,15 @@
},
"evm": {
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
Expand All @@ -30,7 +32,7 @@
"gasEstimates": null,
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.7.6+commit.7338295f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.7/proxy/Proxied.sol\":\"Proxied\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.7/proxy/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address ownerAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n ownerAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x760a00cd889372a2358732403723d8a13cb8b02bb82450a9bf5488177828aa79\",\"license\":\"MIT\"}},\"version\":1}",
"metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"solc_0.8/proxy/Proxied.sol\":\"Proxied\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"solc_0.8/proxy/Proxied.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address ownerAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n ownerAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xaaceeafeeaf0d200ca3942d8bf14c1c4f787a77f79cc87c08bb668e65acdee29\",\"license\":\"MIT\"}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
Expand All @@ -40,6 +42,6 @@
"methods": {},
"version": 1
},
"solcInput": "{\n \"language\": \"Solidity\",\n \"sources\": {\n \"solc_0.7/proxy/Proxied.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.7.0;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address ownerAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n ownerAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n}\\n\"\n }\n },\n \"settings\": {\n \"optimizer\": {\n \"enabled\": true,\n \"runs\": 999999\n },\n \"outputSelection\": {\n \"*\": {\n \"*\": [\n \"abi\",\n \"evm.bytecode\",\n \"evm.deployedBytecode\",\n \"evm.methodIdentifiers\",\n \"metadata\",\n \"devdoc\",\n \"userdoc\",\n \"storageLayout\",\n \"evm.gasEstimates\"\n ],\n \"\": [\n \"ast\"\n ]\n }\n },\n \"metadata\": {\n \"useLiteralContent\": true\n }\n }\n}",
"solcInputHash": "9a092dc08b6ce1d4cefe366abe0295ec"
"solcInput": "{\n \"language\": \"Solidity\",\n \"sources\": {\n \"solc_0.8/proxy/Proxied.sol\": {\n \"content\": \"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nabstract contract Proxied {\\n /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them\\n /// It also allows these functions to be called inside a contructor\\n /// even if the contract is meant to be used without proxy\\n modifier proxied() {\\n address proxyAdminAddress = _proxyAdmin();\\n // With hardhat-deploy proxies\\n // the proxyAdminAddress is zero only for the implementation contract\\n // if the implementation contract want to be used as a standalone/immutable contract\\n // it simply has to execute the `proxied` function\\n // This ensure the proxyAdminAddress is never zero post deployment\\n // And allow you to keep the same code for both proxied contract and immutable contract\\n if (proxyAdminAddress == address(0)) {\\n // ensure can not be called twice when used outside of proxy : no admin\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\\n )\\n }\\n } else {\\n require(msg.sender == proxyAdminAddress);\\n }\\n _;\\n }\\n\\n modifier onlyProxyAdmin() {\\n require(msg.sender == _proxyAdmin(), \\\"NOT_AUTHORIZED\\\");\\n _;\\n }\\n\\n function _proxyAdmin() internal view returns (address ownerAddress) {\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n ownerAddress := sload(0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103)\\n }\\n }\\n}\\n\"\n }\n },\n \"settings\": {\n \"optimizer\": {\n \"enabled\": true,\n \"runs\": 999999\n },\n \"outputSelection\": {\n \"*\": {\n \"*\": [\n \"abi\",\n \"evm.bytecode\",\n \"evm.deployedBytecode\",\n \"evm.methodIdentifiers\",\n \"metadata\",\n \"devdoc\",\n \"userdoc\",\n \"storageLayout\",\n \"evm.gasEstimates\"\n ],\n \"\": [\n \"ast\"\n ]\n }\n },\n \"metadata\": {\n \"useLiteralContent\": true\n }\n }\n}",
"solcInputHash": "671af58dff9d96540fbd6480e1e9a256"
}
Loading