Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Commit

Permalink
Gift Card testnet deployment (#388)
Browse files Browse the repository at this point in the history
* Some slight fixes to tasks for deploying GiftCards, config updates to support keeper address

* lint
  • Loading branch information
stevieraykatz authored Sep 22, 2023
1 parent 3ef06b9 commit 78d6a94
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 11 deletions.
1 change: 1 addition & 0 deletions config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export const CONFIG: Config = {
"0x0f6d331f26C0B64fc6EACddABd5645b55cf2d8e0",
],
Treasury: "0x30f07D09F7f0E22be0a6879eF505dc810b76D6b6",
GiftCardKeeper: "0x824477EE69d19Eb9B21725195Cc7eE22aCe5881C",
},
};

Expand Down
1 change: 1 addition & 0 deletions config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export type Config = {
CharityApplicationsOwners: string[];
ProxyAdminMultiSigOwners: string[];
Treasury: string;
GiftCardKeeper: string;
};
};

Expand Down
4 changes: 2 additions & 2 deletions contract-address.json
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,8 @@
"implementation": "0x4B49aC71590A13d26742C9cb2BDd5994dB369cAe"
},
"giftcards": {
"implementation": "",
"proxy": ""
"implementation": "0x456452F23d80Be2b115111a1FFBAb3D90101cc00",
"proxy": "0x99dD586da67FBCB5De9e466E07C8550687a70fC7"
},
"goldfinch": {
"liquidVault": "",
Expand Down
19 changes: 14 additions & 5 deletions tasks/deploy/deployGiftcard.ts
Original file line number Diff line number Diff line change
@@ -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."
Expand All @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion tasks/deploy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "./deployEndowmentMultisig";
import "./deployEndowmentMultisigEmitter";
import "./deployEndowmentMultisigFactory";
import "./deployGasFwd";
// import "./deployGiftcard";
import "./deployGiftcard";
import "./deployHaloImplementation";
import "./deployIndexFund";
import "./deployLocalRegistrar";
Expand Down
5 changes: 2 additions & 3 deletions tasks/manage/registrar/setStratParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 78d6a94

Please sign in to comment.