-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #159 from ourzora/isabella/add-contract-read-for-f…
…actory-upgrade Add existing contract read for factory upgrading
- Loading branch information
Showing
6 changed files
with
100 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@zoralabs/nft-drop-contracts': patch | ||
--- | ||
|
||
Adding a contract name check in \_authorizeUpgrade to prevent incorrect contract name upgrades. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.10; | ||
|
||
import {IContractMetadata} from "../../src/interfaces/IContractMetadata.sol"; | ||
import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; | ||
|
||
contract MockContractMetadata is IContractMetadata, UUPSUpgradeable { | ||
string public override contractURI; | ||
string public override contractName; | ||
|
||
constructor(string memory _contractURI, string memory _contractName) { | ||
contractURI = _contractURI; | ||
contractName = _contractName; | ||
} | ||
|
||
function setContractURI(string memory _contractURI) external { | ||
contractURI = _contractURI; | ||
} | ||
|
||
function setContractName(string memory _contractName) external { | ||
contractName = _contractName; | ||
} | ||
|
||
function _authorizeUpgrade(address _newImplementation) internal override {} | ||
} |