The contribution contract implements an ERC721 interface which
represents any contribution.
The contributions are non-fungible (as opposed to the Kredits tokens)
and can be not be transferred. The contract stores the history of any
contribution.
Contributions can be claimed which will issue the Kredits tokens to the
contributor.
This is an early implementation and misses some access control and
probably more things.
This allows to filter contributors by the account entries.
For example:
```js
Contributor.filterByAccount({site: 'github.com'}); // returns all
contributors with github account
Contributor.filterByAccount({site: 'github.com', username: 'bumi'});
// returns bumi
```
This moves the whole checks if everything is running into its own class
and is no longer inside the different functions.
Makes the functions smaller and the healthcheck can be used from the
client only if wanted/needed.
This reuses the kredits library functions in the helper scripts and
seeds. We no longer need to add IPFS hashes manually but simply can
provider contributor/proposal data.
This moves the Kredits initialization to the instance which allows us to
be more flexible with handling contract addresses.
Example:
var k = new Kredits(provider, signer, {Registry: '0xabc'});
k.init().then((kredits) { ...});
var k = new Kredits(provider, signer, {Contributors: '0xabc'})
k.Contributor.add(...);
This allows to provide options like gas price/limit settings for the
state changing contract calls.
These options are simply passed to the ethers contract instance.
We need to provide the gas limit when using the jsonrpc provider.
(ganache failed with revert if not enought gas was provider)
This makes it easier to handle truffle arguments which we for example
need to specify the network.
So we ask the user for input instead on using the argv array which might
change.