diff --git a/contracts/Authentication.sol b/contracts/Authentication.sol index 3001647..9619e46 100644 --- a/contracts/Authentication.sol +++ b/contracts/Authentication.sol @@ -1,8 +1,8 @@ pragma solidity ^0.4.2; -import './zeppelin/lifecycle/Killable.sol'; +import 'zeppelin-solidity/contracts/lifecycle/Destructible.sol'; -contract Authentication is Killable { +contract Authentication is Destructible { struct User { bytes32 name; } diff --git a/contracts/zeppelin/lifecycle/Killable.sol b/contracts/zeppelin/lifecycle/Killable.sol deleted file mode 100644 index 8101072..0000000 --- a/contracts/zeppelin/lifecycle/Killable.sol +++ /dev/null @@ -1,15 +0,0 @@ -pragma solidity ^0.4.4; - - -import "./../ownership/Ownable.sol"; - - -/* - * Killable - * Base contract that can be killed by owner. All funds in contract will be sent to the owner. - */ -contract Killable is Ownable { - function kill() onlyOwner { - selfdestruct(owner); - } -} diff --git a/contracts/zeppelin/ownership/Ownable.sol b/contracts/zeppelin/ownership/Ownable.sol deleted file mode 100644 index 705f081..0000000 --- a/contracts/zeppelin/ownership/Ownable.sol +++ /dev/null @@ -1,26 +0,0 @@ -pragma solidity ^0.4.4; - - -/* - * Ownable - * - * Base contract with an owner. - * Provides onlyOwner modifier, which prevents function from running if it is called by anyone other than the owner. - */ -contract Ownable { - address public owner; - - function Ownable() { - owner = msg.sender; - } - - modifier onlyOwner() { - if (msg.sender == owner) - _; - } - - function transferOwnership(address newOwner) onlyOwner { - if (newOwner != address(0)) owner = newOwner; - } - -} diff --git a/migrations/2_deploy_contracts.js b/migrations/2_deploy_contracts.js index 8370e42..d2e731c 100644 --- a/migrations/2_deploy_contracts.js +++ b/migrations/2_deploy_contracts.js @@ -1,11 +1,5 @@ -var Ownable = artifacts.require("./zeppelin/ownership/Ownable.sol"); -var Killable = artifacts.require("./zeppelin/lifecycle/Killable.sol"); var Authentication = artifacts.require("./Authentication.sol"); module.exports = function(deployer) { - deployer.deploy(Ownable); - deployer.link(Ownable, Killable); - deployer.deploy(Killable); - deployer.link(Killable, Authentication); deployer.deploy(Authentication); }; diff --git a/package.json b/package.json index 1e80252..e98988b 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,8 @@ "react-router-redux": "^4.0.7", "redux": "^3.6.0", "redux-auth-wrapper": "^1.0.0", - "redux-thunk": "^2.2.0" + "redux-thunk": "^2.2.0", + "zeppelin-solidity": "^1.10.0" }, "scripts": { "start": "node scripts/start.js",