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