Skip to content

Commit aa6a754

Browse files
committed
Add check for proxies in storage for proxy re-deployment
1 parent 6c96669 commit aa6a754

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

web3deployment/KatalystDeploy/katalystNetworkDeployer.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,15 @@ async function waitForMatchingEngineAndStorageUpdate() {
565565
}
566566
}
567567

568+
async function checkZeroProxies() {
569+
let networkProxies = await storageContract.methods.getKyberProxies().call();
570+
if (networkProxies.length > 0) {
571+
console.log("\x1b[41m%s\x1b[0m" ,"Existing kyberProxies in storage, remove before proceeding");
572+
process.exit(1);
573+
}
574+
return;
575+
}
576+
568577
async function setNetworkAddressInMatchingEngine(tempAddress) {
569578
console.log("set network in matching engine");
570579
if (tempAddress == undefined) {
@@ -760,6 +769,7 @@ async function listReservesForTokens() {
760769
}
761770

762771
async function redeployProxy() {
772+
await checkZeroProxies();
763773
await setNetworkInProxy();
764774
await setHintHandlerInProxy();
765775
await pressToContinue();

web3deployment/KatalystDeploy/katalyst_deployer_ropsten_input.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,7 @@
148148
"neg diff in bps" : 20,
149149

150150
"epoch period": 2700,
151-
<<<<<<< HEAD
152-
"start timestamp": 1591983945,
153-
=======
154151
"start timestamp": 1591848000,
155-
>>>>>>> 25c50ac... update change from katalyst_iteration3
156152
"network fee bps": 30,
157153
"reward fee bps": 3850,
158154
"rebate bps": 3000,

0 commit comments

Comments
 (0)