@zoralabs/protocol-sdk 0.5.15 → 0.5.16

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.
@@ -1,21 +1,17 @@
1
- import type { Account, Address, Chain, Hex, PublicClient, TransactionReceipt, WalletClient } from "viem";
1
+ import type { Account, Address, Chain, Hex, SimulateContractParameters, TransactionReceipt, TypedDataDefinition, WalletClient } from "viem";
2
2
  import { zoraCreator1155PremintExecutorImplABI } from "@zoralabs/protocol-deployments";
3
- import { PremintConfigVersion, ContractCreationConfig, TokenConfigForVersion, TokenCreationConfigV1, TokenCreationConfigV2, TokenCreationConfig, PremintConfigForVersion } from "@zoralabs/protocol-deployments";
3
+ import { PremintConfigVersion, ContractCreationConfig, TokenConfigForVersion, TokenCreationConfigV1, TokenCreationConfigV2, TokenCreationConfig, PremintConfigForVersion, PremintConfigWithVersion } from "@zoralabs/protocol-deployments";
4
4
  import { PremintAPIClient } from "./premint-api-client";
5
5
  import type { DecodeEventLogReturnType } from "viem";
6
6
  import { IHttpClient } from "src/apis/http-api-base";
7
7
  import { MintCosts } from "src/mint/mint-client";
8
+ import { ClientConfig, PublicClient } from "src/utils";
8
9
  type PremintedV2LogType = DecodeEventLogReturnType<typeof zoraCreator1155PremintExecutorImplABI, "PremintedV2">["args"];
9
10
  type URLSReturnType = {
10
11
  explorer: null | string;
11
12
  zoraCollect: null | string;
12
13
  zoraManage: null | string;
13
14
  };
14
- type SignedPremintResponse = {
15
- urls: URLSReturnType;
16
- uid: number;
17
- verifyingContract: Address;
18
- };
19
15
  export declare const defaultTokenConfigV1MintArguments: () => Omit<TokenCreationConfigV1, "fixedPriceMinter" | "tokenURI" | "royaltyRecipient">;
20
16
  export declare const defaultTokenConfigV2MintArguments: () => Omit<TokenCreationConfigV2, "fixedPriceMinter" | "tokenURI" | "payoutRecipient" | "createReferral">;
21
17
  /**
@@ -27,13 +23,12 @@ export declare const defaultTokenConfigV2MintArguments: () => Omit<TokenCreation
27
23
  export declare function getPremintedLogFromReceipt(receipt: TransactionReceipt): PremintedV2LogType | undefined;
28
24
  /**
29
25
  * Preminter API to access ZORA Premint functionality.
30
- * Currently only supports V1 premints.
31
26
  */
32
27
  declare class PremintClient {
33
28
  readonly apiClient: PremintAPIClient;
34
29
  readonly publicClient: PublicClient;
35
30
  readonly chain: Chain;
36
- constructor(chain: Chain, publicClient?: PublicClient, httpClient?: IHttpClient);
31
+ constructor(chain: Chain, publicClient: PublicClient, httpClient: IHttpClient);
37
32
  getDataFromPremintReceipt(receipt: TransactionReceipt): {
38
33
  premintedLog: {
39
34
  contractAddress: `0x${string}`;
@@ -46,80 +41,26 @@ declare class PremintClient {
46
41
  urls: URLSReturnType;
47
42
  };
48
43
  /**
49
- * Update existing premint given collection address and UID of existing premint.
50
- *
51
- * 1. Loads existing premint token
52
- * 2. Updates with settings passed into function
53
- * 3. Increments the version field
54
- * 4. Re-signs the premint
55
- * 5. Uploads the premint to the ZORA API
56
- *
57
- * Updates existing premint
58
- * @param settings Settings for the new premint
59
- * @param settings.account Account to sign the premint update from. Taken from walletClient if none passed in.
60
- * @param settings.collection Collection information for the mint
61
- * @param settings.walletClient viem wallet client to use to sign
62
- * @param settings.uid UID
63
- * @param settings.token Mint argument settings, optional settings are overridden with sensible defaults.
64
- *
65
- */
66
- updatePremint({ walletClient, uid, collection, account, tokenConfigUpdates, }: {
67
- walletClient: WalletClient;
68
- uid: number;
69
- account?: Account | Address;
70
- collection: Address;
71
- tokenConfigUpdates: Partial<TokenCreationConfig>;
72
- }): Promise<SignedPremintResponse>;
73
- /**
74
- * Delete premint.
75
- *
76
- * 1. Loads current premint from collection address with UID
77
- * 2. Increments version and marks as deleted
78
- * 3. Signs new premint version
79
- * 4. Sends to ZORA Premint API
80
- *
81
- * Deletes existing premint
82
- * @param settings.collection collection address
83
- * @param settings.uid UID
84
- * @param settings.walletClient viem wallet client to use to sign
44
+ * Prepares data for updating a premint
85
45
  *
46
+ * @param parameters - Parameters for updating the premint {@link UpdatePremintParams}
47
+ * @returns A PremintReturn. {@link PremintReturn}
86
48
  */
87
- deletePremint({ walletClient, uid, account, collection, }: {
88
- walletClient: WalletClient;
89
- uid: number;
90
- account?: Account | Address;
91
- collection: Address;
92
- }): Promise<SignedPremintResponse>;
49
+ updatePremint(args: UpdatePremintParams): Promise<PremintReturn<any>>;
93
50
  /**
94
- * Internal function to sign and submit a premint request.
51
+ * Prepares data for deleting a premint
95
52
  *
96
- * @param premintArguments Arguments to premint
97
- * @returns
53
+ * @param parameters - Parameters for deleting the premint {@link DeletePremintParams}
54
+ * @returns A PremintReturn. {@link PremintReturn}
98
55
  */
99
- private signAndSubmitPremint;
56
+ deletePremint(params: DeletePremintParams): Promise<PremintReturn<any>>;
100
57
  /**
101
- * Create premint
58
+ * Prepares data for creating a premint
102
59
  *
103
- * @param settings Settings for the new premint
104
- * @param settings.account Account to sign the premint with. Taken from walletClient if none passed in.
105
- * @param settings.collection Collection information for the mint
106
- * @param settings.tokenCreationConfig Mint argument settings, optional settings are overridden with sensible defaults.
107
- * @param setings.premintConfigVersion Premint config version to use, defaults to V2
108
- * @param settings.uid the UID to use – optional and retrieved as a fresh UID from ZORA by default.
109
- * @param settings.checkSignature if the signature should have a pre-flight check. Not required but helpful for debugging.
110
- * @returns premint url, uid, newContractAddress, and premint object
60
+ * @param parameters - Parameters for creating the premint {@link CreatePremintParameters}
61
+ * @returns A PremintReturn. {@link PremintReturn}
111
62
  */
112
- createPremint<T extends PremintConfigVersion = PremintConfigVersion.V2>({ creatorAccount, collection, tokenCreationConfig, premintConfigVersion, walletClient, uid, checkSignature, }: {
113
- creatorAccount: Address | Account;
114
- checkSignature?: boolean;
115
- walletClient: WalletClient;
116
- collection: ContractCreationConfig;
117
- tokenCreationConfig: Partial<TokenConfigForVersion<T>> & {
118
- tokenURI: string;
119
- };
120
- premintConfigVersion?: T;
121
- uid?: number;
122
- }): Promise<SignedPremintResponse>;
63
+ createPremint<T extends PremintConfigVersion = PremintConfigVersion.V2>(parameters: CreatePremintParameters<T>): Promise<PremintReturn<any>>;
123
64
  /**
124
65
  * Fetches given premint data from the ZORA API.
125
66
  *
@@ -171,29 +112,13 @@ declare class PremintClient {
171
112
  pricePerToken: bigint;
172
113
  }): Promise<MintCosts>;
173
114
  /**
174
- * Execute premint on-chain
115
+ * Prepares the parameters to collect a premint; it brings the contract and token onchain, then collects
116
+ * tokens on that contract for the mint recipient.
175
117
  *
176
- * @param settings.data Data from the API for the mint
177
- * @param settings.account Optional account (if omitted taken from wallet client) for the account executing the premint.
178
- * @param settings.walletClient WalletClient to send execution from.
179
- * @param settings.mintArguments User minting arguments.
180
- * @param settings.mintArguments.quantityToMint Quantity to mint, optional, defaults to 1.
181
- * @param settings.mintArguments.mintComment Optional mint comment, optional, omits when not included.
182
- * @param settings.publicClient Optional public client for preflight checks.
118
+ * @param parameters - Parameters for collecting the Premint {@link MakeMintParametersArguments}
183
119
  * @returns receipt, log, zoraURL
184
120
  */
185
- makeMintParameters({ uid, tokenContract, minterAccount, mintArguments, }: {
186
- uid: number;
187
- tokenContract: Address;
188
- minterAccount: Account | Address;
189
- mintArguments?: {
190
- quantityToMint: number;
191
- mintComment?: string;
192
- mintReferral?: Address;
193
- platformReferral?: Address;
194
- mintRecipient?: Address;
195
- };
196
- }): Promise<import("viem").SimulateContractParameters<readonly [{
121
+ makeMintParameters(parameters: MakeMintParametersArguments): Promise<SimulateContractParameters<readonly [{
197
122
  readonly stateMutability: "nonpayable";
198
123
  readonly type: "constructor";
199
124
  readonly inputs: readonly [{
@@ -1540,1377 +1465,98 @@ declare class PremintClient {
1540
1465
  readonly type: "error";
1541
1466
  readonly inputs: readonly [];
1542
1467
  readonly name: "premintSignerContractNotAContract";
1543
- }], "premintV1", [{
1544
- contractAdmin: `0x${string}`;
1545
- contractURI: string;
1546
- contractName: string;
1547
- additionalAdmins: readonly `0x${string}`[];
1548
- }, import("@zoralabs/protocol-deployments").PremintConfigV1, `0x${string}`, bigint, {
1549
- mintRecipient: `0x${string}`;
1550
- mintComment: string;
1551
- mintRewardsRecipients: readonly `0x${string}`[];
1552
- }], Chain, Chain | undefined, `0x${string}` | import("viem").JsonRpcAccount<`0x${string}`> | import("viem").LocalAccount<string, `0x${string}`>> | import("viem").SimulateContractParameters<readonly [{
1553
- readonly stateMutability: "nonpayable";
1554
- readonly type: "constructor";
1555
- readonly inputs: readonly [{
1556
- readonly name: "_factory";
1557
- readonly internalType: "contract IZoraCreator1155Factory";
1558
- readonly type: "address";
1559
- }];
1560
- }, {
1561
- readonly stateMutability: "nonpayable";
1562
- readonly type: "function";
1563
- readonly inputs: readonly [];
1564
- readonly name: "acceptOwnership";
1565
- readonly outputs: readonly [];
1566
- }, {
1567
- readonly stateMutability: "nonpayable";
1568
- readonly type: "function";
1569
- readonly inputs: readonly [];
1570
- readonly name: "cancelOwnershipTransfer";
1571
- readonly outputs: readonly [];
1572
- }, {
1573
- readonly stateMutability: "pure";
1574
- readonly type: "function";
1575
- readonly inputs: readonly [];
1576
- readonly name: "contractName";
1577
- readonly outputs: readonly [{
1578
- readonly name: "";
1579
- readonly internalType: "string";
1580
- readonly type: "string";
1581
- }];
1582
- }, {
1583
- readonly stateMutability: "pure";
1584
- readonly type: "function";
1585
- readonly inputs: readonly [];
1586
- readonly name: "contractVersion";
1587
- readonly outputs: readonly [{
1588
- readonly name: "";
1589
- readonly internalType: "string";
1590
- readonly type: "string";
1591
- }];
1592
- }, {
1593
- readonly stateMutability: "view";
1594
- readonly type: "function";
1595
- readonly inputs: readonly [{
1596
- readonly name: "contractConfig";
1597
- readonly internalType: "struct ContractCreationConfig";
1598
- readonly type: "tuple";
1599
- readonly components: readonly [{
1600
- readonly name: "contractAdmin";
1601
- readonly internalType: "address";
1602
- readonly type: "address";
1603
- }, {
1604
- readonly name: "contractURI";
1605
- readonly internalType: "string";
1606
- readonly type: "string";
1607
- }, {
1608
- readonly name: "contractName";
1609
- readonly internalType: "string";
1610
- readonly type: "string";
1611
- }];
1612
- }];
1613
- readonly name: "getContractAddress";
1614
- readonly outputs: readonly [{
1615
- readonly name: "";
1616
- readonly internalType: "address";
1617
- readonly type: "address";
1618
- }];
1619
- }, {
1620
- readonly stateMutability: "view";
1621
- readonly type: "function";
1622
- readonly inputs: readonly [{
1623
- readonly name: "contractConfig";
1624
- readonly internalType: "struct ContractWithAdditionalAdminsCreationConfig";
1625
- readonly type: "tuple";
1626
- readonly components: readonly [{
1627
- readonly name: "contractAdmin";
1628
- readonly internalType: "address";
1629
- readonly type: "address";
1630
- }, {
1631
- readonly name: "contractURI";
1632
- readonly internalType: "string";
1633
- readonly type: "string";
1634
- }, {
1635
- readonly name: "contractName";
1636
- readonly internalType: "string";
1637
- readonly type: "string";
1638
- }, {
1639
- readonly name: "additionalAdmins";
1640
- readonly internalType: "address[]";
1641
- readonly type: "address[]";
1642
- }];
1643
- }];
1644
- readonly name: "getContractWithAdditionalAdminsAddress";
1645
- readonly outputs: readonly [{
1646
- readonly name: "";
1647
- readonly internalType: "address";
1648
- readonly type: "address";
1649
- }];
1650
- }, {
1651
- readonly stateMutability: "view";
1652
- readonly type: "function";
1653
- readonly inputs: readonly [];
1654
- readonly name: "implementation";
1655
- readonly outputs: readonly [{
1656
- readonly name: "";
1657
- readonly internalType: "address";
1658
- readonly type: "address";
1659
- }];
1660
- }, {
1661
- readonly stateMutability: "nonpayable";
1662
- readonly type: "function";
1663
- readonly inputs: readonly [{
1664
- readonly name: "_initialOwner";
1665
- readonly internalType: "address";
1666
- readonly type: "address";
1667
- }];
1668
- readonly name: "initialize";
1669
- readonly outputs: readonly [];
1670
- }, {
1671
- readonly stateMutability: "view";
1672
- readonly type: "function";
1673
- readonly inputs: readonly [{
1674
- readonly name: "signer";
1675
- readonly internalType: "address";
1676
- readonly type: "address";
1677
- }, {
1678
- readonly name: "premintContractConfigContractAdmin";
1679
- readonly internalType: "address";
1680
- readonly type: "address";
1681
- }, {
1682
- readonly name: "contractAddress";
1683
- readonly internalType: "address";
1684
- readonly type: "address";
1685
- }];
1686
- readonly name: "isAuthorizedToCreatePremint";
1687
- readonly outputs: readonly [{
1688
- readonly name: "isAuthorized";
1689
- readonly internalType: "bool";
1690
- readonly type: "bool";
1691
- }];
1692
- }, {
1693
- readonly stateMutability: "view";
1694
- readonly type: "function";
1695
- readonly inputs: readonly [{
1696
- readonly name: "signer";
1697
- readonly internalType: "address";
1698
- readonly type: "address";
1699
- }, {
1700
- readonly name: "premintContractConfigContractAdmin";
1701
- readonly internalType: "address";
1702
- readonly type: "address";
1703
- }, {
1704
- readonly name: "contractAddress";
1705
- readonly internalType: "address";
1706
- readonly type: "address";
1707
- }, {
1708
- readonly name: "additionalAdmins";
1709
- readonly internalType: "address[]";
1710
- readonly type: "address[]";
1711
- }];
1712
- readonly name: "isAuthorizedToCreatePremintWithAdditionalAdmins";
1713
- readonly outputs: readonly [{
1714
- readonly name: "isAuthorized";
1715
- readonly internalType: "bool";
1716
- readonly type: "bool";
1717
- }];
1718
- }, {
1719
- readonly stateMutability: "view";
1720
- readonly type: "function";
1721
- readonly inputs: readonly [{
1722
- readonly name: "contractConfig";
1723
- readonly internalType: "struct ContractCreationConfig";
1724
- readonly type: "tuple";
1725
- readonly components: readonly [{
1726
- readonly name: "contractAdmin";
1727
- readonly internalType: "address";
1728
- readonly type: "address";
1729
- }, {
1730
- readonly name: "contractURI";
1731
- readonly internalType: "string";
1732
- readonly type: "string";
1733
- }, {
1734
- readonly name: "contractName";
1735
- readonly internalType: "string";
1736
- readonly type: "string";
1737
- }];
1738
- }, {
1739
- readonly name: "premintConfig";
1740
- readonly internalType: "struct PremintConfig";
1741
- readonly type: "tuple";
1742
- readonly components: readonly [{
1743
- readonly name: "tokenConfig";
1744
- readonly internalType: "struct TokenCreationConfig";
1745
- readonly type: "tuple";
1746
- readonly components: readonly [{
1747
- readonly name: "tokenURI";
1748
- readonly internalType: "string";
1749
- readonly type: "string";
1750
- }, {
1751
- readonly name: "maxSupply";
1752
- readonly internalType: "uint256";
1753
- readonly type: "uint256";
1754
- }, {
1755
- readonly name: "maxTokensPerAddress";
1756
- readonly internalType: "uint64";
1757
- readonly type: "uint64";
1758
- }, {
1759
- readonly name: "pricePerToken";
1760
- readonly internalType: "uint96";
1761
- readonly type: "uint96";
1762
- }, {
1763
- readonly name: "mintStart";
1764
- readonly internalType: "uint64";
1765
- readonly type: "uint64";
1766
- }, {
1767
- readonly name: "mintDuration";
1768
- readonly internalType: "uint64";
1769
- readonly type: "uint64";
1770
- }, {
1771
- readonly name: "royaltyMintSchedule";
1772
- readonly internalType: "uint32";
1773
- readonly type: "uint32";
1774
- }, {
1775
- readonly name: "royaltyBPS";
1776
- readonly internalType: "uint32";
1777
- readonly type: "uint32";
1778
- }, {
1779
- readonly name: "royaltyRecipient";
1780
- readonly internalType: "address";
1781
- readonly type: "address";
1782
- }, {
1783
- readonly name: "fixedPriceMinter";
1784
- readonly internalType: "address";
1785
- readonly type: "address";
1786
- }];
1787
- }, {
1788
- readonly name: "uid";
1789
- readonly internalType: "uint32";
1790
- readonly type: "uint32";
1791
- }, {
1792
- readonly name: "version";
1793
- readonly internalType: "uint32";
1794
- readonly type: "uint32";
1795
- }, {
1796
- readonly name: "deleted";
1797
- readonly internalType: "bool";
1798
- readonly type: "bool";
1799
- }];
1800
- }, {
1801
- readonly name: "signature";
1802
- readonly internalType: "bytes";
1803
- readonly type: "bytes";
1804
- }];
1805
- readonly name: "isValidSignature";
1806
- readonly outputs: readonly [{
1807
- readonly name: "isValid";
1808
- readonly internalType: "bool";
1809
- readonly type: "bool";
1810
- }, {
1811
- readonly name: "contractAddress";
1812
- readonly internalType: "address";
1813
- readonly type: "address";
1814
- }, {
1815
- readonly name: "recoveredSigner";
1816
- readonly internalType: "address";
1817
- readonly type: "address";
1818
- }];
1819
- }, {
1820
- readonly stateMutability: "view";
1821
- readonly type: "function";
1822
- readonly inputs: readonly [{
1823
- readonly name: "collectionAddress";
1824
- readonly internalType: "address";
1825
- readonly type: "address";
1826
- }];
1827
- readonly name: "mintFee";
1828
- readonly outputs: readonly [{
1829
- readonly name: "";
1830
- readonly internalType: "uint256";
1831
- readonly type: "uint256";
1832
- }];
1833
- }, {
1834
- readonly stateMutability: "view";
1835
- readonly type: "function";
1836
- readonly inputs: readonly [];
1837
- readonly name: "owner";
1838
- readonly outputs: readonly [{
1839
- readonly name: "";
1840
- readonly internalType: "address";
1841
- readonly type: "address";
1842
- }];
1843
- }, {
1844
- readonly stateMutability: "view";
1845
- readonly type: "function";
1846
- readonly inputs: readonly [];
1847
- readonly name: "pendingOwner";
1848
- readonly outputs: readonly [{
1849
- readonly name: "";
1850
- readonly internalType: "address";
1851
- readonly type: "address";
1852
- }];
1853
- }, {
1854
- readonly stateMutability: "payable";
1855
- readonly type: "function";
1856
- readonly inputs: readonly [{
1857
- readonly name: "contractConfig";
1858
- readonly internalType: "struct ContractWithAdditionalAdminsCreationConfig";
1859
- readonly type: "tuple";
1860
- readonly components: readonly [{
1861
- readonly name: "contractAdmin";
1862
- readonly internalType: "address";
1863
- readonly type: "address";
1864
- }, {
1865
- readonly name: "contractURI";
1866
- readonly internalType: "string";
1867
- readonly type: "string";
1868
- }, {
1869
- readonly name: "contractName";
1870
- readonly internalType: "string";
1871
- readonly type: "string";
1872
- }, {
1873
- readonly name: "additionalAdmins";
1874
- readonly internalType: "address[]";
1875
- readonly type: "address[]";
1876
- }];
1877
- }, {
1878
- readonly name: "premintCollection";
1879
- readonly internalType: "address";
1880
- readonly type: "address";
1881
- }, {
1882
- readonly name: "encodedPremintConfig";
1883
- readonly internalType: "struct PremintConfigEncoded";
1884
- readonly type: "tuple";
1885
- readonly components: readonly [{
1886
- readonly name: "uid";
1887
- readonly internalType: "uint32";
1888
- readonly type: "uint32";
1889
- }, {
1890
- readonly name: "version";
1891
- readonly internalType: "uint32";
1892
- readonly type: "uint32";
1893
- }, {
1894
- readonly name: "deleted";
1895
- readonly internalType: "bool";
1896
- readonly type: "bool";
1897
- }, {
1898
- readonly name: "tokenConfig";
1899
- readonly internalType: "bytes";
1900
- readonly type: "bytes";
1901
- }, {
1902
- readonly name: "premintConfigVersion";
1903
- readonly internalType: "bytes32";
1904
- readonly type: "bytes32";
1905
- }];
1906
- }, {
1907
- readonly name: "signature";
1908
- readonly internalType: "bytes";
1909
- readonly type: "bytes";
1910
- }, {
1911
- readonly name: "quantityToMint";
1912
- readonly internalType: "uint256";
1913
- readonly type: "uint256";
1914
- }, {
1915
- readonly name: "mintArguments";
1916
- readonly internalType: "struct MintArguments";
1917
- readonly type: "tuple";
1918
- readonly components: readonly [{
1919
- readonly name: "mintRecipient";
1920
- readonly internalType: "address";
1921
- readonly type: "address";
1922
- }, {
1923
- readonly name: "mintComment";
1924
- readonly internalType: "string";
1925
- readonly type: "string";
1926
- }, {
1927
- readonly name: "mintRewardsRecipients";
1928
- readonly internalType: "address[]";
1929
- readonly type: "address[]";
1930
- }];
1931
- }, {
1932
- readonly name: "firstMinter";
1933
- readonly internalType: "address";
1934
- readonly type: "address";
1935
- }, {
1936
- readonly name: "signerContract";
1937
- readonly internalType: "address";
1938
- readonly type: "address";
1939
- }];
1940
- readonly name: "premint";
1941
- readonly outputs: readonly [{
1942
- readonly name: "premintResult";
1943
- readonly internalType: "struct PremintResult";
1944
- readonly type: "tuple";
1945
- readonly components: readonly [{
1946
- readonly name: "contractAddress";
1947
- readonly internalType: "address";
1948
- readonly type: "address";
1949
- }, {
1950
- readonly name: "tokenId";
1951
- readonly internalType: "uint256";
1952
- readonly type: "uint256";
1953
- }, {
1954
- readonly name: "createdNewContract";
1955
- readonly internalType: "bool";
1956
- readonly type: "bool";
1957
- }];
1958
- }];
1959
- }, {
1960
- readonly stateMutability: "view";
1961
- readonly type: "function";
1962
- readonly inputs: readonly [{
1963
- readonly name: "contractAddress";
1964
- readonly internalType: "address";
1965
- readonly type: "address";
1966
- }, {
1967
- readonly name: "uid";
1968
- readonly internalType: "uint32";
1969
- readonly type: "uint32";
1970
- }];
1971
- readonly name: "premintStatus";
1972
- readonly outputs: readonly [{
1973
- readonly name: "contractCreated";
1974
- readonly internalType: "bool";
1975
- readonly type: "bool";
1976
- }, {
1977
- readonly name: "tokenIdForPremint";
1978
- readonly internalType: "uint256";
1979
- readonly type: "uint256";
1980
- }];
1981
- }, {
1982
- readonly stateMutability: "payable";
1983
- readonly type: "function";
1984
- readonly inputs: readonly [{
1985
- readonly name: "contractConfig";
1986
- readonly internalType: "struct ContractCreationConfig";
1987
- readonly type: "tuple";
1988
- readonly components: readonly [{
1989
- readonly name: "contractAdmin";
1990
- readonly internalType: "address";
1991
- readonly type: "address";
1992
- }, {
1993
- readonly name: "contractURI";
1994
- readonly internalType: "string";
1995
- readonly type: "string";
1996
- }, {
1997
- readonly name: "contractName";
1998
- readonly internalType: "string";
1999
- readonly type: "string";
2000
- }];
2001
- }, {
2002
- readonly name: "premintConfig";
2003
- readonly internalType: "struct PremintConfig";
2004
- readonly type: "tuple";
2005
- readonly components: readonly [{
2006
- readonly name: "tokenConfig";
2007
- readonly internalType: "struct TokenCreationConfig";
2008
- readonly type: "tuple";
2009
- readonly components: readonly [{
2010
- readonly name: "tokenURI";
2011
- readonly internalType: "string";
2012
- readonly type: "string";
2013
- }, {
2014
- readonly name: "maxSupply";
2015
- readonly internalType: "uint256";
2016
- readonly type: "uint256";
2017
- }, {
2018
- readonly name: "maxTokensPerAddress";
2019
- readonly internalType: "uint64";
2020
- readonly type: "uint64";
2021
- }, {
2022
- readonly name: "pricePerToken";
2023
- readonly internalType: "uint96";
2024
- readonly type: "uint96";
2025
- }, {
2026
- readonly name: "mintStart";
2027
- readonly internalType: "uint64";
2028
- readonly type: "uint64";
2029
- }, {
2030
- readonly name: "mintDuration";
2031
- readonly internalType: "uint64";
2032
- readonly type: "uint64";
2033
- }, {
2034
- readonly name: "royaltyMintSchedule";
2035
- readonly internalType: "uint32";
2036
- readonly type: "uint32";
2037
- }, {
2038
- readonly name: "royaltyBPS";
2039
- readonly internalType: "uint32";
2040
- readonly type: "uint32";
2041
- }, {
2042
- readonly name: "royaltyRecipient";
2043
- readonly internalType: "address";
2044
- readonly type: "address";
2045
- }, {
2046
- readonly name: "fixedPriceMinter";
2047
- readonly internalType: "address";
2048
- readonly type: "address";
2049
- }];
2050
- }, {
2051
- readonly name: "uid";
2052
- readonly internalType: "uint32";
2053
- readonly type: "uint32";
2054
- }, {
2055
- readonly name: "version";
2056
- readonly internalType: "uint32";
2057
- readonly type: "uint32";
2058
- }, {
2059
- readonly name: "deleted";
2060
- readonly internalType: "bool";
2061
- readonly type: "bool";
2062
- }];
2063
- }, {
2064
- readonly name: "signature";
2065
- readonly internalType: "bytes";
2066
- readonly type: "bytes";
2067
- }, {
2068
- readonly name: "quantityToMint";
2069
- readonly internalType: "uint256";
2070
- readonly type: "uint256";
2071
- }, {
2072
- readonly name: "mintArguments";
2073
- readonly internalType: "struct MintArguments";
2074
- readonly type: "tuple";
2075
- readonly components: readonly [{
2076
- readonly name: "mintRecipient";
2077
- readonly internalType: "address";
2078
- readonly type: "address";
2079
- }, {
2080
- readonly name: "mintComment";
2081
- readonly internalType: "string";
2082
- readonly type: "string";
2083
- }, {
2084
- readonly name: "mintRewardsRecipients";
2085
- readonly internalType: "address[]";
2086
- readonly type: "address[]";
2087
- }];
2088
- }];
2089
- readonly name: "premintV1";
2090
- readonly outputs: readonly [{
2091
- readonly name: "";
2092
- readonly internalType: "struct PremintResult";
2093
- readonly type: "tuple";
2094
- readonly components: readonly [{
2095
- readonly name: "contractAddress";
2096
- readonly internalType: "address";
2097
- readonly type: "address";
2098
- }, {
2099
- readonly name: "tokenId";
2100
- readonly internalType: "uint256";
2101
- readonly type: "uint256";
2102
- }, {
2103
- readonly name: "createdNewContract";
2104
- readonly internalType: "bool";
2105
- readonly type: "bool";
2106
- }];
2107
- }];
2108
- }, {
2109
- readonly stateMutability: "payable";
2110
- readonly type: "function";
2111
- readonly inputs: readonly [{
2112
- readonly name: "contractConfig";
2113
- readonly internalType: "struct ContractCreationConfig";
2114
- readonly type: "tuple";
2115
- readonly components: readonly [{
2116
- readonly name: "contractAdmin";
2117
- readonly internalType: "address";
2118
- readonly type: "address";
2119
- }, {
2120
- readonly name: "contractURI";
2121
- readonly internalType: "string";
2122
- readonly type: "string";
2123
- }, {
2124
- readonly name: "contractName";
2125
- readonly internalType: "string";
2126
- readonly type: "string";
2127
- }];
2128
- }, {
2129
- readonly name: "premintConfig";
2130
- readonly internalType: "struct PremintConfigV2";
2131
- readonly type: "tuple";
2132
- readonly components: readonly [{
2133
- readonly name: "tokenConfig";
2134
- readonly internalType: "struct TokenCreationConfigV2";
2135
- readonly type: "tuple";
2136
- readonly components: readonly [{
2137
- readonly name: "tokenURI";
2138
- readonly internalType: "string";
2139
- readonly type: "string";
2140
- }, {
2141
- readonly name: "maxSupply";
2142
- readonly internalType: "uint256";
2143
- readonly type: "uint256";
2144
- }, {
2145
- readonly name: "maxTokensPerAddress";
2146
- readonly internalType: "uint64";
2147
- readonly type: "uint64";
2148
- }, {
2149
- readonly name: "pricePerToken";
2150
- readonly internalType: "uint96";
2151
- readonly type: "uint96";
2152
- }, {
2153
- readonly name: "mintStart";
2154
- readonly internalType: "uint64";
2155
- readonly type: "uint64";
2156
- }, {
2157
- readonly name: "mintDuration";
2158
- readonly internalType: "uint64";
2159
- readonly type: "uint64";
2160
- }, {
2161
- readonly name: "royaltyBPS";
2162
- readonly internalType: "uint32";
2163
- readonly type: "uint32";
2164
- }, {
2165
- readonly name: "payoutRecipient";
2166
- readonly internalType: "address";
2167
- readonly type: "address";
2168
- }, {
2169
- readonly name: "fixedPriceMinter";
2170
- readonly internalType: "address";
2171
- readonly type: "address";
2172
- }, {
2173
- readonly name: "createReferral";
2174
- readonly internalType: "address";
2175
- readonly type: "address";
2176
- }];
2177
- }, {
2178
- readonly name: "uid";
2179
- readonly internalType: "uint32";
2180
- readonly type: "uint32";
2181
- }, {
2182
- readonly name: "version";
2183
- readonly internalType: "uint32";
2184
- readonly type: "uint32";
2185
- }, {
2186
- readonly name: "deleted";
2187
- readonly internalType: "bool";
2188
- readonly type: "bool";
2189
- }];
2190
- }, {
2191
- readonly name: "signature";
2192
- readonly internalType: "bytes";
2193
- readonly type: "bytes";
2194
- }, {
2195
- readonly name: "quantityToMint";
2196
- readonly internalType: "uint256";
2197
- readonly type: "uint256";
2198
- }, {
2199
- readonly name: "mintArguments";
2200
- readonly internalType: "struct MintArguments";
2201
- readonly type: "tuple";
2202
- readonly components: readonly [{
2203
- readonly name: "mintRecipient";
2204
- readonly internalType: "address";
2205
- readonly type: "address";
2206
- }, {
2207
- readonly name: "mintComment";
2208
- readonly internalType: "string";
2209
- readonly type: "string";
2210
- }, {
2211
- readonly name: "mintRewardsRecipients";
2212
- readonly internalType: "address[]";
2213
- readonly type: "address[]";
2214
- }];
2215
- }];
2216
- readonly name: "premintV2";
2217
- readonly outputs: readonly [{
2218
- readonly name: "";
2219
- readonly internalType: "struct PremintResult";
2220
- readonly type: "tuple";
2221
- readonly components: readonly [{
2222
- readonly name: "contractAddress";
2223
- readonly internalType: "address";
2224
- readonly type: "address";
2225
- }, {
2226
- readonly name: "tokenId";
2227
- readonly internalType: "uint256";
2228
- readonly type: "uint256";
2229
- }, {
2230
- readonly name: "createdNewContract";
2231
- readonly internalType: "bool";
2232
- readonly type: "bool";
2233
- }];
2234
- }];
2235
- }, {
2236
- readonly stateMutability: "view";
2237
- readonly type: "function";
2238
- readonly inputs: readonly [];
2239
- readonly name: "proxiableUUID";
2240
- readonly outputs: readonly [{
2241
- readonly name: "";
2242
- readonly internalType: "bytes32";
2243
- readonly type: "bytes32";
2244
- }];
2245
- }, {
2246
- readonly stateMutability: "nonpayable";
2247
- readonly type: "function";
2248
- readonly inputs: readonly [];
2249
- readonly name: "resignOwnership";
2250
- readonly outputs: readonly [];
2251
- }, {
2252
- readonly stateMutability: "nonpayable";
2253
- readonly type: "function";
2254
- readonly inputs: readonly [{
2255
- readonly name: "_newOwner";
2256
- readonly internalType: "address";
2257
- readonly type: "address";
2258
- }];
2259
- readonly name: "safeTransferOwnership";
2260
- readonly outputs: readonly [];
2261
- }, {
2262
- readonly stateMutability: "view";
2263
- readonly type: "function";
2264
- readonly inputs: readonly [{
2265
- readonly name: "contractAddress";
2266
- readonly internalType: "address";
2267
- readonly type: "address";
2268
- }];
2269
- readonly name: "supportedPremintSignatureVersions";
2270
- readonly outputs: readonly [{
2271
- readonly name: "versions";
2272
- readonly internalType: "string[]";
2273
- readonly type: "string[]";
2274
- }];
2275
- }, {
2276
- readonly stateMutability: "nonpayable";
2277
- readonly type: "function";
2278
- readonly inputs: readonly [{
2279
- readonly name: "_newOwner";
2280
- readonly internalType: "address";
2281
- readonly type: "address";
2282
- }];
2283
- readonly name: "transferOwnership";
2284
- readonly outputs: readonly [];
2285
- }, {
2286
- readonly stateMutability: "nonpayable";
2287
- readonly type: "function";
2288
- readonly inputs: readonly [{
2289
- readonly name: "newImplementation";
2290
- readonly internalType: "address";
2291
- readonly type: "address";
2292
- }];
2293
- readonly name: "upgradeTo";
2294
- readonly outputs: readonly [];
2295
- }, {
2296
- readonly stateMutability: "payable";
2297
- readonly type: "function";
2298
- readonly inputs: readonly [{
2299
- readonly name: "newImplementation";
2300
- readonly internalType: "address";
2301
- readonly type: "address";
2302
- }, {
2303
- readonly name: "data";
2304
- readonly internalType: "bytes";
2305
- readonly type: "bytes";
2306
- }];
2307
- readonly name: "upgradeToAndCall";
2308
- readonly outputs: readonly [];
2309
- }, {
2310
- readonly stateMutability: "view";
2311
- readonly type: "function";
2312
- readonly inputs: readonly [];
2313
- readonly name: "zora1155Factory";
2314
- readonly outputs: readonly [{
2315
- readonly name: "";
2316
- readonly internalType: "contract IZoraCreator1155Factory";
2317
- readonly type: "address";
2318
- }];
2319
- }, {
2320
- readonly type: "event";
2321
- readonly anonymous: false;
2322
- readonly inputs: readonly [{
2323
- readonly name: "previousAdmin";
2324
- readonly internalType: "address";
2325
- readonly type: "address";
2326
- readonly indexed: false;
2327
- }, {
2328
- readonly name: "newAdmin";
2329
- readonly internalType: "address";
2330
- readonly type: "address";
2331
- readonly indexed: false;
2332
- }];
2333
- readonly name: "AdminChanged";
2334
- }, {
2335
- readonly type: "event";
2336
- readonly anonymous: false;
2337
- readonly inputs: readonly [{
2338
- readonly name: "beacon";
2339
- readonly internalType: "address";
2340
- readonly type: "address";
2341
- readonly indexed: true;
2342
- }];
2343
- readonly name: "BeaconUpgraded";
2344
- }, {
2345
- readonly type: "event";
2346
- readonly anonymous: false;
2347
- readonly inputs: readonly [{
2348
- readonly name: "version";
2349
- readonly internalType: "uint8";
2350
- readonly type: "uint8";
2351
- readonly indexed: false;
2352
- }];
2353
- readonly name: "Initialized";
2354
- }, {
2355
- readonly type: "event";
2356
- readonly anonymous: false;
2357
- readonly inputs: readonly [{
2358
- readonly name: "owner";
2359
- readonly internalType: "address";
2360
- readonly type: "address";
2361
- readonly indexed: true;
2362
- }, {
2363
- readonly name: "canceledOwner";
2364
- readonly internalType: "address";
2365
- readonly type: "address";
2366
- readonly indexed: true;
2367
- }];
2368
- readonly name: "OwnerCanceled";
2369
- }, {
2370
- readonly type: "event";
2371
- readonly anonymous: false;
2372
- readonly inputs: readonly [{
2373
- readonly name: "owner";
2374
- readonly internalType: "address";
2375
- readonly type: "address";
2376
- readonly indexed: true;
2377
- }, {
2378
- readonly name: "pendingOwner";
2379
- readonly internalType: "address";
2380
- readonly type: "address";
2381
- readonly indexed: true;
2382
- }];
2383
- readonly name: "OwnerPending";
2384
- }, {
2385
- readonly type: "event";
2386
- readonly anonymous: false;
2387
- readonly inputs: readonly [{
2388
- readonly name: "prevOwner";
2389
- readonly internalType: "address";
2390
- readonly type: "address";
2391
- readonly indexed: true;
2392
- }, {
2393
- readonly name: "newOwner";
2394
- readonly internalType: "address";
2395
- readonly type: "address";
2396
- readonly indexed: true;
2397
- }];
2398
- readonly name: "OwnerUpdated";
2399
- }, {
2400
- readonly type: "event";
2401
- readonly anonymous: false;
2402
- readonly inputs: readonly [{
2403
- readonly name: "contractAddress";
2404
- readonly internalType: "address";
2405
- readonly type: "address";
2406
- readonly indexed: true;
2407
- }, {
2408
- readonly name: "tokenId";
2409
- readonly internalType: "uint256";
2410
- readonly type: "uint256";
2411
- readonly indexed: true;
2412
- }, {
2413
- readonly name: "createdNewContract";
2414
- readonly internalType: "bool";
2415
- readonly type: "bool";
2416
- readonly indexed: true;
2417
- }, {
2418
- readonly name: "uid";
2419
- readonly internalType: "uint32";
2420
- readonly type: "uint32";
2421
- readonly indexed: false;
2422
- }, {
2423
- readonly name: "contractConfig";
2424
- readonly internalType: "struct ContractCreationConfig";
2425
- readonly type: "tuple";
2426
- readonly components: readonly [{
2427
- readonly name: "contractAdmin";
2428
- readonly internalType: "address";
2429
- readonly type: "address";
2430
- }, {
2431
- readonly name: "contractURI";
2432
- readonly internalType: "string";
2433
- readonly type: "string";
2434
- }, {
2435
- readonly name: "contractName";
2436
- readonly internalType: "string";
2437
- readonly type: "string";
2438
- }];
2439
- readonly indexed: false;
2440
- }, {
2441
- readonly name: "tokenConfig";
2442
- readonly internalType: "struct TokenCreationConfig";
2443
- readonly type: "tuple";
2444
- readonly components: readonly [{
2445
- readonly name: "tokenURI";
2446
- readonly internalType: "string";
2447
- readonly type: "string";
2448
- }, {
2449
- readonly name: "maxSupply";
2450
- readonly internalType: "uint256";
2451
- readonly type: "uint256";
2452
- }, {
2453
- readonly name: "maxTokensPerAddress";
2454
- readonly internalType: "uint64";
2455
- readonly type: "uint64";
2456
- }, {
2457
- readonly name: "pricePerToken";
2458
- readonly internalType: "uint96";
2459
- readonly type: "uint96";
2460
- }, {
2461
- readonly name: "mintStart";
2462
- readonly internalType: "uint64";
2463
- readonly type: "uint64";
2464
- }, {
2465
- readonly name: "mintDuration";
2466
- readonly internalType: "uint64";
2467
- readonly type: "uint64";
2468
- }, {
2469
- readonly name: "royaltyMintSchedule";
2470
- readonly internalType: "uint32";
2471
- readonly type: "uint32";
2472
- }, {
2473
- readonly name: "royaltyBPS";
2474
- readonly internalType: "uint32";
2475
- readonly type: "uint32";
2476
- }, {
2477
- readonly name: "royaltyRecipient";
2478
- readonly internalType: "address";
2479
- readonly type: "address";
2480
- }, {
2481
- readonly name: "fixedPriceMinter";
2482
- readonly internalType: "address";
2483
- readonly type: "address";
2484
- }];
2485
- readonly indexed: false;
2486
- }, {
2487
- readonly name: "minter";
2488
- readonly internalType: "address";
2489
- readonly type: "address";
2490
- readonly indexed: false;
2491
- }, {
2492
- readonly name: "quantityMinted";
2493
- readonly internalType: "uint256";
2494
- readonly type: "uint256";
2495
- readonly indexed: false;
2496
- }];
2497
- readonly name: "Preminted";
2498
- }, {
2499
- readonly type: "event";
2500
- readonly anonymous: false;
2501
- readonly inputs: readonly [{
2502
- readonly name: "contractAddress";
2503
- readonly internalType: "address";
2504
- readonly type: "address";
2505
- readonly indexed: true;
2506
- }, {
2507
- readonly name: "tokenId";
2508
- readonly internalType: "uint256";
2509
- readonly type: "uint256";
2510
- readonly indexed: true;
2511
- }, {
2512
- readonly name: "createdNewContract";
2513
- readonly internalType: "bool";
2514
- readonly type: "bool";
2515
- readonly indexed: true;
2516
- }, {
2517
- readonly name: "uid";
2518
- readonly internalType: "uint32";
2519
- readonly type: "uint32";
2520
- readonly indexed: false;
2521
- }, {
2522
- readonly name: "minter";
2523
- readonly internalType: "address";
2524
- readonly type: "address";
2525
- readonly indexed: false;
2526
- }, {
2527
- readonly name: "quantityMinted";
2528
- readonly internalType: "uint256";
2529
- readonly type: "uint256";
2530
- readonly indexed: false;
2531
- }];
2532
- readonly name: "PremintedV2";
2533
- }, {
2534
- readonly type: "event";
2535
- readonly anonymous: false;
2536
- readonly inputs: readonly [{
2537
- readonly name: "implementation";
2538
- readonly internalType: "address";
2539
- readonly type: "address";
2540
- readonly indexed: true;
2541
- }];
2542
- readonly name: "Upgraded";
2543
- }, {
2544
- readonly type: "error";
2545
- readonly inputs: readonly [];
2546
- readonly name: "ADDRESS_DELEGATECALL_TO_NON_CONTRACT";
2547
- }, {
2548
- readonly type: "error";
2549
- readonly inputs: readonly [];
2550
- readonly name: "ADDRESS_LOW_LEVEL_CALL_FAILED";
2551
- }, {
2552
- readonly type: "error";
2553
- readonly inputs: readonly [{
2554
- readonly name: "operator";
2555
- readonly internalType: "address";
2556
- readonly type: "address";
2557
- }, {
2558
- readonly name: "user";
2559
- readonly internalType: "address";
2560
- readonly type: "address";
2561
- }];
2562
- readonly name: "Burn_NotOwnerOrApproved";
2563
- }, {
2564
- readonly type: "error";
2565
- readonly inputs: readonly [];
2566
- readonly name: "CREATOR_FUNDS_RECIPIENT_NOT_SET";
2567
- }, {
2568
- readonly type: "error";
2569
- readonly inputs: readonly [{
2570
- readonly name: "reason";
2571
- readonly internalType: "bytes";
2572
- readonly type: "bytes";
2573
- }];
2574
- readonly name: "CallFailed";
2575
- }, {
2576
- readonly type: "error";
2577
- readonly inputs: readonly [];
2578
- readonly name: "Call_TokenIdMismatch";
2579
- }, {
2580
- readonly type: "error";
2581
- readonly inputs: readonly [];
2582
- readonly name: "CallerNotZoraCreator1155";
2583
- }, {
2584
- readonly type: "error";
2585
- readonly inputs: readonly [{
2586
- readonly name: "tokenId";
2587
- readonly internalType: "uint256";
2588
- readonly type: "uint256";
2589
- }, {
2590
- readonly name: "quantity";
2591
- readonly internalType: "uint256";
2592
- readonly type: "uint256";
2593
- }, {
2594
- readonly name: "totalMinted";
2595
- readonly internalType: "uint256";
2596
- readonly type: "uint256";
2597
- }, {
2598
- readonly name: "maxSupply";
2599
- readonly internalType: "uint256";
2600
- readonly type: "uint256";
2601
- }];
2602
- readonly name: "CannotMintMoreTokens";
2603
- }, {
2604
- readonly type: "error";
2605
- readonly inputs: readonly [{
2606
- readonly name: "proposedAddress";
2607
- readonly internalType: "address";
2608
- readonly type: "address";
2609
- }];
2610
- readonly name: "Config_TransferHookNotSupported";
2611
- }, {
2612
- readonly type: "error";
2613
- readonly inputs: readonly [];
2614
- readonly name: "ERC1155_MINT_TO_ZERO_ADDRESS";
2615
- }, {
2616
- readonly type: "error";
2617
- readonly inputs: readonly [];
2618
- readonly name: "ERC1967_NEW_IMPL_NOT_CONTRACT";
2619
- }, {
2620
- readonly type: "error";
2621
- readonly inputs: readonly [];
2622
- readonly name: "ERC1967_NEW_IMPL_NOT_UUPS";
2623
- }, {
2624
- readonly type: "error";
2625
- readonly inputs: readonly [];
2626
- readonly name: "ERC1967_UNSUPPORTED_PROXIABLEUUID";
2627
- }, {
2628
- readonly type: "error";
2629
- readonly inputs: readonly [];
2630
- readonly name: "ERC20TransferSlippage";
2631
- }, {
2632
- readonly type: "error";
2633
- readonly inputs: readonly [{
2634
- readonly name: "recipient";
2635
- readonly internalType: "address";
2636
- readonly type: "address";
2637
- }, {
2638
- readonly name: "amount";
2639
- readonly internalType: "uint256";
2640
- readonly type: "uint256";
2641
- }];
2642
- readonly name: "ETHWithdrawFailed";
2643
- }, {
2644
- readonly type: "error";
2645
- readonly inputs: readonly [];
2646
- readonly name: "FUNCTION_MUST_BE_CALLED_THROUGH_ACTIVE_PROXY";
2647
- }, {
2648
- readonly type: "error";
2649
- readonly inputs: readonly [];
2650
- readonly name: "FUNCTION_MUST_BE_CALLED_THROUGH_DELEGATECALL";
2651
- }, {
2652
- readonly type: "error";
2653
- readonly inputs: readonly [];
2654
- readonly name: "FirstMinterAddressZero";
2655
- }, {
2656
- readonly type: "error";
2657
- readonly inputs: readonly [{
2658
- readonly name: "amount";
2659
- readonly internalType: "uint256";
2660
- readonly type: "uint256";
2661
- }, {
2662
- readonly name: "contractValue";
2663
- readonly internalType: "uint256";
2664
- readonly type: "uint256";
2665
- }];
2666
- readonly name: "FundsWithdrawInsolvent";
2667
- }, {
2668
- readonly type: "error";
2669
- readonly inputs: readonly [];
2670
- readonly name: "INITIALIZABLE_CONTRACT_ALREADY_INITIALIZED";
2671
- }, {
2672
- readonly type: "error";
2673
- readonly inputs: readonly [];
2674
- readonly name: "INITIALIZABLE_CONTRACT_IS_INITIALIZING";
2675
- }, {
2676
- readonly type: "error";
2677
- readonly inputs: readonly [];
2678
- readonly name: "INITIALIZABLE_CONTRACT_IS_NOT_INITIALIZING";
2679
- }, {
2680
- readonly type: "error";
2681
- readonly inputs: readonly [];
2682
- readonly name: "INVALID_ADDRESS_ZERO";
2683
- }, {
2684
- readonly type: "error";
2685
- readonly inputs: readonly [];
2686
- readonly name: "INVALID_ETH_AMOUNT";
2687
- }, {
2688
- readonly type: "error";
2689
- readonly inputs: readonly [{
2690
- readonly name: "mintTo";
2691
- readonly internalType: "address";
2692
- readonly type: "address";
2693
- }, {
2694
- readonly name: "merkleProof";
2695
- readonly internalType: "bytes32[]";
2696
- readonly type: "bytes32[]";
2697
- }, {
2698
- readonly name: "merkleRoot";
2699
- readonly internalType: "bytes32";
2700
- readonly type: "bytes32";
2701
- }];
2702
- readonly name: "InvalidMerkleProof";
2703
- }, {
2704
- readonly type: "error";
2705
- readonly inputs: readonly [];
2706
- readonly name: "InvalidMintSchedule";
2707
- }, {
2708
- readonly type: "error";
2709
- readonly inputs: readonly [];
2710
- readonly name: "InvalidPremintVersion";
2711
- }, {
2712
- readonly type: "error";
2713
- readonly inputs: readonly [];
2714
- readonly name: "InvalidSignature";
2715
- }, {
2716
- readonly type: "error";
2717
- readonly inputs: readonly [];
2718
- readonly name: "InvalidSignatureVersion";
2719
- }, {
2720
- readonly type: "error";
2721
- readonly inputs: readonly [{
2722
- readonly name: "magicValue";
2723
- readonly internalType: "bytes4";
2724
- readonly type: "bytes4";
2725
- }];
2726
- readonly name: "InvalidSigner";
2727
- }, {
2728
- readonly type: "error";
2729
- readonly inputs: readonly [];
2730
- readonly name: "MintNotYetStarted";
2731
- }, {
2732
- readonly type: "error";
2733
- readonly inputs: readonly [];
2734
- readonly name: "Mint_InsolventSaleTransfer";
2735
- }, {
2736
- readonly type: "error";
2737
- readonly inputs: readonly [];
2738
- readonly name: "Mint_InvalidMintArrayLength";
2739
- }, {
2740
- readonly type: "error";
2741
- readonly inputs: readonly [];
2742
- readonly name: "Mint_TokenIDMintNotAllowed";
2743
- }, {
2744
- readonly type: "error";
2745
- readonly inputs: readonly [];
2746
- readonly name: "Mint_UnknownCommand";
2747
- }, {
2748
- readonly type: "error";
2749
- readonly inputs: readonly [];
2750
- readonly name: "Mint_ValueTransferFail";
2751
- }, {
2752
- readonly type: "error";
2753
- readonly inputs: readonly [];
2754
- readonly name: "MinterContractAlreadyExists";
2755
- }, {
2756
- readonly type: "error";
2757
- readonly inputs: readonly [];
2758
- readonly name: "MinterContractDoesNotExist";
2759
- }, {
2760
- readonly type: "error";
2761
- readonly inputs: readonly [];
2762
- readonly name: "NewOwnerNeedsToBeAdmin";
2763
- }, {
2764
- readonly type: "error";
2765
- readonly inputs: readonly [];
2766
- readonly name: "NonEthRedemption";
2767
- }, {
2768
- readonly type: "error";
2769
- readonly inputs: readonly [];
2770
- readonly name: "ONLY_CREATE_REFERRAL";
2771
- }, {
2772
- readonly type: "error";
2773
- readonly inputs: readonly [];
2774
- readonly name: "ONLY_OWNER";
2775
- }, {
2776
- readonly type: "error";
2777
- readonly inputs: readonly [];
2778
- readonly name: "ONLY_PENDING_OWNER";
2779
- }, {
2780
- readonly type: "error";
2781
- readonly inputs: readonly [];
2782
- readonly name: "OWNER_CANNOT_BE_ZERO_ADDRESS";
2783
- }, {
2784
- readonly type: "error";
2785
- readonly inputs: readonly [];
2786
- readonly name: "OnlyTransfersFromZoraMints";
2787
- }, {
2788
- readonly type: "error";
2789
- readonly inputs: readonly [];
2790
- readonly name: "PremintDeleted";
2791
- }, {
2792
- readonly type: "error";
2793
- readonly inputs: readonly [{
2794
- readonly name: "caller";
2795
- readonly internalType: "address";
2796
- readonly type: "address";
2797
- }, {
2798
- readonly name: "recipient";
2799
- readonly internalType: "address";
2800
- readonly type: "address";
2801
- }, {
2802
- readonly name: "amount";
2803
- readonly internalType: "uint256";
2804
- readonly type: "uint256";
2805
- }];
2806
- readonly name: "ProtocolRewardsWithdrawFailed";
2807
- }, {
2808
- readonly type: "error";
2809
- readonly inputs: readonly [];
2810
- readonly name: "Renderer_NotValidRendererContract";
2811
- }, {
2812
- readonly type: "error";
2813
- readonly inputs: readonly [];
2814
- readonly name: "SaleEnded";
2815
- }, {
2816
- readonly type: "error";
2817
- readonly inputs: readonly [];
2818
- readonly name: "SaleHasNotStarted";
2819
- }, {
2820
- readonly type: "error";
2821
- readonly inputs: readonly [{
2822
- readonly name: "targetContract";
2823
- readonly internalType: "address";
2824
- readonly type: "address";
2825
- }];
2826
- readonly name: "Sale_CannotCallNonSalesContract";
2827
- }, {
2828
- readonly type: "error";
2829
- readonly inputs: readonly [{
2830
- readonly name: "expected";
2831
- readonly internalType: "uint256";
2832
- readonly type: "uint256";
2833
- }, {
2834
- readonly name: "actual";
2835
- readonly internalType: "uint256";
2836
- readonly type: "uint256";
2837
- }];
2838
- readonly name: "TokenIdMismatch";
2839
- }, {
2840
- readonly type: "error";
2841
- readonly inputs: readonly [];
2842
- readonly name: "UUPS_UPGRADEABLE_MUST_NOT_BE_CALLED_THROUGH_DELEGATECALL";
2843
- }, {
2844
- readonly type: "error";
2845
- readonly inputs: readonly [{
2846
- readonly name: "expected";
2847
- readonly internalType: "string";
2848
- readonly type: "string";
2849
- }, {
2850
- readonly name: "actual";
2851
- readonly internalType: "string";
2852
- readonly type: "string";
2853
- }];
2854
- readonly name: "UpgradeToMismatchedContractName";
2855
- }, {
2856
- readonly type: "error";
2857
- readonly inputs: readonly [{
2858
- readonly name: "user";
2859
- readonly internalType: "address";
2860
- readonly type: "address";
2861
- }, {
2862
- readonly name: "limit";
2863
- readonly internalType: "uint256";
2864
- readonly type: "uint256";
2865
- }, {
2866
- readonly name: "requestedAmount";
2867
- readonly internalType: "uint256";
2868
- readonly type: "uint256";
2869
- }];
2870
- readonly name: "UserExceedsMintLimit";
2871
- }, {
2872
- readonly type: "error";
2873
- readonly inputs: readonly [{
2874
- readonly name: "user";
2875
- readonly internalType: "address";
2876
- readonly type: "address";
2877
- }, {
2878
- readonly name: "tokenId";
2879
- readonly internalType: "uint256";
2880
- readonly type: "uint256";
2881
- }, {
2882
- readonly name: "role";
2883
- readonly internalType: "uint256";
2884
- readonly type: "uint256";
2885
- }];
2886
- readonly name: "UserMissingRoleForToken";
2887
- }, {
2888
- readonly type: "error";
2889
- readonly inputs: readonly [];
2890
- readonly name: "WrongValueSent";
2891
- }, {
2892
- readonly type: "error";
2893
- readonly inputs: readonly [];
2894
- readonly name: "premintSignerContractFailedToRecoverSigner";
2895
- }, {
2896
- readonly type: "error";
2897
- readonly inputs: readonly [];
2898
- readonly name: "premintSignerContractNotAContract";
2899
- }], "premintV2", [{
2900
- contractAdmin: `0x${string}`;
2901
- contractURI: string;
2902
- contractName: string;
2903
- additionalAdmins: readonly `0x${string}`[];
2904
- }, import("@zoralabs/protocol-deployments").PremintConfigV2, `0x${string}`, bigint, {
2905
- mintRecipient: `0x${string}`;
2906
- mintComment: string;
2907
- mintRewardsRecipients: readonly `0x${string}`[];
2908
- }], Chain, Chain | undefined, `0x${string}` | import("viem").JsonRpcAccount<`0x${string}`> | import("viem").LocalAccount<string, `0x${string}`>>>;
1468
+ }], "premintV1" | "premintV2", any, any, any, `0x${string}` | Account>>;
2909
1469
  }
2910
- export declare function createPremintClient({ chain, httpClient, publicClient, }: {
1470
+ export declare function createPremintClient(clientConfig: ClientConfig): PremintClient;
1471
+ type ContractCreationConfigWithoutAdditionalAdmins = Omit<ContractCreationConfig, "additionalAdmins">;
1472
+ /** ======= ADMIN ======= */
1473
+ export type SignAndSubmitParams = {
1474
+ /** The WalletClient used to sign the premint */
1475
+ walletClient: WalletClient;
1476
+ /** The account that is to sign the premint */
1477
+ account: Account | Address;
1478
+ /** If the signature should be checked before submitting it to the api */
1479
+ checkSignature?: boolean;
1480
+ };
1481
+ export type SignAndSubmitReturn = {
1482
+ /** The signature of the Premint */
1483
+ signature: Hex;
1484
+ /** The account that signed the Premint */
1485
+ signerAccount: Account | Address;
1486
+ };
1487
+ export type SubmitParams = {
1488
+ /** The signature of the Premint */
1489
+ signature: Hex;
1490
+ /** If the premint signature should be validated before submitting to the API */
1491
+ checkSignature?: boolean;
1492
+ /** The account that signed the premint */
1493
+ signerAccount: Account | Address;
1494
+ };
1495
+ type PremintReturn<T extends PremintConfigVersion> = {
1496
+ /** The typedDataDefinition of the Premint which is to be signed the creator. */
1497
+ typedDataDefinition: TypedDataDefinition;
1498
+ /** The deterministic collection address of the Premint */
1499
+ collectionAddress: Address;
1500
+ /** Signs the Premint, and submits it and the signature to the Zora Premint API */
1501
+ signAndSubmit: (params: SignAndSubmitParams) => Promise<SignAndSubmitReturn>;
1502
+ /** For the case where the premint is signed externally, takes the signature for the Premint, and submits it and the Premint to the Zora Premint API */
1503
+ submit: (params: SubmitParams) => void;
1504
+ } & PremintConfigWithVersion<T>;
1505
+ /** CREATE */
1506
+ type CreatePremintParameters<T extends PremintConfigVersion> = {
1507
+ /** The account to receive the creator reward if it's a free mint, and the paid mint fee if it's a paid mint */
1508
+ payoutRecipient: Address;
1509
+ /** Collection information for the mint */
1510
+ collection: ContractCreationConfigWithoutAdditionalAdmins;
1511
+ /** tokenCreationConfig Token creation settings, optional settings are overridden with sensible defaults */
1512
+ tokenCreationConfig: Partial<TokenConfigForVersion<T>> & {
1513
+ tokenURI: string;
1514
+ };
1515
+ /** Premint config version to use, defaults to V2 */
1516
+ premintConfigVersion?: T;
1517
+ /** uid the UID to use – optional and retrieved as a fresh UID from ZORA by default. */
1518
+ uid?: number;
1519
+ };
1520
+ /** UPDATE */
1521
+ export type UpdatePremintParams = {
1522
+ /** uid of the Premint to update */
1523
+ uid: number;
1524
+ /** address of the Premint to update */
1525
+ collection: Address;
1526
+ /** update to apply to the Premint */
1527
+ tokenConfigUpdates: Partial<TokenCreationConfig>;
1528
+ };
1529
+ /** DELETE */
1530
+ export type DeletePremintParams = {
1531
+ /** id of the premint to delete */
1532
+ uid: number;
1533
+ /** collection address of the Premint to delete */
1534
+ collection: Address;
1535
+ };
1536
+ export type MakeMintParametersArguments = {
1537
+ /** uid of the Premint to mint */
1538
+ uid: number;
1539
+ /** Premint contract address */
1540
+ tokenContract: Address;
1541
+ /** Account to execute the mint */
1542
+ minterAccount: Account | Address;
1543
+ /** Minting settings */
1544
+ mintArguments?: {
1545
+ /** Quantity of tokens to mint */
1546
+ quantityToMint: number;
1547
+ /** Comment to add to the mint */
1548
+ mintComment?: string;
1549
+ /** Address to receive the mint referral reward */
1550
+ mintReferral?: Address;
1551
+ /** Address to receive the minted tokens */
1552
+ mintRecipient?: Address;
1553
+ };
1554
+ };
1555
+ export declare function makeUrls({ uid, address, tokenId, chain, }: {
1556
+ uid?: number;
1557
+ tokenId?: bigint;
1558
+ address?: Address;
2911
1559
  chain: Chain;
2912
- publicClient?: PublicClient;
2913
- httpClient?: IHttpClient;
2914
- }): PremintClient;
1560
+ }): URLSReturnType;
2915
1561
  export {};
2916
1562
  //# sourceMappingURL=premint-client.d.ts.map