I think so far I always used keys like INVALID_AMOUNT instead of full messages.
This should make the code smaller and is enough to identify the error and potentially also map it to a full message
I think so far I always used keys like `INVALID_AMOUNT` instead of full messages.
This should make the code smaller and is enough to identify the error and potentially also map it to a full message
haythem96
(Migrated from github.com)
reviewed 2019-07-31 14:46:56 +00:00
as that full string increases the contract and thus the deployment costs, afaik? so I thought it is better to use small strings.
just saw that I haven't done it everywhere. I thought about something like this: https://github.com/67P/kredits-contracts/blob/master/apps/contribution/contracts/Contribution.sol#L181
as that full string increases the contract and thus the deployment costs, afaik? so I thought it is better to use small strings.
haythem96
(Migrated from github.com)
reviewed 2019-07-31 15:03:30 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR add unit tests for the Token smart contracts. #103
can we merge this one @bumi ?
looks good to me. :shipit:
see that one comment, then we can merge it.
I think so far I always used keys like
INVALID_AMOUNTinstead of full messages.This should make the code smaller and is enough to identify the error and potentially also map it to a full message
@@ -24,2 +24,4 @@require(amount > 0, "INVALID_AMOUNT");uint256 amountInWei = amount.mul(1 ether);_mint(contributorAccount, amountInWei);@bumi is that cool ?
@@ -24,2 +24,4 @@require(amount > 0, "INVALID_AMOUNT");uint256 amountInWei = amount.mul(1 ether);_mint(contributorAccount, amountInWei);just saw that I haven't done it everywhere. I thought about something like this: https://github.com/67P/kredits-contracts/blob/master/apps/contribution/contracts/Contribution.sol#L181
as that full string increases the contract and thus the deployment costs, afaik? so I thought it is better to use small strings.
@@ -24,2 +24,4 @@require(amount > 0, "INVALID_AMOUNT");uint256 amountInWei = amount.mul(1 ether);_mint(contributorAccount, amountInWei);ahh okaay (y)