@zoralabs/protocol-deployments 0.1.6 → 0.1.8

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/wagmi.config.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineConfig } from "@wagmi/cli";
2
- import { Abi } from "viem";
2
+ import { Abi, zeroAddress } from "viem";
3
3
  import { readdirSync, readFileSync } from "fs";
4
4
  import * as abis from "@zoralabs/zora-1155-contracts";
5
5
  import {
@@ -36,7 +36,7 @@ const get1155Addresses = () => {
36
36
  address?: Address;
37
37
  abi: Abi;
38
38
  }) => {
39
- if (!address) return;
39
+ if (!address || address === zeroAddress) return;
40
40
  if (!addresses[contractName]) {
41
41
  addresses[contractName] = {
42
42
  address: {},
@@ -47,6 +47,12 @@ const get1155Addresses = () => {
47
47
  addresses[contractName]!.address[chainId] = address;
48
48
  };
49
49
 
50
+ const protocolRewardsConfig = JSON.parse(
51
+ readFileSync("../protocol-rewards/deterministicConfig.json", "utf-8"),
52
+ ) as {
53
+ expectedAddress: Address;
54
+ };
55
+
50
56
  for (const addressesFile of addressesFiles) {
51
57
  const jsonAddress = JSON.parse(
52
58
  readFileSync(`../1155-deployments/addresses/${addressesFile}`, "utf-8"),
@@ -58,6 +64,7 @@ const get1155Addresses = () => {
58
64
  FACTORY_IMPL: Address;
59
65
  FACTORY_PROXY: Address;
60
66
  PREMINTER_PROXY?: Address;
67
+ ERC20_MINTER?: Address;
61
68
  };
62
69
 
63
70
  const chainId = parseInt(addressesFile.split(".")[0]);
@@ -92,6 +99,18 @@ const get1155Addresses = () => {
92
99
  address: jsonAddress.PREMINTER_PROXY,
93
100
  abi: abis.zoraCreator1155PremintExecutorImplABI,
94
101
  });
102
+ addAddress({
103
+ contractName: "ProtocolRewards",
104
+ chainId,
105
+ address: protocolRewardsConfig.expectedAddress,
106
+ abi: abis.protocolRewardsABI,
107
+ });
108
+ addAddress({
109
+ contractName: "ERC20Minter",
110
+ chainId,
111
+ abi: abis.erc20MinterABI,
112
+ address: jsonAddress.ERC20_MINTER,
113
+ });
95
114
  }
96
115
 
97
116
  return addresses;