Store kredits tokens as wei with 18 decimals
This stores the tokens with 18 decimals as most other tokens and as assumed by a potential future token standard EIP 777.
This commit is contained in:
@@ -14,11 +14,15 @@ contract Token is ERC20Token, AragonApp {
|
||||
|
||||
function initialize(bytes32[4] _appIds) public onlyInit {
|
||||
appIds = _appIds;
|
||||
name = 'Kredits';
|
||||
symbol = 'K';
|
||||
decimals = 18;
|
||||
initialized();
|
||||
}
|
||||
|
||||
function mintFor(address contributorAccount, uint256 amount, uint32 contributionId) public isInitialized auth(MINT_TOKEN_ROLE) {
|
||||
_mint(contributorAccount, amount);
|
||||
uint256 amountInWei = amount.mul(1 ether);
|
||||
_mint(contributorAccount, amountInWei);
|
||||
emit LogMint(contributorAccount, amount, contributionId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user