Test token app #157
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "tests/contracts-token"
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 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_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
@ -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)