Add JS wrapper for Kit contract #130

Merged
bumi merged 4 commits from feature/kredits-kit-wrapper into master 2019-06-09 11:56:33 +00:00
Showing only changes of commit ccd52f6ee5 - Show all commits

View File

@@ -6,12 +6,12 @@ const Addresses = require('./addresses/KreditsKit.json');
class KreditsKit { class KreditsKit {
constructor (provider, signer, options = {}) { constructor (provider, signer, options = {}) {
let { address, abi, ipfsConfig } = options; let { address, abi } = options;
this.provider = provider; this.provider = provider;
this.signer = signer; this.signer = signer;
this.options = options; this.options = options;
this.address = address this.address = address;
this.abi = abi || ABI; this.abi = abi || ABI;
} }
@@ -39,8 +39,8 @@ class KreditsKit {
const deployEvent = result.events.find(e => e.event === 'DeployInstance'); const deployEvent = result.events.find(e => e.event === 'DeployInstance');
return { return {
daoAddress: deployEvent.args.dao, daoAddress: deployEvent.args.dao,
transactionHash: transaction.hash transactionHash: transaction.hash,
} };
}); });
}); });
} }