From d486d9cf6add87c43dae335eca755ee13ce8be8d Mon Sep 17 00:00:00 2001 From: David Roon Date: Mon, 14 Jun 2021 15:04:26 +0200 Subject: [PATCH] avoid using pastEvents to get dao registry address (#310) * avoid using pastEvents to get dao registry address * fix lint --- utils/DeploymentUtil.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/utils/DeploymentUtil.js b/utils/DeploymentUtil.js index 609eca489..f1f2ceb16 100644 --- a/utils/DeploymentUtil.js +++ b/utils/DeploymentUtil.js @@ -668,10 +668,9 @@ const cloneDao = async ({ await daoFactory.createDao(name, creator ? creator : owner, { from: owner }); // checking the gas usaged to clone a contract - let pastEvents = await daoFactory.getPastEvents(); - let { _address, _name } = pastEvents[0].returnValues; + let _address = await daoFactory.getDaoAddress(name); let newDao = await DaoRegistry.at(_address); - return { dao: newDao, daoFactory, daoName: _name }; + return { dao: newDao, daoFactory, daoName: name }; }; const createBankExtension = async (