69 Commits

Author SHA1 Message Date
ad034d7712 Naming is hard 2019-04-19 14:15:30 +02:00
59135bf312 Add contract calls for total contribution balances
Those methods return the total kredits amounts of contribtions.
2019-04-19 13:06:36 +02:00
952b5153fd
Validate proposed contributions 2019-04-11 13:46:42 +02:00
4c0bb879e8
Show IPFS hash in list script output 2019-04-11 11:01:45 +02:00
b00ddda312
Merge pull request #92 from 67P/feature/contribution_schema
Validate contribution docs against schema
2019-04-11 08:40:38 +02:00
130e2a7797
Validate contribution docs against schema
Currently requires an open PR branch for the schemas, which is adding
date and time for contributions.

refs #30
2019-04-10 18:37:02 +02:00
26d12ba239 Store kredits tokens as wei with 18 decimals
This stores the tokens with 18 decimals as most other tokens and as
assumed by a potential future token standard EIP 777.
2019-04-10 13:59:00 +02:00
f21c4cf9de Fix confirmed contribution check
If the blocknumber is higher or equal the contribution.confirmedAt block
number then the contribution is confirmed and can be claimed.
2019-04-09 22:30:17 +02:00
26c2710149
Improve list-contributions script
* Improve sort order of table columns
* Print if the contribution is confirmed
* Log error if something goes wrong
2019-04-06 17:56:48 +02:00
766463b57b Dynamic function to test for core contributor flag
This removes the isCore flag and allows us to dynamically calculate the
core flag for contributors.

For now this is just us (the first 6 contirbutors)

Also we do not need the default contributor anymore because the deploy
user has the role to manage contributors and can create the first real
contributors.
2019-04-05 18:55:21 +02:00
551edcfa72 Fix init kredits for readonly providers
The apm option was not passed on to kredits
2019-04-05 01:05:16 +02:00
99394e7f14
Merge pull request #73 from 67P/feature/contribution_owner
Convert contribution owner to ID, use smaller number formats
2019-04-04 21:40:16 +00:00
8ceab08bfc ups 2019-04-04 23:23:02 +02:00
40c5d2a275
Merge branch 'master' into feature/contribution_owner 2019-04-04 23:12:16 +02:00
a049f2eedb
Adjust proposals for format changes 2019-04-04 23:11:43 +02:00
afbd114a36 Add app upgrade helper script
This script deploys a new app version, upgrades the given DAO to the
latest version of that app and builds the ABI files for the wrapper.

usage:

    scripts/upgrade.sh <app name> <dao address>

e.g.

    scripts/upgrade.sh token 0xfoobar

The DAO address can also be set as environment variable
$KREDITS_DAO_ADDRESS
2019-04-04 19:51:38 +02:00
db312dafbf Add some helpers to reset a fresh DAO 2019-04-04 19:27:57 +02:00
5b49f82544
Adjust wrapper and scripts for contract changes 2019-04-04 16:24:37 +02:00
786f38cfb7
Print errors in seed contract calls 2019-04-04 15:25:31 +02:00
92da07dca2
Merge pull request #67 from 67P/feature/contributor-balance-1
Add balance when loading contributor
2019-04-03 20:22:50 +02:00
74e61e1393 Show balance in list-contributors helper script 2019-04-03 14:05:16 +02:00
ed3e5dd4c4
Allow seed tx to fail
This allows for running seeds multiple times, e.g. after adding new
ones.
2019-04-03 11:41:55 +02:00
9984ca66ba Use namehash from ethers.utils
no need for the additional dependency
2019-04-03 10:24:11 +02:00
91135dbc82 Fix deploy-kit helper script
We no longer need the app ids as json. Those are dynamically calculated
now
2019-04-02 18:06:33 +02:00
adb7122a28
Add helper script for updating local address file
Can be run after starting the devchain, so that all local truffle
scripts work with the new network ID.
2019-04-02 17:35:28 +02:00
ce446e530d Set Kreits apm from arapp.json file in helper scripts
different networks might require different apm domains. We set those in
the arapp.json file which we can reuise to init the kredits instance in
the helper scripts.
2019-04-02 09:58:44 +02:00
61fa26da7a Add more information output to the send funds helper 2019-04-01 11:53:50 +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
0cc67c2fad Support getting the network version from different web3
version/providers
2019-03-29 12:07:09 +01:00
4bd1aed197 Refactor kredits init in helper scripts
This now also supports readonly providers like infura
2019-03-29 12:05:51 +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
4f5ae01c5a Add helper funtion to list contract entries 2019-03-28 11:16:20 +01:00
d6f99f57b7 Auto resolve promises in repl 2019-03-28 11:12:32 +01:00
b6f34ac9a5 Pretty print JSON for contract addresses
This makes it easier to read the file and a git diff is more useful
2019-03-27 21:58:19 +01:00
258c6729b6 Cleanup scripts and use helper to get the networkid 2019-03-27 17:06:52 +01:00
0686c79998 Print dao address and kreditskit address 2019-03-27 16:56:24 +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
9cc237fbf4 Support web3 providers that do not support sync calls
This is currently the non default web3 provider used for rinkeby etc.
2019-03-26 00:35:22 +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
12341d1526 Add script to print current DAO address 2019-03-24 16:09:00 +01:00
14b23ecdf1 move app bootstrap script to scripts 2019-03-24 15:45:48 +01:00
1594bf0e17 update seeds 2019-03-24 00:39:46 +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
89261d039a Fix contributor id lookup for proposal creation script 2018-04-26 02:42:31 +02:00
b1345b53f3 Add repl.js helper script
This is similar to the cli.js helper but only provides an initialized
`kredits` instance.
The cli.js is for executing contract functions
2018-04-23 16:24:40 +02:00
847f5a251c Allow funding accounts with the seeds script 2018-04-23 13:43:35 +02:00
6378df7075 cleanup 2018-04-23 12:11:26 +02:00