Test token app #157

Merged
haythem96 merged 6 commits from tests/contracts-token into master 2019-07-31 15:17:38 +00:00
Showing only changes of commit c8ba573fb2 - Show all commits

View File

@ -6,8 +6,6 @@ import "./ERC20Token.sol";
contract Token is ERC20Token, AragonApp {
bytes32 public constant MINT_TOKEN_ROLE = keccak256("MINT_TOKEN_ROLE");
string private constant ERROR_INVALID_AMOUNT = "Amount should be greater than zero";
// ensure alphabetic order
enum Apps { Contribution, Contributor, Proposal, Token }
bytes32[4] public appIds;
@ -23,7 +21,7 @@ contract Token is ERC20Token, AragonApp {
}
function mintFor(address contributorAccount, uint256 amount, uint32 contributionId) public isInitialized auth(MINT_TOKEN_ROLE) {
require(amount > 0, ERROR_INVALID_AMOUNT);
require(amount > 0, "INVALID_AMOUNT");
uint256 amountInWei = amount.mul(1 ether);
_mint(contributorAccount, amountInWei);
haythem96 commented 2019-07-31 14:46:56 +00:00 (Migrated from github.com)
Review

@bumi is that cool ?

@bumi is that cool ?
bumi commented 2019-07-31 15:01:46 +00:00 (Migrated from github.com)
Review

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.

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 commented 2019-07-31 15:03:30 +00:00 (Migrated from github.com)
Review

ahh okaay (y)

ahh okaay (y)