import { ethers } from 'ethers' import type { TransactionResponse } from 'ethers' import { execute, FallbackableOverrides, MutationOption, } from '../../common/utils/execute' export type CreateVoteCaller = ( contract: ethers.Contract, ) => ( propertyAddress: string, agree: boolean, overrides?: FallbackableOverrides, ) => Promise export const createVoteCaller: CreateVoteCaller = ( contract: ethers.Contract, ): (( propertyAddress: string, agree: boolean, overrides?: FallbackableOverrides, ) => Promise) => async ( propertyAddress: string, agree: boolean, overrides?: FallbackableOverrides, ): Promise => execute({ contract, method: 'vote', args: [propertyAddress, agree], mutation: true, overrides, })