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
41fdd5d4
Commit
41fdd5d4
authored
Dec 15, 2016
by
qdeswaef
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes gh-109: resolve conflict between Ownable and ERC20 token.
parent
e859d53b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
Ownable.sol
contracts/Ownable.sol
+1
-1
Ownable.js
test/Ownable.js
+3
-3
No files found.
contracts/Ownable.sol
View file @
41fdd5d4
...
...
@@ -19,7 +19,7 @@ contract Ownable {
_;
}
function transfer(address newOwner) onlyOwner {
function transfer
Ownership
(address newOwner) onlyOwner {
if (newOwner != address(0)) owner = newOwner;
}
...
...
test/Ownable.js
View file @
41fdd5d4
...
...
@@ -12,7 +12,7 @@ contract('Ownable', function(accounts) {
it
(
"changes owner after transfer"
,
async
function
()
{
let
other
=
accounts
[
1
];
let
transfer
=
await
ownable
.
transfer
(
other
);
let
transfer
=
await
ownable
.
transfer
Ownership
(
other
);
let
owner
=
await
ownable
.
owner
();
assert
.
isTrue
(
owner
===
other
);
...
...
@@ -20,7 +20,7 @@ contract('Ownable', function(accounts) {
it
(
"should prevent non-owners from transfering"
,
async
function
()
{
let
other
=
accounts
[
2
];
let
transfer
=
await
ownable
.
transfer
(
other
,
{
from
:
accounts
[
2
]});
let
transfer
=
await
ownable
.
transfer
Ownership
(
other
,
{
from
:
accounts
[
2
]});
let
owner
=
await
ownable
.
owner
();
assert
.
isFalse
(
owner
===
other
);
...
...
@@ -29,7 +29,7 @@ contract('Ownable', function(accounts) {
it
(
"should guard ownership against stuck state"
,
async
function
()
{
let
ownable
=
Ownable
.
deployed
();
let
originalOwner
=
await
ownable
.
owner
();
let
transfer
=
await
ownable
.
transfer
(
null
,
{
from
:
originalOwner
});
let
transfer
=
await
ownable
.
transfer
Ownership
(
null
,
{
from
:
originalOwner
});
let
newOwner
=
await
ownable
.
owner
();
assert
.
equal
(
originalOwner
,
newOwner
);
...
...
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