Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
78e39aa2
Commit
78e39aa2
authored
Jun 14, 2018
by
Alex Beregszaszi
Committed by
Matt Condon
Jun 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not use implicit type conversion for address literals (#1002)
Uses the explicit address(0) for the zero address
parent
e4ed8f07
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
Bounty.sol
contracts/Bounty.sol
+1
-1
SimpleSavingsWallet.sol
contracts/examples/SimpleSavingsWallet.sol
+1
-1
SimpleToken.sol
contracts/examples/SimpleToken.sol
+1
-1
SafeERC20Helper.sol
contracts/mocks/SafeERC20Helper.sol
+6
-6
Heritable.sol
contracts/ownership/Heritable.sol
+1
-1
No files found.
contracts/Bounty.sol
View file @
78e39aa2
...
...
@@ -40,7 +40,7 @@ contract Bounty is PullPayment, Destructible {
*/
function claim(Target target) public {
address researcher = researchers[target];
require(researcher !=
0
);
require(researcher !=
address(0)
);
// Check Target contract invariants
require(!target.checkInvariant());
asyncSend(researcher, address(this).balance);
...
...
contracts/examples/SimpleSavingsWallet.sol
View file @
78e39aa2
...
...
@@ -32,7 +32,7 @@ contract SimpleSavingsWallet is Heritable {
* @dev wallet can send funds
*/
function sendTo(address payee, uint256 amount) public onlyOwner {
require(payee !=
0
&& payee != address(this));
require(payee !=
address(0)
&& payee != address(this));
require(amount > 0);
payee.transfer(amount);
emit Sent(payee, amount, address(this).balance);
...
...
contracts/examples/SimpleToken.sol
View file @
78e39aa2
...
...
@@ -24,7 +24,7 @@ contract SimpleToken is StandardToken {
constructor() public {
totalSupply_ = INITIAL_SUPPLY;
balances[msg.sender] = INITIAL_SUPPLY;
emit Transfer(
0x0
, msg.sender, INITIAL_SUPPLY);
emit Transfer(
address(0)
, msg.sender, INITIAL_SUPPLY);
}
}
contracts/mocks/SafeERC20Helper.sol
View file @
78e39aa2
...
...
@@ -70,26 +70,26 @@ contract SafeERC20Helper {
}
function doFailingTransfer() public {
failing.safeTransfer(
0
, 0);
failing.safeTransfer(
address(0)
, 0);
}
function doFailingTransferFrom() public {
failing.safeTransferFrom(
0, 0
, 0);
failing.safeTransferFrom(
address(0), address(0)
, 0);
}
function doFailingApprove() public {
failing.safeApprove(
0
, 0);
failing.safeApprove(
address(0)
, 0);
}
function doSucceedingTransfer() public {
succeeding.safeTransfer(
0
, 0);
succeeding.safeTransfer(
address(0)
, 0);
}
function doSucceedingTransferFrom() public {
succeeding.safeTransferFrom(
0, 0
, 0);
succeeding.safeTransferFrom(
address(0), address(0)
, 0);
}
function doSucceedingApprove() public {
succeeding.safeApprove(
0
, 0);
succeeding.safeApprove(
address(0)
, 0);
}
}
contracts/ownership/Heritable.sol
View file @
78e39aa2
...
...
@@ -78,7 +78,7 @@ contract Heritable is Ownable {
*/
function removeHeir() public onlyOwner {
heartbeat();
heir_ =
0
;
heir_ =
address(0)
;
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment