From 1b1c62763c6f0ea65ce641f0bec97dd5859b33d1 Mon Sep 17 00:00:00 2001 From: Nick Pai Date: Tue, 22 Jun 2021 10:34:07 -0400 Subject: [PATCH 1/2] improve: Enhance block explorer verification --- index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 89795f3..512715b 100644 --- a/index.js +++ b/index.js @@ -108,12 +108,17 @@ const libraryAddress = argv.libraryAddress ? argv.libraryAddress : "0x0000000000 ...empParams, tokenAddress: await emp.methods.tokenCurrency().call(), finderAddress: await emp.methods.finder().call(), - tokenFactoryAddress: getAddress("TokenFactory"), timerAddress: await emp.methods.timerAddress().call() }; + // Delete params only needed to pass into EMPCreator.deploy() method that are not included in EMP constructor + // params. + delete empConstructorParams["syntheticName"]; + delete empConstructorParams["syntheticSymbol"]; + const encodedParameters = web3.eth.abi.encodeParameters( getAbi("ExpiringMultiParty")[0].inputs, [ empConstructorParams ]); - console.log("Encoded EMP Parameters", encodedParameters); + console.log("Encoded EMP Parameters", encodedParameters.slice(2)); + console.table(empConstructorParams); process.exit(0); })().catch((e) => { console.error(e); From fc1455778fe96e3164635c485663c59ca0484c11 Mon Sep 17 00:00:00 2001 From: Nick Pai Date: Tue, 22 Jun 2021 10:36:15 -0400 Subject: [PATCH 2/2] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 512715b..79f0f07 100644 --- a/index.js +++ b/index.js @@ -71,7 +71,7 @@ const libraryAddress = argv.libraryAddress ? argv.libraryAddress : "0x0000000000 disputeBondPercentage: { rawValue: toWei("0.1") }, // 10% dispute bond. sponsorDisputeRewardPercentage: { rawValue: toWei("0.05") }, // 5% reward for sponsors who are disputed invalidly disputerDisputeRewardPercentage: { rawValue: toWei("0.2") }, // 20% reward for correct disputes. - minSponsorTokens: { rawValue: parseFixed(argv.minSponsorTokens.toString(), decimals) }, // Minimum sponsor position size. + minSponsorTokens: { rawValue: parseFixed(argv.minSponsorTokens.toString(), decimals).toString() }, // Minimum sponsor position size. liquidationLiveness: 7200, // 2 hour liquidation liveness. withdrawalLiveness: 7200, // 2 hour withdrawal liveness. financialProductLibraryAddress: libraryAddress, // Default to 0x0 if no address is passed.