aboutsummaryrefslogtreecommitdiffstats
path: root/packages/deployer/test/fixtures/contracts/base/Ownable.sol
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2018-01-19 20:43:32 +0800
committerGitHub <noreply@github.com>2018-01-19 20:43:32 +0800
commite1af25c8a6fa96c665d63fff2033d7611b023db2 (patch)
tree5769ca73d50c497e46e6c6c927700ae0fa00bec9 /packages/deployer/test/fixtures/contracts/base/Ownable.sol
parent9ccf63b44afe1ae6ccc2b9298ee35697d6be9e30 (diff)
parent6091f818da7cddcb4a22a573f7726ba9b76b398e (diff)
downloaddexon-sol-tools-e1af25c8a6fa96c665d63fff2033d7611b023db2.tar
dexon-sol-tools-e1af25c8a6fa96c665d63fff2033d7611b023db2.tar.gz
dexon-sol-tools-e1af25c8a6fa96c665d63fff2033d7611b023db2.tar.bz2
dexon-sol-tools-e1af25c8a6fa96c665d63fff2033d7611b023db2.tar.lz
dexon-sol-tools-e1af25c8a6fa96c665d63fff2033d7611b023db2.tar.xz
dexon-sol-tools-e1af25c8a6fa96c665d63fff2033d7611b023db2.tar.zst
dexon-sol-tools-e1af25c8a6fa96c665d63fff2033d7611b023db2.zip
Merge pull request #323 from 0xProject/feature/separate-deployer
Move deployer to a separate package
Diffstat (limited to 'packages/deployer/test/fixtures/contracts/base/Ownable.sol')
-rw-r--r--packages/deployer/test/fixtures/contracts/base/Ownable.sol27
1 files changed, 27 insertions, 0 deletions
diff --git a/packages/deployer/test/fixtures/contracts/base/Ownable.sol b/packages/deployer/test/fixtures/contracts/base/Ownable.sol
new file mode 100644
index 000000000..2a74c3717
--- /dev/null
+++ b/packages/deployer/test/fixtures/contracts/base/Ownable.sol
@@ -0,0 +1,27 @@
+pragma solidity 0.4.14;
+
+/*
+ * 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() {
+ require(msg.sender == owner);
+ _;
+ }
+
+ function transferOwnership(address newOwner) onlyOwner {
+ if (newOwner != address(0)) {
+ owner = newOwner;
+ }
+ }
+}