diff --git a/.changeset/thick-lemons-work.md b/.changeset/thick-lemons-work.md new file mode 100644 index 000000000..19dc8083f --- /dev/null +++ b/.changeset/thick-lemons-work.md @@ -0,0 +1,5 @@ +--- +"@zoralabs/protocol-deployments": patch +--- + +Added Protocol Rewards and ERC20 Minter abis and addresses to protocol-deployments diff --git a/packages/1155-deployments/addresses/7777777.json b/packages/1155-deployments/addresses/7777777.json index beb5638e2..42b74dee6 100644 --- a/packages/1155-deployments/addresses/7777777.json +++ b/packages/1155-deployments/addresses/7777777.json @@ -9,5 +9,6 @@ "PREMINTER_PROXY": "0x7777773606e7e46C8Ba8B98C08f5cD218e31d340", "REDEEM_MINTER_FACTORY": "0x78964965cF77850224513a367f899435C5B69174", "UPGRADE_GATE": "0xbC50029836A59A4E5e1Bb8988272F46ebA0F9900", + "ERC20_MINTER": "0x777777E8850d8D6d98De2B5f64fae401F96eFF31", "timestamp": 1712349677 } diff --git a/packages/1155-deployments/addresses/999999999.json b/packages/1155-deployments/addresses/999999999.json index 0545eb762..b96f7aa07 100644 --- a/packages/1155-deployments/addresses/999999999.json +++ b/packages/1155-deployments/addresses/999999999.json @@ -9,5 +9,6 @@ "PREMINTER_PROXY": "0x7777773606e7e46C8Ba8B98C08f5cD218e31d340", "REDEEM_MINTER_FACTORY": "0x25cFb6dd9cDE8425e781d6718a29Ccbca3F038d6", "UPGRADE_GATE": "0x0000000000000000000000000000000000000000", + "ERC20_MINTER": "0x777777E8850d8D6d98De2B5f64fae401F96eFF31", "timestamp": 1712339316 } diff --git a/packages/protocol-deployments/wagmi.config.ts b/packages/protocol-deployments/wagmi.config.ts index 6809a2744..314a48746 100644 --- a/packages/protocol-deployments/wagmi.config.ts +++ b/packages/protocol-deployments/wagmi.config.ts @@ -1,5 +1,5 @@ import { defineConfig } from "@wagmi/cli"; -import { Abi } from "viem"; +import { Abi, zeroAddress } from "viem"; import { readdirSync, readFileSync } from "fs"; import * as abis from "@zoralabs/zora-1155-contracts"; import { @@ -36,7 +36,7 @@ const get1155Addresses = () => { address?: Address; abi: Abi; }) => { - if (!address) return; + if (!address || address === zeroAddress) return; if (!addresses[contractName]) { addresses[contractName] = { address: {}, @@ -47,6 +47,12 @@ const get1155Addresses = () => { addresses[contractName]!.address[chainId] = address; }; + const protocolRewardsConfig = JSON.parse( + readFileSync("../protocol-rewards/deterministicConfig.json", "utf-8"), + ) as { + expectedAddress: Address; + }; + for (const addressesFile of addressesFiles) { const jsonAddress = JSON.parse( readFileSync(`../1155-deployments/addresses/${addressesFile}`, "utf-8"), @@ -58,6 +64,7 @@ const get1155Addresses = () => { FACTORY_IMPL: Address; FACTORY_PROXY: Address; PREMINTER_PROXY?: Address; + ERC20_MINTER?: Address; }; const chainId = parseInt(addressesFile.split(".")[0]); @@ -92,6 +99,18 @@ const get1155Addresses = () => { address: jsonAddress.PREMINTER_PROXY, abi: abis.zoraCreator1155PremintExecutorImplABI, }); + addAddress({ + contractName: "ProtocolRewards", + chainId, + address: protocolRewardsConfig.expectedAddress, + abi: abis.protocolRewardsABI, + }); + addAddress({ + contractName: "ERC20Minter", + chainId, + abi: abis.erc20MinterABI, + address: jsonAddress.ERC20_MINTER, + }); } return addresses;