import { LCDClient } from '@terra-money/terra.js' ; import { AddressProvider , DENOMS } from '../address-provider' ; interface Option { lcd : LCDClient ; market : DENOMS ; block_height ? : number ; } interface EpochStateResponse { exchange_rate : string ; aterra_supply : string ; } param lcd param money param block_height export const queryMarketEpochState = ( { lcd , market , block_height , } ) => async ( addressProvider ) : Promise < EpochStateResponse > => { const marketContractAddress = addressProvider . market ( market ) ; const response = await lcd . wasm . contractQuery ( marketContractAddress , { epoch_state : { block_height : block_height , } , } ) ; return response ; } ;