@@ -40,6 +40,126 @@ contract Inbox {
4040
4141` ;
4242
43+ exports [` Ownable.sol 1` ] = `
44+ pragma solidity ^0.4.24;
45+
46+ /**
47+ * @title Ownable
48+ * @dev The Ownable contract has an owner address, and provides basic authorization control
49+ * functions, this simplifies the implementation of "user permissions".
50+ */
51+ contract Ownable {
52+ address private _owner ;
53+
54+ event OwnershipRenounced (address indexed previousOwner );
55+ event OwnershipTransferred (
56+ address indexed previousOwner ,
57+ address indexed newOwner
58+ );
59+
60+ /**
61+ * @dev The Ownable constructor sets the original \`owner\` of the contract to the sender
62+ * account.
63+ */
64+ constructor () public {
65+ _owner = msg.sender;
66+ }
67+
68+ /**
69+ * @return the address of the owner.
70+ */
71+ function owner() public view returns(address ) {
72+ return _owner ;
73+ }
74+
75+ /**
76+ * @dev Throws if called by any account other than the owner.
77+ */
78+ modifier onlyOwner () {
79+ require(isOwner ());
80+ _;
81+ }
82+
83+ /**
84+ * @return true if \`msg.sender\` is the owner of the contract.
85+ */
86+ function isOwner() public view returns(bool ) {
87+ return msg .sender == _owner ;
88+ }
89+
90+ /**
91+ * @dev Allows the current owner to relinquish control of the contract.
92+ * @notice Renouncing to ownership will leave the contract without an owner.
93+ * It will not be possible to call the functions with the \`onlyOwner\`
94+ * modifier anymore.
95+ */
96+ function renounceOwnership() public onlyOwner {
97+ emit OwnershipRenounced (_owner );
98+ _owner = address (0 );
99+ }
100+
101+ /**
102+ * @dev Allows the current owner to transfer control of the contract to a newOwner.
103+ * @param newOwner The address to transfer ownership to.
104+ */
105+ function transferOwnership(address newOwner ) public onlyOwner {
106+ _transferOwnership (newOwner );
107+ }
108+
109+ /**
110+ * @dev Transfers control of the contract to a newOwner.
111+ * @param newOwner The address to transfer ownership to.
112+ */
113+ function _transferOwnership(address newOwner ) internal {
114+ require (newOwner != address (0 ));
115+ emit OwnershipTransferred (_owner , newOwner );
116+ _owner = newOwner ;
117+ }
118+ }
119+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
120+ pragma solidity ^0.4.24;
121+ contract Ownable {
122+ address private _owner ;
123+ event OwnershipRenounced (address indexed previousOwner );
124+ event OwnershipTransferred (
125+ address indexed previousOwner ,
126+ address indexed newOwner
127+ );
128+
129+ constructor () public {
130+ _owner = msg.sender;
131+ }
132+
133+ function owner() public view returns(address ) {
134+ return _owner ;
135+ }
136+ modifier onlyOwner () {
137+ require(isOwner ());
138+ _;
139+ }
140+
141+ function isOwner() public view returns(bool ) {
142+ return msg .sender == _owner ;
143+ }
144+
145+ function renounceOwnership() public onlyOwner {
146+ emit OwnershipRenounced (_owner );
147+ _owner = address (0 );
148+ }
149+
150+ function transferOwnership(address newOwner ) public onlyOwner {
151+ _transferOwnership (newOwner );
152+ }
153+
154+ function _transferOwnership(address newOwner ) internal {
155+ require (newOwner != address (0 ));
156+ emit OwnershipTransferred (_owner , newOwner );
157+ _owner = newOwner ;
158+ }
159+ }
160+
161+ ` ;
162+
43163exports [` SimpleStorage.sol 1` ] = `
44164pragma solidity ^0.4.0;
45165
0 commit comments