import { ethers } from 'ethers' import { execute, FallbackableOverrides, MutationOption, } from '../utils/execute' import type { TransactionResponse } from 'ethers' export type CreateApproveCaller = ( contract: ethers.Contract, ) => ( to: string, value: string, overrides?: FallbackableOverrides, ) => Promise export const createApproveCaller: CreateApproveCaller = (contract: ethers.Contract) => async (to: string, value: string, overrides?: FallbackableOverrides) => execute({ contract, method: 'approve', mutation: true, args: [to, value], overrides, })