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

Premint #161

Merged
merged 51 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
068989e
Premint
oveddan Sep 18, 2023
2f0fb93
Add back mint fee getter (#198)
oveddan Sep 26, 2023
bd93a06
* Updated script to deploy preminter to now deploy the proxy (#189)
oveddan Sep 26, 2023
fd46a94
Premint - move premint state to its own contract (#188)
oveddan Sep 26, 2023
7769b42
fix: redeem minter tests
kulkarohan Sep 26, 2023
16c839b
Merge pull request #203 from ourzora/premint_update_redeem_tests
kulkarohan Sep 26, 2023
f6c1e64
fix: token transfer hook for single token transfers
IsabellaSmallcombe Sep 27, 2023
58332f3
feat: add unit tests
IsabellaSmallcombe Sep 27, 2023
ed9e493
Seperate upgrade gate new contract (#204)
iainnash Sep 27, 2023
7b92825
refactor: add helper to read uups implementation
kulkarohan Sep 27, 2023
70619ba
Merge branch 'premint' into add_uups_helper
kulkarohan Sep 27, 2023
e3385ac
fix: param name casing
kulkarohan Sep 27, 2023
d2b537c
refactor: use updated zora 1155 impl getter
kulkarohan Sep 27, 2023
4b37522
Merge pull request #205 from ourzora/isabella/fix-transfer-hook-1155-…
kulkarohan Sep 27, 2023
83eb212
Merge branch 'premint' into add_uups_helper
kulkarohan Sep 27, 2023
e801c7a
refactor: add helper to read uups implementation
kulkarohan Sep 27, 2023
a77c0a6
fix: zora 1155 impl var name
kulkarohan Sep 27, 2023
e2fa2d7
chore: run lint
kulkarohan Sep 27, 2023
a69b3f8
chore: run lint
kulkarohan Sep 27, 2023
395cd25
Merge pull request #206 from ourzora/add_uups_helper
kulkarohan Sep 27, 2023
a9bdce6
refactor: implement first minter reward on adminMint
kulkarohan Sep 27, 2023
5a678f8
chore: update runs
kulkarohan Sep 27, 2023
9a6b85c
refactor: remove mint fee amount deploy param
kulkarohan Sep 27, 2023
aa824fa
chore: run lint
kulkarohan Sep 27, 2023
d700ff4
chore: run lint
kulkarohan Sep 27, 2023
704070a
chore: remove mint fee amount from chain configs
kulkarohan Sep 27, 2023
ec07204
chore: update fork test
kulkarohan Sep 27, 2023
7415a4d
fix: use mint w rewards to gurantee mint fee amount
kulkarohan Sep 27, 2023
3e58f0c
Premint: updated documentation (#199)
oveddan Sep 28, 2023
e6b1fb9
move upgrade gate to initializer pattern (#209)
iainnash Sep 28, 2023
1e0d23a
Merge pull request #208 from ourzora/update_constructor
kulkarohan Sep 28, 2023
d1d2d77
Merge branch 'premint' into update_rewards_logic
kulkarohan Sep 28, 2023
f363f38
Merge pull request #207 from ourzora/update_rewards_logic
kulkarohan Sep 28, 2023
4a0a3d7
refactor: only mint if specified quantity is greater than 0 (#212)
kulkarohan Sep 29, 2023
e32380b
Premint - factory proxy 777 deployments (#191)
oveddan Sep 29, 2023
56f9106
Merge branch 'main' into premint
oveddan Sep 29, 2023
a93699e
update deps
oveddan Sep 29, 2023
b4ce845
add back release command
oveddan Sep 29, 2023
e044d37
fix version publish
oveddan Sep 29, 2023
b5807c4
fix contract version
oveddan Sep 29, 2023
0c83f54
move wagmi cli to proper version
oveddan Sep 29, 2023
0f0ba70
more things in dev deps
oveddan Sep 29, 2023
c226740
move all into deps
oveddan Sep 29, 2023
7e16c4d
update protocol rewards package (#226)
iainnash Sep 29, 2023
895b242
fix build
oveddan Sep 29, 2023
841c7dc
fix wagmi build
oveddan Sep 29, 2023
d587b5a
Clean Up Transfer Hook Mock (#229)
IsabellaSmallcombe Sep 29, 2023
dd1e4db
fix preminter file
oveddan Sep 29, 2023
9118b23
test building package in main premint
oveddan Sep 29, 2023
666454a
fix eth amount
oveddan Sep 29, 2023
17fa62d
remove yarn production flag
oveddan Sep 29, 2023
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
5 changes: 5 additions & 0 deletions .changeset/curly-dolphins-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zoralabs/zora-1155-contracts": patch
---

Add back `mintFee` getter
5 changes: 5 additions & 0 deletions .changeset/happy-socks-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zoralabs/zora-1155-contracts": minor
---

Adds first minter rewards to zora 1155 contracts.
5 changes: 5 additions & 0 deletions .changeset/long-avocados-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zoralabs/zora-1155-contracts": minor
---

Added deterministic contract creation from the Zora1155 factory
5 changes: 5 additions & 0 deletions .changeset/popular-cows-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zoralabs/zora-1155-contracts": patch
---

Move delegated token creation state to its own contract
5 changes: 5 additions & 0 deletions .changeset/spotty-horses-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zoralabs/zora-1155-contracts": patch
---

Deprecate ZoraCreatorRedeemMinterStrategy at v1.0.1, a newer version will soon be released
5 changes: 5 additions & 0 deletions .changeset/twelve-comics-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zoralabs/zora-1155-contracts": minor
---

Added the PremintExecutor contract, and updated erc1155 to support delegated minting
2 changes: 2 additions & 0 deletions .env.anvil
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FORK_RPC_URL="https://testnet.rpc.zora.co/"
FORK_BLOCK_NUMBER=916572
9 changes: 8 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
ALCHEMY_KEY={{ mainnet_rpc_url }}
ALCHEMY_KEY=

# Turnkey authentication and private key information
TURNKEY_API_PUBLIC_KEY=""
TURNKEY_API_PRIVATE_KEY=""
TURNKEY_ORGANIZATION_ID=""
TURNKEY_PRIVATE_KEY_ID="xxxx-xxx-xxxx-xxxx-xxxxxxxx"
TURNKEY_TARGET_ADDRESS="xxxxxxxx"
4 changes: 2 additions & 2 deletions .github/actions/setup_deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ runs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: "yarn"

- name: Install project dependencies
shell: bash
run: yarn
run: yarn --production

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/changesets-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: "yarn"

- name: Install project dependencies
Expand All @@ -44,6 +44,7 @@ jobs:
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
version: yarn update-version
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changesets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: "yarn"

- name: Install project dependencies
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: "yarn"

- name: Install project dependencies
Expand All @@ -40,9 +40,9 @@ jobs:

- name: Filter files to ignore
run: |
lcov --rc lcov_branch_coverage=1 \
--remove lcov.info \
--output-file lcov.info "*node_modules*" "*test*" "*script*" "*DeploymentConfig*"
lcov --rc lcov_branch_coverage=1 \
--remove lcov.info \
--output-file lcov.info "*node_modules*" "*test*" "*script*" "*DeploymentConfig*" "*Redeem*" "*deployment*"

- name: Report code coverage
uses: zgosalvez/github-actions-report-lcov@v2
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,25 @@ jobs:
- name: "Inspect Storage Layout"
continue-on-error: false
run: yarn run storage-inspect:check

build_js:
needs: build
strategy:
fail-fast: true

name: Build JS Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install node deps and founry
uses: ./.github/actions/setup_deps

- name: Download foundry artifacts
uses: actions/download-artifact@v3
with:
name: foundry-built-artifacts

- name: Build js package
run: |
yarn prepack
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: "yarn"

- name: Install project dependencies
Expand Down
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ lcov.info
dist/

.env
.env*
.env.*
!.env.example

package/wagmiGenerated.ts
package/chainConfigs.ts
package/chainConfigs.ts

# not currently using pnpm
pnpm-lock.yaml
22 changes: 11 additions & 11 deletions .storage-layout
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@
| 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 |
| firstMinters | mapping(uint256 => address) | 562 | 0 | 32 | src/nft/ZoraCreator1155Impl.sol:ZoraCreator1155Impl |
| delegatedTokenId | mapping(uint32 => uint256) | 563 | 0 | 32 | src/nft/ZoraCreator1155Impl.sol:ZoraCreator1155Impl |

=======================
➡ ZoraCreator1155FactoryImpl
=======================

| Name | Type | Slot | Offset | Bytes | Contract |
|------------------|----------------------------------------------|------|--------|-------|-----------------------------------------------------------------------|
| _owner | address | 0 | 0 | 20 | src/factory/ZoraCreator1155FactoryImpl.sol:ZoraCreator1155FactoryImpl |
| _pendingOwner | address | 1 | 0 | 20 | src/factory/ZoraCreator1155FactoryImpl.sol:ZoraCreator1155FactoryImpl |
| __gap | uint256[50] | 2 | 0 | 1600 | src/factory/ZoraCreator1155FactoryImpl.sol:ZoraCreator1155FactoryImpl |
| _initialized | uint8 | 52 | 0 | 1 | src/factory/ZoraCreator1155FactoryImpl.sol:ZoraCreator1155FactoryImpl |
| _initializing | bool | 52 | 1 | 1 | src/factory/ZoraCreator1155FactoryImpl.sol:ZoraCreator1155FactoryImpl |
| isAllowedUpgrade | mapping(address => mapping(address => bool)) | 53 | 0 | 32 | src/factory/ZoraCreator1155FactoryImpl.sol:ZoraCreator1155FactoryImpl |
| __gap | uint256[50] | 54 | 0 | 1600 | src/factory/ZoraCreator1155FactoryImpl.sol:ZoraCreator1155FactoryImpl |
| __gap | uint256[50] | 104 | 0 | 1600 | src/factory/ZoraCreator1155FactoryImpl.sol:ZoraCreator1155FactoryImpl |
| __gap | uint256[50] | 154 | 0 | 1600 | src/factory/ZoraCreator1155FactoryImpl.sol:ZoraCreator1155FactoryImpl |
| Name | Type | Slot | Offset | Bytes | Contract |
|---------------|-------------|------|--------|-------|-----------------------------------------------------------------------|
| _owner | address | 0 | 0 | 20 | src/factory/ZoraCreator1155FactoryImpl.sol:ZoraCreator1155FactoryImpl |
| _pendingOwner | address | 1 | 0 | 20 | src/factory/ZoraCreator1155FactoryImpl.sol:ZoraCreator1155FactoryImpl |
| __gap | uint256[50] | 2 | 0 | 1600 | src/factory/ZoraCreator1155FactoryImpl.sol:ZoraCreator1155FactoryImpl |
| _initialized | uint8 | 52 | 0 | 1 | src/factory/ZoraCreator1155FactoryImpl.sol:ZoraCreator1155FactoryImpl |
| _initializing | bool | 52 | 1 | 1 | src/factory/ZoraCreator1155FactoryImpl.sol:ZoraCreator1155FactoryImpl |
| __gap | uint256[50] | 53 | 0 | 1600 | src/factory/ZoraCreator1155FactoryImpl.sol:ZoraCreator1155FactoryImpl |
| __gap | uint256[50] | 103 | 0 | 1600 | src/factory/ZoraCreator1155FactoryImpl.sol:ZoraCreator1155FactoryImpl |
14 changes: 8 additions & 6 deletions addresses/999.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"CONTRACT_1155_IMPL": "0x91C1863eD54809c45b53bb6090eb437036c792C4",
"CONTRACT_1155_IMPL": "0x1842522fEabF9143758EbEEB85A4B417b5b15A0f",
"CONTRACT_1155_IMPL_VERSION": "1.4.0",
"FACTORY_IMPL": "0xdF4A315443Ce2c11e6657D6A98B3a7143DE7B268",
"FACTORY_PROXY": "0x6a357139C1bcDcf0B3AB9bC447932dDdcb956703",
"FACTORY_IMPL": "0x39252E0b2Fd78687b3b9aD2103D38d6C18aD1522",
"FACTORY_PROXY": "0x777777267FA8D1C26EF7A2dffb33A290464D1b4B",
"FIXED_PRICE_SALE_STRATEGY": "0xd81351363b7d80b06E4Ec4De7989f0f91e41A846",
"MERKLE_MINT_SALE_STRATEGY": "0x2c4457D38A329526063b26a2bB2C31B61553Aa98",
"PREMINTER_IMPL": "0x852AdbCA541AC8b422e9d73a11e774d22577266a",
"PREMINTER_PROXY": "0x7777770cbcc9df2d3f3aeb158fd2106e20c598ba",
"REDEEM_MINTER_FACTORY": "0x27817bAef1341De9Ad04097Bbba4Ea8dA32c8552",
"timestamp": 1688509842,
"commit": "f60dd5f"
}
"timestamp": 1695924035,
"commit": "b5b1a73"
}
1 change: 0 additions & 1 deletion chainConfigs/1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"FACTORY_OWNER": "0xDB392f4391462d60B8B4413ef72018Ab595Af9D0",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0xd1d1D4e36117aB794ec5d4c78cBD3a8904E691D0",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
1 change: 0 additions & 1 deletion chainConfigs/10.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"FACTORY_OWNER": "0x4c7f7b6067fac9a737ecf2ca1a733fc85dd65a2b",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x7A810DCd0f8d83B20212326813Db6EF7E9FD030c",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
1 change: 0 additions & 1 deletion chainConfigs/11155111.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"FACTORY_OWNER": "0xE51051a204afb2fC071A2406914cdEA5638e5018",
"MINT_FEE_AMOUNT": 111000000000000,
"MINT_FEE_RECIPIENT": "0xE51051a204afb2fC071A2406914cdEA5638e5018"
}
1 change: 0 additions & 1 deletion chainConfigs/420.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"FACTORY_OWNER": "0xbb45052B2260707655Dfd916a416264f5981192c",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x5dEe21327CD7CD6725C2578DA1c3E5bb2D2D34b2",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
10 changes: 4 additions & 6 deletions chainConfigs/424.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"FACTORY_OWNER": "0x8fbC66d36cceB3Ad69B4d672756da54CcFec1cD2",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x95FD5d77B206cCc0B1f7D7A4077fbE8eb4fC31eF",
"PROTOCOL_REWARDS": "0x7777777A456fF23D9b6851184472c08FBDa73e32"
}

"FACTORY_OWNER": "0x8fbC66d36cceB3Ad69B4d672756da54CcFec1cD2",
"MINT_FEE_RECIPIENT": "0x95FD5d77B206cCc0B1f7D7A4077fbE8eb4fC31eF",
"PROTOCOL_REWARDS": "0x7777777A456fF23D9b6851184472c08FBDa73e32"
}
1 change: 0 additions & 1 deletion chainConfigs/5.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"FACTORY_OWNER": "0xDC498668B5e6CC518fD58A2ADBF614Fd3A13D3a0",
"MINT_FEE_AMOUNT": 10000,
"MINT_FEE_RECIPIENT": "0x9444390c01Dd5b7249E53FAc31290F7dFF53450D",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
1 change: 0 additions & 1 deletion chainConfigs/58008.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"FACTORY_OWNER": "0xfAe426B462f4Bc9857ED28D8473Fb85192f23E9b",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x917D86f1eBD1d9f59Dae1C00e5Af7f8689299EC4"
}
10 changes: 4 additions & 6 deletions chainConfigs/7777777.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"FACTORY_OWNER": "0xdEA20c96253dc2d64897D2b8d27A8d935dE74955",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0xEcfc2ee50409E459c554a2b0376F882Ce916D853",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}

"FACTORY_OWNER": "0xdEA20c96253dc2d64897D2b8d27A8d935dE74955",
"MINT_FEE_RECIPIENT": "0xEcfc2ee50409E459c554a2b0376F882Ce916D853",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
1 change: 0 additions & 1 deletion chainConfigs/8453.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"FACTORY_OWNER": "0x004d6611884B4A661749B64b2ADc78505c3e1AB3",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x7bf90111Ad7C22bec9E9dFf8A01A44713CC1b1B6",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
1 change: 0 additions & 1 deletion chainConfigs/84531.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"FACTORY_OWNER": "0x02539E813cA450C2c7334e885423f4A899a063Fe",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0x02539E813cA450C2c7334e885423f4A899a063Fe",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
1 change: 0 additions & 1 deletion chainConfigs/999.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"FACTORY_OWNER": "0xE84DBB2B25F761751231a9D0DAfbdD4dC3aa8252",
"MINT_FEE_AMOUNT": 777000000000000,
"MINT_FEE_RECIPIENT": "0xE84DBB2B25F761751231a9D0DAfbdD4dC3aa8252",
"PROTOCOL_REWARDS": "0x7777777F279eba3d3Ad8F4E708545291A6fDBA8B"
}
Loading
Loading