Commit Graph
100 Commits
Author SHA1 Message Date
bumiandGitHub a86ea08bdf Merge pull request #128 from 67P/feature/simple-init
Add helper to initialize a new instance with provider
2019-05-17 07:37:10 +00:00
bumi e20bda73fb Remove not needed network check
We default to localhost anyway
2019-05-17 09:17:10 +02:00
bumi 4c64aa7c2a linting 2019-05-14 12:03:29 +02:00
bumi 1a227ba67c Linting 2019-05-14 11:31:33 +02:00
bumi df7536589d Add helper to initialize a new instance with provider
So far we always had to initialze a provider and signer and pass those
to the kredits constructor.
This helper makes it easier to initialize a default ethers provider and
a default signer.
2019-05-14 11:25:21 +02:00
bumiandGitHub 37ce2fddde Merge pull request #124 from 67P/bugfix/fix-me-1
Fix util import
2019-05-04 08:40:58 +00:00
bumi 3a43284557 Fix page number calculation for zero records
So far it returned 0 because of those in range checks which both
applied because numberOfPages is 0 if we have no record.
2019-05-04 01:34:05 +02:00
bumi 572848c04a Fix util import 2019-05-04 01:09:22 +02:00
bumiandGitHub b6ce9dcfc8 Merge pull request #118 from 67P/deprecate/old-add-methods
Deprecate old add* methods
2019-05-01 18:12:18 +00:00
bumiandGitHub f9f2ef234e Merge pull request #122 from 67P/feature/veto_script
Add script for vetoing via console
2019-05-01 18:05:37 +00:00
bumi ad74d30aa7 Contributor canPerform fix deployment 2019-04-25 22:25:38 +02:00
bumi c69ebd0a62 Fix canPerform method
Even if the variable is not used and the linter might complain we have
to have that parameter in the signature. otherwise the method is not
found and can not be called.
2019-04-25 22:06:40 +02:00
bumi b04d572b9a Fix apps lookup
We use the directories in ./apps to load available app names.
For this we need to make sure that we only use directories.
2019-04-25 16:45:39 +02:00
bumiandGitHub d643e5842c Merge pull request #97 from 67P/chore/linter
Add linter and travis.yml
2019-04-24 18:28:32 +00:00
bumi a87d5326bf Oh my package-lock 2019-04-24 20:17:03 +02:00
bumi 4649de24c8 Deploy notes for latest contributor and contribution deployment 2019-04-24 17:32:58 +02:00
bumiandGitHub 58db57ee45 Merge branch 'master' into feature/kredits-formatter 2019-04-24 13:10:48 +00:00
bumiandGitHub b64a7ca299 Merge pull request #113 from 67P/feature/gitea_site
Add Gitea site/username to serializer and seeds
2019-04-24 12:58:44 +00:00
bumiandGitHub 6f09ca8d13 Merge pull request #114 from 67P/chore/scripts
Improve/fix scripts
2019-04-24 12:57:43 +00:00
bumi 6f53c8097e Wrap anything that could break in the try/catch block 2019-04-24 14:55:35 +02:00
bumiandGitHub 48c8f6b9b3 Merge branch 'master' into feature/kredits-formatter 2019-04-23 12:56:55 +00:00
bumiandGitHub cd45ce260f Merge pull request #112 from 67P/feature/update-contributor-profile
Update contributor profile
2019-04-20 09:22:31 +00:00
bumi 9714926e11 Add function to update contributor profile to wrapper
The function updates the contributor profile,
adds the new profile to IPFS and does the contract call to update
the profile hash
2019-04-20 02:17:38 +02:00
bumi 59614201b5 Ups... 2019-04-20 02:15:53 +02:00
bumi e591742e40 Add Contributor validation against JSON schema
based on the Contribution validation.
2019-04-20 01:10:46 +02:00
bumi 791190f5e7 Cleanup promise call 2019-04-20 00:30:20 +02:00
bumi 24b66daf2a Update ABI 2019-04-19 14:16:40 +02:00
bumi ad034d7712 Naming is hard 2019-04-19 14:15:30 +02:00
bumi 375d8f3275 Cleanup 2019-04-19 13:34:39 +02:00
bumiandGitHub 80dc787971 Merge pull request #109 from 67P/dev/list_contributors_error_handling
Handle errors in contributor list script
2019-04-19 11:22:38 +00:00
bumi 7967dc26f2 Update ABIs 2019-04-19 13:20:25 +02:00
bumi c248725cc1 Add balances to getContributorById call 2019-04-19 13:19:55 +02:00
bumi 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
bumi 3cb94fb660 Add kredits-formatter and additionally format balance
This adds a `balanceInt` value to the contributor data that has the
token balance formatted as full Kredits. (similar to Ether)
2019-04-19 11:57:35 +02:00
bumiandGitHub 5820d71b2c Merge pull request #96 from 67P/feature/pagination
Add pagination for .all methods
2019-04-17 13:53:17 +00:00
bumiandGitHub 4771c0c8a0 Merge branch 'master' into feature/pagination 2019-04-17 13:52:53 +00:00
bumiandGitHub 8abc7ba77f Merge pull request #104 from 67P/chore/update-kosmos-schema
Update kosmos-schema dependency
2019-04-16 11:19:03 +00:00
bumi f696721918 Readme: add note about locally running out of funds 2019-04-16 13:17:54 +02:00
bumi 00b58dec66 Update kosmos-schema dependency 2019-04-16 13:16:05 +02:00
bumiandGitHub 560315cbca Merge pull request #102 from 67P/chore/add-yarn-support
Add yarn lock files
2019-04-15 15:54:38 +00:00
bumi b13bf6e8b0 Readme: add note about locally running out of funds 2019-04-15 15:59:54 +02:00
bumiandGitHub 8dcad88372 Merge pull request #99 from 67P/update-seeds
Update seeds
2019-04-15 10:39:10 +00:00
bumiandGitHub b6c06c289c Merge pull request #95 from 67P/cosmetics
Cosmetic cleanups
2019-04-12 18:55:59 +00:00
bumiandGitHub f405e39c04 Merge pull request #94 from 67P/bugfix/schema_changes
Refactor contribution serializer and validation
2019-04-12 18:54:56 +00:00
bumi 27e5190e29 Production release to rinkeby
Deployed all apps and created a new Kredits DAO
2019-04-10 18:28:24 +02:00
bumi 4d2e0ea84b Update Token symbol 2019-04-10 15:50:33 +02:00
bumi 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
bumi 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
bumiandGitHub 9ca0580db6 Merge pull request #85 from 67P/dev/fix_seeds
Fix contributor ID in seeds
2019-04-09 07:33:42 +00:00
bumi 65d9cf2a06 Fix bootstrap
This runs npm install for every app through a postinstall hook.
2019-04-08 18:10:13 +02:00
bumiandGitHub b35dc2049b Merge pull request #82 from 67P/dev/list_contributions
Improve list-contributions script
2019-04-06 19:40:24 +00:00
bumiandGitHub cc24c27444 Merge pull request #80 from 67P/chore/rename-ipfshash-1
Rename ipfsHash to hashDigest in Contributor
2019-04-06 13:55:19 +00:00
bumi f717968402 Better function naming to update contributor profiles 2019-04-06 15:42:16 +02:00
bumi 14d7fbd75e Rename ipfsHash to hashDigest in Contributor
naming should be consistent with the other contracts and digest is more
correct.
2019-04-06 15:24:44 +02:00
bumi a0e4f5410d Set veto period to 1 week
This makes a contribution claimable after roughly 7 days
2019-04-05 20:30:02 +02:00
bumi 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
bumi 6510dca4b1 Fix provider fallbacks for non dev networks
This now checks if frame or a local node is running and else uses infura
to connect to the ethereum network.
Now you can use all the helpers for the testnets/mainnet without running
anything (in readonly mode)
2019-04-05 13:51:23 +02:00
bumi 551edcfa72 Fix init kredits for readonly providers
The apm option was not passed on to kredits
2019-04-05 01:05:16 +02:00
bumi d58e2d560a deploy to rinkeby 2019-04-05 00:38:51 +02:00
bumiandGitHub 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
bumi 8ceab08bfc ups 2019-04-04 23:23:02 +02:00
bumi 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
bumi db312dafbf Add some helpers to reset a fresh DAO 2019-04-04 19:27:57 +02:00
bumiandGitHub 732dfe7b29 Merge pull request #71 from 67P/chore/update_seeds
Update seeds
2019-04-04 11:32:58 +00:00
bumiandGitHub 3ce8f41d32 Merge pull request #72 from 67P/chore/whitespace
Remove unnecessary space chars
2019-04-04 11:17:35 +00:00
bumi 6b9466c348 Update seeds
Claim contribution which issues Kredits to the contributor
2019-04-03 21:40:37 +02:00
bumi 9fffdbfb58 Fix permissions to manage contributors
Uses the contributor oracle to decide if somebody has the
MANAGE_CONTRIBUTOR_ROLE
2019-04-03 21:22:53 +02:00
bumi 70b9edbcac Update ipfs package 2019-04-03 21:01:51 +02:00
bumiandGitHub 6fed81c0ed Merge pull request #66 from 67P/chore/seeds
Allow seed tx to fail
2019-04-03 17:03:22 +00:00
bumi 74e61e1393 Show balance in list-contributors helper script 2019-04-03 14:05:16 +02:00
bumi 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
bumi 9984ca66ba Use namehash from ethers.utils
no need for the additional dependency
2019-04-03 10:24:11 +02:00
bumi 1b09a30646 Fix contributor oracle permission auth
It seems that the entity is either defined by the permission or if we
want to use the oracle the permission must be defined for any_entity.
In that case the oracle does not get the msg.sender as who/entity thus
we will use tx.origin in that case.
2019-04-03 10:06:00 +02:00
bumi 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
bumi 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
bumi 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
bumi 61fa26da7a Add more information output to the send funds helper 2019-04-01 11:53:50 +02:00
bumi 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
bumi 3662f1ae24 Add Operator getter for backwards compatibility 2019-03-29 15:03:37 +01:00
bumi c568263fea update eth-provider to support different providers
Ideally eth-provider checks which connection is available and uses the
available one.
frame => local node => infura

But it seems there is still a bug and it raises an error if frame is not
available.
But at least we can use frame now for testnet/mainnet deployments
2019-03-29 12:08:07 +01:00
bumi 38079d07db remove debug console 2019-03-29 12:07:52 +01:00
bumi 0cc67c2fad Support getting the network version from different web3
version/providers
2019-03-29 12:07:09 +01:00
bumi a45be0021e Fix old registry reference 2019-03-29 12:06:43 +01:00
bumi 4bd1aed197 Refactor kredits init in helper scripts
This now also supports readonly providers like infura
2019-03-29 12:05:51 +01:00
bumi 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
bumi 4f5ae01c5a Add helper funtion to list contract entries 2019-03-28 11:16:20 +01:00
bumi d6f99f57b7 Auto resolve promises in repl 2019-03-28 11:12:32 +01:00
bumi 901566d1ff Update network specific addresses and app ids 2019-03-28 11:11:49 +01:00
bumi 5d4be8f176 Update ABIs used by wrapper 2019-03-28 11:09:49 +01:00
bumi f9ab8b225a Fix proposal wrapper to support the latest contracts 2019-03-28 11:08:34 +01:00
bumi dfa55516ec Add contribution veto function
Allows anybody with the VETO_CONTRIBUTION_ROLE to veto a contribution
and thus prevent that the contribution can be claimed.
So far like the ADD_CONTRIBUTION_ROLE any contributor is allowed to
veto.
2019-03-28 11:06:19 +01:00
bumi 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
bumi 258c6729b6 Cleanup scripts and use helper to get the networkid 2019-03-27 17:06:52 +01:00
bumi b201642485 remove obsolete comment 2019-03-27 16:56:52 +01:00
bumi 0686c79998 Print dao address and kreditskit address 2019-03-27 16:56:24 +01:00
bumi 7e68dbf8c2 rinkeby deployment 2019-03-27 00:39:00 +01:00
bumi 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
bumi 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
bumi 3584a73c08 Set kredits-<name>.open.aragonpm.eth as appid hashes 2019-03-26 00:34:46 +01:00
bumi 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