Skip to content

Commit

Permalink
Save the ERC20 Minter in Deployment Config (#360)
Browse files Browse the repository at this point in the history
<!--- Provide a general summary of your changes in the Title above -->

## 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

<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## Does this change the ABI/API?

- [ ] This changes the ABI/API

<!-- If so, please describe how and what potential impact this may have -->

## What tests did you add/modify to account for these changes

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, tests ran to see how -->
<!--- your change affects other areas of the code, etc. -->

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->

- [ ] 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:

<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [ ] 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
  • Loading branch information
oveddan authored Apr 18, 2024
1 parent d28dfbf commit 40d2086
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/1155-deployments/src/DeploymentConfig.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ struct Deployment {
address preminterProxy;
/// @notice Upgrade gate
address upgradeGate;
/// @notice erc20 minter
address erc20Minter;
}

abstract contract DeploymentConfig is Script {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions packages/1155-deployments/src/ZoraDeployerBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 40d2086

Please sign in to comment.