import { BigNumber } from '@ethersproject/bignumber' ; import { Provider } from '@ethersproject/providers' ; import { Contract } from '@ethersproject/contracts' ; import { WeiPerEther as ONE } from '@ethersproject/constants' ; export const TokensToUnbuttonWrapperMap = { Networks : [ 1 ] , 1 : { '0xd46ba6d942050d489dbd938a2c909a5d5039a161' : '0xedb171c18ce90b633db442f2a6f72874093b49ef' , '0x1e6bb68acec8fefbd87d192be09bb274170a0548' : '0xF03387d8d0FF326ab586A58E0ab4121d106147DF' , } , } ; export async function getWrapperRate ( provider , wrapperAddress ) { const ubWrapper = new Contract ( wrapperAddress , [ 'function underlyingToWrapper(uint256 amount) external view returns (uint256)' , ] , provider ) ; return ubWrapper . underlyingToWrapper ( ONE ) ; }