{"version":3,"sources":["../../src/execute/approveDepositAllowance.ts"],"sourcesContent":["import { BigDecimalish, toBigInt } from '@nadohq/utils';\nimport { ERC20_ABI, WithContract, WriteableContractInstance } from '../common';\n\nexport interface ApproveDepositAllowanceParams {\n  amount: BigDecimalish;\n  tokenContract: WriteableContractInstance<typeof ERC20_ABI>;\n}\n\n/**\n * Approves the endpoint contract to spend the amount of tokens specified\n */\nexport function approveDepositAllowance({\n  endpoint,\n  amount,\n  tokenContract,\n}: WithContract<'endpoint', ApproveDepositAllowanceParams>) {\n  return tokenContract.write.approve([endpoint.address, toBigInt(amount)]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAwC;AAWjC,SAAS,wBAAwB;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AACF,GAA4D;AAC1D,SAAO,cAAc,MAAM,QAAQ,CAAC,SAAS,aAAS,uBAAS,MAAM,CAAC,CAAC;AACzE;","names":[]}