diff --git a/packages/contracts/contracts/allowlist/EnumerableSetAllowlist.sol b/packages/contracts/contracts/allowlist/EnumerableSetAllowlist.sol index 1eec01075..487fa2a35 100644 --- a/packages/contracts/contracts/allowlist/EnumerableSetAllowlist.sol +++ b/packages/contracts/contracts/allowlist/EnumerableSetAllowlist.sol @@ -33,7 +33,7 @@ contract EnumerableSetAllowlist is IAllowlistManager,IEnumerableSetAllowlist { address[] calldata _addressList ) public onlyCommitmentOwner(_commitmentId) - { + { delete allowList[_commitmentId]; _addToAllowlist(_commitmentId, _addressList); diff --git a/packages/contracts/deploy/00_deploy_commitment_allowlists.ts b/packages/contracts/deploy/00_deploy_commitment_allowlists.ts new file mode 100644 index 000000000..e61778465 --- /dev/null +++ b/packages/contracts/deploy/00_deploy_commitment_allowlists.ts @@ -0,0 +1,38 @@ +import { DeployFunction } from 'hardhat-deploy/dist/types' +import { deploy } from 'helpers/deploy-helpers' + +const deployFn: DeployFunction = async (hre) => { + + + // const tellerV2 = await hre.contracts.get('TellerV2') + const lenderCommitmentForwarder = await hre.contracts.get('LenderCommitmentForwarder') + + + + await deploy({ + contract: 'EnumerableSetAllowlist', + args: [ lenderCommitmentForwarder.address ], + proxy: { + proxyContract: 'OpenZeppelinTransparentProxy', + + }, + skipIfAlreadyDeployed: true, + hre, + }) + + await deploy({ + contract: 'OpenAllowlist', + args: [ ], + proxy: { + proxyContract: 'OpenZeppelinTransparentProxy', + + }, + skipIfAlreadyDeployed: true, + hre, + }) +} + +// tags and deployment +deployFn.tags = ['commitment-allowlists'] +deployFn.dependencies = ['teller-v2'] +export default deployFn