Commit 41fdd5d4 by qdeswaef

fixes gh-109: resolve conflict between Ownable and ERC20 token.

parent e859d53b
......@@ -19,7 +19,7 @@ contract Ownable {
_;
}
function transfer(address newOwner) onlyOwner {
function transferOwnership(address newOwner) onlyOwner {
if (newOwner != address(0)) owner = newOwner;
}
......
......@@ -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.transferOwnership(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.transferOwnership(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.transferOwnership(null, {from: originalOwner});
let newOwner = await ownable.owner();
assert.equal(originalOwner, newOwner);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment