Adjust API for new ethers v5 API

see issue for details: https://github.com/ethers-io/ethers.js/issues/920#issuecomment-650836642
This commit is contained in:
2020-06-29 17:23:08 +02:00
parent bc38dcb136
commit 23d3dd3a80
18 changed files with 209 additions and 36 deletions

View File

@@ -30,11 +30,11 @@ class KreditsKit {
appIdFor (contractName) {
// see appIds in KreditsKit.sol for more details
const knownContracts = ['Contribution', 'Contributor', 'Proposal', 'Token'];
return this.contract.functions.appIds(knownContracts.indexOf(contractName));
return this.contract.appIds(knownContracts.indexOf(contractName));
}
newDAO (options = {}) {
return this.contract.functions.newInstance(options).then(transaction => {
return this.contract.newInstance(options).then(transaction => {
return transaction.wait().then(result => {
const deployEvent = result.events.find(e => e.event === 'DeployInstance');
return {