@zoralabs/protocol-deployments 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +14 -14
- package/CHANGELOG.md +14 -0
- package/addresses/999.json +6 -6
- package/addresses/999999999.json +6 -6
- package/dist/index.cjs +19 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/dist/package/wagmiGenerated.d.ts +40 -12
- package/dist/package/wagmiGenerated.d.ts.map +1 -1
- package/package/wagmiGenerated.ts +19 -2
- package/package.json +2 -1
- package/script/DeployProxiesToNewChain.s.sol +1 -1
- package/script/DeployTestContracts.s.sol +1 -1
- package/src/Zora1155PremintFixtures.sol +75 -0
- package/test/UpgradesTest.t.sol +25 -1
- package/test/ZoraCreator1155PremintExecutorForkTest.t.sol +133 -26
- package/tsconfig.json +1 -17
|
@@ -3251,6 +3251,20 @@ export declare const zoraCreator1155PremintExecutorImplABI: readonly [{
|
|
|
3251
3251
|
readonly internalType: "address";
|
|
3252
3252
|
readonly type: "address";
|
|
3253
3253
|
}];
|
|
3254
|
+
}, {
|
|
3255
|
+
readonly stateMutability: "view";
|
|
3256
|
+
readonly type: "function";
|
|
3257
|
+
readonly inputs: readonly [{
|
|
3258
|
+
readonly name: "collectionAddress";
|
|
3259
|
+
readonly internalType: "address";
|
|
3260
|
+
readonly type: "address";
|
|
3261
|
+
}];
|
|
3262
|
+
readonly name: "mintFee";
|
|
3263
|
+
readonly outputs: readonly [{
|
|
3264
|
+
readonly name: "";
|
|
3265
|
+
readonly internalType: "uint256";
|
|
3266
|
+
readonly type: "uint256";
|
|
3267
|
+
}];
|
|
3254
3268
|
}, {
|
|
3255
3269
|
readonly stateMutability: "view";
|
|
3256
3270
|
readonly type: "function";
|
|
@@ -3497,9 +3511,9 @@ export declare const zoraCreator1155PremintExecutorImplABI: readonly [{
|
|
|
3497
3511
|
readonly internalType: "string";
|
|
3498
3512
|
readonly type: "string";
|
|
3499
3513
|
}, {
|
|
3500
|
-
readonly name: "
|
|
3501
|
-
readonly internalType: "address";
|
|
3502
|
-
readonly type: "address";
|
|
3514
|
+
readonly name: "mintRewardsRecipients";
|
|
3515
|
+
readonly internalType: "address[]";
|
|
3516
|
+
readonly type: "address[]";
|
|
3503
3517
|
}];
|
|
3504
3518
|
}];
|
|
3505
3519
|
readonly name: "premintV1";
|
|
@@ -3624,9 +3638,9 @@ export declare const zoraCreator1155PremintExecutorImplABI: readonly [{
|
|
|
3624
3638
|
readonly internalType: "string";
|
|
3625
3639
|
readonly type: "string";
|
|
3626
3640
|
}, {
|
|
3627
|
-
readonly name: "
|
|
3628
|
-
readonly internalType: "address";
|
|
3629
|
-
readonly type: "address";
|
|
3641
|
+
readonly name: "mintRewardsRecipients";
|
|
3642
|
+
readonly internalType: "address[]";
|
|
3643
|
+
readonly type: "address[]";
|
|
3630
3644
|
}];
|
|
3631
3645
|
}];
|
|
3632
3646
|
readonly name: "premintV2";
|
|
@@ -4492,6 +4506,20 @@ export declare const zoraCreator1155PremintExecutorImplConfig: {
|
|
|
4492
4506
|
readonly internalType: "address";
|
|
4493
4507
|
readonly type: "address";
|
|
4494
4508
|
}];
|
|
4509
|
+
}, {
|
|
4510
|
+
readonly stateMutability: "view";
|
|
4511
|
+
readonly type: "function";
|
|
4512
|
+
readonly inputs: readonly [{
|
|
4513
|
+
readonly name: "collectionAddress";
|
|
4514
|
+
readonly internalType: "address";
|
|
4515
|
+
readonly type: "address";
|
|
4516
|
+
}];
|
|
4517
|
+
readonly name: "mintFee";
|
|
4518
|
+
readonly outputs: readonly [{
|
|
4519
|
+
readonly name: "";
|
|
4520
|
+
readonly internalType: "uint256";
|
|
4521
|
+
readonly type: "uint256";
|
|
4522
|
+
}];
|
|
4495
4523
|
}, {
|
|
4496
4524
|
readonly stateMutability: "view";
|
|
4497
4525
|
readonly type: "function";
|
|
@@ -4738,9 +4766,9 @@ export declare const zoraCreator1155PremintExecutorImplConfig: {
|
|
|
4738
4766
|
readonly internalType: "string";
|
|
4739
4767
|
readonly type: "string";
|
|
4740
4768
|
}, {
|
|
4741
|
-
readonly name: "
|
|
4742
|
-
readonly internalType: "address";
|
|
4743
|
-
readonly type: "address";
|
|
4769
|
+
readonly name: "mintRewardsRecipients";
|
|
4770
|
+
readonly internalType: "address[]";
|
|
4771
|
+
readonly type: "address[]";
|
|
4744
4772
|
}];
|
|
4745
4773
|
}];
|
|
4746
4774
|
readonly name: "premintV1";
|
|
@@ -4865,9 +4893,9 @@ export declare const zoraCreator1155PremintExecutorImplConfig: {
|
|
|
4865
4893
|
readonly internalType: "string";
|
|
4866
4894
|
readonly type: "string";
|
|
4867
4895
|
}, {
|
|
4868
|
-
readonly name: "
|
|
4869
|
-
readonly internalType: "address";
|
|
4870
|
-
readonly type: "address";
|
|
4896
|
+
readonly name: "mintRewardsRecipients";
|
|
4897
|
+
readonly internalType: "address[]";
|
|
4898
|
+
readonly type: "address[]";
|
|
4871
4899
|
}];
|
|
4872
4900
|
}];
|
|
4873
4901
|
readonly name: "premintV2";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wagmiGenerated.d.ts","sourceRoot":"","sources":["../../package/wagmiGenerated.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGxC,CAAC;AAMX;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmJpC,CAAC;AAEX;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;CAaxC,CAAC;AAEX;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGvC,CAAC"}
|
|
@@ -2089,6 +2089,15 @@ export const zoraCreator1155PremintExecutorImplABI = [
|
|
|
2089
2089
|
{ name: "recoveredSigner", internalType: "address", type: "address" },
|
|
2090
2090
|
],
|
|
2091
2091
|
},
|
|
2092
|
+
{
|
|
2093
|
+
stateMutability: "view",
|
|
2094
|
+
type: "function",
|
|
2095
|
+
inputs: [
|
|
2096
|
+
{ name: "collectionAddress", internalType: "address", type: "address" },
|
|
2097
|
+
],
|
|
2098
|
+
name: "mintFee",
|
|
2099
|
+
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
|
|
2100
|
+
},
|
|
2092
2101
|
{
|
|
2093
2102
|
stateMutability: "view",
|
|
2094
2103
|
type: "function",
|
|
@@ -2246,7 +2255,11 @@ export const zoraCreator1155PremintExecutorImplABI = [
|
|
|
2246
2255
|
components: [
|
|
2247
2256
|
{ name: "mintRecipient", internalType: "address", type: "address" },
|
|
2248
2257
|
{ name: "mintComment", internalType: "string", type: "string" },
|
|
2249
|
-
{
|
|
2258
|
+
{
|
|
2259
|
+
name: "mintRewardsRecipients",
|
|
2260
|
+
internalType: "address[]",
|
|
2261
|
+
type: "address[]",
|
|
2262
|
+
},
|
|
2250
2263
|
],
|
|
2251
2264
|
},
|
|
2252
2265
|
],
|
|
@@ -2330,7 +2343,11 @@ export const zoraCreator1155PremintExecutorImplABI = [
|
|
|
2330
2343
|
components: [
|
|
2331
2344
|
{ name: "mintRecipient", internalType: "address", type: "address" },
|
|
2332
2345
|
{ name: "mintComment", internalType: "string", type: "string" },
|
|
2333
|
-
{
|
|
2346
|
+
{
|
|
2347
|
+
name: "mintRewardsRecipients",
|
|
2348
|
+
internalType: "address[]",
|
|
2349
|
+
type: "address[]",
|
|
2350
|
+
},
|
|
2334
2351
|
],
|
|
2335
2352
|
},
|
|
2336
2353
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zoralabs/protocol-deployments",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"repository": "https://github.com/ourzora/zora-protocol",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"solady": "^0.0.132",
|
|
40
40
|
"tsup": "^7.2.0",
|
|
41
41
|
"tsx": "^3.13.0",
|
|
42
|
+
"zoralabs-tsconfig": "*",
|
|
42
43
|
"typescript": "^5.2.2"
|
|
43
44
|
}
|
|
44
45
|
}
|
|
@@ -36,7 +36,7 @@ contract DeployProxiesToNewChain is ZoraDeployerBase {
|
|
|
36
36
|
IZoraCreator1155PremintExecutor.MintArguments memory mintArguments = IZoraCreator1155PremintExecutor.MintArguments({
|
|
37
37
|
mintRecipient: fundsRecipient,
|
|
38
38
|
mintComment: "",
|
|
39
|
-
|
|
39
|
+
mintRewardsRecipients: new address[](0)
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
signAndExecutePremintV2(deployment.preminterProxy, vm.envAddress("TEST_PREMINT_FUNDS_RECIPIENT"), mintArguments);
|
|
@@ -21,7 +21,7 @@ contract DeployTestContracts is ZoraDeployerBase {
|
|
|
21
21
|
IZoraCreator1155PremintExecutor.MintArguments memory mintArguments = IZoraCreator1155PremintExecutor.MintArguments({
|
|
22
22
|
mintRecipient: fundsRecipient,
|
|
23
23
|
mintComment: "",
|
|
24
|
-
|
|
24
|
+
mintRewardsRecipients: new address[](0)
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
signAndExecutePremintV2(deployment.preminterProxy, fundsRecipient, mintArguments);
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import {ZoraCreator1155Impl} from "@zoralabs/zora-1155-contracts/src/nft/ZoraCreator1155Impl.sol";
|
|
5
|
+
import {ZoraCreatorFixedPriceSaleStrategy} from "@zoralabs/zora-1155-contracts/src/minters/fixed-price/ZoraCreatorFixedPriceSaleStrategy.sol";
|
|
6
|
+
import {IZoraCreator1155Errors} from "@zoralabs/zora-1155-contracts/src/interfaces/IZoraCreator1155Errors.sol";
|
|
7
|
+
import {IMinter1155} from "@zoralabs/zora-1155-contracts/src/interfaces/IMinter1155.sol";
|
|
8
|
+
import {Zora1155Factory} from "@zoralabs/zora-1155-contracts/src/proxies/Zora1155Factory.sol";
|
|
9
|
+
import {ZoraCreator1155FactoryImpl} from "@zoralabs/zora-1155-contracts/src/factory/ZoraCreator1155FactoryImpl.sol";
|
|
10
|
+
import {ProtocolRewards} from "@zoralabs/protocol-rewards/src/ProtocolRewards.sol";
|
|
11
|
+
import {ProxyShim} from "@zoralabs/zora-1155-contracts/src/utils/ProxyShim.sol";
|
|
12
|
+
import {PremintConfig, PremintConfigV2, ContractCreationConfig, TokenCreationConfigV2, TokenCreationConfig} from "@zoralabs/zora-1155-contracts/src/delegation/ZoraCreator1155Attribution.sol";
|
|
13
|
+
|
|
14
|
+
library Zora1155PremintFixtures {
|
|
15
|
+
function makeDefaultContractCreationConfig(address contractAdmin) internal pure returns (ContractCreationConfig memory) {
|
|
16
|
+
return ContractCreationConfig({contractAdmin: contractAdmin, contractName: "blah_______blah", contractURI: "blah.contract"});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function makeTokenCreationConfigV2WithCreateReferral(
|
|
20
|
+
IMinter1155 fixedPriceMinter,
|
|
21
|
+
address payoutRecipient,
|
|
22
|
+
address createReferral
|
|
23
|
+
) internal pure returns (TokenCreationConfigV2 memory) {
|
|
24
|
+
return
|
|
25
|
+
TokenCreationConfigV2({
|
|
26
|
+
tokenURI: "blah.token",
|
|
27
|
+
maxSupply: 10,
|
|
28
|
+
maxTokensPerAddress: 5,
|
|
29
|
+
pricePerToken: 0,
|
|
30
|
+
mintStart: 0,
|
|
31
|
+
mintDuration: 0,
|
|
32
|
+
fixedPriceMinter: address(fixedPriceMinter),
|
|
33
|
+
payoutRecipient: payoutRecipient,
|
|
34
|
+
royaltyBPS: 10,
|
|
35
|
+
createReferral: createReferral
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function makeDefaultV2PremintConfig(
|
|
40
|
+
IMinter1155 fixedPriceMinter,
|
|
41
|
+
address payoutRecipient,
|
|
42
|
+
address createReferral
|
|
43
|
+
) internal pure returns (PremintConfigV2 memory) {
|
|
44
|
+
// make a v2 premint config
|
|
45
|
+
return
|
|
46
|
+
PremintConfigV2({
|
|
47
|
+
tokenConfig: makeTokenCreationConfigV2WithCreateReferral(fixedPriceMinter, payoutRecipient, createReferral),
|
|
48
|
+
uid: 100,
|
|
49
|
+
version: 0,
|
|
50
|
+
deleted: false
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function makeDefaultV1PremintConfig(IMinter1155 fixedPriceMinter, address royaltyRecipient) internal pure returns (PremintConfig memory) {
|
|
55
|
+
// make a v1 premint config
|
|
56
|
+
return
|
|
57
|
+
PremintConfig({
|
|
58
|
+
tokenConfig: TokenCreationConfig({
|
|
59
|
+
tokenURI: "blah.token",
|
|
60
|
+
maxSupply: 10,
|
|
61
|
+
maxTokensPerAddress: 5,
|
|
62
|
+
pricePerToken: 0,
|
|
63
|
+
mintStart: 0,
|
|
64
|
+
mintDuration: 0,
|
|
65
|
+
fixedPriceMinter: address(fixedPriceMinter),
|
|
66
|
+
royaltyRecipient: royaltyRecipient,
|
|
67
|
+
royaltyBPS: 10,
|
|
68
|
+
royaltyMintSchedule: 0
|
|
69
|
+
}),
|
|
70
|
+
uid: 100,
|
|
71
|
+
version: 0,
|
|
72
|
+
deleted: false
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
package/test/UpgradesTest.t.sol
CHANGED
|
@@ -52,6 +52,25 @@ contract UpgradesTest is ForkDeploymentConfig, DeploymentTestingUtils, Test {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
function _buildSafeUrl(address safe, address target, bytes memory cd) internal view returns (string memory) {
|
|
56
|
+
// sample url: https://ourzora.github.io/smol-safe/?value=0&safe={safeAddress}&to={target}&data={calldata}&network={chainId}
|
|
57
|
+
// https://ourzora.github.io/smol-safe/?safe={safe}&to={to}&data={data}&value=0&network={network}
|
|
58
|
+
string memory safeQueryString = string.concat("safe=", vm.toString(safe));
|
|
59
|
+
string memory toQueryString = string.concat("&to=", vm.toString(target));
|
|
60
|
+
string memory dataQueryString = string.concat("&data=", vm.toString(cd));
|
|
61
|
+
string memory valueQueryString = "&value=0";
|
|
62
|
+
string memory chainIdQueryString = string.concat("&network=", vm.toString(block.chainid));
|
|
63
|
+
string memory targetUrl = string.concat(
|
|
64
|
+
string.concat(
|
|
65
|
+
string.concat(string.concat(string.concat("https://ourzora.github.io/smol-safe/?", safeQueryString), toQueryString), dataQueryString),
|
|
66
|
+
valueQueryString
|
|
67
|
+
),
|
|
68
|
+
chainIdQueryString
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
return targetUrl;
|
|
72
|
+
}
|
|
73
|
+
|
|
55
74
|
/// @notice checks which chains need an upgrade, simulated the upgrade, and gets the upgrade calldata
|
|
56
75
|
function simulateUpgradeOnFork(string memory chainName) private {
|
|
57
76
|
// create and select the fork, which will be used for all subsequent calls
|
|
@@ -86,6 +105,7 @@ contract UpgradesTest is ForkDeploymentConfig, DeploymentTestingUtils, Test {
|
|
|
86
105
|
console.logBytes(factory1155UpgradeCalldata);
|
|
87
106
|
console2.log("upgrade to address:", targetImpl1155);
|
|
88
107
|
console2.log("upgrade to version:", ZoraCreator1155FactoryImpl(targetImpl1155).contractVersion());
|
|
108
|
+
console2.log("smol safe upgrade url: ", _buildSafeUrl(chainConfig.factoryOwner, targetProxy1155, factory1155UpgradeCalldata));
|
|
89
109
|
console2.log("------------------------");
|
|
90
110
|
}
|
|
91
111
|
|
|
@@ -100,10 +120,13 @@ contract UpgradesTest is ForkDeploymentConfig, DeploymentTestingUtils, Test {
|
|
|
100
120
|
address mintReferral = makeAddr("referral");
|
|
101
121
|
vm.deal(collector, 10 ether);
|
|
102
122
|
|
|
123
|
+
address[] memory mintRewardsRecipients = new address[](1);
|
|
124
|
+
mintRewardsRecipients[0] = mintReferral;
|
|
125
|
+
|
|
103
126
|
IZoraCreator1155PremintExecutor.MintArguments memory mintArguments = IZoraCreator1155PremintExecutor.MintArguments({
|
|
104
127
|
mintRecipient: collector,
|
|
105
128
|
mintComment: "",
|
|
106
|
-
|
|
129
|
+
mintRewardsRecipients: mintRewardsRecipients
|
|
107
130
|
});
|
|
108
131
|
|
|
109
132
|
vm.startPrank(collector);
|
|
@@ -115,6 +138,7 @@ contract UpgradesTest is ForkDeploymentConfig, DeploymentTestingUtils, Test {
|
|
|
115
138
|
console2.log("upgrade calldata:");
|
|
116
139
|
console.logBytes(preminterUpgradeCalldata);
|
|
117
140
|
console2.log("upgrade to address:", targetPremintImpl);
|
|
141
|
+
console2.log("smol safe upgrade url: ", _buildSafeUrl(chainConfig.factoryOwner, targetPreminterProxy, preminterUpgradeCalldata));
|
|
118
142
|
console2.log("------------------------");
|
|
119
143
|
}
|
|
120
144
|
|
|
@@ -3,14 +3,25 @@ pragma solidity 0.8.17;
|
|
|
3
3
|
|
|
4
4
|
import "forge-std/Test.sol";
|
|
5
5
|
import {ForkDeploymentConfig} from "../src/DeploymentConfig.sol";
|
|
6
|
-
import {ZoraCreator1155Attribution, ContractCreationConfig, PremintConfig, TokenCreationConfig} from "@zoralabs/zora-1155-contracts/src/delegation/ZoraCreator1155Attribution.sol";
|
|
6
|
+
import {ZoraCreator1155Attribution, ContractCreationConfig, PremintConfig, PremintConfigV2, TokenCreationConfig} from "@zoralabs/zora-1155-contracts/src/delegation/ZoraCreator1155Attribution.sol";
|
|
7
7
|
import {ZoraCreator1155PremintExecutorImpl} from "@zoralabs/zora-1155-contracts/src/delegation/ZoraCreator1155PremintExecutorImpl.sol";
|
|
8
8
|
import {ZoraCreator1155FactoryImpl} from "@zoralabs/zora-1155-contracts/src/factory/ZoraCreator1155FactoryImpl.sol";
|
|
9
|
+
import {IZoraCreator1155PremintExecutor} from "@zoralabs/zora-1155-contracts/src/interfaces/IZoraCreator1155PremintExecutor.sol";
|
|
10
|
+
import {Zora1155PremintFixtures} from "../src/Zora1155PremintFixtures.sol";
|
|
9
11
|
|
|
10
12
|
contract ZoraCreator1155PreminterForkTest is ForkDeploymentConfig, Test {
|
|
11
13
|
ZoraCreator1155FactoryImpl factory;
|
|
12
14
|
ZoraCreator1155PremintExecutorImpl preminter;
|
|
13
15
|
uint256 mintFeeAmount = 0.000777 ether;
|
|
16
|
+
address creator;
|
|
17
|
+
uint256 creatorPrivateKey;
|
|
18
|
+
address payoutRecipient = makeAddr("payoutRecipient");
|
|
19
|
+
address minter = makeAddr("minter");
|
|
20
|
+
|
|
21
|
+
ContractCreationConfig contractConfig;
|
|
22
|
+
PremintConfig premintConfig;
|
|
23
|
+
PremintConfigV2 premintConfigV2;
|
|
24
|
+
address createReferral = makeAddr("creatReferral");
|
|
14
25
|
|
|
15
26
|
/// @notice gets the chains to do fork tests on, by reading environment var FORK_TEST_CHAINS.
|
|
16
27
|
/// Chains are by name, and must match whats under `rpc_endpoints` in the foundry.toml
|
|
@@ -23,44 +34,98 @@ contract ZoraCreator1155PreminterForkTest is ForkDeploymentConfig, Test {
|
|
|
23
34
|
}
|
|
24
35
|
}
|
|
25
36
|
|
|
26
|
-
function
|
|
27
|
-
console.log("testing on fork: ", chainName);
|
|
28
|
-
|
|
29
|
-
// create and select the fork, which will be used for all subsequent calls
|
|
30
|
-
// it will also affect the current block chain id based on the rpc url returned
|
|
31
|
-
vm.createSelectFork(vm.rpcUrl(chainName));
|
|
32
|
-
|
|
37
|
+
function setupPremint() private {
|
|
33
38
|
// get contract hash, which is unique per contract creation config, and can be used
|
|
34
39
|
// retrieve the address created for a contract
|
|
35
40
|
address preminterAddress = getDeployment().preminterProxy;
|
|
36
41
|
|
|
37
|
-
if (preminterAddress == address(0)) {
|
|
38
|
-
console.log("preminter not configured for chain...skipping");
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
42
|
// override local preminter to use the addresses from the chain
|
|
43
43
|
factory = ZoraCreator1155FactoryImpl(getDeployment().factoryProxy);
|
|
44
44
|
preminter = ZoraCreator1155PremintExecutorImpl(preminterAddress);
|
|
45
|
+
|
|
46
|
+
(creator, creatorPrivateKey) = makeAddrAndKey("creator");
|
|
47
|
+
|
|
48
|
+
contractConfig = Zora1155PremintFixtures.makeDefaultContractCreationConfig(creator);
|
|
49
|
+
|
|
50
|
+
premintConfig = Zora1155PremintFixtures.makeDefaultV1PremintConfig(factory.fixedPriceMinter(), payoutRecipient);
|
|
51
|
+
premintConfigV2 = Zora1155PremintFixtures.makeDefaultV2PremintConfig(factory.fixedPriceMinter(), payoutRecipient, createReferral);
|
|
45
52
|
}
|
|
46
53
|
|
|
47
|
-
function
|
|
54
|
+
function equals(string memory str1, string memory str2) public pure returns (bool) {
|
|
55
|
+
return keccak256(abi.encodePacked(str1)) == keccak256(abi.encodePacked(str2));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function test_fork_legacyPremint_successfullyMintsPremintTokens() external {
|
|
48
59
|
string[] memory forkTestChains = getForkTestChains();
|
|
49
60
|
for (uint256 i = 0; i < forkTestChains.length; i++) {
|
|
50
|
-
|
|
61
|
+
string memory chainName = forkTestChains[i];
|
|
62
|
+
|
|
63
|
+
console.log("testing on fork: ", chainName);
|
|
64
|
+
|
|
65
|
+
// create and select the fork, which will be used for all subsequent calls
|
|
66
|
+
// it will also affect the current block chain id based on the rpc url returned
|
|
67
|
+
vm.createSelectFork(vm.rpcUrl(chainName));
|
|
68
|
+
|
|
69
|
+
setupPremint();
|
|
70
|
+
|
|
71
|
+
_signAndExecutePremintLegacy(creatorPrivateKey, minter, 1, "test comment");
|
|
51
72
|
}
|
|
52
73
|
}
|
|
53
74
|
|
|
54
|
-
function
|
|
55
|
-
|
|
56
|
-
|
|
75
|
+
function test_fork_premintV1_successfullyMintsPremintTokens() external {
|
|
76
|
+
string[] memory forkTestChains = getForkTestChains();
|
|
77
|
+
for (uint256 i = 0; i < forkTestChains.length; i++) {
|
|
78
|
+
string memory chainName = forkTestChains[i];
|
|
79
|
+
|
|
80
|
+
if (!_chainSupportsPremintV2(chainName)) {
|
|
81
|
+
console.log("skipping chain, does not support v1 premint: ", chainName);
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
console.log("testing on fork: ", chainName);
|
|
86
|
+
|
|
87
|
+
// it will also affect the current block chain id based on the rpc url returned
|
|
88
|
+
vm.createSelectFork(vm.rpcUrl(chainName));
|
|
89
|
+
|
|
90
|
+
setupPremint();
|
|
91
|
+
|
|
92
|
+
_signAndExecutePremintV1(creatorPrivateKey, minter, 1, "test comment");
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function test_fork_premintV2_successfullyMintsPremintTokens() external {
|
|
97
|
+
string[] memory forkTestChains = getForkTestChains();
|
|
98
|
+
for (uint256 i = 0; i < forkTestChains.length; i++) {
|
|
99
|
+
string memory chainName = forkTestChains[i];
|
|
100
|
+
|
|
101
|
+
if (!_chainSupportsPremintV2(chainName)) {
|
|
102
|
+
console.log("skipping chain, does not support v2 premint: ", chainName);
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
console.log("testing on fork: ", chainName);
|
|
107
|
+
|
|
108
|
+
// it will also affect the current block chain id based on the rpc url returned
|
|
109
|
+
vm.createSelectFork(vm.rpcUrl(chainName));
|
|
110
|
+
|
|
111
|
+
setupPremint();
|
|
112
|
+
|
|
113
|
+
_signAndExecutePremintV2(creatorPrivateKey, minter, 0, "test comment");
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function _chainSupportsPremintV2(string memory chainName) private pure returns (bool) {
|
|
118
|
+
// for now we know that only goerli and sepolia have v2 premint deployed
|
|
119
|
+
return (equals(chainName, "zora_sepolia") || equals(chainName, "zora_goerli"));
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function _signAndExecutePremintLegacy(
|
|
57
123
|
uint256 privateKey,
|
|
58
|
-
uint256 chainId,
|
|
59
124
|
address executor,
|
|
60
125
|
uint256 quantityToMint,
|
|
61
126
|
string memory comment
|
|
62
127
|
) private returns (uint256 newTokenId) {
|
|
63
|
-
bytes memory signature =
|
|
128
|
+
bytes memory signature = _signPremintV1(preminter.getContractAddress(contractConfig), privateKey, block.chainid);
|
|
64
129
|
|
|
65
130
|
uint256 mintCost = mintFeeAmount * quantityToMint;
|
|
66
131
|
vm.deal(executor, mintCost);
|
|
@@ -70,12 +135,24 @@ contract ZoraCreator1155PreminterForkTest is ForkDeploymentConfig, Test {
|
|
|
70
135
|
newTokenId = preminter.premint{value: mintCost}(contractConfig, premintConfig, signature, quantityToMint, comment);
|
|
71
136
|
}
|
|
72
137
|
|
|
73
|
-
function
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
uint256
|
|
77
|
-
|
|
78
|
-
|
|
138
|
+
function _signAndExecutePremintV1(uint256 privateKey, address executor, uint256 quantityToMint, string memory comment) private {
|
|
139
|
+
bytes memory signature = _signPremintV1(preminter.getContractAddress(contractConfig), privateKey, block.chainid);
|
|
140
|
+
|
|
141
|
+
uint256 mintCost = mintFeeAmount * quantityToMint;
|
|
142
|
+
vm.deal(executor, mintCost);
|
|
143
|
+
|
|
144
|
+
// now call the premint function, using the same config that was used to generate the digest, and the signature
|
|
145
|
+
vm.prank(executor);
|
|
146
|
+
preminter.premintV1{value: mintCost}(
|
|
147
|
+
contractConfig,
|
|
148
|
+
premintConfig,
|
|
149
|
+
signature,
|
|
150
|
+
quantityToMint,
|
|
151
|
+
IZoraCreator1155PremintExecutor.MintArguments({mintRecipient: executor, mintComment: comment, mintRewardsRecipients: new address[](0)})
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function _signPremintV1(address contractAddress, uint256 privateKey, uint256 chainId) private view returns (bytes memory) {
|
|
79
156
|
bytes32 digest = ZoraCreator1155Attribution.premintHashedTypeDataV4(
|
|
80
157
|
ZoraCreator1155Attribution.hashPremint(premintConfig),
|
|
81
158
|
contractAddress,
|
|
@@ -88,6 +165,36 @@ contract ZoraCreator1155PreminterForkTest is ForkDeploymentConfig, Test {
|
|
|
88
165
|
return _sign(privateKey, digest);
|
|
89
166
|
}
|
|
90
167
|
|
|
168
|
+
function _signAndExecutePremintV2(uint256 privateKey, address executor, uint256 quantityToMint, string memory comment) private {
|
|
169
|
+
bytes memory signature = _signPremintV2(preminter.getContractAddress(contractConfig), privateKey, block.chainid);
|
|
170
|
+
|
|
171
|
+
uint256 mintCost = mintFeeAmount * quantityToMint;
|
|
172
|
+
vm.deal(executor, mintCost);
|
|
173
|
+
|
|
174
|
+
// now call the premint function, using the same config that was used to generate the digest, and the signature
|
|
175
|
+
vm.prank(executor);
|
|
176
|
+
preminter.premintV2{value: mintCost}(
|
|
177
|
+
contractConfig,
|
|
178
|
+
premintConfigV2,
|
|
179
|
+
signature,
|
|
180
|
+
quantityToMint,
|
|
181
|
+
IZoraCreator1155PremintExecutor.MintArguments({mintRecipient: executor, mintComment: comment, mintRewardsRecipients: new address[](0)})
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function _signPremintV2(address contractAddress, uint256 privateKey, uint256 chainId) private view returns (bytes memory) {
|
|
186
|
+
bytes32 digest = ZoraCreator1155Attribution.premintHashedTypeDataV4(
|
|
187
|
+
ZoraCreator1155Attribution.hashPremint(premintConfigV2),
|
|
188
|
+
contractAddress,
|
|
189
|
+
ZoraCreator1155Attribution.HASHED_VERSION_2,
|
|
190
|
+
chainId
|
|
191
|
+
);
|
|
192
|
+
|
|
193
|
+
// 3. Sign the digest
|
|
194
|
+
// create a signature with the digest for the params
|
|
195
|
+
return _sign(privateKey, digest);
|
|
196
|
+
}
|
|
197
|
+
|
|
91
198
|
function _sign(uint256 privateKey, bytes32 digest) private pure returns (bytes memory) {
|
|
92
199
|
// sign the message
|
|
93
200
|
(uint8 v, bytes32 r, bytes32 s) = vm.sign(privateKey, digest);
|
package/tsconfig.json
CHANGED
|
@@ -1,23 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
"extends": "zoralabs-tsconfig/tsconfig.json",
|
|
2
3
|
"compilerOptions": {
|
|
3
|
-
"allowJs": true,
|
|
4
4
|
"baseUrl": ".",
|
|
5
|
-
"downlevelIteration": true,
|
|
6
|
-
"esModuleInterop": true,
|
|
7
|
-
"isolatedModules": true,
|
|
8
|
-
"lib": ["es2021"],
|
|
9
|
-
"module": "esnext",
|
|
10
|
-
"moduleResolution": "node",
|
|
11
|
-
"noImplicitAny": true,
|
|
12
|
-
"noUncheckedIndexedAccess": true,
|
|
13
|
-
"noUnusedLocals": true,
|
|
14
|
-
"noUnusedParameters": true,
|
|
15
|
-
"resolveJsonModule": true,
|
|
16
|
-
"skipLibCheck": true,
|
|
17
|
-
"strict": true,
|
|
18
|
-
"strictNullChecks": true,
|
|
19
|
-
"target": "es2021",
|
|
20
|
-
"types": ["node"],
|
|
21
5
|
"outDir": "dist"
|
|
22
6
|
},
|
|
23
7
|
"exclude": ["node_modules/**", "dist/**"],
|