Skip to content

Commit

Permalink
fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
iainnash committed Sep 11, 2023
2 parents 0e64362 + 9228c58 commit c016669
Show file tree
Hide file tree
Showing 22 changed files with 145 additions and 219 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ jobs:
run: |
forge test -vvv --match-test fork
env:
FORK_TEST_CHAINS: mainnet,goerli,optimism,optimism_goerli,zora,zora_goerli,base_goerli,base,pgn_sepolia,pgn
FORK_TEST_CHAINS: mainnet,goerli,optimism,optimism_goerli,zora,zora_goerli,base_goerli,base # ,pgn_sepolia,pgn
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
id: test
1 change: 1 addition & 0 deletions addresses/1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"DROP_METADATA_RENDERER": "0x5914d9a241008b9f02f22811bf3a77e02b84d226",
"EDITION_METADATA_RENDERER": "0x192ce8267cbab9c3c477d61e85d7f0c5fe3b46af",
"ERC721DROP_IMPL": "0x8237F421357F87a23ed0CFf3a5586172F210A21B",
"ERC721DROP_IMPL_VERSION": 14,
"FACTORY_UPGRADE_GATE": "0x8Da5aC3A39D3B8BCaA1FC15A01506cf4F5e79830",
"ZORA_NFT_CREATOR_PROXY": "0xF74B146ce44CC162b601deC3BE331784DB111DC1",
"ZORA_NFT_CREATOR_V1_IMPL": "0x932A29Dbfc1B8c3BdfC763eF53F113486A5b5E7D"
Expand Down
1 change: 1 addition & 0 deletions addresses/10.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"DROP_METADATA_RENDERER": "0x96CcF205A366E15E261d77B14586389f80a029e9",
"EDITION_METADATA_RENDERER": "0xa2a7D8bcE0bf58D177137ECB94f3Fa6aA06aA7A1",
"ERC721DROP_IMPL": "0x3E8524770adD176bE381a0529E09f1c6c3502A5a",
"ERC721DROP_IMPL_VERSION": 14,
"FACTORY_UPGRADE_GATE": "0x192D663C3D6813a24a24582A76B8d872c4F6F7f9",
"ZORA_NFT_CREATOR_PROXY": "0x7d1a46c6e614A0091c39E102F2798C27c1fA8892",
"ZORA_NFT_CREATOR_V1_IMPL": "0x805E0a08dE70f85C01F7848370d5e3fc08aAd0ea",
Expand Down
1 change: 1 addition & 0 deletions addresses/11155111.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"DROP_METADATA_RENDERER": "0x0Cf8733DEd6d9E0905A8cCc8DC767F381A76970a",
"EDITION_METADATA_RENDERER": "0xC5c958a65656A84b74100D1d420a1819fEA18d41",
"ERC721DROP_IMPL": "0xF706f5A8030C1e7D344D2Ef32Dff6B8568B3d07B",
"ERC721DROP_IMPL_VERSION": 11,
"FACTORY_UPGRADE_GATE": "0x3C1ebcF36Ca9DD9371c9aA99c274e4988906c6E3",
"ZORA_NFT_CREATOR_PROXY": "0x87cfd516c5ea86e50b950678CA970a8a28de27ac",
"ZORA_NFT_CREATOR_V1_IMPL": "0x96315ee3C58d16A40DA8Ee05008bA1F6654ea358"
Expand Down
1 change: 1 addition & 0 deletions addresses/420.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"DROP_METADATA_RENDERER": "0xCe6B190956D73dA045bA348743E4C1cb6652f37f",
"EDITION_METADATA_RENDERER": "0x169007EF8fF4d2a225f361654e4B8280910fD8FC",
"ERC721DROP_IMPL": "0x61Cb091f8EC70029E393D31BA8F6D533c1308408",
"ERC721DROP_IMPL_VERSION": 14,
"FACTORY_UPGRADE_GATE": "0x9B414A3F7872bdd2E6513689214BD2Debbe48340",
"ZORA_NFT_CREATOR_PROXY": "0x3C1ebcF36Ca9DD9371c9aA99c274e4988906c6E3",
"ZORA_NFT_CREATOR_V1_IMPL": "0xbe83E15eED1FD666C241960f50549bE9D639743c",
Expand Down
1 change: 1 addition & 0 deletions addresses/424.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"DROP_METADATA_RENDERER": "0xd77783B9df27BC9ABd438d1ddE67e3afB64618e0",
"EDITION_METADATA_RENDERER": "0xC647382DFbb02ddf39dde7fDEbb5D844a832BE33",
"ERC721DROP_IMPL": "0x0ef82DaB14798E63F1B99479Ba689e3f6A6fEb6C",
"ERC721DROP_IMPL_VERSION": 13,
"FACTORY_UPGRADE_GATE": "0x973577d5B73a9b2508296F81260415151d0a955E",
"ZORA_NFT_CREATOR_PROXY": "0x48d8db63724444C6270749fEe80bBDB6CF33677f",
"ZORA_NFT_CREATOR_V1_IMPL": "0x97eb05B8db496B12244BCcf17CF377d00a99b67a",
Expand Down
1 change: 1 addition & 0 deletions addresses/5.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"EDITION_METADATA_RENDERER": "0x2f5C21EF9DdFf9A1FE76a1c55dd5112fcf2EfD39",
"DROP_METADATA_RENDERER": "0x5956Fd16c4d8c4b4711F2551971aBB7c2F4aF677",
"ERC721DROP_IMPL": "0xe4c17055048aEe01D0d122804816fEe5E6ac4A67",
"ERC721DROP_IMPL_VERSION": 14,
"FACTORY_UPGRADE_GATE": "0x942C03C7afE5c8118BDB728Aa06d1b894B1cD9A8",
"ZORA_NFT_CREATOR_PROXY": "0xb9583D05Ba9ba8f7F14CCEe3Da10D2bc0A72f519",
"ZORA_NFT_CREATOR_V1_IMPL": "0x0209aAEC870BE5C1cC243eE18eF6e80d545e9F32"
Expand Down
1 change: 1 addition & 0 deletions addresses/58008.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"DROP_METADATA_RENDERER": "0x973577d5B73a9b2508296F81260415151d0a955E",
"EDITION_METADATA_RENDERER": "0x0ef82DaB14798E63F1B99479Ba689e3f6A6fEb6C",
"ERC721DROP_IMPL": "0x48d8db63724444C6270749fEe80bBDB6CF33677f",
"ERC721DROP_IMPL_VERSION": 13,
"FACTORY_UPGRADE_GATE": "0x97eb05B8db496B12244BCcf17CF377d00a99b67a",
"ZORA_NFT_CREATOR_PROXY": "0x418B87c2C9579d27FC3D66605545AB9889737E60",
"ZORA_NFT_CREATOR_V1_IMPL": "0x39C51a7957651ea176733F19125BD9c253894D6F",
Expand Down
1 change: 1 addition & 0 deletions addresses/7777777.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"DROP_METADATA_RENDERER": "0x4A0ad3Ef9bE8095590D854bC8481C9E50922a3c0",
"EDITION_METADATA_RENDERER": "0xCA7bF48453B72e4E175267127B4Ed7EB12F83b93",
"ERC721DROP_IMPL": "0x53a85FbD2955EF713AA489Ae0C48523E727a0c07",
"ERC721DROP_IMPL_VERSION": 14,
"FACTORY_UPGRADE_GATE": "0x446A4135FB31007064107EFfDC15B8843B72B6F6",
"ZORA_NFT_CREATOR_PROXY": "0xA2c2A96A232113Dd4993E8b048EEbc3371AE8d85",
"ZORA_NFT_CREATOR_V1_IMPL": "0xfFFD7409031B1aeb731271C6C2D59771523Ff8a8",
Expand Down
1 change: 1 addition & 0 deletions addresses/8453.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"DROP_METADATA_RENDERER": "0xF77330C8b1c41f2e44470763Cf9E3ACa78Db4381",
"EDITION_METADATA_RENDERER": "0x2008C05685F9fA15BBD75d80e9A44ab0c7230577",
"ERC721DROP_IMPL": "0x8Ca5e648C5dFEfcdDa06d627F4b490B719ccFD98",
"ERC721DROP_IMPL_VERSION": 14,
"FACTORY_UPGRADE_GATE": "0x532142aE8e53a5F92B9dE1a43F1FFD6eF789e65e",
"ZORA_NFT_CREATOR_PROXY": "0x58C3ccB2dcb9384E5AB9111CD1a5DEA916B0f33c",
"ZORA_NFT_CREATOR_V1_IMPL": "0x76CC78EF3aafD52e716a8e37F3dBbE0C42c51d54",
Expand Down
1 change: 1 addition & 0 deletions addresses/84531.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"DROP_METADATA_RENDERER": "0x0Cf8733DEd6d9E0905A8cCc8DC767F381A76970a",
"EDITION_METADATA_RENDERER": "0xC5c958a65656A84b74100D1d420a1819fEA18d41",
"ERC721DROP_IMPL": "0x39Bcc1e15b8ec15684F17fEf298151F4A544B591",
"ERC721DROP_IMPL_VERSION": 14,
"FACTORY_UPGRADE_GATE": "0x3C1ebcF36Ca9DD9371c9aA99c274e4988906c6E3",
"ZORA_NFT_CREATOR_PROXY": "0x87cfd516c5ea86e50b950678CA970a8a28de27ac",
"ZORA_NFT_CREATOR_V1_IMPL": "0x489f8fFbd5f5eA8875c2EbC5CA9ED1214BD77F42"
Expand Down
1 change: 1 addition & 0 deletions addresses/999.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"DROP_METADATA_RENDERER": "0xb9583D05Ba9ba8f7F14CCEe3Da10D2bc0A72f519",
"EDITION_METADATA_RENDERER": "0x481c56e15A9B2987Bd6041043e1d807697505d23",
"ERC721DROP_IMPL": "0x293997C6a1f2A1cA3aB971f548c4D95585E46282",
"ERC721DROP_IMPL_VERSION": 14,
"FACTORY_UPGRADE_GATE": "0x2068BA7Be6e22b97d21f5eb6e152A36d2Dc27da2",
"ZORA_NFT_CREATOR_PROXY": "0xeB29A4e5b84fef428c072debA2444e93c080CE87",
"ZORA_NFT_CREATOR_V1_IMPL": "0xe4c17055048aEe01D0d122804816fEe5E6ac4A67"
Expand Down
15 changes: 8 additions & 7 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ gas_reports = ['*']
fs_permissions = [{ access = "read", path = "./addresses"}, { access = "read", path = "./chainConfigs"}, { access = "read", path = "./package.json" }]

[etherscan]
optimism = { key = "$OPT_ETHERSCAN_API_KEY" }
base = { key = "ANY_KEY_IS_OKAY" }
mainnet = { key = "$ETHERSCAN_API_KEY" }

zora_mainnet = { key = "", chain = 7777777, url = "https://explorer.zora.energy/api\\?" }
zora_testnet = { key = "", chain = 999, url = "https://explorer.testnet.zora.energy/api\\?" }

Expand All @@ -22,16 +26,13 @@ pgn_sepolia = { key = "", chain = 7777777, url = "https://explorer.sepolia.publi
mainnet = "https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY}"
goerli = "https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_KEY}"

# for optimism, since we are just using this for deployment/fork testing,
# we can use these since they're lower volume.

optimism = "https://mainnet.optimism.io"
optimism_goerli = "https://goerli.optimism.io"
optimism = "https://opt-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY}"
optimism_goerli = "https://opt-goerli.g.alchemy.com/v2/${ALCHEMY_KEY}"

zora = "https://rpc.zora.energy"
zora_goerli = "https://testnet.rpc.zora.energy"

base = "https://developer-access-mainnet.base.org"
base_goerli = "https://goerli.base.org"
base = "https://base-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY}"
base_goerli = "https://base-goerli.g.alchemy.com/v2/${ALCHEMY_KEY}"
pgn = "https://rpc.publicgoods.network"
pgn_sepolia = "https://sepolia.publicgoods.network"
3 changes: 3 additions & 0 deletions script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,15 @@ contract Deploy is ZoraDropsDeployBase {

// vm.stopBroadcast();

uint256 dropImplementationVersion = dropImplementation.contractVersion();

return
getDeploymentJSON(
DropDeployment({
dropMetadata: address(dropMetadata),
editionMetadata: address(editionMetadata),
dropImplementation: address(dropImplementation),
dropImplementationVersion: dropImplementationVersion,
factoryUpgradeGate: address(factoryUpgradeGate),
factory: address(factory),
factoryImpl: address(factoryImpl)
Expand Down
3 changes: 2 additions & 1 deletion script/UpgradeERC721DropFactory.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity ^0.8.13;

import "forge-std/console2.sol";
import {ZoraDropsDeployBase} from "./ZoraDropsDeployBase.sol";
import {ChainConfig, DropDeployment} from '../src/DeploymentConfig.sol';
import {ChainConfig, DropDeployment} from "../src/DeploymentConfig.sol";

import {ERC721Drop} from "../src/ERC721Drop.sol";
import {ERC721DropProxy} from "../src/ERC721DropProxy.sol";
Expand Down Expand Up @@ -61,6 +61,7 @@ contract UpgradeERC721DropFactory is ZoraDropsDeployBase {
});

deployment.dropImplementation = address(dropImplementation);
deployment.dropImplementationVersion = dropImplementation.contractVersion();

console2.log("Drop IMPL: ");
console2.log(address(dropImplementation));
Expand Down
6 changes: 3 additions & 3 deletions script/ZoraDropsDeployBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
pragma solidity ^0.8.13;

import "forge-std/Script.sol";
import {ScriptDeploymentConfig, DropDeployment} from '../src/DeploymentConfig.sol';
import {ScriptDeploymentConfig, DropDeployment} from "../src/DeploymentConfig.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {ZoraNFTCreatorV1} from "../src/ZoraNFTCreatorV1.sol";
import {IERC721Drop} from "../src/interfaces/IERC721Drop.sol";

/// @notice Deployment drops for base where
/// @notice Deployment drops for base where
abstract contract ZoraDropsDeployBase is ScriptDeploymentConfig {

/// @notice Get deployment configuration struct as JSON
/// @param deployment deploymet struct
/// @return deploymentJson string JSON of the deployment info
Expand All @@ -19,6 +18,7 @@ abstract contract ZoraDropsDeployBase is ScriptDeploymentConfig {
vm.serializeAddress(deploymentJsonKey, DROP_METADATA_RENDERER, deployment.dropMetadata);
vm.serializeAddress(deploymentJsonKey, EDITION_METADATA_RENDERER, deployment.editionMetadata);
vm.serializeAddress(deploymentJsonKey, ERC721DROP_IMPL, deployment.dropImplementation);
vm.serializeUint(deploymentJsonKey, ERC721DROP_IMPL_VERSION, deployment.dropImplementationVersion);
vm.serializeAddress(deploymentJsonKey, FACTORY_UPGRADE_GATE, deployment.factoryUpgradeGate);
vm.serializeAddress(deploymentJsonKey, ZORA_NFT_CREATOR_PROXY, deployment.factory);
// Get the JSON key as a seralized string
Expand Down
3 changes: 3 additions & 0 deletions src/DeploymentConfig.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ struct DropDeployment {
address editionMetadata;
/// @notice Implementation contract for the drop contract
address dropImplementation;
/// @notice Implementation version for the drop contract
uint256 dropImplementationVersion;
/// @notice Factory upgrade gate immutable registry for allowing upgrades
address factoryUpgradeGate;
/// @notice Factory proxy contract that creates zora drops style NFT contracts
Expand Down Expand Up @@ -65,6 +67,7 @@ abstract contract DeploymentConfig is StdChains, StdCheatsSafe, StdUtils, Script
string constant DROP_METADATA_RENDERER = "DROP_METADATA_RENDERER";
string constant EDITION_METADATA_RENDERER = "EDITION_METADATA_RENDERER";
string constant ERC721DROP_IMPL = "ERC721DROP_IMPL";
string constant ERC721DROP_IMPL_VERSION = "ERC721DROP_IMPL_VERSION";
string constant FACTORY_UPGRADE_GATE = "FACTORY_UPGRADE_GATE";
string constant ZORA_NFT_CREATOR_PROXY = "ZORA_NFT_CREATOR_PROXY";
string constant ZORA_NFT_CREATOR_V1_IMPL = "ZORA_NFT_CREATOR_V1_IMPL";
Expand Down
6 changes: 3 additions & 3 deletions src/ERC721Drop.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/se
import {MerkleProofUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol";
import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import {MathUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol";
import {IProtocolRewards} from "@zoralabs/protocol-rewards/dist/contracts/interfaces/IProtocolRewards.sol";
import {ERC721Rewards} from "@zoralabs/protocol-rewards/dist/contracts/abstract/ERC721/ERC721Rewards.sol";
import {ERC721RewardsStorageV1} from "@zoralabs/protocol-rewards/dist/contracts/abstract/ERC721/ERC721RewardsStorageV1.sol";
import {IProtocolRewards} from "@zoralabs/protocol-rewards/src/interfaces/IProtocolRewards.sol";
import {ERC721Rewards} from "@zoralabs/protocol-rewards/src/abstract/ERC721/ERC721Rewards.sol";
import {ERC721RewardsStorageV1} from "@zoralabs/protocol-rewards/src/abstract/ERC721/ERC721RewardsStorageV1.sol";

import {IMetadataRenderer} from "./interfaces/IMetadataRenderer.sol";
import {IERC721Drop} from "./interfaces/IERC721Drop.sol";
Expand Down
4 changes: 2 additions & 2 deletions test/ERC721Drop.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ pragma solidity ^0.8.10;
import {Test} from "forge-std/Test.sol";
import {IERC721AUpgradeable} from "erc721a-upgradeable/IERC721AUpgradeable.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
import {ProtocolRewards} from "@zoralabs/protocol-rewards/dist/contracts/ProtocolRewards.sol";
import {RewardsSettings} from "@zoralabs/protocol-rewards/dist/contracts/abstract/RewardSplits.sol";
import {ProtocolRewards} from "@zoralabs/protocol-rewards/src/ProtocolRewards.sol";
import {RewardsSettings} from "@zoralabs/protocol-rewards/src/abstract/RewardSplits.sol";

import {ERC721Drop} from "../src/ERC721Drop.sol";
import {DummyMetadataRenderer} from "./utils/DummyMetadataRenderer.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/ZoraNFTCreatorV1.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity ^0.8.10;

import {Test} from "forge-std/Test.sol";
import {IERC721AUpgradeable} from "erc721a-upgradeable/IERC721AUpgradeable.sol";
import {ProtocolRewards} from "@zoralabs/protocol-rewards/dist/contracts/ProtocolRewards.sol";
import {ProtocolRewards} from "@zoralabs/protocol-rewards/src/ProtocolRewards.sol";

import {IMetadataRenderer} from "../src/interfaces/IMetadataRenderer.sol";
import "../src/ZoraNFTCreatorV1.sol";
Expand Down
Loading

0 comments on commit c016669

Please sign in to comment.