aboutsummaryrefslogtreecommitdiffstats
path: root/test/compilationTests/gnosis/MarketMakers/LMSRMarketMaker.sol
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-07-02 17:14:28 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-07-03 00:58:44 +0800
commit9d23fd80130ca1d020cf3ba494751fd5e3aa5fde (patch)
treec392fe25bfc32af41f69744309df9b541953a002 /test/compilationTests/gnosis/MarketMakers/LMSRMarketMaker.sol
parent469dc7bbe72c3ac1c32d46a233e4bf0b36451c22 (diff)
downloaddexon-solidity-9d23fd80130ca1d020cf3ba494751fd5e3aa5fde.tar.gz
dexon-solidity-9d23fd80130ca1d020cf3ba494751fd5e3aa5fde.tar.zst
dexon-solidity-9d23fd80130ca1d020cf3ba494751fd5e3aa5fde.zip
Update compilation tests.
Diffstat (limited to 'test/compilationTests/gnosis/MarketMakers/LMSRMarketMaker.sol')
-rw-r--r--test/compilationTests/gnosis/MarketMakers/LMSRMarketMaker.sol12
1 files changed, 6 insertions, 6 deletions
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());