Skip to content

Commit

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

* chore: update scripts

* feat: mintWithRewards

* fix: update test setup

* chore: update imports

* fix: update remappings

* chore: update dependencies

* chore: update dependencies

* chore: add rewards tests

* chore: update rewards package

* chore: update tests

* chore: update rewards dep

* refactor: change lister to origin

* chore: update tests

* chore: update contract version

* chore: add zora rewards testnet

* chore: update deploys

* v1.3.3

* chore: update deploys

* chore: update tests

* fix: assert latest contract version

* chore: fix merge conflicts

* refactor: ensure funds recipient cannot be set to address(0)

* chore: update deps

* refactor: store create referral upon token creation

* fix: pass token id

* refactor: add common token setup

* refactor: reward handling when funds recipient is not set

* chore: update dep

* chore: update tests

* chore: update contract version

* chore: update chain config

* chore: update deploy config

* chore: update runs

* chore: update zora testnet deploy

* chore: add changeset

* chore: update tests

* chore: update yarn lock

* style: run linter

* chore: update deps

* chore: update deps

* refactor: add rewards storage

* chore: update protocol rewards

* chore: update remappings

* chore: update deploy config

* chore: update naming

* chore: update zora goerli deploy

* chore: update goerli deploy

* chore: update op goerli deploy

* chore: update base goerli deploy

* chore: update deps

* chore: update op goerli factory owner

* chore: update contract version

* chore: update goerli deploy

* chore: update zora goerli deploy

* chore: update op goerli deploy

* chore: update base goerli deploy

* chore: update chain configs

* refactor: add error for protocol rewards withdraw

* chore: update deps

* refactor: update rewards handle and withdraw

* chore: update tests

* chore: update testnets

* chore: update version

* chore: update config

* chore: update deployments

* chore: update chain configs

* chore: update deploys

* Update ZoraCreator1155.t.sol

* Update ZoraCreator1155Factory.t.sol

* update storage layout

* fix fork test

* update package json and changeset

* yarn lock update

---------

Co-authored-by: jgeary <[email protected]>
Co-authored-by: iain nash <[email protected]>
  • Loading branch information
3 people authored Aug 9, 2023
1 parent 5b3fafd commit 9f6510d
Show file tree
Hide file tree
Showing 40 changed files with 785 additions and 174 deletions.
8 changes: 8 additions & 0 deletions .changeset/little-moose-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@zoralabs/zora-1155-contracts": minor
---

Add support for rewards

* Add new minting functions supporting rewards
* Add new "rewards" library
1 change: 1 addition & 0 deletions .storage-layout
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
| __gap | uint256[50] | 460 | 0 | 1600 | src/nft/ZoraCreator1155Impl.sol:ZoraCreator1155Impl |
| permissions | mapping(uint256 => mapping(address => uint256)) | 510 | 0 | 32 | src/nft/ZoraCreator1155Impl.sol:ZoraCreator1155Impl |
| __gap | uint256[50] | 511 | 0 | 1600 | src/nft/ZoraCreator1155Impl.sol:ZoraCreator1155Impl |
| createReferrals | mapping(uint256 => address) | 561 | 0 | 32 | src/nft/ZoraCreator1155Impl.sol:ZoraCreator1155Impl |

=======================
➡ ZoraCreator1155FactoryImpl
Expand Down
4 changes: 2 additions & 2 deletions addresses/1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"FIXED_PRICE_SALE_STRATEGY": "0x8A1DBE9b1CeB1d17f92Bebf10216FCFAb5C3fbA7",
"MERKLE_MINT_SALE_STRATEGY": "0x5c895Cc296e334CA11DF751aA72135807D4057d4",
"REDEEM_MINTER_FACTORY": "0xdA48f625903547Dc7B70Ad8E019e7dFc55d0aA96",
"1155_IMPL": "0x4c2b5f3B7eadaDD58d5ec457ABf57f4718b171Ae",
"FACTORY_IMPL": "0xfca4587FAf3a32eBE2F05c9D044aEF072031A796",
"CONTRACT_1155_IMPL": "0xF62b0d56BA617F803DF1C464C519FF7D29451B2f",
"FACTORY_IMPL": "0x2810D376AC3b80C443ddD3F4e84E036F2e90622A",
"FACTORY_PROXY": "0xA6C5f2DE915240270DaC655152C3f6A91748cb85"
}
4 changes: 2 additions & 2 deletions addresses/10.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"CONTRACT_1155_IMPL": "0x2fBdBc34B6015e7b40638179Aa05a2D2267452c7",
"FACTORY_IMPL": "0x677F06C6a93e167c1ebD4eaFa3A3f9370DFc665a",
"CONTRACT_1155_IMPL": "0xeB29A4e5b84fef428c072debA2444e93c080CE87",
"FACTORY_IMPL": "0x8Ca5e648C5dFEfcdDa06d627F4b490B719ccFD98",
"FACTORY_PROXY": "0x78b524931e9d847c40BcBf225c25e154a7B05fDA",
"FIXED_PRICE_SALE_STRATEGY": "0x3678862f04290E565cCA2EF163BAeb92Bb76790C",
"MERKLE_MINT_SALE_STRATEGY": "0x899ce31dF6C6Af81203AcAaD285bF539234eF4b8",
Expand Down
4 changes: 2 additions & 2 deletions addresses/420.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"CONTRACT_1155_IMPL": "0x363319e62B5D68AA5152C6C885f68Bec2f065f83",
"FACTORY_IMPL": "0xdb6576BD7EAFB2D38826D614Ec0B908cCCCa3F48",
"CONTRACT_1155_IMPL": "0x34c976E09EEcA565E208b0860Ea83F3cB881d205",
"FACTORY_IMPL": "0x39Bcc1e15b8ec15684F17fEf298151F4A544B591",
"FACTORY_PROXY": "0xb0C56317E9cEBc6E0f7A59458a83D0A9ccC3e955",
"FIXED_PRICE_SALE_STRATEGY": "0x5b31082c269e1e575b371e14dec2594ebc6a4c5a",
"MERKLE_MINT_SALE_STRATEGY": "0xC126d0C412bE68809827c0522Eba05910936e46b",
Expand Down
10 changes: 6 additions & 4 deletions addresses/5.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"CONTRACT_1155_IMPL": "0x89a53404d3e29c6e5431d73e04F44045d37D01FE",
"FACTORY_IMPL": "0xA06262157905913f855573f53AD48DE2D4ba1F4A",
"FACTORY_PROXY": "0x8732b4bCa198509bB9c40f9a24638Be1eaB7D30c",
"FIXED_PRICE_SALE_STRATEGY": "0xD8EB23E82f0795427F27D7F20CAb56e7630D1166",
"MERKLE_MINT_SALE_STRATEGY": "0x91724462892148fb0bAcD300d7503A80baB32aA5",
"REDEEM_MINTER_FACTORY": "0xD507589779D7a4ec85FF9041dB2C2dc19e4B0554",
"1155_IMPL": "0x0043809514fCFf58b74B0AF2b5870bD5F85abD35",
"FACTORY_IMPL": "0x85ED22CE9B651F42E9F7f95d35B124b5d48EACdb",
"FACTORY_PROXY": "0x8732b4bCa198509bB9c40f9a24638Be1eaB7D30c"
}
"timestamp": 1688510153,
"commit": "f60dd5f"
}
4 changes: 2 additions & 2 deletions addresses/7777777.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"CONTRACT_1155_IMPL": "0x922ffBF264C2dbe49B79660DEef688880FA773E1",
"FACTORY_IMPL": "0xF77330C8b1c41f2e44470763Cf9E3ACa78Db4381",
"CONTRACT_1155_IMPL": "0x8Ca5e648C5dFEfcdDa06d627F4b490B719ccFD98",
"FACTORY_IMPL": "0x76CC78EF3aafD52e716a8e37F3dBbE0C42c51d54",
"FACTORY_PROXY": "0x35ca784918bf11692708c1D530691704AAcEA95E",
"FIXED_PRICE_SALE_STRATEGY": "0x169d9147dFc9409AfA4E558dF2C9ABeebc020182",
"MERKLE_MINT_SALE_STRATEGY": "0x695C9A141748D308d26Bd4f8E9F9A5df5F0623f8",
Expand Down
4 changes: 2 additions & 2 deletions addresses/8453.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"CONTRACT_1155_IMPL": "0x3AE2804De4A54283601Db24a897856D9772eA0D8",
"FACTORY_IMPL": "0x374e1216f3F65Be4dc121378dFAd541Ed09E0D7C",
"CONTRACT_1155_IMPL": "0x805E0a08dE70f85C01F7848370d5e3fc08aAd0ea",
"FACTORY_IMPL": "0xeB29A4e5b84fef428c072debA2444e93c080CE87",
"FACTORY_PROXY": "0x9b24FD165a371042e5CA81e8d066d25CAD11EDE7",
"FIXED_PRICE_SALE_STRATEGY": "0xFF8B0f870ff56870Dc5aBd6cB3E6E89c8ba2e062",
"MERKLE_MINT_SALE_STRATEGY": "0xbC98b527433266910fcc0ae56E17DDbd41846bCB",
Expand Down
4 changes: 2 additions & 2 deletions addresses/84531.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"CONTRACT_1155_IMPL": "0xC126d0C412bE68809827c0522Eba05910936e46b",
"FACTORY_IMPL": "0x06E71de8A63c5392a15d06665C36184dbE78C85B",
"CONTRACT_1155_IMPL": "0x669c0E36c7C3b7Ba984F746c43C5b7C073db7197",
"FACTORY_IMPL": "0x2bB7D8226575AEB76597A50134088BaA8AaA48De",
"FACTORY_PROXY": "0x9168C5ba5a0a76db8A1BF5b2eE5557f2A0ECA4f4",
"FIXED_PRICE_SALE_STRATEGY": "0x66e7bE0b5A7dD9eb7999AAbE7AbdFa40381b6d5E",
"MERKLE_MINT_SALE_STRATEGY": "0xFFc886a0C539e2AB50211D7C55f01408507a3c65",
Expand Down
8 changes: 4 additions & 4 deletions addresses/999.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"CONTRACT_1155_IMPL": "0x42c10148399080F3d1f5C4278aabc1624c781FbD",
"FACTORY_IMPL": "0x8a08f94eC8eb4041A766A2C9433Ad0EEAE147B09",
"CONTRACT_1155_IMPL": "0x91C1863eD54809c45b53bb6090eb437036c792C4",
"FACTORY_IMPL": "0xdF4A315443Ce2c11e6657D6A98B3a7143DE7B268",
"FACTORY_PROXY": "0x6a357139C1bcDcf0B3AB9bC447932dDdcb956703",
"FIXED_PRICE_SALE_STRATEGY": "0xd81351363b7d80b06E4Ec4De7989f0f91e41A846",
"MERKLE_MINT_SALE_STRATEGY": "0x2c4457D38A329526063b26a2bB2C31B61553Aa98",
"REDEEM_MINTER_FACTORY": "0x27817bAef1341De9Ad04097Bbba4Ea8dA32c8552",
"timestamp": 1684354070,
"commit": "8f9a781"
"timestamp": 1688509842,
"commit": "f60dd5f"
}
3 changes: 2 additions & 1 deletion chainConfigs/1.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"FACTORY_OWNER": "0xDB392f4391462d60B8B4413ef72018Ab595Af9D0",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0xd1d1D4e36117aB794ec5d4c78cBD3a8904E691D0"
"MINT_FEE_RECIPIENT": "0xd1d1D4e36117aB794ec5d4c78cBD3a8904E691D0",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
3 changes: 2 additions & 1 deletion chainConfigs/10.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"FACTORY_OWNER": "0x7A810DCd0f8d83B20212326813Db6EF7E9FD030c",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x7A810DCd0f8d83B20212326813Db6EF7E9FD030c"
"MINT_FEE_RECIPIENT": "0x7A810DCd0f8d83B20212326813Db6EF7E9FD030c",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
5 changes: 3 additions & 2 deletions chainConfigs/420.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"FACTORY_OWNER": "0x11cf5f667dc6ad4dee58cb07e4aac6a3fc7e1dcb",
"FACTORY_OWNER": "0xbb45052B2260707655Dfd916a416264f5981192c",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x5dEe21327CD7CD6725C2578DA1c3E5bb2D2D34b2"
"MINT_FEE_RECIPIENT": "0x5dEe21327CD7CD6725C2578DA1c3E5bb2D2D34b2",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
3 changes: 2 additions & 1 deletion chainConfigs/424.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"FACTORY_OWNER": "0x8fbC66d36cceB3Ad69B4d672756da54CcFec1cD2",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x95FD5d77B206cCc0B1f7D7A4077fbE8eb4fC31eF"
"MINT_FEE_RECIPIENT": "0x95FD5d77B206cCc0B1f7D7A4077fbE8eb4fC31eF",
"PROTOCOL_REWARDS": "0x7777777A456fF23D9b6851184472c08FBDa73e32"
}

3 changes: 2 additions & 1 deletion chainConfigs/5.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"FACTORY_OWNER": "0xDC498668B5e6CC518fD58A2ADBF614Fd3A13D3a0",
"MINT_FEE_AMOUNT": 10000,
"MINT_FEE_RECIPIENT": "0x9444390c01Dd5b7249E53FAc31290F7dFF53450D"
"MINT_FEE_RECIPIENT": "0x9444390c01Dd5b7249E53FAc31290F7dFF53450D",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
3 changes: 2 additions & 1 deletion chainConfigs/7777777.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"FACTORY_OWNER": "0xdEA20c96253dc2d64897D2b8d27A8d935dE74955",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0xEcfc2ee50409E459c554a2b0376F882Ce916D853"
"MINT_FEE_RECIPIENT": "0xEcfc2ee50409E459c554a2b0376F882Ce916D853",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}

3 changes: 2 additions & 1 deletion chainConfigs/8453.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"FACTORY_OWNER": "0x004d6611884B4A661749B64b2ADc78505c3e1AB3",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x7bf90111Ad7C22bec9E9dFf8A01A44713CC1b1B6"
"MINT_FEE_RECIPIENT": "0x7bf90111Ad7C22bec9E9dFf8A01A44713CC1b1B6",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
3 changes: 2 additions & 1 deletion chainConfigs/84531.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"FACTORY_OWNER": "0x02539E813cA450C2c7334e885423f4A899a063Fe",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x02539E813cA450C2c7334e885423f4A899a063Fe"
"MINT_FEE_RECIPIENT": "0x02539E813cA450C2c7334e885423f4A899a063Fe",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
3 changes: 2 additions & 1 deletion chainConfigs/999.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"FACTORY_OWNER": "0xE84DBB2B25F761751231a9D0DAfbdD4dC3aa8252",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0xE84DBB2B25F761751231a9D0DAfbdD4dC3aa8252"
"MINT_FEE_RECIPIENT": "0xE84DBB2B25F761751231a9D0DAfbdD4dC3aa8252",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
24 changes: 11 additions & 13 deletions foundry.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[profile.default]
src = 'src'
out = 'out'
fs_permissions = [{access = "read", path = "./addresses"}, {access = "read", path = "./chainConfigs"}, {access = "read", path = "./package.json"}]
libs = ['_imagine', 'node_modules', 'script']
solc_version = '0.8.17'
optimizer = true
optimizer_runs = 5000
optimizer_runs = 3000
out = 'out'
solc_version = '0.8.17'
src = 'src'
via_ir = true
fs_permissions = [{ access = "read", path = "./addresses"}, { access = "read", path = "./chainConfigs"}, { access = "read", path = "./package.json" }]

[profile.optimized]
optimizer = true
optimizer_runs = 5000
optimizer_runs = 3000
out = 'out'
script = 'src'
solc_version = '0.8.17'
Expand All @@ -22,20 +22,18 @@ via_ir = true
optimizer_runs = 200
solc_version = '0.8.17'


[rpc_endpoints]
mainnet = "https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY}"
goerli = "https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_KEY}"
mainnet = "https://eth-mainnet.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.
base = "https://developer-access-mainnet.base.org"
base_goerli = "https://goerli.base.org"
optimism = "https://mainnet.optimism.io"
optimism_goerli = "https://goerli.optimism.io"
pgn = "https://rpc.publicgoods.network"
pgn_sepolia = "https://sepolia.publicgoods.network"
zora = "https://rpc.zora.energy"
zora_goerli = "https://testnet.rpc.zora.energy"
base_goerli = "https://goerli.base.org"
base = "https://developer-access-mainnet.base.org"
pgn_sepolia = "https://sepolia.publicgoods.network"
pgn = "https://rpc.publicgoods.network"


# See more config options https://github.com/foundry-rs/foundry/tree/master/config
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
"package/"
],
"dependencies": {
"@openzeppelin/contracts": "4.8.3",
"@zoralabs/openzeppelin-contracts-upgradeable": "^4.8.4",
"@openzeppelin/contracts": "4.9.2",
"@zoralabs/openzeppelin-contracts-upgradeable": "4.8.4",
"@zoralabs/protocol-rewards": "1.1.0",
"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
@@ -1,5 +1,6 @@
ds-test/=node_modules/ds-test/src/
forge-std/=node_modules/forge-std/src/
@zoralabs/openzeppelin-contracts-upgradeable/=node_modules/@zoralabs/openzeppelin-contracts-upgradeable/
@zoralabs/protocol-rewards/=node_modules/@zoralabs/protocol-rewards/
@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/
_imagine=_imagine/
4 changes: 3 additions & 1 deletion script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ contract DeployScript is ZoraDeployerBase {
console2.log("zoraFeeAmount", chainConfig.mintFeeAmount);
console2.log("zoraFeeRecipient", chainConfig.mintFeeRecipient);
console2.log("factoryOwner", chainConfig.factoryOwner);
console2.log("protocolRewards", chainConfig.protocolRewards);

address deployer = vm.envAddress("DEPLOYER");

Expand All @@ -45,7 +46,8 @@ contract DeployScript is ZoraDeployerBase {

deployment.factoryProxy = address(factoryProxy);

ZoraCreator1155Impl creatorImpl = new ZoraCreator1155Impl(chainConfig.mintFeeAmount, chainConfig.mintFeeRecipient, address(factoryProxy));
ZoraCreator1155Impl creatorImpl =
new ZoraCreator1155Impl(chainConfig.mintFeeAmount, chainConfig.mintFeeRecipient, address(factoryProxy), chainConfig.protocolRewards);

deployment.contract1155Impl = address(creatorImpl);

Expand Down
3 changes: 2 additions & 1 deletion script/Upgrade.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ contract UpgradeScript is ZoraDeployerBase {
if (isNewNFTImpl) {
console2.log("mintFeeAmount", chainConfig.mintFeeAmount);
console2.log("minFeeRecipient", chainConfig.mintFeeRecipient);
deployment.contract1155Impl = address(new ZoraCreator1155Impl(chainConfig.mintFeeAmount, chainConfig.mintFeeRecipient, deployment.factoryProxy));
console2.log("protocolRewards", chainConfig.protocolRewards);
deployment.contract1155Impl = address(new ZoraCreator1155Impl(chainConfig.mintFeeAmount, chainConfig.mintFeeRecipient, deployment.factoryProxy, chainConfig.protocolRewards));
console2.log("New NFT_IMPL", deployment.contract1155Impl);
} else {
console2.log("Existing NFT_IMPL", deployment.contract1155Impl);
Expand Down
6 changes: 5 additions & 1 deletion script/ZoraDeployerBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ abstract contract ZoraDeployerBase is ScriptDeploymentConfig, Script {
IZoraCreator1155Factory(factoryProxy).createContract(
"ipfs://bafybeicgolwqpozsc7iwgytavete56a2nnytzix2nb2rxefdvbtwwtnnoe/metadata",
unicode"🪄",
ICreatorRoyaltiesControl.RoyaltyConfiguration({royaltyBPS: 0, royaltyRecipient: address(0), royaltyMintSchedule: 0}),
ICreatorRoyaltiesControl.RoyaltyConfiguration({
royaltyBPS: 0,
royaltyRecipient: address(0),
royaltyMintSchedule: 0
}),
payable(admin),
initUpdate
)
Expand Down
4 changes: 4 additions & 0 deletions src/deployment/DeploymentConfig.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ struct ChainConfig {
uint256 mintFeeAmount;
/// @notice Mint fee recipient user
address mintFeeRecipient;
/// @notice Protocol rewards contract address
address protocolRewards;
}

/// @notice Deployment addresses – set to new deployed addresses by the scripts.
Expand Down Expand Up @@ -45,6 +47,7 @@ abstract contract DeploymentConfig is CommonBase {
string constant FACTORY_OWNER = "FACTORY_OWNER";
string constant MINT_FEE_AMOUNT = "MINT_FEE_AMOUNT";
string constant MINT_FEE_RECIPIENT = "MINT_FEE_RECIPIENT";
string constant PROTOCOL_REWARDS = "PROTOCOL_REWARDS";

string constant FIXED_PRICE_SALE_STRATEGY = "FIXED_PRICE_SALE_STRATEGY";
string constant MERKLE_MINT_SALE_STRATEGY = "MERKLE_MINT_SALE_STRATEGY";
Expand All @@ -67,6 +70,7 @@ abstract contract DeploymentConfig is CommonBase {
chainConfig.factoryOwner = json.readAddress(getKeyPrefix(FACTORY_OWNER));
chainConfig.mintFeeAmount = json.readUint(getKeyPrefix(MINT_FEE_AMOUNT));
chainConfig.mintFeeRecipient = json.readAddress(getKeyPrefix(MINT_FEE_RECIPIENT));
chainConfig.protocolRewards = json.readAddress(getKeyPrefix(PROTOCOL_REWARDS));
}

/// @notice Get the deployment configuration struct from the JSON configuration file
Expand Down
1 change: 1 addition & 0 deletions src/interfaces/IZoraCreator1155.sol
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ interface IZoraCreator1155 is IZoraCreator1155TypesV1, IVersionedContract, IOwna

error ETHWithdrawFailed(address recipient, uint256 amount);
error FundsWithdrawInsolvent(uint256 amount, uint256 contractValue);
error ProtocolRewardsWithdrawFailed(address caller, address recipient, uint256 amount);

error CannotMintMoreTokens(uint256 tokenId, uint256 quantity, uint256 totalMinted, uint256 maxSupply);

Expand Down
Loading

0 comments on commit 9f6510d

Please sign in to comment.