import type { AddressLike } from '@enzymefinance/ethers' ; import type { ComptrollerLib } from '@enzymefinance/protocol' ; import { curveMinterMintManySelector , curveMinterMintSelector , curveMinterToggleApproveMintSelector , encodeArgs , sighash , } from '@enzymefinance/protocol' ; import { constants , utils } from 'ethers' ; export function vaultCallCurveMinterMint ( { comptrollerProxy , minter , gauge , } ) { return comptrollerProxy . vaultCallOnContract ( minter , curveMinterMintSelector , encodeArgs ( [ 'address' ] , [ gauge ] ) ) ; } export function vaultCallCurveMinterMintMany ( { comptrollerProxy , minter , gauges , } ) { const gaugesFormatted = new Array ( 8 ) . fill ( constants . AddressZero ) ; for ( const i in gauges ) { gaugesFormatted [ i ] = gauges [ i ] ; } return comptrollerProxy . vaultCallOnContract ( minter , curveMinterMintManySelector , encodeArgs ( [ 'address[8]' ] , [ gaugesFormatted ] ) ) ; } export function vaultCallCurveMinterToggleApproveMint ( { comptrollerProxy , minter , account , } ) { return comptrollerProxy . vaultCallOnContract ( minter , curveMinterToggleApproveMintSelector , encodeArgs ( [ 'address' ] , [ account ] ) ) ; } export function vaultCallStartAssetBypassTimelock ( { comptrollerProxy , contract , asset , } ) { return comptrollerProxy . vaultCallOnContract ( contract , sighash ( utils . FunctionFragment . fromString ( 'startAssetBypassTimelock(address)' ) ) , encodeArgs ( [ 'address' ] , [ asset ] ) ) ; }