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

constructor hotfix for cdk #11

Merged
merged 3 commits into from
Jan 26, 2022
Merged
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ Rinkeby Deployer Address: `0x43C4D51dE4b7bf046d92c324678a1a3969703632`

| Contract | Address | Etherscan |
| ----------------- |:------------------------------------------:| ---------------------------------------------------------------------------------------------:|
| Catalog Proxy | 0x232Dd4a3AB377C9225E49c5932Ae8A694aa7c0b5 | [link](https://rinkeby.etherscan.io/address/0x232Dd4a3AB377C9225E49c5932Ae8A694aa7c0b5) |
| V1 Implementation | 0xd25E883Ba97a851252b2459827503b829d1c4b40 | [link](https://rinkeby.etherscan.io/address/0xd25E883Ba97a851252b2459827503b829d1c4b40) |
| Catalog Proxy | 0x775B572e0CEB816625Af9779Bb686A8b47975876 | [link](https://rinkeby.etherscan.io/address/0x775B572e0CEB816625Af9779Bb686A8b47975876) |
| V1 Implementation | 0x6b4d0c257830FeC10833ec868F5eb774AF5044a9 | [link](https://rinkeby.etherscan.io/address/0x6b4d0c257830FeC10833ec868F5eb774AF5044a9) |



Expand Down
2 changes: 1 addition & 1 deletion addresses/4.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"catalog": "0x232Dd4a3AB377C9225E49c5932Ae8A694aa7c0b5"
"catalog": "0x775B572e0CEB816625Af9779Bb686A8b47975876"
}
3 changes: 0 additions & 3 deletions contracts/catalog/Catalog.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ contract Catalog is ERC721Upgradeable, IERC2981Upgradeable, OwnableUpgradeable,
/// Merkle Root
bytes32 public merkleRoot;

/// @custom:oz-upgrades-unsafe-allow constructor
constructor() initializer {}

/**
initialize Function
@notice Initializes contract with default values, acts as a constructor
Expand Down
32 changes: 32 additions & 0 deletions contracts/proxy/CatalogProxy.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

import {Proxy} from "@openzeppelin/contracts/proxy/Proxy.sol";
import {ERC1967Upgrade} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol";

/**
* @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an
* implementation address that can be changed. This address is stored in storage in the location specified by
* https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the
* implementation behind the proxy.
*/
contract CatalogProxy is Proxy, ERC1967Upgrade {
/**
* @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.
*
* If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded
* function call, and allows initializating the storage of the proxy like a Solidity constructor.
*/
constructor(address _logic, bytes memory _data) payable {
assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1));
_upgradeToAndCall(_logic, _data, false);
}

/**
* @dev Returns the current implementation address.
*/
function _implementation() internal view virtual override returns (address impl) {
return ERC1967Upgrade._getImplementation();
}
}
65 changes: 22 additions & 43 deletions data/deployments/rinkeby/Catalog.json

Large diffs are not rendered by default.

34 changes: 13 additions & 21 deletions data/deployments/rinkeby/Catalog_Implementation.json

Large diffs are not rendered by default.

54 changes: 20 additions & 34 deletions data/deployments/rinkeby/Catalog_Proxy.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@catalogworks/catalog-contracts",
"author": "@catalogworks",
"license": "MIT",
"version": "0.1.1",
"version": "0.1.2",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"repository": {
Expand Down