Skip to content

Commit

Permalink
add OLD test
Browse files Browse the repository at this point in the history
  • Loading branch information
daopunk committed Feb 8, 2024
1 parent da838c2 commit e13199b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/QMath.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,16 @@ contract QMath is Test {
assertApproxEqAbs(INIT_OD_AMOUNT / 1e18, _result / 1e18, 500); // $500 flux
}

// needs to be predeployed
function testCamelotRelayerPrice() public {
vm.warp(block.timestamp + 1 minutes + 1 seconds);
uint256 _result = camelotOdWethOracle.read();
emit log_named_uint('Camelot OD/WETH', _result); // / 1e18 =
emit log_named_uint('Camelot OD/WETH', _result);

assertApproxEqAbs(initPrice, _result, 100_000_000); // 0.000000000100000000 variability
assertEq(INIT_OD_AMOUNT / 1e18, _result);
}

// function testDenominatedOraclePrice() public {}
function testOldCamelotRelayerPrice() public {
vm.expectRevert(bytes('OLD'));
camelotOdWethOracle.read();
}
}

0 comments on commit e13199b

Please sign in to comment.