@@ -22,6 +22,13 @@ import "./Operations.sol";
2222/// Specialise proxy wallet. Owner can send transactions unhindered. Delegates
2323/// can send only particular transactions to a named Operations contract.
2424contract OperationsProxy {
25+ event OwnerChanged (address indexed was , address indexed who );
26+ event DelegateChanged (address indexed was , address indexed who , uint8 indexed track );
27+ event ConfirmerChanged (address indexed was , address indexed who , uint8 indexed track );
28+ event NewRequestWaiting (uint8 indexed track , bytes32 hash );
29+ event RequestConfirmed (uint8 indexed track , bytes32 hash , bool success );
30+ event RequestRejected (uint8 indexed track , bytes32 hash );
31+
2532 address public owner;
2633 mapping (uint8 => address ) public delegate;
2734 mapping (uint8 => address ) public confirmer;
@@ -32,14 +39,22 @@ contract OperationsProxy {
3239
3340 Operations public operations;
3441
35- event OwnerChanged (address indexed was , address indexed who );
36- event DelegateChanged (address indexed was , address indexed who , uint8 indexed track );
37- event ConfirmerChanged (address indexed was , address indexed who , uint8 indexed track );
38- event NewRequestWaiting (uint8 indexed track , bytes32 hash );
39- event RequestConfirmed (uint8 indexed track , bytes32 hash , bool success );
40- event RequestRejected (uint8 indexed track , bytes32 hash );
42+ modifier onlyOwner {
43+ require (msg .sender == owner);
44+ _;
45+ }
46+
47+ modifier onlyDelegateOf (uint8 track ) {
48+ require (delegate[track] == msg .sender );
49+ _;
50+ }
51+
52+ modifier onlyConfirmerOf (uint8 track ) {
53+ require (confirmer[track] == msg .sender );
54+ _;
55+ }
4156
42- function OperationsProxy (
57+ constructor (
4358 address _owner ,
4459 address _stable ,
4560 address _beta ,
@@ -189,19 +204,4 @@ contract OperationsProxy {
189204 o_relayed = false ;
190205 }
191206 }
192-
193- modifier onlyOwner {
194- require (msg .sender == owner);
195- _;
196- }
197-
198- modifier onlyDelegateOf (uint8 track ) {
199- require (delegate[track] == msg .sender );
200- _;
201- }
202-
203- modifier onlyConfirmerOf (uint8 track ) {
204- require (confirmer[track] == msg .sender );
205- _;
206- }
207207}
0 commit comments