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