Skip to content

Commit

Permalink
fix: remove initial owner
Browse files Browse the repository at this point in the history
Signed-off-by: Campion Fellin <[email protected]>
  • Loading branch information
campionfellin committed Feb 12, 2024
1 parent b6977f1 commit 95914b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
11 changes: 3 additions & 8 deletions packages/manifold/contracts/edition/ManifoldERC721Edition.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol";
import "@manifoldxyz/libraries-solidity/contracts/access/IAdminControl.sol";
import "@manifoldxyz/creator-core-solidity/contracts/core/IERC721CreatorCore.sol";
import "@manifoldxyz/creator-core-solidity/contracts/extensions/CreatorExtension.sol";
import "@manifoldxyz/creator-core-solidity/contracts/extensions/ICreatorExtensionTokenURI.sol";
Expand All @@ -17,7 +17,7 @@ import "./IManifoldERC721Edition.sol";
/**
* Manifold ERC721 Edition Controller Implementation
*/
contract ManifoldERC721Edition is AdminControl, CreatorExtension, ICreatorExtensionTokenURI, IManifoldERC721Edition, ReentrancyGuard {
contract ManifoldERC721Edition is CreatorExtension, ICreatorExtensionTokenURI, IManifoldERC721Edition, ReentrancyGuard {
using Strings for uint256;

struct IndexRange {
Expand All @@ -31,10 +31,6 @@ contract ManifoldERC721Edition is AdminControl, CreatorExtension, ICreatorExtens
mapping(address => mapping(uint256 => IndexRange[])) _indexRanges;

mapping(address => uint256[]) _creatorInstanceIds;

constructor(address initialOwner) {
_transferOwnership(initialOwner);
}

/**
* @dev Only allows approved admins to call the specified function
Expand All @@ -44,11 +40,10 @@ contract ManifoldERC721Edition is AdminControl, CreatorExtension, ICreatorExtens
_;
}

function supportsInterface(bytes4 interfaceId) public view virtual override(CreatorExtension, IERC165, AdminControl) returns (bool) {
function supportsInterface(bytes4 interfaceId) public view virtual override(CreatorExtension, IERC165) returns (bool) {
return
interfaceId == type(ICreatorExtensionTokenURI).interfaceId ||
interfaceId == type(IManifoldERC721Edition).interfaceId ||
interfaceId == type(IAdminControl).interfaceId ||
CreatorExtension.supportsInterface(interfaceId);
}

Expand Down
12 changes: 1 addition & 11 deletions packages/manifold/script/ManifoldERC721Edition.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,12 @@ import "../contracts/edition/ManifoldERC721Edition.sol";

contract DeployManifoldERC721Edition is Script {
function run() external {

// address initialOwner = <your wallet address>; // uncomment this and put in your wallet on goerli
address initialOwner = vm.envAddress("INITIAL_OWNER"); // comment this out on goerli

// uint pk = some combo of 6s and 9s;
// address addr = vm.addr(pk);
// console.log(addr);

require(initialOwner != address(0), "Initial owner address not set. Please configure INITIAL_OWNER.");

// uint256 deployerPrivateKey = pk; // uncomment this when testing on goerli
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); // comment this out when testing on goerli
vm.startBroadcast(deployerPrivateKey);
// forge script scripts/ManifoldERC721Edition.s.sol --optimizer-runs 1000 --rpc-url <YOUR_NODE> --broadcast
// forge verify-contract --compiler-version 0.8.17 --optimizer-runs 1000 --chain sepolia <DEPLOYED_ADDRESS> contracts/edition/ManifoldERC721Edition.sol:ManifoldERC721Edition --constructor-args $(cast abi-encode "constructor(address)" "${INITIAL_OWNER}") --watch
new ManifoldERC721Edition{salt: 0x4d616e69666f6c6445524337323145646974696f6e4d616e69666f6c64455243}(initialOwner);
new ManifoldERC721Edition{salt: 0x4d616e69666f6c6445524337323145646974696f6e4d616e69666f6c64455243}();
vm.stopBroadcast();
}
}
2 changes: 1 addition & 1 deletion packages/manifold/test/edition/ManifoldERC721Edition.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ contract ManifoldERC721EditionTest is Test {
creatorCore2 = new ERC721Creator("Token", "NFT");
creatorCore3 = new ERC721Creator("Token", "NFT");

example = new ManifoldERC721Edition(owner);
example = new ManifoldERC721Edition();

creatorCore1.registerExtension(address(example), "");
creatorCore2.registerExtension(address(example), "");
Expand Down

0 comments on commit 95914b0

Please sign in to comment.