@@ -3,17 +3,18 @@ pragma solidity ^0.4.18;
33import "../ERC20Interface.sol " ;
44import "../Withdrawable.sol " ;
55
6+
67interface SetStepFunctionInterface {
7- function setImbalanceStepFunction (
8- ERC20 token ,
9- int [] xBuy ,
10- int [] yBuy ,
11- int [] xSell ,
12- int [] ySell
13- ) public ;
8+ function setImbalanceStepFunction (
9+ ERC20 token ,
10+ int [] xBuy ,
11+ int [] yBuy ,
12+ int [] xSell ,
13+ int [] ySell
14+ ) public ;
1415}
1516
16- contract SetStepFunctionWrapper is Withdrawable {
17+ contract SetStepFunctionWrapper2 is Withdrawable {
1718 SetStepFunctionInterface public rateContract;
1819 function SetStepFunctionWrapper (address admin , address operator ) public {
1920 addOperator (operator);
@@ -25,22 +26,32 @@ contract SetStepFunctionWrapper is Withdrawable {
2526 }
2627
2728 function setImbalanceStepFunction (ERC20 token ,
28- int [] xBuy ,
29- int [] yBuy ,
30- int [] xSell ,
31- int [] ySell ) public onlyOperator {
29+ int [] xBuy ,
30+ int [] yBuy ,
31+ int [] xSell ,
32+ int [] ySell )
33+ public onlyOperator
34+ {
3235 uint i;
3336
34- // check all x for buy are positive and y are negative
37+ // check all x for buy are positiv
3538 for ( i = 0 ; i < xBuy.length ; i++ ) {
36- require (xBuy[i] >= 0 );
37- require (yBuy[i] <= 0 );
39+ require (xBuy[i] >= 0 );
40+ }
41+
42+ // check all y for buy are negative
43+ for ( i = 0 ; i < yBuy.length ; i++ ) {
44+ require (yBuy[i] <= 0 );
3845 }
3946
40- // check all x for sell are negative and y are negative
47+ // check all x for sell are negative
4148 for ( i = 0 ; i < xSell.length ; i++ ) {
42- require (xSell[i] <= 0 );
43- require (ySell[i] <= 0 );
49+ require (xSell[i] <= 0 );
50+ }
51+
52+ // check all y for sell are negative
53+ for ( i = 0 ; i < ySell.length ; i++ ) {
54+ require (ySell[i] <= 0 );
4455 }
4556
4657 rateContract.setImbalanceStepFunction (token,xBuy,yBuy,xSell,ySell);
0 commit comments