import { Dec , Int , MsgExecuteContract } from '@terra-money/terra.js' ; import { AddressProvider } from '../address-provider' ; import { DENOMS } from '../address-provider' ; import { Parse } from '../utils' ; import accAddress = Parse . accAddress ; import dec = Parse . dec ; interface Option { address : string ; currency : DENOMS ; amount : string ; } param address param money param amount export const fabricateMarketDepositStableCoin = ( { address , currency , amount , } ) => ( addressProvider ) : MsgExecuteContract [ ] => { const mmContractAddress = addressProvider . market ( currency ) ; return [ new MsgExecuteContract ( accAddress ( address ) , mmContractAddress , { deposit_stable : { } , } , { [ `${ currency }` ] : new Int ( new Dec ( dec ( amount ) ) . mul ( 1000000 ) ) . toString ( ) , } ) , ] ; } ;