From 2ff9b0b1de19393a1c21887056f95e9441414724 Mon Sep 17 00:00:00 2001 From: yuetloo Date: Thu, 9 May 2024 13:21:00 -0400 Subject: [PATCH] use qualified name for Poll --- contracts/tasks/runners/exportRound.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/contracts/tasks/runners/exportRound.ts b/contracts/tasks/runners/exportRound.ts index fa3e332b1..27be1e51b 100644 --- a/contracts/tasks/runners/exportRound.ts +++ b/contracts/tasks/runners/exportRound.ts @@ -14,12 +14,14 @@ import { task, types } from 'hardhat/config' import { Contract, formatUnits, getNumber } from 'ethers' import { Ipfs } from '../../utils/ipfs' -import { Project, Round, RoundFileContent } from '../../utils/types' +import { EContracts, Project, Round, RoundFileContent } from '../../utils/types' import { RecipientRegistryLogProcessor } from '../../utils/RecipientRegistryLogProcessor' import { getRecipientAddressAbi, MaciV0Abi } from '../../utils/abi' import { JSONFile } from '../../utils/JSONFile' import path from 'path' import fs from 'fs' +import { getContractAt } from '../../utils/contracts' +import { Poll } from '../../typechain-types' type RoundListEntry = { network: string @@ -216,7 +218,11 @@ async function getRoundInfo( try { if (pollAddress) { - const pollContract = await ethers.getContractAt('Poll', pollAddress) + const pollContract = await getContractAt( + EContracts.Poll, + pollAddress, + ethers + ) const [roundStartTime, roundDuration] = await pollContract.getDeployTimeAndDuration() startTime = getNumber(roundStartTime)