Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into releases/mainnet/v1…
Browse files Browse the repository at this point in the history
….0.0
  • Loading branch information
Shadowfiend committed Apr 28, 2020
2 parents a0a44da + 2cc1080 commit 6d97bb4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 3 additions & 2 deletions solidity/contracts/KeepToken.sol
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
pragma solidity 0.5.17;

import "openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol";
import "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol";


/// @dev Interface of recipient contract for approveAndCall pattern.
interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external; }

/// @title KEEP Token
/// @dev Standard ERC20Burnable token
contract KeepToken is ERC20Burnable {
contract KeepToken is ERC20Burnable, ERC20Detailed {
string public constant NAME = "KEEP Token";
string public constant SYMBOL = "KEEP";
uint8 public constant DECIMALS = 18; // The number of digits after the decimal place when displaying token values on-screen.
uint256 public constant INITIAL_SUPPLY = 10**27; // 1 billion tokens, 18 decimal places.

/// @dev Gives msg.sender all of existing tokens.
constructor() public {
constructor() public ERC20Detailed(NAME, SYMBOL, DECIMALS) {
_mint(msg.sender, INITIAL_SUPPLY);
}

Expand Down
10 changes: 9 additions & 1 deletion solidity/test/TestToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@ describe('TestToken', function() {
account_two = accounts[1];

before(async () => {
token = await KeepToken.new({from: account_one});
token = await KeepToken.new({ from: account_one });
});

it("sets token details", async function () {
await token.name.call();

assert.equal(await token.name.call(), "KEEP Token", "unexpected token name");
assert.equal(await token.symbol.call(), "KEEP", "unexpected token symbol");
assert.equal(await token.decimals.call(), 18, "unexpected decimals");
});

it("should send tokens correctly", async function() {
Expand Down

0 comments on commit 6d97bb4

Please sign in to comment.