Use address(this) instead of this (#1134)
* Use address(this) instead of this It's preferred to use `address(this)` vs `this` * Change to address(this) vs this
This commit is contained in:
committed by
Nicolás Venturo
parent
2765350248
commit
56735a706c
@ -41,7 +41,7 @@ contract TokenTimelock {
|
||||
// solium-disable-next-line security/no-block-members
|
||||
require(block.timestamp >= releaseTime);
|
||||
|
||||
uint256 amount = token.balanceOf(this);
|
||||
uint256 amount = token.balanceOf(address(this));
|
||||
require(amount > 0);
|
||||
|
||||
token.safeTransfer(beneficiary, amount);
|
||||
|
||||
@ -87,7 +87,7 @@ contract TokenVesting is Ownable {
|
||||
require(revocable);
|
||||
require(!revoked[_token]);
|
||||
|
||||
uint256 balance = _token.balanceOf(this);
|
||||
uint256 balance = _token.balanceOf(address(this));
|
||||
|
||||
uint256 unreleased = releasableAmount(_token);
|
||||
uint256 refund = balance.sub(unreleased);
|
||||
@ -112,7 +112,7 @@ contract TokenVesting is Ownable {
|
||||
* @param _token ERC20 token which is being vested
|
||||
*/
|
||||
function vestedAmount(ERC20Basic _token) public view returns (uint256) {
|
||||
uint256 currentBalance = _token.balanceOf(this);
|
||||
uint256 currentBalance = _token.balanceOf(address(this));
|
||||
uint256 totalBalance = currentBalance.add(released[_token]);
|
||||
|
||||
if (block.timestamp < cliff) {
|
||||
|
||||
Reference in New Issue
Block a user