Skip to content

Commit 70a4b3c

Browse files
committed
update according to review comments
1 parent 3455a2b commit 70a4b3c

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

contracts/wrappers/SetStepFunctionWrapper.sol

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,17 @@ contract SetStepFunctionWrapper2 is Withdrawable {
2525
rateContract = _contract;
2626
}
2727

28-
function setImbalanceStepFunction(ERC20 token,
28+
function setImbalanceStepFunction(
29+
ERC20 token,
2930
int[] xBuy,
3031
int[] yBuy,
3132
int[] xSell,
3233
int[] ySell)
33-
public onlyOperator
34+
public onlyOperator
3435
{
3536
uint i;
3637

37-
// check all x for buy are positiv
38+
// check all x for buy are positive
3839
for( i = 0 ; i < xBuy.length ; i++ ) {
3940
require(xBuy[i] >= 0 );
4041
}

web3deployment/compileContracts.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ const input = {
66
"ConversionRates.sol" : fs.readFileSync(contractPath + 'reserves/fprConversionRate/ConversionRates.sol','utf8'),
77
"EnhancedStepFunctions.sol" : fs.readFileSync(contractPath + 'reserves/fprConversionRate/EnhancedStepFunctions.sol', 'utf8'),
88
"ConversionRatesInterface.sol" : fs.readFileSync(contractPath + 'ConversionRatesInterface.sol', 'utf8'),
9+
"reserves/fprConversionRate/ConversionRates.sol" : fs.readFileSync(contractPath + 'reserves/fprConversionRate/ConversionRates.sol','utf8'),
10+
"reserves/VolumeImbalanceRecorder.sol" : fs.readFileSync(contractPath + 'reserves/VolumeImbalanceRecorder.sol', 'utf8'),
11+
"VolumeImbalanceRecorder.sol" : fs.readFileSync(contractPath + 'reserves/VolumeImbalanceRecorder.sol', 'utf8'),
912
"PermissionGroups.sol" : fs.readFileSync(contractPath + 'PermissionGroups.sol', 'utf8'),
1013
"ERC20Interface.sol" : fs.readFileSync(contractPath + 'ERC20Interface.sol', 'utf8'),
1114
"ExpectedRate.sol" : fs.readFileSync(contractPath + 'ExpectedRate.sol', 'utf8'),
@@ -36,15 +39,13 @@ const input = {
3639
"Utils.sol" : fs.readFileSync(contractPath + 'Utils.sol', 'utf8'),
3740
"Utils2.sol" : fs.readFileSync(contractPath + 'Utils2.sol', 'utf8'),
3841
"Utils3.sol" : fs.readFileSync(contractPath + 'Utils3.sol', 'utf8'),
39-
"reserves/fprConversionRate/ConversionRates.sol" : fs.readFileSync(contractPath + 'reserves/fprConversionRate/ConversionRates.sol','utf8'),
40-
"reserves/VolumeImbalanceRecorder.sol" : fs.readFileSync(contractPath + 'reserves/VolumeImbalanceRecorder.sol', 'utf8'),
4142
"Withdrawable.sol" : fs.readFileSync(contractPath + 'Withdrawable.sol', 'utf8'),
4243
"WhiteList.sol" : fs.readFileSync(contractPath + 'WhiteList.sol', 'utf8'),
4344
"WhiteListInterface.sol" : fs.readFileSync(contractPath + 'WhiteListInterface.sol', 'utf8'),
4445
"WrapFeeBurner.sol" : fs.readFileSync(contractPath + 'wrappers/WrapFeeBurner.sol', 'utf8'),
4546
"KyberUniswapReserve.sol" : fs.readFileSync(contractPath + 'reserves/bridgeReserves/uniswap/KyberUniswapReserve.sol', 'utf8'),
4647
"WrapperBase.sol" : fs.readFileSync(contractPath + 'wrappers/WrapperBase.sol', 'utf8'),
47-
"SetStepFunctionWrapper.sol" : fs.readFileSync(contractPath + 'wrappers/SetStepFunctionWrapper.sol', 'utf8')
48+
"SetStepFunctionWrapper.sol" : fs.readFileSync(contractPath + 'wrappers/SetStepFunctionWrapper.sol', 'utf8'),
4849
"WrapConversionRate.sol" : fs.readFileSync(contractPath + 'wrappers/WrapConversionRate.sol', 'utf8'),
4950
"WrapReadTokenData.sol" : fs.readFileSync(contractPath + 'wrappers/WrapReadTokenData.sol', 'utf8')
5051
};

web3deployment/reserveEnhancedSteps.js renamed to web3deployment/reserveEnhancedStepsDeployer.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ async function main() {
187187
console.log('chainId', chainId);
188188
console.log('starting compilation');
189189
output = await require("./compileContracts.js").compileContracts();
190+
console.log(output.errors)
190191
console.log("finished compilation");
191192

192193
if (!dontSendTx) {
@@ -210,15 +211,22 @@ async function main() {
210211

211212
console.log("wrapperAddress", wrapperAddress);
212213

214+
let stepsSetterContract;
215+
let stepsSetterAddress;
216+
217+
console.log("deploying step function setter.");
218+
[stepsSetterAddress, stepsSetterContract] = await deployContract(output, "WrapConversionRate.sol:WrapConversionRate", [conversionRatesAddress]);
219+
213220
operators = ['0xF76d38Da26c0c0a4ce8344370D7Ae4c34B031dea','0xf3d872b9e8d314820dc8e99dafbe1a3feedc27d5']
214221
admin = '0xf3d872b9e8d314820dc8e99dafbe1a3feedc27d5';
215222

216223
await setPermissions(reserveContract, operators, operators, admin);
217224
await setPermissions(wrapperContract, operators, operators, admin);
225+
await setPermissions(stepsSetterContract, operators, operators, admin);
218226

219-
operators[2] = wrapperAddress;
227+
operators.push(stepsSetterAddress);
220228
await setPermissions(conversionRatesContract, operators, operators, admin);
221-
229+
console.log(operators)
222230
console.log("done for now...")
223231
return;
224232

0 commit comments

Comments
 (0)