From 6515a1f272856d610378be09491a92cfeb3f1961 Mon Sep 17 00:00:00 2001 From: Iain Date: Thu, 2 Feb 2023 12:04:27 -0500 Subject: [PATCH] initial pass --- .github/workflows/coverage.yml | 51 ++++ .github/workflows/test.yml | 2 +- .vscode/settings.json | 3 + LICENSE | 21 ++ package.json | 12 +- script/{Counter.s.sol => Deploy.s.sol} | 6 +- src/interfaces/ICreatorPermissionControl.sol | 15 ++ src/interfaces/IMinter1155.sol | 12 + src/interfaces/IZoraCreator1155.sol | 48 ++++ src/nft/CreatorNFT.sol | 57 ----- src/nft/CreatorNFTStorageV1.sol | 2 - src/nft/ICreatorNFT.sol | 28 -- src/nft/IZoraCreator1155TypesV1.sol | 21 ++ src/nft/ZoraCreator1155Impl.sol | 242 ++++++++++++++++++ src/nft/ZoraCreator1155StorageV1.sol | 16 ++ src/permissions/CreatorPermissionControl.sol | 64 +++++ .../CreatorPermissionStorageV1.sol | 8 + src/proxies/ZoraCreator1155FactoryProxy.sol | 10 + src/proxies/ZoraCreator1155Proxy.sol | 10 + yarn.lock | 50 ++++ 20 files changed, 584 insertions(+), 94 deletions(-) create mode 100644 .github/workflows/coverage.yml create mode 100644 .vscode/settings.json create mode 100644 LICENSE rename script/{Counter.s.sol => Deploy.s.sol} (55%) create mode 100644 src/interfaces/ICreatorPermissionControl.sol create mode 100644 src/interfaces/IMinter1155.sol create mode 100644 src/interfaces/IZoraCreator1155.sol delete mode 100644 src/nft/CreatorNFT.sol delete mode 100644 src/nft/CreatorNFTStorageV1.sol delete mode 100644 src/nft/ICreatorNFT.sol create mode 100644 src/nft/IZoraCreator1155TypesV1.sol create mode 100644 src/nft/ZoraCreator1155Impl.sol create mode 100644 src/nft/ZoraCreator1155StorageV1.sol create mode 100644 src/permissions/CreatorPermissionControl.sol create mode 100644 src/permissions/CreatorPermissionStorageV1.sol create mode 100644 src/proxies/ZoraCreator1155FactoryProxy.sol create mode 100644 src/proxies/ZoraCreator1155Proxy.sol diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 000000000..85a8a4cd5 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,51 @@ +name: test + +on: push + +env: + FOUNDRY_PROFILE: ci + +jobs: + check: + strategy: + fail-fast: true + + name: Foundry project + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + with: + version: nightly + + - uses: actions/setup-node@v2 + with: + node-version: "16" + + - run: npm install + + - name: Run Forge coverage + run: | + yarn run coverage + id: build + + - name: Run Forge tests + run: | + forge test -vvv + id: test + + - name: Setup LCOV + uses: hrishikesh-kadam/setup-lcov@v1 + + - name: Report code coverage + uses: zgosalvez/github-actions-report-lcov@v3 + with: + coverage-files: coverage/lcov.*.info + minimum-coverage: 90 + artifact-name: code-coverage-report + github-token: ${{ secrets.GITHUB_TOKEN }} + working-directory: ./ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 09880b1d7..484502703 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,6 @@ name: test -on: workflow_dispatch +on: push env: FOUNDRY_PROFILE: ci diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..136159ade --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "solidity.compileUsingRemoteVersion": "v0.8.17+commit.8df45f5f" +} \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..cb8e50c6e --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Zora Labs + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/package.json b/package.json index 337c88267..07bcd2d6b 100644 --- a/package.json +++ b/package.json @@ -6,12 +6,18 @@ "license": "MIT", "scripts": { "test": "forge test", - "test-gas": "forge test --gas-report" + "test-gas": "forge test --gas-report", + "prettier": "prettier --write 'src/**/*.sol'", + "coverage": "forge coverage --report lcov" }, "dependencies": { - "@openzeppelin/contracts-upgradeable": "4.8.0", "@openzeppelin/contracts": "4.8.0", + "@openzeppelin/contracts-upgradeable": "4.8.0", "ds-test": "https://github.com/dapphub/ds-test#cd98eff28324bfac652e63a239a60632a761790b", "forge-std": "https://github.com/foundry-rs/forge-std#cd7d533f9a0ee0ec02ad81e0a8f262bc4203c653" + }, + "devDependencies": { + "prettier": "^2.8.3", + "prettier-plugin-solidity": "^1.1.1" } -} \ No newline at end of file +} diff --git a/script/Counter.s.sol b/script/Deploy.s.sol similarity index 55% rename from script/Counter.s.sol rename to script/Deploy.s.sol index 0e546aba3..8fe055aca 100644 --- a/script/Counter.s.sol +++ b/script/Deploy.s.sol @@ -1,9 +1,9 @@ -// SPDX-License-Identifier: UNLICENSED -pragma solidity ^0.8.13; +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.17; import "forge-std/Script.sol"; -contract CounterScript is Script { +contract DeployScript is Script { function setUp() public {} function run() public { diff --git a/src/interfaces/ICreatorPermissionControl.sol b/src/interfaces/ICreatorPermissionControl.sol new file mode 100644 index 000000000..215478897 --- /dev/null +++ b/src/interfaces/ICreatorPermissionControl.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.17; + +interface ICreatorPermissionControl { + event UpdatedPermissions( + uint256 tokenId, + address user, + uint256 permissions + ); + + function getPermissions(uint256 token, address user) + external + view + returns (uint256); +} diff --git a/src/interfaces/IMinter1155.sol b/src/interfaces/IMinter1155.sol new file mode 100644 index 000000000..5a1632e75 --- /dev/null +++ b/src/interfaces/IMinter1155.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.17; + +interface IMinter1155 { + function requestMint( + address sender, + uint256 tokenId, + uint256 quantity, + address findersRecipient, + bytes calldata minterArguments + ) external; +} diff --git a/src/interfaces/IZoraCreator1155.sol b/src/interfaces/IZoraCreator1155.sol new file mode 100644 index 000000000..b3559956c --- /dev/null +++ b/src/interfaces/IZoraCreator1155.sol @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.17; + +import {IZoraCreator1155TypesV1} from "../nft/IZoraCreator1155TypesV1.sol"; + +interface IZoraCreator1155 is IZoraCreator1155TypesV1 { + function PERMISSION_BIT_ADMIN() external returns (uint256); + + function PERMISSION_BIT_MINTER() external returns (uint256); + + function PERMISSION_BIT_SALES() external returns (uint256); + + function PERMISSION_BIT_METADATA() external returns (uint256); + + event UpdatedToken(address from, uint256 tokenId, TokenData tokenData); + + error UserMissingRoleForToken(address user, uint256 tokenId, uint256 role); + + event RoyaltyConfigurationUpdated( + uint256 tokenId, + address sender, + RoyaltyConfiguration royaltyConfiguration + ); + + // TODO: maybe add more context + error CannotMintMoreTokens(uint256 tokenId); + + // Only allow minting one token id at time + function purchase( + address minter, + uint256 tokenId, + uint256 quantity, + address findersRecipient, + bytes calldata minterArguments + ) external payable; + + function setupNewToken(string memory _uri, uint256 maxSupply) + external + returns (uint256 tokenId); + + event ContractURIUpdated(address updater, string newURI); + + event UpdatedMetadataRendererForToken( + uint256 tokenId, + address user, + address metadataRenderer + ); +} diff --git a/src/nft/CreatorNFT.sol b/src/nft/CreatorNFT.sol deleted file mode 100644 index 5b695dbb1..000000000 --- a/src/nft/CreatorNFT.sol +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.17; - -import {ICreatorNFT} from "./ICreatorNFT.sol"; - -contract CreatorNFT is ICreatorNFT {} -// SPDX-License-Identifier: MIT -pragma solidity 0.8.17; - -contract CreatorNFT is ICreator, PublicMulticall, CreatorNFTStorageV1 { - function constructor() { - - } - function initialize() external {} - - modifier onlyAllowedMinter(address minter, uint256 tokenId) { - // if (minter == LAZY_FIXED_PRICE_ADDRESS) { - // return true; - // } - // if (minter == LAZY_ALLOWLIST) { - // return true; - // } - return allowedMinters[tokenId][minter]; - } - - function mint( - uint256 tokenId, - uint256 maxSize, - string uri - ) { - - } - - function adminMint(recipient, tokenId, quantity) { - - } - - // multicall [ - // mint() -- mint - // setSalesConfiguration() -- set sales configuration - // adminMint() -- mint reserved quantity - // ] - - // Only allow minting one token id at time - function purchase( - address minter, - uint256 tokenId, - uint256 quantity, - address findersRecipient, - bytes calldata minterArguments - ) external onlyAllowedMinter(minter, tokenId) payable returns (uint256) { - bytes[] memory commands = IMinter(minter).requestMint( - address(this), tokenId, quantity, findersRecipient, minterArguments - ); - _executeCommands(commands); - } -} diff --git a/src/nft/CreatorNFTStorageV1.sol b/src/nft/CreatorNFTStorageV1.sol deleted file mode 100644 index a57e4f5eb..000000000 --- a/src/nft/CreatorNFTStorageV1.sol +++ /dev/null @@ -1,2 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.17; diff --git a/src/nft/ICreatorNFT.sol b/src/nft/ICreatorNFT.sol deleted file mode 100644 index 7bcc1ce7b..000000000 --- a/src/nft/ICreatorNFT.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.17; - -interface ICreatorNFT is PublicMulticall, CreatorNFTStorageV1 { - function constructor() { - - } - function initialize() external {} - - modifier onlyAllowedMinter(address minter, uint256 tokenId) { - if (minter == LAZY_FIXED_PRICE_ADDRESS) { - return true; - } - if (minter == LAZY_ALLOWLIST) { - return true; - } - return allowedMinters[tokenId][minter]; - } - - // Only allow minting one token id at time - function mint( - address minter, - uint256 tokenId, - uint256 quantity, - address findersRecipient, - bytes calldata minterArguments - ) external onlyAllowedMinter(minter, tokenId) returns (uint256) {} -} diff --git a/src/nft/IZoraCreator1155TypesV1.sol b/src/nft/IZoraCreator1155TypesV1.sol new file mode 100644 index 000000000..85cf74d94 --- /dev/null +++ b/src/nft/IZoraCreator1155TypesV1.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.17; + +interface IZoraCreator1155TypesV1 { + struct RoyaltyConfiguration { + uint32 royaltyBPS; + address royaltyRecipient; + } + + struct TokenData { + string uri; + uint256 maxSupply; + uint256 totalSupply; + } + + struct Command { + uint256 blank; + // type + // args + } +} diff --git a/src/nft/ZoraCreator1155Impl.sol b/src/nft/ZoraCreator1155Impl.sol new file mode 100644 index 000000000..4ee6587c7 --- /dev/null +++ b/src/nft/ZoraCreator1155Impl.sol @@ -0,0 +1,242 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.17; + +import {IZoraCreator1155} from "../interfaces/IZoraCreator1155.sol"; +import {PublicMulticall} from "../utils/PublicMulticall.sol"; +import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; +import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; +import {ZoraCreator1155StorageV1} from "./ZoraCreator1155StorageV1.sol"; +import {IMinter1155} from "../interfaces/IMinter1155.sol"; +import {CreatorPermissionControl} from "../permissions/CreatorPermissionControl.sol"; + +contract ZoraCreator1155Impl is + IZoraCreator1155, + ReentrancyGuardUpgradeable, + PublicMulticall, + ERC1155Upgradeable, + ZoraCreator1155StorageV1, + CreatorPermissionControl +{ + uint256 private immutable CONTRACT_BASE_ID = 0; + + uint256 public immutable PERMISSION_BIT_ADMIN = 1; // 0b1 + uint256 public immutable PERMISSION_BIT_MINTER = 2; // 0b01 + uint256 public immutable PERMISSION_BIT_SALES = 4; // 0b001 + uint256 public immutable PERMISSION_BIT_METADATA = 8; // 0b0001 + + constructor() initializer {} + + function initialize( + string memory contractURI, + RoyaltyConfiguration memory defaultRoyaltyConfiguration, + address defaultAdmin + ) external initializer { + // Initialize OZ 1155 implementation + __ERC1155_init(""); + + // Setup re-entracy guard + __ReentrancyGuard_init(); + + // Setup contract-default token ID + _setupDefaultToken( + defaultAdmin, + contractURI, + defaultRoyaltyConfiguration + ); + } + + function _setupDefaultToken( + address defaultAdmin, + string memory contractURI, + RoyaltyConfiguration memory defaultRoyaltyConfiguration + ) internal { + _addPermission(CONTRACT_BASE_ID, defaultAdmin, PERMISSION_BIT_ADMIN); + + // Mint token ID 0 / don't allow any user mints + _setupNewToken(contractURI, 0); + + _updateRoyaltyConfiguration( + CONTRACT_BASE_ID, + defaultRoyaltyConfiguration + ); + } + + // remove from OZ impl + function _setURI(string memory newuri) internal virtual override {} + + function _getNextTokenId() internal returns (uint256) { + unchecked { + return ++nextTokenId; + } + } + + function _isAdminOrRole( + address user, + uint256 tokenId, + uint256 role + ) internal view returns (bool) { + return _hasPermission(tokenId, user, PERMISSION_BIT_ADMIN | role); + } + + function _requireAdminOrRole( + address user, + uint256 tokenId, + uint256 role + ) internal view { + if (!_hasPermission(tokenId, user, PERMISSION_BIT_ADMIN | role)) { + revert UserMissingRoleForToken(user, tokenId, role); + } + } + + modifier onlyAdminOrRole(uint256 tokenId, uint256 role) { + _requireAdminOrRole(msg.sender, tokenId, role); + _; + } + + function requireCanMintQuantity(uint256 tokenId, uint256 quantity) + internal + view + { + TokenData memory tokenInformation = tokens[tokenId]; + if ( + tokenInformation.totalSupply + quantity >= tokens[tokenId].maxSupply + ) { + revert CannotMintMoreTokens(tokenId); + } + } + + modifier canMint(uint256 tokenId, uint256 quantity) { + requireCanMintQuantity(tokenId, quantity); + _; + } + + function setupNewToken(string memory _uri, uint256 maxSupply) + public + onlyAdminOrRole(CONTRACT_BASE_ID, PERMISSION_BIT_MINTER) + nonReentrant + returns (uint256) + { + return _setupNewToken(_uri, maxSupply); + } + + function _setupNewToken(string memory _uri, uint256 maxSupply) + internal + returns (uint256 tokenId) + { + tokenId = _getNextTokenId(); + TokenData memory tokenData = TokenData({ + uri: _uri, + maxSupply: maxSupply, + totalSupply: 0 + }); + tokens[tokenId] = tokenData; + emit UpdatedToken(msg.sender, tokenId, tokenData); + } + + function _updateRoyaltyConfiguration( + uint256 tokenId, + RoyaltyConfiguration memory royaltyConfiguration + ) internal { + royaltyConfigurations[tokenId] = royaltyConfiguration; + + emit RoyaltyConfigurationUpdated({ + tokenId: tokenId, + sender: msg.sender, + royaltyConfiguration: royaltyConfiguration + }); + } + + function setTokenMetadataRenderer( + uint256 tokenId, + address metadataRenderer, + bytes memory initData + ) public { + if (!_isAdminOrRole(msg.sender, tokenId, PERMISSION_BIT_METADATA)) { + _requireAdminOrRole(msg.sender, tokenId, PERMISSION_BIT_METADATA); + } + + metadataRendererContract[tokenId] = metadataRenderer; + + if (initData.length > 0) { + // metadataRenderer. + } + + emit UpdatedMetadataRendererForToken( + tokenId, + msg.sender, + metadataRenderer + ); + } + + function adminMint( + address recipient, + uint256 tokenId, + uint256 quantity, + bytes memory data + ) public canMint(tokenId, quantity) nonReentrant { + // First check token specific role + if (!_isAdminOrRole(msg.sender, tokenId, PERMISSION_BIT_MINTER)) { + // Then check admin role + _requireAdminOrRole( + msg.sender, + CONTRACT_BASE_ID, + PERMISSION_BIT_MINTER + ); + } + _mint(recipient, tokenId, quantity, data); + } + + function adminMintBatch( + address recipient, + uint256[] memory tokenIds, + uint256[] memory quantities, + bytes memory data + ) public nonReentrant { + if ( + !_isAdminOrRole(msg.sender, CONTRACT_BASE_ID, PERMISSION_BIT_MINTER) + ) { + for (uint256 i = 0; i < tokenIds.length; ++i) { + uint256 checkingTokenId = tokenIds[i]; + requireCanMintQuantity(tokenIds[i], quantities[i]); + _requireAdminOrRole( + msg.sender, + checkingTokenId, + PERMISSION_BIT_MINTER + ); + } + } + _mintBatch(recipient, tokenIds, quantities, data); + } + + // multicall [ + // mint() -- mint + // setSalesConfiguration() -- set sales configuration + // adminMint() -- mint reserved quantity + // ] + + function executeCommands(Command[] calldata commands) internal {} + + // Only allow minting one token id at time + function purchase( + address minter, + uint256 tokenId, + uint256 quantity, + address findersRecipient, + bytes calldata minterArguments + ) + external + payable + onlyAdminOrRole(tokenId, PERMISSION_BIT_MINTER) + canMint(tokenId, quantity) + { + // executeCommands( + IMinter1155(minter).requestMint( + address(this), + tokenId, + quantity, + findersRecipient, + minterArguments + ); + // ); + } +} diff --git a/src/nft/ZoraCreator1155StorageV1.sol b/src/nft/ZoraCreator1155StorageV1.sol new file mode 100644 index 000000000..dc42f3091 --- /dev/null +++ b/src/nft/ZoraCreator1155StorageV1.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.17; + +import {IZoraCreator1155TypesV1} from "./IZoraCreator1155TypesV1.sol"; + +contract ZoraCreator1155StorageV1 is IZoraCreator1155TypesV1 { + mapping(uint256 => TokenData) public tokens; + + mapping(uint256 => address) public metadataRendererContract; + + mapping(uint256 => RoyaltyConfiguration) public royaltyConfigurations; + + uint256 public nextTokenId; + + uint256[50] private ___gap; +} diff --git a/src/permissions/CreatorPermissionControl.sol b/src/permissions/CreatorPermissionControl.sol new file mode 100644 index 000000000..8a2e20636 --- /dev/null +++ b/src/permissions/CreatorPermissionControl.sol @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.17; + +import {CreatorPermissionStorageV1} from "./CreatorPermissionStorageV1.sol"; +import {ICreatorPermissionControl} from "../interfaces/ICreatorPermissionControl.sol"; + +contract CreatorPermissionControl is + CreatorPermissionStorageV1, + ICreatorPermissionControl +{ + function getPermissionKey(uint256 token, address user) + internal + pure + returns (uint256) + { + return uint256(keccak256(abi.encode(token, user))); + } + + function _hasPermission( + uint256 token, + address user, + uint256 permissionBits + ) internal view returns (bool) { + return permissions[getPermissionKey(token, user)] & permissionBits > 0; + } + + function getPermissions(uint256 token, address user) + external + view + returns (uint256) + { + return permissions[getPermissionKey(token, user)]; + } + + function _addPermission( + uint256 tokenId, + address user, + uint256 permissionBits + ) internal { + uint256 permissionKey = getPermissionKey(tokenId, user); + uint256 tokenPermissions = permissions[permissionKey]; + tokenPermissions |= permissionBits; + permissions[permissionKey] = tokenPermissions; + emit UpdatedPermissions(tokenId, user, tokenPermissions); + } + + function _clearPermissions(uint256 tokenId, address user) internal { + uint256 permissionKey = getPermissionKey(tokenId, user); + permissions[permissionKey] = 0; + emit UpdatedPermissions(tokenId, user, 0); + } + + function _removePermission( + uint256 tokenId, + address user, + uint256 permissionBits + ) internal { + uint256 permissionKey = getPermissionKey(tokenId, user); + uint256 tokenPermissions = permissions[permissionKey]; + tokenPermissions &= ~permissionBits; + permissions[permissionKey] = tokenPermissions; + emit UpdatedPermissions(tokenId, user, tokenPermissions); + } +} diff --git a/src/permissions/CreatorPermissionStorageV1.sol b/src/permissions/CreatorPermissionStorageV1.sol new file mode 100644 index 000000000..0e82cf68e --- /dev/null +++ b/src/permissions/CreatorPermissionStorageV1.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.17; + +contract CreatorPermissionStorageV1 { + mapping(uint256 => uint256) public permissions; + + uint256[50] private ___gap; +} diff --git a/src/proxies/ZoraCreator1155FactoryProxy.sol b/src/proxies/ZoraCreator1155FactoryProxy.sol new file mode 100644 index 000000000..a199074ed --- /dev/null +++ b/src/proxies/ZoraCreator1155FactoryProxy.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.17; + +import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; + +contract ZoraCreator1155FactoryProxy is ERC1967Proxy { + constructor(address _logic) ERC1967Proxy(_logic, '') { + + } +} diff --git a/src/proxies/ZoraCreator1155Proxy.sol b/src/proxies/ZoraCreator1155Proxy.sol new file mode 100644 index 000000000..f89588c78 --- /dev/null +++ b/src/proxies/ZoraCreator1155Proxy.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.17; + +import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; + +contract ZoraCreator1155Proxy is ERC1967Proxy { + constructor(address _logic) ERC1967Proxy(_logic, '') { + + } +} diff --git a/yarn.lock b/yarn.lock index f588f9ad9..90ced4f30 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,6 +12,18 @@ resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.8.0.tgz#6854c37df205dd2c056bdfa1b853f5d732109109" integrity sha512-AGuwhRRL+NaKx73WKRNzeCxOCOCxpaqF+kp8TJ89QzAipSwZy/NoflkWaL9bywXFRhIzXt8j38sfF7KBKCPWLw== +"@solidity-parser/parser@^0.14.5": + version "0.14.5" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.5.tgz#87bc3cc7b068e08195c219c91cd8ddff5ef1a804" + integrity sha512-6dKnHZn7fg/iQATVEzqyUOyEidbn05q7YA2mQ9hC0MMXhhV3/JrsxmFSYZAcr7j1yUP700LLhTruvJ3MiQmjJg== + dependencies: + antlr4ts "^0.5.0-alpha.4" + +antlr4ts@^0.5.0-alpha.4: + version "0.5.0-alpha.4" + resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a" + integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ== + "ds-test@https://github.com/dapphub/ds-test#cd98eff28324bfac652e63a239a60632a761790b": version "1.0.0" resolved "https://github.com/dapphub/ds-test#cd98eff28324bfac652e63a239a60632a761790b" @@ -19,3 +31,41 @@ "forge-std@https://github.com/foundry-rs/forge-std#cd7d533f9a0ee0ec02ad81e0a8f262bc4203c653": version "1.1.1" resolved "https://github.com/foundry-rs/forge-std#cd7d533f9a0ee0ec02ad81e0a8f262bc4203c653" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +prettier-plugin-solidity@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.1.1.tgz#4d3375b85f97812ffcbe48d5a8b3fe914d69c91f" + integrity sha512-uD24KO26tAHF+zMN2nt1OUzfknzza5AgxjogQQrMLZc7j8xiQrDoNWNeOlfFC0YLTwo12CLD10b9niLyP6AqXg== + dependencies: + "@solidity-parser/parser" "^0.14.5" + semver "^7.3.8" + solidity-comments-extractor "^0.0.7" + +prettier@^2.8.3: + version "2.8.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.3.tgz#ab697b1d3dd46fb4626fbe2f543afe0cc98d8632" + integrity sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw== + +semver@^7.3.8: + version "7.3.8" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" + integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== + dependencies: + lru-cache "^6.0.0" + +solidity-comments-extractor@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz#99d8f1361438f84019795d928b931f4e5c39ca19" + integrity sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==