diff --git a/config/index.ts b/config/index.ts index f5b5ae53a..634c997f2 100644 --- a/config/index.ts +++ b/config/index.ts @@ -67,6 +67,7 @@ export const CONFIG: Config = { "0x0f6d331f26C0B64fc6EACddABd5645b55cf2d8e0", ], Treasury: "0x30f07D09F7f0E22be0a6879eF505dc810b76D6b6", + GiftCardKeeper: "0x824477EE69d19Eb9B21725195Cc7eE22aCe5881C", }, }; diff --git a/config/types.ts b/config/types.ts index 8821fa354..ef922dd7b 100644 --- a/config/types.ts +++ b/config/types.ts @@ -52,6 +52,7 @@ export type Config = { CharityApplicationsOwners: string[]; ProxyAdminMultiSigOwners: string[]; Treasury: string; + GiftCardKeeper: string; }; }; diff --git a/contract-address.json b/contract-address.json index 7e1734732..4ed83f0fc 100644 --- a/contract-address.json +++ b/contract-address.json @@ -441,8 +441,8 @@ "implementation": "0x4B49aC71590A13d26742C9cb2BDd5994dB369cAe" }, "giftcards": { - "implementation": "", - "proxy": "" + "implementation": "0x456452F23d80Be2b115111a1FFBAb3D90101cc00", + "proxy": "0x99dD586da67FBCB5De9e466E07C8550687a70fC7" }, "goldfinch": { "liquidVault": "", diff --git a/tasks/deploy/deployGiftcard.ts b/tasks/deploy/deployGiftcard.ts index 32ffef8e0..6c291b18e 100644 --- a/tasks/deploy/deployGiftcard.ts +++ b/tasks/deploy/deployGiftcard.ts @@ -1,16 +1,19 @@ -import {deployGiftCard} from "contracts/accessory/gift-cards/scripts/deploy.ts"; +import {CONFIG} from "config"; +import {deployGiftCard} from "contracts/accessory/gift-cards/scripts/deploy"; import {task} from "hardhat/config"; import {getAddresses, isLocalNetwork, logger} from "utils"; type TaskArgs = { - angelCoreStruct?: string; keeper: string; registrar?: string; skipVerify: boolean; }; task("deploy:GiftCard", "Will deploy GiftCardContracts contract") - .addParam("keeper", "Keeper address for GiftCard contract.") + .addOptionalParam( + "keeper", + "Keeper address for GiftCard contract, will lookup from config if not specified" + ) .addOptionalParam( "registrar", "Registrar contract address. Will do a local lookup from contract-address.json if none is provided." @@ -21,14 +24,20 @@ task("deploy:GiftCard", "Will deploy GiftCardContracts contract") const addresses = await getAddresses(hre); const registrar = taskArgs.registrar || addresses.registrar.proxy; + const keeper = taskArgs.keeper || CONFIG.PROD_CONFIG.GiftCardKeeper; const verify_contracts = !isLocalNetwork(hre) && !taskArgs.skipVerify; const GiftCardDataInput = { - keeper: taskArgs.keeper, + keeper: keeper, registrarContract: registrar, }; - await deployGiftCard(GiftCardDataInput, verify_contracts, hre); + await deployGiftCard( + GiftCardDataInput, + addresses.multiSig.apTeam.proxy, + verify_contracts, + hre + ); } catch (error) { logger.out(error, logger.Level.Error); } diff --git a/tasks/deploy/index.ts b/tasks/deploy/index.ts index adbfc18df..651285df2 100644 --- a/tasks/deploy/index.ts +++ b/tasks/deploy/index.ts @@ -7,7 +7,7 @@ import "./deployEndowmentMultisig"; import "./deployEndowmentMultisigEmitter"; import "./deployEndowmentMultisigFactory"; import "./deployGasFwd"; -// import "./deployGiftcard"; +import "./deployGiftcard"; import "./deployHaloImplementation"; import "./deployIndexFund"; import "./deployLocalRegistrar"; diff --git a/tasks/manage/registrar/setStratParams.ts b/tasks/manage/registrar/setStratParams.ts index 5da359d32..0aa4beaee 100644 --- a/tasks/manage/registrar/setStratParams.ts +++ b/tasks/manage/registrar/setStratParams.ts @@ -28,7 +28,7 @@ task("manage:registrar:setStratParams") ) .setAction(async function (taskArguments: TaskArgs, hre) { const config: StratConfig = allStrategyConfigs[taskArguments.name]; - if(await isProdNetwork(hre)) { + if (await isProdNetwork(hre)) { await hre.run("manage:registrar:setStratParams:on-network", { ...taskArguments, chainId: ChainID.polygon, @@ -37,8 +37,7 @@ task("manage:registrar:setStratParams") ...taskArguments, chainId: config.chainId, }); - } - else { + } else { await hre.run("manage:registrar:setStratParams:on-network", { ...taskArguments, chainId: ChainID.mumbai,