Skip to content

Commit

Permalink
use qualified name for Poll
Browse files Browse the repository at this point in the history
yuetloo committed May 9, 2024

Verified

This commit was signed with the committer’s verified signature.
yuetloo yuetloo
1 parent bcdd62c commit 2ff9b0b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions contracts/tasks/runners/exportRound.ts
Original file line number Diff line number Diff line change
@@ -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<Poll>(
EContracts.Poll,
pollAddress,
ethers
)
const [roundStartTime, roundDuration] =
await pollContract.getDeployTimeAndDuration()
startTime = getNumber(roundStartTime)

0 comments on commit 2ff9b0b

Please sign in to comment.