Manuel Wiedenmann a9093c1c40 Fix linter errors
# Conflicts:
#	lib/contracts/contribution.js
#	lib/contracts/contributor.js
#	lib/contracts/proposal.js
#	lib/kredits.js
#	lib/utils/pagination.js
2019-04-13 00:08:12 +02:00

25 lines
441 B
JavaScript

class Base {
constructor (contract) {
this.contract = contract;
}
get functions () {
return this.contract.functions;
}
get ipfs () {
if (!this._ipfsAPI) { throw new Error('IPFS API not configured; please set an ipfs instance'); }
return this._ipfsAPI;
}
set ipfs (ipfsAPI) {
this._ipfsAPI = ipfsAPI;
}
on (type, callback) {
return this.contract.on(type, callback);
}
}
module.exports = Base;