158 Commits

Author SHA1 Message Date
70b9edbcac Update ipfs package 2019-04-03 21:01:51 +02:00
6351db3057 Add balance when loading contributor
This is a regression introduced by the latest contract updates.
Now we return the balance again when loading contributor data.
2019-04-03 13:56:52 +02:00
9984ca66ba Use namehash from ethers.utils
no need for the additional dependency
2019-04-03 10:24:11 +02:00
fedb10c5da Dynamically get app ids from the namehash
This dynamically hashes the app id which makes it easier to manually set
contract addresses. This is useful in development environments with no
default network ids.
The used apm (which is part of the app id hash) is configurable.

usage:

new Kredits(provider, signer, { addresses: { Kernel: '0x...' }, apm: 'aragonpm.eth' })
2019-04-01 22:41:00 +02:00
a24f80d44f
Change addresses 2019-04-01 14:04:11 +02:00
9512ba4334
Update contract addresses 2019-04-01 11:19:30 +02:00
c2f763bec7
Add missing variable assignment 2019-04-01 11:16:55 +02:00
51e5da414f Update ethers.js to latest version v4
The main change is how ethers loads the networkId which is now async.
Thus the init process had to change a bit
2019-03-29 18:13:51 +01:00
3662f1ae24 Add Operator getter for backwards compatibility 2019-03-29 15:03:37 +01:00
38079d07db remove debug console 2019-03-29 12:07:52 +01:00
a45be0021e Fix old registry reference 2019-03-29 12:06:43 +01:00
94832d4d07 Add ACL contract wrapper
this mainly allows us to check if an account has a certain role and thus
if the account can call specific contract functions.

At some point we might want to extend that to support the check if an
account can call the function. For that we would need to have a mapping
between function names and roles, which we have not right now.
2019-03-28 12:39:04 +01:00
901566d1ff Update network specific addresses and app ids 2019-03-28 11:11:49 +01:00
5d4be8f176 Update ABIs used by wrapper 2019-03-28 11:09:49 +01:00
f9ab8b225a Fix proposal wrapper to support the latest contracts 2019-03-28 11:08:34 +01:00
b201642485 remove obsolete comment 2019-03-27 16:56:52 +01:00
7e68dbf8c2 rinkeby deployment 2019-03-27 00:39:00 +01:00
f5973756c8 Dynamically set AppIds
AppIds are used to lookup the actual contract addresses of each app.
Because of different registry names (open.aragonpm.eth vs. aragonpm.eth)
we have to use different ids in the local dev chain and in the
testnet/mainnet. To allow this we need to set the appids dynamically.

There is an open aragon issue to solve this and also allow to use
open.aragonpm.eth in the devchain by default.
https://github.com/aragon/aragen/issues/10
2019-03-27 00:21:06 +01:00
3584a73c08 Set kredits-<name>.open.aragonpm.eth as appid hashes 2019-03-26 00:34:46 +01:00
3c2cdf4376 Deployment hacking while trying to deploy on rinkeby
This currently breaks the local usage because of the different appIds:
<name>.open.aragonpm.eth vs. <name>.aragonpm.eth (local)
2019-03-26 00:18:59 +01:00
e1fea4ed97 refactor DAO deployment 2019-03-24 22:11:24 +01:00
116f69cb12 cleanup 2019-03-24 00:20:48 +01:00
6c569239de refactor contrats with aragonos 2019-03-23 19:15:23 +01:00
dae44cac70 Continue Contribution contract and JS wrapper 2018-09-29 19:46:37 +02:00
7216522d83 Update Operator ABI 2018-06-15 09:42:29 +02:00
956f858620 Rename healthcheck to preflight 2018-06-07 16:39:07 +02:00
da2f951bdb
Merge pull request #42 from 67P/feature/filter-contributors-by-account
Add filter and find by account function to contributors
2018-04-26 14:27:26 +00:00
017073018f Use more readable Array.every method instead of reduce 2018-04-26 15:35:32 +02:00
fe1fa2e881 Allow filter and find for contributors by account data 2018-04-26 14:51:18 +02:00
c367c9cf6b
Merge pull request #44 from 67P/add-contributors-alias
Add Contributors alias for Contributor
2018-04-26 11:52:23 +00:00
52643da096 typo 2018-04-26 13:52:09 +02:00
ad5fe3ae77 Add Contributors alias for Contributor
Because the contract is named `Contributors` we alias to `Contributor` which will become the new contract name if we manage to change it.
2018-04-26 12:41:51 +02:00
3895553e88 Use destructuring for options
This makes it more readable what options are used
2018-04-26 10:23:27 +02:00
2e8d00bc2c Add a filter by account function to contributors
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

```
2018-04-23 16:29:44 +02:00
78b47753b3 Constructor confugration options
This changes the function signature of the constructor but allows us to
pass any options.
Mainly this is now used for the ipfs configs.
2018-04-23 11:01:08 +02:00
471c705e64 Replaces the ipfsHash buffer with a B58 string 2018-04-21 20:59:59 +02:00
92c566c13c Fix build-json to merge addresses 2018-04-21 20:01:46 +02:00
7ba32bb0ed Extract healthcheck into its own class
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.
2018-04-21 16:45:04 +02:00
772071c699 Merge branch 'master' into fallback-provider
# Conflicts:
#	lib/kredits.js
2018-04-21 11:18:56 +02:00
6f02a4d4b2
Merge pull request #35 from 67P/refactor/kredits-init
Refactor kredits address initialization
2018-04-21 08:32:57 +00:00
92f3963c5a Remove not needed static contractNames function 2018-04-20 13:01:44 +02:00
3da3e22214 Refactor kredits address initialization
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(...);
2018-04-20 03:08:18 +02:00
6738abd0b3 Add support for contract tx call options
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)
2018-04-20 02:09:30 +02:00
fbd15953ab Rename contributorAttr address -> account 2018-04-20 00:16:14 +02:00
b6bc5af7bf Serialize details in contributions 2018-04-19 15:39:00 +02:00
7f56e1163a Add accounts to contributor serialization 2018-04-19 15:23:15 +02:00
3ad9835f79 Add kovan deployment 2018-04-19 15:02:40 +02:00
42bfb3d24e Fallback to provider if no contract signer is given
No signing functions will be available then.
2018-04-19 01:30:27 +02:00
a16cd862f6 Better ipfs handling and default configs 2018-04-19 00:40:33 +02:00
424a2c4d02 Fix token modle.exports 2018-04-19 00:28:03 +02:00