Refactor contract interaction in its own module #42

Merged
bumi merged 11 commits from kredits-module into master 2018-04-10 13:46:58 +00:00
bumi commented 2018-04-09 17:31:16 +00:00 (Migrated from github.com)

This moves most of the contract interaction into a Kredits wrapper module that makes it easy to interact with the contracts and does all the hard work.

The module is still included here but will be moved into its own npm package (kredits-contracts (=truffle-kredits))

This moves most of the contract interaction into a Kredits wrapper module that makes it easy to interact with the contracts and does all the hard work. The module is still included here but will be moved into its own npm package (kredits-contracts (=truffle-kredits))
bumi commented 2018-04-09 18:43:12 +00:00 (Migrated from github.com)

ok, this PR is getting quite big and it is time to merge. @travis-ci, what do you think?

ok, this PR is getting quite big and it is time to merge. @travis-ci, what do you think?
fsmanuel (Migrated from github.com) approved these changes 2018-04-10 12:36:43 +00:00
fsmanuel (Migrated from github.com) left a comment

Left some comments where we can improve the code but already approved because we can also do that later.

Left some comments where we can improve the code but already approved because we can also do that later.
@@ -55,3 +55,3 @@
window.scroll(0,0);
window.alert('Contributor added.');
window.alert('Proposal added.');
});
fsmanuel (Migrated from github.com) commented 2018-04-10 12:09:39 +00:00

Good catch!

Good catch!
fsmanuel (Migrated from github.com) commented 2018-04-10 12:11:53 +00:00

No need for .toString()

No need for `.toString()`
@@ -0,0 +1,61 @@
import ethers from 'npm:ethers';
fsmanuel (Migrated from github.com) commented 2018-04-10 12:17:14 +00:00

We can use this.functions

We can use `this.functions`
fsmanuel (Migrated from github.com) commented 2018-04-10 12:17:20 +00:00

We can use this.functions

We can use `this.functions`
fsmanuel (Migrated from github.com) commented 2018-04-10 12:18:09 +00:00

We can use this.functions

We can use `this.functions`
@@ -0,0 +1,61 @@
import ethers from 'npm:ethers';
fsmanuel (Migrated from github.com) commented 2018-04-10 12:18:33 +00:00

We can use this.functions

We can use `this.functions`
fsmanuel (Migrated from github.com) commented 2018-04-10 12:18:40 +00:00

We can use this.functions

We can use `this.functions`
fsmanuel (Migrated from github.com) commented 2018-04-10 12:18:55 +00:00

We can use this.functions

We can use `this.functions`
@@ -0,0 +1,55 @@
import ipfsAPI from 'npm:ipfs-api';
fsmanuel (Migrated from github.com) commented 2018-04-10 12:28:40 +00:00

Should we call it deserialize because it's the function and not the deserializer?

Should we call it `deserialize` because it's the function and not the deserializer?
@@ -0,0 +28,4 @@
});
}
cat(hashData) {
fsmanuel (Migrated from github.com) commented 2018-04-10 12:30:55 +00:00

❤️

❤️
bumi (Migrated from github.com) reviewed 2018-04-10 13:24:30 +00:00
@@ -0,0 +1,55 @@
import ipfsAPI from 'npm:ipfs-api';
bumi (Migrated from github.com) commented 2018-04-10 13:24:30 +00:00

good point here.
actually wanted to ask you. I felt it is nicer to pass a function here than an object. what do you think?

good point here. actually wanted to ask you. I felt it is nicer to pass a function here than an object. what do you think?
Sign in to join this conversation.