import { BigNumberJS } from '../BigNumberJS' import { BaseToken } from './BaseToken' import { TokenType } from './TokenType' export interface IPairConstructor { address: string token0: string token1: string reserve0: string reserve1: string totalSupply: string price: string apr: string | null } export class Pair extends BaseToken { public readonly address: string public readonly token0: string public readonly token1: string public readonly reserve0: BigNumberJS public readonly reserve1: BigNumberJS public readonly totalSupply: BigNumberJS public readonly price: BigNumberJS public readonly apr: BigNumberJS | null public constructor({ address, token0, token1, reserve0, reserve1, totalSupply, price, apr, }: IPairConstructor) { super(TokenType.PAIR) this.address = address this.token0 = token0 this.token1 = token1 this.reserve0 = new BigNumberJS(reserve0) this.reserve1 = new BigNumberJS(reserve1) this.totalSupply = new BigNumberJS(totalSupply) this.price = new BigNumberJS(price) this.apr = apr ? new BigNumberJS(apr) : null } }