Skip to content

Commit

Permalink
feat: protocol rewards (#143)
Browse files Browse the repository at this point in the history
* chore: add zora rewards package

* chore: update remappings

* refactor: add ERC721Rewards extension

* chore: update dependencies

* chore: add zora rewards to scripts

* chore: update existing tests

* feat: add purchaseWithRewards

* chore: update dependencies

* fix: add finder and lister params

* chore: add rewards tests

* chore: reduce optimizer runs

* chore: update dependencies

* chore: update runs

* fix: handle supply royaltes when purchasing with rewards

* chore: update tests

* chore: update OZ dependency location

* chore: update rewards tests

* refactor: add recipient to purchase w rewards

* chore: update rewards dep

* refactor: update lister to origin

* chore: update tests

* chore: add zora rewards to chain configs

* refactor: change purchase to mint w/ rewards

* refactor: update referral names

* chore: add pgn

* chore: add rewards to deploy config

* chore: update dependencies

* refactor: set create referral on initialization

* refactor: add create referral to factory

* chore: update scripts w/ default create referral

* chore: update tests

* chore: update create referral tests

* refactor: add common helpers

* chore: update deps

* chore: update deps

* refactor: add rewards storage

* chore: update runs

* chore: update protocol rewards

* chore: update deploy config

* chore: update naming

* chore: update versions

* refactor: do not force create referral via factory

* chore: update goerli deploy

* chore: update zora goerli deploy

* chore: update op goerli deploy

* chore: update base goerli deploy

* chore: update deps

* chore: update goerli deploy

* chore: update zora goerli deploy

* chore: update op goerli deploy

* chore: update base goerli deploy

* chore: update dep

* refactor: update rewards handler

* chore: update tests

* refactor: add error for protocol rewards withdraw

* refactor: add rewards withdraw and sale event helper

* chore: update runs

* chore: remove old var

* chore: add back OZ

* chore: update lock

* chore: update chain configs

* chore: update testnets

* chore: update deploys

* chore: update deployments

* chore: update op goerli

* chore: update chain configs

* fix: consistent chain config amounts

* chore: update deploys

* fix: remove chain config key

* generate new storage layout

---------

Co-authored-by: James Geary <[email protected]>
  • Loading branch information
kulkarohan and jgeary authored Aug 9, 2023
1 parent 4ac7950 commit e6038b8
Show file tree
Hide file tree
Showing 34 changed files with 1,196 additions and 746 deletions.
1 change: 1 addition & 0 deletions .storage-layout
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
| salesConfig | struct IERC721Drop.SalesConfiguration | 354 | 0 | 96 | src/ERC721Drop.sol:ERC721Drop |
| presaleMintsByAddress | mapping(address => uint256) | 357 | 0 | 32 | src/ERC721Drop.sol:ERC721Drop |
| royaltyMintSchedule | uint32 | 358 | 0 | 4 | src/ERC721Drop.sol:ERC721Drop |
| createReferral | address | 358 | 4 | 20 | src/ERC721Drop.sol:ERC721Drop |

=======================
➡ ERC721DropProxy
Expand Down
4 changes: 2 additions & 2 deletions addresses/1.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"DROP_METADATA_RENDERER": "0x5914d9a241008b9f02f22811bf3a77e02b84d226",
"EDITION_METADATA_RENDERER": "0x192ce8267cbab9c3c477d61e85d7f0c5fe3b46af",
"ERC721DROP_IMPL": "0x419074d73Cf0852e46b8531b430B1230C348C291",
"ERC721DROP_IMPL": "0x8237F421357F87a23ed0CFf3a5586172F210A21B",
"FACTORY_UPGRADE_GATE": "0x8Da5aC3A39D3B8BCaA1FC15A01506cf4F5e79830",
"ZORA_NFT_CREATOR_PROXY": "0xF74B146ce44CC162b601deC3BE331784DB111DC1",
"ZORA_NFT_CREATOR_V1_IMPL": "0xa6a2956fa075d50b021385478A99f3642dAfCc2C"
"ZORA_NFT_CREATOR_V1_IMPL": "0x932A29Dbfc1B8c3BdfC763eF53F113486A5b5E7D"
}
4 changes: 2 additions & 2 deletions addresses/10.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"DROP_METADATA_RENDERER": "0x96CcF205A366E15E261d77B14586389f80a029e9",
"EDITION_METADATA_RENDERER": "0xa2a7D8bcE0bf58D177137ECB94f3Fa6aA06aA7A1",
"ERC721DROP_IMPL": "0x46E772210f01647FA573b915bE287Ff9b65AD4B0",
"ERC721DROP_IMPL": "0x3E8524770adD176bE381a0529E09f1c6c3502A5a",
"FACTORY_UPGRADE_GATE": "0x192D663C3D6813a24a24582A76B8d872c4F6F7f9",
"ZORA_NFT_CREATOR_PROXY": "0x7d1a46c6e614A0091c39E102F2798C27c1fA8892",
"ZORA_NFT_CREATOR_V1_IMPL": "0xd1cba36d92B052079523F471Eb891563F2E5dF5C",
"ZORA_NFT_CREATOR_V1_IMPL": "0x805E0a08dE70f85C01F7848370d5e3fc08aAd0ea",
"timestamp": 1683682873,
"commit": "8b52993"
}
4 changes: 2 additions & 2 deletions addresses/420.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"DROP_METADATA_RENDERER": "0xCe6B190956D73dA045bA348743E4C1cb6652f37f",
"EDITION_METADATA_RENDERER": "0x169007EF8fF4d2a225f361654e4B8280910fD8FC",
"ERC721DROP_IMPL": "0x0Cf8733DEd6d9E0905A8cCc8DC767F381A76970a",
"ERC721DROP_IMPL": "0x61Cb091f8EC70029E393D31BA8F6D533c1308408",
"FACTORY_UPGRADE_GATE": "0x9B414A3F7872bdd2E6513689214BD2Debbe48340",
"ZORA_NFT_CREATOR_PROXY": "0x3C1ebcF36Ca9DD9371c9aA99c274e4988906c6E3",
"ZORA_NFT_CREATOR_V1_IMPL": "0xC5c958a65656A84b74100D1d420a1819fEA18d41",
"ZORA_NFT_CREATOR_V1_IMPL": "0xbe83E15eED1FD666C241960f50549bE9D639743c",
"timestamp": 1683668679,
"commit": "e100eee"
}
6 changes: 2 additions & 4 deletions addresses/5.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"ZORA_NFT_CREATOR_V1": "0xb4d319458E489825Cea8e25b5e43742BCdAFc6dd",
"ZORA_NFT_CREATOR_PROXY": "0xb9583D05Ba9ba8f7F14CCEe3Da10D2bc0A72f519",
"ZORA_ERC721_TRANSFER_HELPER": "0xd1adAF05575295710dE1145c3c9427c364A70a7f",
"ZORA_FEE_MANAGER": "0xCf5E957CA7b77EC16611992d79f4E179132ad98C",
"EDITION_METADATA_RENDERER": "0x2f5C21EF9DdFf9A1FE76a1c55dd5112fcf2EfD39",
"DROP_METADATA_RENDERER": "0x5956Fd16c4d8c4b4711F2551971aBB7c2F4aF677",
"ERC721_DROP": "0x2093eFB737C07324D8b6c5807910EFF45045D987",
"ERC721DROP_IMPL": "0xe4c17055048aEe01D0d122804816fEe5E6ac4A67",
"FACTORY_UPGRADE_GATE": "0x942C03C7afE5c8118BDB728Aa06d1b894B1cD9A8",
"ZORA_NFT_CREATOR_PROXY": "0xb9583D05Ba9ba8f7F14CCEe3Da10D2bc0A72f519",
"ZORA_NFT_CREATOR_V1_IMPL": "0x4328cbDAD668E81B475766520E1004e6688D2949"
"ZORA_NFT_CREATOR_V1_IMPL": "0x0209aAEC870BE5C1cC243eE18eF6e80d545e9F32"
}
4 changes: 2 additions & 2 deletions addresses/7777777.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"DROP_METADATA_RENDERER": "0x4A0ad3Ef9bE8095590D854bC8481C9E50922a3c0",
"EDITION_METADATA_RENDERER": "0xCA7bF48453B72e4E175267127B4Ed7EB12F83b93",
"ERC721DROP_IMPL": "0x8ee55A8598EC2CE412a476890695fa0E7154510c",
"ERC721DROP_IMPL": "0x53a85FbD2955EF713AA489Ae0C48523E727a0c07",
"FACTORY_UPGRADE_GATE": "0x446A4135FB31007064107EFfDC15B8843B72B6F6",
"ZORA_NFT_CREATOR_PROXY": "0xA2c2A96A232113Dd4993E8b048EEbc3371AE8d85",
"ZORA_NFT_CREATOR_V1_IMPL": "0xe7763512099a9C2567a40a669aA9F48FF8493455",
"ZORA_NFT_CREATOR_V1_IMPL": "0xfFFD7409031B1aeb731271C6C2D59771523Ff8a8",
"timestamp": 1686787866,
"commit": "87735a2"
}
4 changes: 2 additions & 2 deletions addresses/8453.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"DROP_METADATA_RENDERER": "0xF77330C8b1c41f2e44470763Cf9E3ACa78Db4381",
"EDITION_METADATA_RENDERER": "0x2008C05685F9fA15BBD75d80e9A44ab0c7230577",
"ERC721DROP_IMPL": "0x3F155E58AcA1AE60e4FEce2753CC6B363525042c",
"ERC721DROP_IMPL": "0x8Ca5e648C5dFEfcdDa06d627F4b490B719ccFD98",
"FACTORY_UPGRADE_GATE": "0x532142aE8e53a5F92B9dE1a43F1FFD6eF789e65e",
"ZORA_NFT_CREATOR_PROXY": "0x58C3ccB2dcb9384E5AB9111CD1a5DEA916B0f33c",
"ZORA_NFT_CREATOR_V1_IMPL": "0xba187429b966788B5C11a99A848938c88DfDFf5C",
"ZORA_NFT_CREATOR_V1_IMPL": "0x76CC78EF3aafD52e716a8e37F3dBbE0C42c51d54",
"timestamp": 1689712140,
"commit": "a9e390f"
}
4 changes: 2 additions & 2 deletions addresses/84531.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"DROP_METADATA_RENDERER": "0x0Cf8733DEd6d9E0905A8cCc8DC767F381A76970a",
"EDITION_METADATA_RENDERER": "0xC5c958a65656A84b74100D1d420a1819fEA18d41",
"ERC721DROP_IMPL": "0x421B6ad0CdD20bE3636F3511B6ae244d8F668dB1",
"ERC721DROP_IMPL": "0x39Bcc1e15b8ec15684F17fEf298151F4A544B591",
"FACTORY_UPGRADE_GATE": "0x3C1ebcF36Ca9DD9371c9aA99c274e4988906c6E3",
"ZORA_NFT_CREATOR_PROXY": "0x87cfd516c5ea86e50b950678CA970a8a28de27ac",
"ZORA_NFT_CREATOR_V1_IMPL": "0x0ABdD5AA61E9107519DB7cD626442B905284B7eb"
"ZORA_NFT_CREATOR_V1_IMPL": "0x489f8fFbd5f5eA8875c2EbC5CA9ED1214BD77F42"
}
4 changes: 2 additions & 2 deletions addresses/999.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"DROP_METADATA_RENDERER": "0xb9583D05Ba9ba8f7F14CCEe3Da10D2bc0A72f519",
"EDITION_METADATA_RENDERER": "0x481c56e15A9B2987Bd6041043e1d807697505d23",
"ERC721DROP_IMPL": "0xA3Fb46092D9DAe8eAa2F99417630930F4Ee5A45a",
"ERC721DROP_IMPL": "0x293997C6a1f2A1cA3aB971f548c4D95585E46282",
"FACTORY_UPGRADE_GATE": "0x2068BA7Be6e22b97d21f5eb6e152A36d2Dc27da2",
"ZORA_NFT_CREATOR_PROXY": "0xeB29A4e5b84fef428c072debA2444e93c080CE87",
"ZORA_NFT_CREATOR_V1_IMPL": "0x4589A93f2444b736E3d35acB331f5241b1c6DAD3"
"ZORA_NFT_CREATOR_V1_IMPL": "0xe4c17055048aEe01D0d122804816fEe5E6ac4A67"
}
3 changes: 2 additions & 1 deletion chainConfigs/1.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0xd1d1D4e36117aB794ec5d4c78cBD3a8904E691D0",
"SUBSCRIPTION_MARKET_FILTER_ADDRESS": "0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6",
"ZORA_ERC721_TRANSFER_HELPER": "0x909e9efE4D87d1a6018C2065aE642b6D0447bc91"
"ZORA_ERC721_TRANSFER_HELPER": "0x909e9efE4D87d1a6018C2065aE642b6D0447bc91",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
3 changes: 2 additions & 1 deletion chainConfigs/10.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x7A810DCd0f8d83B20212326813Db6EF7E9FD030c",
"SUBSCRIPTION_MARKET_FILTER_ADDRESS": "0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6",
"ZORA_ERC721_TRANSFER_HELPER": "0x0000000000000000000000000000000000000000"
"ZORA_ERC721_TRANSFER_HELPER": "0x0000000000000000000000000000000000000000",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
2 changes: 1 addition & 1 deletion chainConfigs/11155111.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"FACTORY_OWNER": "0xE51051a204afb2fC071A2406914cdEA5638e5018",
"FACTORY_UPGRADE_GATE_OWNER": "0xE51051a204afb2fC071A2406914cdEA5638e5018",
"MINT_FEE_AMOUNT": 111000000000000,
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0xE51051a204afb2fC071A2406914cdEA5638e5018",
"SUBSCRIPTION_MARKET_FILTER_ADDRESS": "0x9B414A3F7872bdd2E6513689214BD2Debbe48340",
"SUBSCRIPTION_MARKET_FILTER_OWNER": "0xE51051a204afb2fC071A2406914cdEA5638e5018",
Expand Down
3 changes: 2 additions & 1 deletion chainConfigs/420.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x11cf5F667dC6AD4dEE58CB07e4AAc6a3fc7E1DCb",
"SUBSCRIPTION_MARKET_FILTER_ADDRESS": "0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6",
"ZORA_ERC721_TRANSFER_HELPER": "0x0000000000000000000000000000000000000000"
"ZORA_ERC721_TRANSFER_HELPER": "0x0000000000000000000000000000000000000000",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
3 changes: 2 additions & 1 deletion chainConfigs/424.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"MINT_FEE_RECIPIENT": "0x95FD5d77B206cCc0B1f7D7A4077fbE8eb4fC31eF",
"SUBSCRIPTION_MARKET_FILTER_ADDRESS": "0x0000000000000000000000000000000000000000",
"SUBSCRIPTION_MARKET_FILTER_OWNER": "0x0000000000000000000000000000000000000000",
"ZORA_ERC721_TRANSFER_HELPER": "0x0000000000000000000000000000000000000000"
"ZORA_ERC721_TRANSFER_HELPER": "0x0000000000000000000000000000000000000000",
"PROTOCOL_REWARDS": "0x7777777A456fF23D9b6851184472c08FBDa73e32"
}
3 changes: 2 additions & 1 deletion chainConfigs/5.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0xDC498668B5e6CC518fD58A2ADBF614Fd3A13D3a0",
"SUBSCRIPTION_MARKET_FILTER_ADDRESS": "0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6",
"ZORA_ERC721_TRANSFER_HELPER": "0xd1adAF05575295710dE1145c3c9427c364A70a7f"
"ZORA_ERC721_TRANSFER_HELPER": "0xd1adAF05575295710dE1145c3c9427c364A70a7f",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
2 changes: 1 addition & 1 deletion chainConfigs/58008.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"FACTORY_OWNER": "0xfAe426B462f4Bc9857ED28D8473Fb85192f23E9b",
"FACTORY_UPGRADE_GATE_OWNER": "0xfAe426B462f4Bc9857ED28D8473Fb85192f23E9b",
"MINT_FEE_AMOUNT": 111000000000000,
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x917D86f1eBD1d9f59Dae1C00e5Af7f8689299EC4",
"SUBSCRIPTION_MARKET_FILTER_ADDRESS": "0x0000000000000000000000000000000000000000",
"SUBSCRIPTION_MARKET_FILTER_OWNER": "0x0000000000000000000000000000000000000000",
Expand Down
3 changes: 2 additions & 1 deletion chainConfigs/7777777.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0xEcfc2ee50409E459c554a2b0376F882Ce916D853",
"SUBSCRIPTION_MARKET_FILTER_ADDRESS": "0x0000000000000000000000000000000000000000",
"ZORA_ERC721_TRANSFER_HELPER": "0x0000000000000000000000000000000000000000"
"ZORA_ERC721_TRANSFER_HELPER": "0x0000000000000000000000000000000000000000",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
3 changes: 2 additions & 1 deletion chainConfigs/8453.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x7bf90111Ad7C22bec9E9dFf8A01A44713CC1b1B6",
"SUBSCRIPTION_MARKET_FILTER_ADDRESS": "0x000000000000AAeB6D7670E522A718067333cd4E",
"ZORA_ERC721_TRANSFER_HELPER": "0x0000000000000000000000000000000000000000"
"ZORA_ERC721_TRANSFER_HELPER": "0x0000000000000000000000000000000000000000",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
5 changes: 3 additions & 2 deletions chainConfigs/84531.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"FACTORY_OWNER": "0x02539E813cA450C2c7334e885423f4A899a063Fe",
"FACTORY_UPGRADE_GATE_OWNER": "0x02539E813cA450C2c7334e885423f4A899a063Fe",
"MINT_FEE_AMOUNT": 111000000000000,
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x02539E813cA450C2c7334e885423f4A899a063Fe",
"SUBSCRIPTION_MARKET_FILTER_ADDRESS": "0x9B414A3F7872bdd2E6513689214BD2Debbe48340",
"ZORA_ERC721_TRANSFER_HELPER": "0xd1adAF05575295710dE1145c3c9427c364A70a7f"
"ZORA_ERC721_TRANSFER_HELPER": "0xd1adAF05575295710dE1145c3c9427c364A70a7f",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
3 changes: 2 additions & 1 deletion chainConfigs/999.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x11cf5F667dC6AD4dEE58CB07e4AAc6a3fc7E1DCb",
"SUBSCRIPTION_MARKET_FILTER_ADDRESS": "0x0000000000000000000000000000000000000000",
"ZORA_ERC721_TRANSFER_HELPER": "0x0000000000000000000000000000000000000000"
"ZORA_ERC721_TRANSFER_HELPER": "0x0000000000000000000000000000000000000000",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
3 changes: 1 addition & 2 deletions foundry.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[profile.default]
solc_version = '0.8.17'
optimizer = true
optimizer_runs = 2383
optimizer_runs = 300
via_ir = true
out = 'out'
test = 'test'
Expand Down Expand Up @@ -33,6 +33,5 @@ zora_goerli = "https://testnet.rpc.zora.energy"

base = "https://developer-access-mainnet.base.org"
base_goerli = "https://goerli.base.org"

pgn = "https://rpc.publicgoods.network"
pgn_sepolia = "https://sepolia.publicgoods.network"
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
},
"dependencies": {
"@dotenv/cli": "^2.2.2",
"@zoralabs/protocol-rewards": "^1.0.2",
"ds-test": "https://github.com/dapphub/ds-test#cd98eff28324bfac652e63a239a60632a761790b",
"forge-std": "https://github.com/foundry-rs/forge-std#cd7d533f9a0ee0ec02ad81e0a8f262bc4203c653"
}
Expand Down
1 change: 1 addition & 0 deletions remappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ erc721a-upgradeable=lib/ERC721A-Upgradeable/contracts/
base64/=lib/base64/
ds-test/=node_modules/ds-test/src/
forge-std/=node_modules/forge-std/src/
@zoralabs/protocol-rewards/=node_modules/@zoralabs/protocol-rewards/
3 changes: 2 additions & 1 deletion script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ contract Deploy is ZoraDropsDeployBase {
_factoryUpgradeGate: factoryUpgradeGate,
_marketFilterDAOAddress: address(chainConfig.subscriptionMarketFilterAddress),
_mintFeeAmount: chainConfig.mintFeeAmount,
_mintFeeRecipient: payable(chainConfig.mintFeeRecipient)
_mintFeeRecipient: payable(chainConfig.mintFeeRecipient),
_protocolRewards: address(chainConfig.protocolRewards)
});

ZoraNFTCreatorV1 factoryImpl = new ZoraNFTCreatorV1(address(dropImplementation), editionMetadata, dropMetadata);
Expand Down
3 changes: 2 additions & 1 deletion script/UpgradeERC721DropFactory.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ contract UpgradeERC721DropFactory is ZoraDropsDeployBase {
_factoryUpgradeGate: IFactoryUpgradeGate(deployment.factoryUpgradeGate),
_marketFilterDAOAddress: chainConfig.subscriptionMarketFilterAddress,
_mintFeeAmount: chainConfig.mintFeeAmount,
_mintFeeRecipient: payable(chainConfig.mintFeeRecipient)
_mintFeeRecipient: payable(chainConfig.mintFeeRecipient),
_protocolRewards: chainConfig.protocolRewards
});

deployment.dropImplementation = address(dropImplementation);
Expand Down
2 changes: 1 addition & 1 deletion script/ZoraDropsDeployBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {IERC721Drop} from "../src/interfaces/IERC721Drop.sol";

/// @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 Down
7 changes: 6 additions & 1 deletion src/DeploymentConfig.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ struct ChainConfig {
address subscriptionMarketFilterOwner;
/// @notice Auto-approved hyperstructure on mainnet for enabling ZORA v3 with less gas. Deprecated – safe to set to address(0x)
address zoraERC721TransferHelper;
/// @notice The Protocol Rewards contract
address protocolRewards;
}

/// @notice Deployment addresses – set to new deployed addresses by the scripts.
Expand Down Expand Up @@ -51,6 +53,8 @@ abstract contract DeploymentConfig is StdChains, StdCheatsSafe, StdUtils, Script
/// @notice File used for demo metadata on verification test mint
string constant DEMO_IPFS_METADATA_FILE = "ipfs://bafkreigu544g6wjvqcysurpzy5pcskbt45a5f33m6wgythpgb3rfqi3lzi";

address constant DEFAULT_CREATE_REFERRAL = address(0);

///
// These are the JSON key constants to standardize writing and reading configuration
///
Expand All @@ -62,6 +66,7 @@ abstract contract DeploymentConfig is StdChains, StdCheatsSafe, StdUtils, Script
string constant SUBSCRIPTION_MARKET_FILTER_ADDRESS = "SUBSCRIPTION_MARKET_FILTER_ADDRESS";
string constant SUBSCRIPTION_MARKET_FILTER_OWNER = "SUBSCRIPTION_MARKET_FILTER_OWNER";
string constant ZORA_ERC721_TRANSFER_HELPER = "ZORA_ERC721_TRANSFER_HELPER";
string constant PROTOCOL_REWARDS = "PROTOCOL_REWARDS";

string constant DROP_METADATA_RENDERER = "DROP_METADATA_RENDERER";
string constant EDITION_METADATA_RENDERER = "EDITION_METADATA_RENDERER";
Expand All @@ -86,8 +91,8 @@ abstract contract DeploymentConfig is StdChains, StdCheatsSafe, StdUtils, Script
chainConfig.mintFeeAmount = json.readUint(getKeyPrefix(MINT_FEE_AMOUNT));
chainConfig.mintFeeRecipient = json.readAddress(getKeyPrefix(MINT_FEE_RECIPIENT));
chainConfig.subscriptionMarketFilterAddress = json.readAddress(getKeyPrefix(SUBSCRIPTION_MARKET_FILTER_ADDRESS));
chainConfig.subscriptionMarketFilterOwner = json.readAddress(getKeyPrefix(SUBSCRIPTION_MARKET_FILTER_OWNER));
chainConfig.zoraERC721TransferHelper = json.readAddress(getKeyPrefix(ZORA_ERC721_TRANSFER_HELPER));
chainConfig.protocolRewards = json.readAddress(getKeyPrefix(PROTOCOL_REWARDS));
}

/// @notice Get the deployment configuration struct from the JSON configuration file
Expand Down
Loading

0 comments on commit e6038b8

Please sign in to comment.