From 40d208646565d0cc4207dd0345753c350757109b Mon Sep 17 00:00:00 2001 From: Dan Oved Date: Thu, 18 Apr 2024 14:43:35 -0700 Subject: [PATCH] Save the ERC20 Minter in Deployment Config (#360) ## Description Make sure to save/load erc20 minter from the deployment config, so that when we run `copy-deployed-contracts` its not removed ## Motivation and Context ## Does this change the ABI/API? - [ ] This changes the ABI/API ## What tests did you add/modify to account for these changes ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New module / feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) ## Checklist: - [ ] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [ ] i added a changeset to account for this change ## Reviewer Checklist: - [ ] My review includes a symposis of the changes and potential issues - [ ] The code style is enforced - [ ] There are no risky / concerning changes / additions to the PR --- packages/1155-deployments/src/DeploymentConfig.sol | 4 ++++ packages/1155-deployments/src/ZoraDeployerBase.sol | 1 + 2 files changed, 5 insertions(+) diff --git a/packages/1155-deployments/src/DeploymentConfig.sol b/packages/1155-deployments/src/DeploymentConfig.sol index 14a460e5..cc0897f8 100644 --- a/packages/1155-deployments/src/DeploymentConfig.sol +++ b/packages/1155-deployments/src/DeploymentConfig.sol @@ -38,6 +38,8 @@ struct Deployment { address preminterProxy; /// @notice Upgrade gate address upgradeGate; + /// @notice erc20 minter + address erc20Minter; } abstract contract DeploymentConfig is Script { @@ -65,6 +67,7 @@ abstract contract DeploymentConfig is Script { string constant PREMINTER_PROXY = "PREMINTER_PROXY"; string constant PREMINTER_IMPL = "PREMINTER_IMPL"; string constant UPGRADE_GATE = "UPGRADE_GATE"; + string constant ERC20_MINTER = "ERC20_MINTER"; /// @notice Return a prefixed key for reading with a ".". /// @param key key to prefix @@ -106,6 +109,7 @@ abstract contract DeploymentConfig is Script { deployment.preminterImpl = readAddressOrDefaultToZero(json, PREMINTER_IMPL); deployment.preminterProxy = readAddressOrDefaultToZero(json, PREMINTER_PROXY); deployment.upgradeGate = readAddressOrDefaultToZero(json, UPGRADE_GATE); + deployment.erc20Minter = readAddressOrDefaultToZero(json, ERC20_MINTER); } function getDeterminsticMintsManagerAddress() internal view returns (address) { diff --git a/packages/1155-deployments/src/ZoraDeployerBase.sol b/packages/1155-deployments/src/ZoraDeployerBase.sol index cf09d6a3..c552a62f 100644 --- a/packages/1155-deployments/src/ZoraDeployerBase.sol +++ b/packages/1155-deployments/src/ZoraDeployerBase.sol @@ -36,6 +36,7 @@ abstract contract ZoraDeployerBase is DeploymentTestingUtils, ScriptDeploymentCo vm.serializeAddress(deploymentJsonKey, PREMINTER_PROXY, deployment.preminterProxy); vm.serializeAddress(deploymentJsonKey, PREMINTER_IMPL, deployment.preminterImpl); vm.serializeAddress(deploymentJsonKey, UPGRADE_GATE, deployment.upgradeGate); + vm.serializeAddress(deploymentJsonKey, ERC20_MINTER, deployment.erc20Minter); deploymentJson = vm.serializeAddress(deploymentJsonKey, FACTORY_PROXY, deployment.factoryProxy); }