36 Commits

Author SHA1 Message Date
Râu Cao
6e0ec8741e
Use a dummy address for the read-only signer
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Necessary for ethers not to fail with public RSK nodes
2022-11-01 15:03:58 +01:00
23b30b7f8e
Fix kredits instance not being returned by init() 2022-04-27 18:06:02 +02:00
50b10dd46c
Syntax and linting issues 2022-04-27 18:05:51 +02:00
a626409221 Move contracts to root level for hardhart usage
byebye aragon apps
2021-06-08 15:45:23 +02:00
a0b0183beb Add Reimbursement app 2020-05-29 10:46:55 +02:00
107654ecca Expose available network IDs
This exposes the network IDs on which kredits is deployed. Helpful to
check if the used network is supported.
2019-06-11 15:45:14 +02:00
e20bda73fb Remove not needed network check
We default to localhost anyway
2019-05-17 09:17:10 +02:00
4c64aa7c2a linting 2019-05-14 12:03:29 +02:00
1a227ba67c Linting 2019-05-14 11:31:33 +02:00
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
94d342ce63 Replace console.log by deprecate function 2019-04-24 19:31:26 +02:00
145b3ea766 Merge branch 'master' into chore/linter
# Conflicts:
#	lib/contracts/contribution.js
#	lib/contracts/contributor.js
#	lib/contracts/proposal.js
#	lib/kredits.js
#	lib/serializers/contributor.js
#	yarn.lock
2019-04-24 19:12:18 +02:00
a9093c1c40 Fix linter errors
# Conflicts:
#	lib/contracts/contribution.js
#	lib/contracts/contributor.js
#	lib/contracts/proposal.js
#	lib/kredits.js
#	lib/utils/pagination.js
2019-04-13 00:08:12 +02:00
f6189bf910 Add pagination for .all methods
I removed rsvp as a dependency as we only use Promise.all
2019-04-12 21:21:19 +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
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
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
b201642485 remove obsolete comment 2019-03-27 16:56:52 +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
956f858620 Rename healthcheck to preflight 2018-06-07 16:39:07 +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
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
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
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
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
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