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 - move attribution lib to contract consumed via interface #166

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions .changeset/long-avocados-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@zoralabs/zora-1155-contracts": minor
---

- Added gasless minter
- Added deterministic contract creation
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
---

Premint with 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
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ lcov.info
dist/

.env
.env*
!.env.example

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

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

=======================
➡ ZoraCreator1155FactoryImpl
Expand Down
13 changes: 7 additions & 6 deletions addresses/999.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"CONTRACT_1155_IMPL": "0x91C1863eD54809c45b53bb6090eb437036c792C4",
"FACTORY_IMPL": "0xdF4A315443Ce2c11e6657D6A98B3a7143DE7B268",
"FACTORY_PROXY": "0x6a357139C1bcDcf0B3AB9bC447932dDdcb956703",
"CONTRACT_1155_IMPL": "0xe349c0e2C91DE151F7Fc469BF9c39F8A05EF59D2",
"FACTORY_IMPL": "0x93B2BCa3b7734370BB5bdcaB5Ef83b8E995cb9e0",
"FACTORY_PROXY": "0x368d9Fa8Fe07652a73E91986A7Eee2436D218739",
"FIXED_PRICE_SALE_STRATEGY": "0xd81351363b7d80b06E4Ec4De7989f0f91e41A846",
"MERKLE_MINT_SALE_STRATEGY": "0x2c4457D38A329526063b26a2bB2C31B61553Aa98",
"PREMINTER": "0x9D0162AC5ff579670f9b941db7eb7675667883B5",
"REDEEM_MINTER_FACTORY": "0x27817bAef1341De9Ad04097Bbba4Ea8dA32c8552",
"timestamp": 1688509842,
"commit": "f60dd5f"
}
"timestamp": 1692386956,
"commit": "d077c85"
}
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
fs_permissions = [{access = "read", path = "./addresses"}, {access = "read", path = "./chainConfigs"}, {access = "read", path = "./package.json"}]
libs = ['_imagine', 'node_modules', 'script']
optimizer = true
optimizer_runs = 3000
optimizer_runs = 500
out = 'out'
solc_version = '0.8.17'
src = 'src'
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zoralabs/zora-1155-contracts",
"version": "1.4.0",
"version": "1.4.5-gasless",
"repository": "git@github.com:ourzora/creator-contracts.git",
"author": "Iain <iain@zora.co>",
"license": "MIT",
Expand All @@ -14,17 +14,17 @@
"prettier": "prettier --write 'src/**/*.sol' 'test/**/*.sol' 'package/**/*.ts' 'wagmi.config.ts'",
"coverage": "forge coverage --report lcov",
"write-gas-report": "forge test --gas-report > gasreport.ansi",
"prepack": "node script/copy-deployed-contracts.mjs && yarn wagmi && yarn bundle-configs && yarn build",
"prepack": "yarn wagmi && yarn bundle-configs && yarn build",
"update-new-deployment-addresses": "node script/copy-deployed-contracts.mjs deploy",
"build": "tsup",
"bundle-configs": "node script/bundle-chainConfigs.mjs && yarn prettier",
"wagmi": "wagmi generate",
"publish-packages": "yarn prepack && changeset publish",
"storage-inspect:check": "./script/storage-check.sh check ZoraCreator1155Impl ZoraCreator1155FactoryImpl",
"storage-inspect:generate": "./script/storage-check.sh generate ZoraCreator1155Impl ZoraCreator1155FactoryImpl",
"release": "yarn run prepack && changeset publish",
"js-test:watch": "vitest dev",
"anvil": "anvil --fork-url https://rpc.zora.energy --fork-block-number 2550000 --chain-id 31337"
"anvil": "source .env.anvil && anvil --fork-url $FORK_RPC_URL --fork-block-number $FORK_BLOCK_NUMBER --chain-id 31337",
"release": "yarn run prepack && changeset publish"
},
"files": [
"dist/",
Expand All @@ -38,7 +38,8 @@
"@zoralabs/openzeppelin-contracts-upgradeable": "4.8.4",
"@zoralabs/protocol-rewards": "1.1.1",
"ds-test": "https://github.com/dapphub/ds-test#cd98eff28324bfac652e63a239a60632a761790b",
"forge-std": "https://github.com/foundry-rs/forge-std#cd7d533f9a0ee0ec02ad81e0a8f262bc4203c653"
"forge-std": "https://github.com/foundry-rs/forge-std#705263c95892a906d7af65f0f73ce8a4a0c80b80",
"solmate": "^6.1.0"
},
"devDependencies": {
"@changesets/cli": "^2.26.1",
Expand Down
2 changes: 1 addition & 1 deletion package/batchPublish.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
parseEther,
createTestClient,
} from "viem";
import { foundry, zora } from "viem/chains";
import { foundry, zora, zoraTestnet } from "viem/chains";
import { describe, it, expect } from "vitest";
import {
zoraCreator1155FactoryImplConfig,
Expand Down
Loading