From 9d23fd80130ca1d020cf3ba494751fd5e3aa5fde Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Mon, 2 Jul 2018 11:14:28 +0200 Subject: Update compilation tests. --- .../compilationTests/gnosis/MarketMakers/LMSRMarketMaker.sol | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/compilationTests/gnosis/MarketMakers/LMSRMarketMaker.sol') diff --git a/test/compilationTests/gnosis/MarketMakers/LMSRMarketMaker.sol b/test/compilationTests/gnosis/MarketMakers/LMSRMarketMaker.sol index 344dd8d2..cf4fcd7d 100644 --- a/test/compilationTests/gnosis/MarketMakers/LMSRMarketMaker.sol +++ b/test/compilationTests/gnosis/MarketMakers/LMSRMarketMaker.sol @@ -24,7 +24,7 @@ contract LMSRMarketMaker is MarketMaker { /// @return Cost function calcCost(Market market, uint8 outcomeTokenIndex, uint outcomeTokenCount) public - constant + view returns (uint cost) { require(market.eventContract().getOutcomeCount() > 1); @@ -59,7 +59,7 @@ contract LMSRMarketMaker is MarketMaker { /// @return Profit function calcProfit(Market market, uint8 outcomeTokenIndex, uint outcomeTokenCount) public - constant + view returns (uint profit) { require(market.eventContract().getOutcomeCount() > 1); @@ -85,7 +85,7 @@ contract LMSRMarketMaker is MarketMaker { /// @return Marginal price of an outcome as a fixed point number function calcMarginalPrice(Market market, uint8 outcomeTokenIndex) public - constant + view returns (uint price) { require(market.eventContract().getOutcomeCount() > 1); @@ -110,7 +110,7 @@ contract LMSRMarketMaker is MarketMaker { /// @return Cost level function calcCostLevel(int logN, int[] netOutcomeTokensSold, uint funding) private - constant + view returns(int costLevel) { // The cost function is C = b * log(sum(exp(q/b) for q in quantities)). @@ -131,7 +131,7 @@ contract LMSRMarketMaker is MarketMaker { /// @return A result structure composed of the sum, the offset used, and the summand associated with the supplied index function sumExpOffset(int logN, int[] netOutcomeTokensSold, uint funding, uint8 outcomeIndex) private - constant + view returns (uint sum, int offset, uint outcomeExpTerm) { // Naive calculation of this causes an overflow @@ -170,7 +170,7 @@ contract LMSRMarketMaker is MarketMaker { /// @return Net outcome tokens sold by market function getNetOutcomeTokensSold(Market market) private - constant + view returns (int[] quantities) { quantities = new int[](market.eventContract().getOutcomeCount()); -- cgit