import { expect } from 'chai' ; import { OracleInstance } from '../build/types/truffle-types' ; const Oracle = artifacts . require ( 'Oracle.sol' ) ; contract ( 'OptionsContract' , accounts => { const creatorAddress = accounts [ 0 ] ; const firstRepoOwnerAddress = accounts [ 1 ] ; const secondRepoOwnerAddress = accounts [ 2 ] ; const cBATAddress = '0x6C8c6b02E7b2BE14d4fA6022Dfd6d75921D90E4E' ; const cDaiAddress = '0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643' ; const cETHAddress = '0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5' ; const cREPAddress = '0x158079Ee67Fce2f58472A96584A73C7Ab9AC95c1' ; const cUSDCAddress = '0x39AA39c021dfbaE8faC545936693aC917d5E7563' ; const cWBTCAddress = '0xC11b1268C1A384e55C48c2391d8d480264A3A7F4' ; const cZRXAddress = '0xB3319f5D18Bc0D84dD1b4825Dcde5d5f7266d407' ; const batAddress = '0x0D8775F648430679A709E98d2b0Cb6250d2887EF' ; const daiAddress = '0x6B175474E89094C44Da98b954EedeAC495271d0F' ; const repAddress = '0x1985365e9f78359a9B6AD760e32412f4a445E862' ; const usdcAddress = '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ; const wbtcAddress = '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599' ; const zrxAddress = '0xE41d2489571d322189246DaFA5ebDe1F4699F498' ; const oracleAddress = '0x0B844c32E21b47C9C03351D604d362B5201955E7' ; const isDeployed = true ; let oracle ; before ( 'set up contracts' , async ( ) => { if ( ! isDeployed ) { oracle = await Oracle . deployed ( ) ; console . log ( oracle . address ) ; } else { oracle = await Oracle . at ( oracleAddress ) ; } } ) ; describe ( 'test the prices' , async ( ) => { it ( 'test all the underlying token prices' , async ( ) => { console . log ( 'BAT Price ' + ( await oracle . getPrice ( batAddress ) ) . toString ( ) ) ; console . log ( 'Dai Price ' + ( await oracle . getPrice ( daiAddress ) ) . toString ( ) ) ; console . log ( 'Rep Price ' + ( await oracle . getPrice ( repAddress ) ) . toString ( ) ) ; console . log ( 'USDC Price ' + ( await oracle . getPrice ( usdcAddress ) ) . toString ( ) ) ; console . log ( 'wBTC Price ' + ( await oracle . getPrice ( wbtcAddress ) ) . toString ( ) ) ; console . log ( 'ZRX Price ' + ( await oracle . getPrice ( zrxAddress ) ) . toString ( ) ) ; } ) ; it ( 'test all the cToken prices' , async ( ) => { console . log ( 'cBAT Price ' + ( await oracle . getPrice ( cBATAddress ) ) . toString ( ) ) ; console . log ( 'cDai Price ' + ( await oracle . getPrice ( cDaiAddress ) ) . toString ( ) ) ; console . log ( 'cRep Price ' + ( await oracle . getPrice ( cREPAddress ) ) . toString ( ) ) ; console . log ( 'cUSDC Price ' + ( await oracle . getPrice ( cUSDCAddress ) ) . toString ( ) ) ; console . log ( 'cwBTC Price ' + ( await oracle . getPrice ( cWBTCAddress ) ) . toString ( ) ) ; console . log ( 'cZRX Price ' + ( await oracle . getPrice ( cZRXAddress ) ) . toString ( ) ) ; console . log ( 'cETH Price ' + ( await oracle . getPrice ( cETHAddress ) ) . toString ( ) ) ; } ) ; } ) ; } ) ;