Skip to content

Commit 153be97

Browse files
author
Radek Ostrowski
committed
explicit uint256
1 parent 32916e6 commit 153be97

5 files changed

+12
-274
lines changed

contracts/AllToken.sol

-144
This file was deleted.

contracts/AllWallet.sol

-118
This file was deleted.

contracts/TimeLockedWallet.sol

+8-8
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ contract TimeLockedWallet {
66

77
address public creator;
88
address public owner;
9-
uint public unlockDate;
10-
uint public createdAt;
9+
uint256 public unlockDate;
10+
uint256 public createdAt;
1111

1212
modifier onlyOwner {
1313
require(msg.sender == owner);
@@ -17,7 +17,7 @@ contract TimeLockedWallet {
1717
function TimeLockedWallet(
1818
address _creator,
1919
address _owner,
20-
uint _unlockDate
20+
uint256 _unlockDate
2121
) public {
2222
creator = _creator;
2323
owner = _owner;
@@ -43,16 +43,16 @@ contract TimeLockedWallet {
4343
require(now >= unlockDate);
4444
ERC20 token = ERC20(_tokenContract);
4545
//now send all the token balance
46-
uint tokenBalance = token.balanceOf(this);
46+
uint256 tokenBalance = token.balanceOf(this);
4747
token.transfer(owner, tokenBalance);
4848
WithdrewTokens(_tokenContract, msg.sender, tokenBalance);
4949
}
5050

51-
function info() public view returns(address, address, uint, uint, uint) {
51+
function info() public view returns(address, address, uint256, uint256, uint256) {
5252
return (creator, owner, unlockDate, createdAt, this.balance);
5353
}
5454

55-
event Received(address from, uint amount);
56-
event Withdrew(address to, uint amount);
57-
event WithdrewTokens(address tokenContract, address to, uint amount);
55+
event Received(address from, uint256 amount);
56+
event Withdrew(address to, uint256 amount);
57+
event WithdrewTokens(address tokenContract, address to, uint256 amount);
5858
}

contracts/TimeLockedWalletFactory.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ contract TimeLockedWalletFactory {
1414
return wallets[_user];
1515
}
1616

17-
function newTimeLockedWallet(address _owner, uint _unlockDate)
17+
function newTimeLockedWallet(address _owner, uint256 _unlockDate)
1818
payable
1919
public
2020
returns(address wallet)
@@ -42,5 +42,5 @@ contract TimeLockedWalletFactory {
4242
revert();
4343
}
4444

45-
event Created(address wallet, address from, address to, uint createdAt, uint unlockDate, uint amount);
45+
event Created(address wallet, address from, address to, uint256 createdAt, uint256 unlockDate, uint256 amount);
4646
}

contracts/ToptalToken.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ contract ToptalToken is ERC20 {
1515

1616
string public name = "Toptal Token";
1717
string public symbol = "TTT";
18-
uint8 public decimals = 6;
18+
uint256 public decimals = 6;
1919

2020
function ToptalToken() public {
21-
totalSupply = 1000000000000;
21+
totalSupply = 1000000 * (10 ** decimals);
2222
balances[msg.sender] = totalSupply;
2323
}
2424

0 commit comments

Comments
 (0)