Skip to content

Commit

Permalink
avoid using pastEvents to get dao registry address (#310)
Browse files Browse the repository at this point in the history
* avoid using pastEvents to get dao registry address

* fix lint
  • Loading branch information
adridadou authored and fforbeck committed Sep 22, 2021
1 parent 0b15b89 commit d486d9c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions utils/DeploymentUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit d486d9c

Please sign in to comment.