76 Commits

Author SHA1 Message Date
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
aedf2cc7bd
Merge pull request #34 from 67P/feature/support-contract-call-options
Add support for contract tx call options
2018-04-20 10:59:07 +00: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
d4ca8d7c25
Merge pull request #33 from 67P/feature/use-prompt
Use prompt instead of argv arguments in scripts
2018-04-19 22:26:29 +00:00
9669f0137b Use prompt instead of argv arguments in scripts
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.
2018-04-20 00:22:09 +02:00
fba767cd40 Only create only registry addresses 2018-04-20 00:18:06 +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
555cf1e12c
Merge pull request #28 from 67P/library
Hello wrapper library
2018-04-18 22:42:25 +00: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
8b0df655e8 Remove debug logs
The classes from the library should be less noisy
2018-04-19 00:23:28 +02:00
d5e68e1639 Hello wrapper library 2018-04-18 18:51:27 +02:00
38a25caaa4 Merge branch 'presist-ganache-db' 2018-04-17 13:24:43 +02:00
f2fc9fd161 Add empty Ganache DB directory 2018-04-17 13:13:52 +02:00
64ce554c49 readme 2018-04-16 11:01:43 +02:00
4b1cbbd0f7 Persist ganache DB and use fixed Mnemonic
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.
2018-04-15 21:03:12 +02:00
e0407cb31a
Merge pull request #24 from 67P/refactor/naming-conventions
More consistent contract parameter naming
2018-04-15 18:24:11 +00:00
9e57567cd3 rename recipent to contributor in token contract 2018-04-15 20:21:49 +02:00
d7c8ee46bd Rename recipientId to contributorId in Operator 2018-04-15 19:58:28 +02:00
00a7a4e511 Merge branch 'master' into refactor/naming-conventions
* master:
  Adjust seeds to new proposal storage
2018-04-15 19:39:30 +02:00
4fd35a86c8 update seeds 2018-04-15 19:35:30 +02:00
5235370960 Adjust seeds to new proposal storage 2018-04-15 15:37:11 +02:00
3a0350d581 Fix 2018-04-10 18:16:19 +02:00
b85117835d update contributor account vs. address 2018-04-10 18:02:00 +02:00
e116e7ebf3 Use new naming convention to call address things accounts
So here we use creatorAccount - similar to proposalId.
Like this we will always have an *Account or *Id as identifier.
2018-04-10 17:49:16 +02:00
147904e237 maybe more consitent 2018-04-10 16:40:11 +02:00
7f30006703 More consistent contract parameter naming 2018-04-10 16:25:17 +02:00
e9c6f1e4a7
Merge pull request #23 from 67P/refactor/contributor-naming-convention
Rename Contributors function parameter to be more consistent
2018-04-10 14:08:26 +02:00
71da31c1fd
Merge pull request #22 from 67P/features/add-voterids-to-proposals
Add voterIds to proposals
2018-04-10 14:01:24 +02:00
7f4a26108c
Merge pull request #21 from 67P/features/cli-repl
Make the CLI a real REPL
2018-04-10 13:54:33 +02:00
163a57af98 Rename Contributors function parameter to be more consitent 2018-04-09 21:50:35 +02:00
b3d19e556c Make the CLI a real reply
After calling the contract function a reply is started.
This allows to interact and inspect the result object or call more
functions on the contract.
2018-04-09 01:52:51 +02:00
0a39a9056d Add voterIds to proposals
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.
2018-04-09 01:49:41 +02:00
ef3b3dd6bb
Merge pull request #17 from 67P/refactor/authentication
Allow Contributors management by core contirbutors
2018-04-08 14:12:28 +02:00
054b0acac9 Readme 2018-04-08 13:50:19 +02:00
19518435fa Allow Contributors management by core contirbutors
So far we only allowed calls to the Contributors contract from the
Operator. With the new registry concept we can call functions again
directly on the Contributors contract (without the need to call it through
the operator).
This changes the authentication for the contributor management functions
to allow either core contributors or the operator to call them.

In the future I envision a bit more flexible and configurable
authentication concept that can more easily evolve over time.
2018-04-08 12:55:39 +02:00
170532a128
Merge pull request #15 from 67P/refactor/ipfs-naming-convention
Rename IPFS hash names to be more consistent
2018-04-07 22:37:25 +02:00
7c766e2791 Rename IPFS hash names to be more consistent
We use ipfsHash now everywhere.
2018-04-07 22:33:32 +02:00
8ff8717bed
Merge pull request #16 from 67P/refactor/new-solidity-style
Newer solidity style
2018-04-07 20:24:30 +00:00
7a5d5a233b
Merge pull request #14 from 67P/features/return-balance
Add getContributorById and include the contributor's balance in the return values
2018-04-07 22:12:11 +02:00
3f79c35635
Merge pull request #11 from 67P/features/cli
Add a general purpose contract CLI
2018-04-07 22:02:31 +02:00
5e614713d7 Newer solidity style
removes depricated throw calls and constant modifiers
2018-04-07 21:34:06 +02:00
baa26a85bb Add getContributorById
Similiar to directly accessing the contributors mapping this method also
returns the balance of the contributor.
2018-04-07 20:10:55 +02:00
ebb26f78c2 code style 2018-04-07 19:41:39 +02:00
1488862b42 Add check if method is defined on the contract 2018-04-04 22:42:16 +02:00