Skip to content

Commit 58429b5

Browse files
committed
Completed the initial test cases
1 parent 527fd0b commit 58429b5

File tree

4 files changed

+32
-24
lines changed

4 files changed

+32
-24
lines changed

build/contracts/Migrations.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1388,7 +1388,7 @@
13881388
}
13891389
},
13901390
"schemaVersion": "3.0.11",
1391-
"updatedAt": "2019-08-11T20:26:36.634Z",
1391+
"updatedAt": "2019-08-11T20:48:35.551Z",
13921392
"devdoc": {
13931393
"methods": {}
13941394
},

contracts/MEXCToken.sol

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,27 @@ import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol";
3131
import "openzeppelin-solidity/contracts/utils/ReentrancyGuard.sol";
3232
import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
3333

34-
contract MEXCToken is ERC20Mintable, ReentrancyGuard, Ownable {
35-
using SafeMath for uint256;
36-
using SafeERC20 for IERC20;
34+
contract MEXCToken is ERC20Mintable, ReentrancyGuard, Ownable {
35+
using SafeMath for uint256;
36+
using SafeERC20 for IERC20;
3737

38-
string public name = "MEXC Token";
39-
string public symbol = "MEXC";
40-
uint8 public decimals = 18;
38+
string public name = "MEXC Token";
39+
string public symbol = "MEXC";
40+
uint8 public decimals = 18;
4141

42-
uint256 public maxSupply = 1714285714 ether; // max allowable minting.
43-
bool public transferDisabled = true; // disable transfer init.
42+
uint256 public maxSupply = 1714285714 ether; // max allowable minting.
43+
bool public transferDisabled = true; // disable transfer init.
4444

45-
constructor() public {
46-
}
4745

48-
/**
49-
* Rename the token to new name, and symbol
50-
*/
51-
function renameToken(string memory _symbol, string memory _name) onlyOwner public {
52-
symbol = _symbol;
53-
name = _name;
54-
}
46+
constructor() public {
47+
}
5548

56-
}
49+
/**
50+
* Rename the token to new name, and symbol
51+
*/
52+
function renameToken(string memory _symbol, string memory _name) onlyOwner public {
53+
symbol = _symbol;
54+
name = _name;
55+
}
56+
57+
}

test/mexctoken.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,11 @@ contract("MEXCToken", accounts => {
2121
assert.equal("FOO Token", name, "Symbol should be FOO Token");
2222
assert.equal("FOO", symbol, "Symbol should be FOO");
2323
});
24+
25+
it("should have a max supply of 1714285714", async () => {
26+
let mexc = await MEXCToken.deployed();
27+
let ts = await mexc.maxSupply();
28+
29+
assert.equal(1714285714, ts.toNumber(), "Max supply should be 1714285714");
30+
});
2431
});

truffle-config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ module.exports = {
1010
host: "127.0.0.1",
1111
port: 9545,
1212
network_id: "*"
13-
},
14-
test: {
15-
host: "127.0.0.1",
16-
port: 8545,
17-
network_id: "*"
13+
// },
14+
// test: {
15+
// host: "127.0.0.1",
16+
// port: 8545,
17+
// network_id: "*"
1818
}
1919
}
2020
};

0 commit comments

Comments
 (0)