This moves the Kredits initialization to the instance which allows us to be more flexible with handling contract addresses.
Example:
```js
var k = new Kredits(provider, signer, {Registry: '0xabc'});
k.init().then((kredits) { ...});
var k = new Kredits(provider, signer, {Contributors: '0xabc'})
k.Contributor.add(...);
```
instead of calling `setup`:
```js
Kredits.setup(provider, signer, ipfsConfig).then((kredits) => { ...});
```
`setup` is still available but deprecated.
Please note: if a custom IPFS config is needed this needs to be set on the `kredits` instance to overwrite the default:
```js
var k = await new Kredits(provider, signer).init();
k.ipfs = new IPFS(...);
```
fsmanuel
(Migrated from github.com)
reviewed 2018-04-20 10:22:06 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This moves the Kredits initialization to the instance which allows us to be more flexible with handling contract addresses.
Example:
instead of calling
setup:setupis still available but deprecated.Please note: if a custom IPFS config is needed this needs to be set on the
kreditsinstance to overwrite the default:@@ -21,65 +19,50 @@ function capitalize(word) {}We can use
Object.keys(ABIS)and removestatic get contractNames().Nice! Just a suggestion.