import type { AddressLike } from '@enzymefinance/ethers' ; import type { SignerWithAddress } from '@enzymefinance/hardhat' ; import type { ComptrollerLib } from '@enzymefinance/protocol' ; import type { BigNumberish , BytesLike } from 'ethers' ; export async function callOnExtension ( { comptrollerProxy , extension , actionId , callArgs = '0x' , signer , } ) { let callOnExtensionTx ; if ( signer ) { callOnExtensionTx = comptrollerProxy . connect ( signer ) . callOnExtension ( extension , actionId , callArgs ) ; } else { callOnExtensionTx = comptrollerProxy . callOnExtension ( extension , actionId , callArgs ) ; } await expect ( callOnExtensionTx ) . resolves . toBeReceipt ( ) ; return callOnExtensionTx ; }