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

moved 1155 deployments into protocol-deployments/1155 #317

Closed
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
10 changes: 10 additions & 0 deletions .changeset/lazy-experts-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@zoralabs/zora-1155-contracts": patch
"@zoralabs/protocol-deployments": patch
"@zoralabs/premint-sdk": patch
---

created new package `protocol-deployments` that includes the deployed contract addresses.

* 1155-contracts js no longer exports deployed addresses, just the abis
* premint-sdk imports deployed addresses from `protocol-deployments
9 changes: 1 addition & 8 deletions .github/workflows/foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ jobs:
run: npx turbo run storage-inspect:check

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

Expand All @@ -133,14 +132,9 @@ jobs:
- name: Install node deps and founry
uses: ./.github/actions/setup_deps

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

- name: Build js package
run: |
npx turbo run prepack
npx turbo run build

coverage-1155:
uses: ./.github/workflows/coverage.yml
Expand All @@ -155,4 +149,3 @@ jobs:
with:
package: "protocol-rewards"
files_to_ignore: '"*lib*"'

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ abis/
# /broadcast/**/dry-run/

# Remove broadcast logs
/broadcast/
**/*/broadcast

# Docs
docs/
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ In it you will find:

- [Zora 1155 Contracts](./packages/1155-contracts)
- [Protocol Rewards](./packages/protocol-rewards)
- [Procotol Deployments](./packages/protocol-deployments)

## Official docs

Expand Down
17 changes: 4 additions & 13 deletions packages/1155-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,17 @@
"test-gas": "forge test --gas-report",
"prettier:check": "prettier --check 'src/**/*.sol' 'test/**/*.sol' 'package/**/*.ts' 'wagmi.config.ts'",
"prettier": "prettier --write 'src/**/*.sol' 'test/**/*.sol' 'package/**/*.ts' 'script/**/*.ts' 'wagmi.config.ts'",
"copy-abis": "tsx script/bundle-abis.ts",
"lint": "yarn run prettier:check",
"coverage": "forge coverage --report lcov",
"write-gas-report": "forge test --gas-report > gasreport.ansi",
"copy-abis": "tsx script/bundle-abis.ts",
"update-new-deployment-addresses": "node script/copy-deployed-contracts.mjs deploy",
"update-contract-version": "node script/update-contract-version.mjs",
"build:contracts": "forge build",
"build": "yarn wagmi && yarn copy-abis && yarn bundle-configs && tsup",
"build:sizes": "forge build --sizes",
"bundle-configs": "node script/bundle-chainConfigs.mjs && yarn prettier",
"build": "yarn wagmi && yarn copy-abis && tsup",
"wagmi": "FOUNDRY_PROFILE=dev forge build && wagmi generate",
"build:sizes": "forge build --sizes",
"storage-inspect:check": "./script/storage-check.sh check ZoraCreator1155Impl ZoraCreator1155FactoryImpl",
"storage-inspect:generate": "./script/storage-check.sh generate ZoraCreator1155Impl ZoraCreator1155FactoryImpl",
"js-test:watch": "vitest dev",
"anvil": "source .env.anvil && anvil --fork-url $FORK_RPC_URL --fork-block-number $FORK_BLOCK_NUMBER --chain-id 31337",
"unlink-contracts": "rm -rf ./node_modules/@zoralabs/protocol-rewards && cp -r ../protocol-rewards ./node_modules/@zoralabs/protocol-rewards",
"link-contracts": "rm -rf ./node_modules && cd .. && yarn"
"update-contract-version": "node script/update-contract-version.mjs"
},
"files": [
"dist/",
Expand All @@ -57,10 +51,7 @@
"glob": "^10.2.2",
"prettier": "^2.8.8",
"es-main": "^1.2.0",
"@turnkey/api-key-stamper": "^0.1.1",
"prettier-plugin-solidity": "^1.1.3",
"@turnkey/http": "^1.2.0",
"@turnkey/viem": "^0.2.4",
"@types/node": "^20.1.2",
"tsup": "^7.2.0",
"typescript": "^5.0.4"
Expand Down
1 change: 0 additions & 1 deletion packages/1155-contracts/package/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
// built at build time. They are not checked in to git.
// The can be generated by running `yarn prepack` in the root
export * from "./wagmiGenerated";
export { chainConfigs } from "./chainConfigs";
27 changes: 0 additions & 27 deletions packages/1155-contracts/script/DeployUpgradeGate.s.sol

This file was deleted.

67 changes: 0 additions & 67 deletions packages/1155-contracts/script/TestCreateDeterministic.sol

This file was deleted.

43 changes: 0 additions & 43 deletions packages/1155-contracts/script/TestUpgrade.s.sol

This file was deleted.

2 changes: 1 addition & 1 deletion packages/1155-contracts/script/storage-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ generate() {
for contract in ${contracts[@]}
do
{ echo -e "\n======================="; echo "➡ $contract" ; echo -e "=======================\n"; } >> "$file"
forge inspect --pretty "$contract" storage-layout >> "$file"
FOUNDRY_PROFILE=dev forge inspect --pretty "$contract" storage-layout >> "$file"
done
if [[ $func == "generate" ]]; then
echo "Storage layout snapshot stored at $file"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ pragma solidity ^0.8.13;
import "forge-std/Script.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";

import {IZoraCreator1155Factory} from "../src/interfaces/IZoraCreator1155Factory.sol";
import {ZoraCreator1155Impl} from "../src/nft/ZoraCreator1155Impl.sol";
import {Zora1155Factory} from "../src/proxies/Zora1155Factory.sol";
import {ICreatorRoyaltiesControl} from "../src/interfaces/ICreatorRoyaltiesControl.sol";
import {ScriptDeploymentConfig, Deployment, ChainConfig} from "../src/deployment/DeploymentConfig.sol";
import {ZoraDeployerUtils} from "../src/deployment/ZoraDeployerUtils.sol";
import {IMinter1155} from "../src/interfaces/IMinter1155.sol";
import {DeterministicDeployerScript} from "../src/deployment/DeterministicDeployerScript.sol";
import {ZoraCreator1155FactoryImpl} from "../src/factory/ZoraCreator1155FactoryImpl.sol";
import {IZoraCreator1155Factory} from "../interfaces/IZoraCreator1155Factory.sol";
import {ZoraCreator1155Impl} from "../nft/ZoraCreator1155Impl.sol";
import {Zora1155Factory} from "../proxies/Zora1155Factory.sol";
import {ICreatorRoyaltiesControl} from "../interfaces/ICreatorRoyaltiesControl.sol";
import {ScriptDeploymentConfig, Deployment, ChainConfig} from "../deployment/DeploymentConfig.sol";
import {ZoraDeployerUtils} from "../deployment/ZoraDeployerUtils.sol";
import {IMinter1155} from "../interfaces/IMinter1155.sol";
import {DeterministicDeployerScript} from "../deployment/DeterministicDeployerScript.sol";
import {ZoraCreator1155FactoryImpl} from "../factory/ZoraCreator1155FactoryImpl.sol";

/// @notice Deployment drops for base where
abstract contract ZoraDeployerBase is ScriptDeploymentConfig, DeterministicDeployerScript {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ contract ZoraCreator1155FactoryForkTest is ForkDeploymentConfig, Test {

// make sure that the address from the factory matches the stored fixed price address
// sanity check - check minters match config
assertEq(address(factory.merkleMinter()), deployment.merkleMintSaleStrategy);
assertEq(address(factory.fixedPriceMinter()), deployment.fixedPriceSaleStrategy);
assertEq(address(factory.redeemMinterFactory()), deployment.redeemMinterFactory);
assertEq(address(factory.merkleMinter()), deployment.merkleMintSaleStrategy, "merkle minter incorrect");
assertEq(address(factory.fixedPriceMinter()), deployment.fixedPriceSaleStrategy, "fixed priced minter incorrect");
assertEq(address(factory.redeemMinterFactory()), deployment.redeemMinterFactory, "redeem minter not correct");
}

function test_fork_canCreateContractAndMint() external {
Expand Down
Loading
Loading