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.
This persists the state of the ganache db and uses a fixed mnemonic
code to create accounts.
It now acts more like a local presistent database and no need to
send funds to the accounts after restart.
The batchVote function accepts an array of proposal ids and votes for
every one.
Normally arrays without fix length are problematic and gas usage can not be
estimated really well. So we need to see how that works or what other
pattern could be used.
Adding a voterIds array to the proposal.
This allows us to check if a user already has voted on a proposal.
As this is not directly supported by the default proposals accessor this
also adds a getProposal function to get all proposal data.