Convert contribution owner to ID, use smaller number formats #73

Merged
raucao merged 14 commits from feature/contribution_owner into master 2019-04-04 21:40:17 +00:00
raucao commented 2019-04-04 14:31:02 +00:00 (Migrated from github.com)

Sorry for mixing these two topics into one PR. This changes the contribution to be tied to a contributor ID instead of an account address. It also changes a bunch of numbers from uint256 to uint32.

Sorry for mixing these two topics into one PR. This changes the contribution to be tied to a contributor ID instead of an account address. It also changes a bunch of numbers from uint256 to uint32.
fsmanuel (Migrated from github.com) reviewed 2019-04-04 15:37:00 +00:00
@ -22,3 +29,4 @@
uint32 amount;
bool claimed;
bytes32 hashDigest;
uint8 hashFunction;
fsmanuel (Migrated from github.com) commented 2019-04-04 15:37:00 +00:00

The mintFor takes a uint256

The `mintFor` takes a `uint256`
fsmanuel (Migrated from github.com) reviewed 2019-04-04 15:53:41 +00:00
@ -57,3 +57,3 @@
let contribution = [
contributionAttr.amount,
contributionAttr.contributorAccount,
contributionAttr.contributorId,
fsmanuel (Migrated from github.com) commented 2019-04-04 15:53:41 +00:00
  getByContributorId(contributorId) {
    return this.functions.getContributorAddressById(contributorId)
      .then(address => this.getByContributorAddress(address));
  }
```suggestion getByContributorId(contributorId) { return this.functions.getContributorAddressById(contributorId) .then(address => this.getByContributorAddress(address)); } ```
fsmanuel (Migrated from github.com) reviewed 2019-04-04 15:54:24 +00:00
@ -17,3 +16,3 @@
return RSVP.all(contributions);
return contributions;
});
fsmanuel (Migrated from github.com) commented 2019-04-04 15:54:23 +00:00

It is missing a .

It is missing a `.`
raucao (Migrated from github.com) reviewed 2019-04-04 17:24:53 +00:00
@ -22,3 +29,4 @@
uint32 amount;
bool claimed;
bytes32 hashDigest;
uint8 hashFunction;
raucao (Migrated from github.com) commented 2019-04-04 17:24:53 +00:00

Yes, but we're converting it before minting in claim(). Nobody has to mine more than 2.2 billion kredits at once, so the locally stored amount can be a smaller format.

Yes, but we're converting it before minting in `claim()`. Nobody has to mine more than 2.2 billion kredits at once, so the locally stored amount can be a smaller format.
fsmanuel (Migrated from github.com) reviewed 2019-04-04 21:04:19 +00:00
@ -16,3 +15,3 @@
}
return RSVP.all(contributions);
return contributions;
fsmanuel (Migrated from github.com) commented 2019-04-04 21:04:18 +00:00

❤️

❤️
bumi (Migrated from github.com) reviewed 2019-04-04 21:37:33 +00:00
@ -16,3 +15,3 @@
}
return RSVP.all(contributions);
return contributions;
bumi (Migrated from github.com) commented 2019-04-04 21:37:33 +00:00

to promise or not to promise? :bumiwonders:

to promise or not to promise? :bumiwonders:
bumi (Migrated from github.com) approved these changes 2019-04-04 21:40:06 +00:00
bumi (Migrated from github.com) left a comment

🎉 🚀

:tada: :rocket:
fsmanuel (Migrated from github.com) reviewed 2019-04-04 21:40:37 +00:00
@ -16,3 +15,3 @@
}
return RSVP.all(contributions);
return contributions;
fsmanuel (Migrated from github.com) commented 2019-04-04 21:40:36 +00:00

If you can wait for it you don't need to promise anything.

If you can wait for it you don't need to promise anything.
raucao commented 2019-04-04 21:49:34 +00:00 (Migrated from github.com)

fuck-yeah

![fuck-yeah](https://user-images.githubusercontent.com/842/55590828-49d32100-5734-11e9-849e-7f86c9d7dc82.jpeg)
Sign in to join this conversation.
No description provided.