Refactor contract interaction in its own module #42
Reference in New Issue
Block a user
Delete Branch "kredits-module"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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))
ok, this PR is getting quite big and it is time to merge. @travis-ci, what do you think?
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.');});Good catch!
No need for
.toString()@@ -0,0 +1,61 @@import ethers from 'npm:ethers';We can use
this.functionsWe can use
this.functionsWe can use
this.functions@@ -0,0 +1,61 @@import ethers from 'npm:ethers';We can use
this.functionsWe can use
this.functionsWe can use
this.functions@@ -0,0 +1,55 @@import ipfsAPI from 'npm:ipfs-api';Should we call it
deserializebecause it's the function and not the deserializer?@@ -0,0 +28,4 @@});}cat(hashData) {❤️
@@ -0,0 +1,55 @@import ipfsAPI from 'npm:ipfs-api';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?