|
1 | 1 | // SPDX-License-Identifier: MIT
|
2 | 2 | pragma solidity ^0.8.20;
|
| 3 | + |
3 | 4 | import {AgoraGovernor} from "src/AgoraGovernor.sol";
|
4 | 5 | import {Hooks} from "src/libraries/Hooks.sol";
|
5 | 6 | import {IHooks} from "src/interfaces/IHooks.sol";
|
@@ -46,129 +47,102 @@ abstract contract BaseHook is IHooks {
|
46 | 47 | }
|
47 | 48 |
|
48 | 49 | /// @inheritdoc IHooks
|
49 |
| - function beforeQuorumCalculation(address, uint256) external virtual view returns (bytes4, uint256) { |
| 50 | + function beforeQuorumCalculation(address, uint256) external view virtual returns (bytes4, uint256) { |
50 | 51 | revert HookNotImplemented();
|
51 | 52 | }
|
52 | 53 |
|
53 | 54 | /// @inheritdoc IHooks
|
54 |
| - function afterQuorumCalculation(address, uint256) external virtual view returns (bytes4, uint256) { |
| 55 | + function afterQuorumCalculation(address, uint256) external view virtual returns (bytes4, uint256) { |
55 | 56 | revert HookNotImplemented();
|
56 | 57 | }
|
57 | 58 |
|
58 | 59 | /// @inheritdoc IHooks
|
59 |
| - function beforeVote( |
60 |
| - address, |
61 |
| - uint256, |
62 |
| - address, |
63 |
| - uint8, |
64 |
| - string memory, |
65 |
| - bytes memory |
66 |
| - ) external virtual returns (bytes4, uint256) { |
| 60 | + function beforeVote(address, uint256, address, uint8, string memory, bytes memory) |
| 61 | + external |
| 62 | + virtual |
| 63 | + returns (bytes4, uint256) |
| 64 | + { |
67 | 65 | revert HookNotImplemented();
|
68 | 66 | }
|
69 | 67 |
|
70 | 68 | /// @inheritdoc IHooks
|
71 |
| - function afterVote( |
72 |
| - address, |
73 |
| - uint256, |
74 |
| - uint256, |
75 |
| - address, |
76 |
| - uint8, |
77 |
| - string memory, |
78 |
| - bytes memory |
79 |
| - ) external virtual returns (bytes4, uint256) { |
| 69 | + function afterVote(address, uint256, uint256, address, uint8, string memory, bytes memory) |
| 70 | + external |
| 71 | + virtual |
| 72 | + returns (bytes4, uint256) |
| 73 | + { |
80 | 74 | revert HookNotImplemented();
|
81 | 75 | }
|
82 | 76 |
|
83 | 77 | /// @inheritdoc IHooks
|
84 |
| - function beforePropose( |
85 |
| - address, |
86 |
| - address[] memory, |
87 |
| - uint256[] memory, |
88 |
| - bytes[] memory, |
89 |
| - string memory |
90 |
| - ) external virtual returns (bytes4, uint256) { |
| 78 | + function beforePropose(address, address[] memory, uint256[] memory, bytes[] memory, string memory) |
| 79 | + external |
| 80 | + virtual |
| 81 | + returns (bytes4, uint256) |
| 82 | + { |
91 | 83 | revert HookNotImplemented();
|
92 | 84 | }
|
93 | 85 |
|
94 | 86 | /// @inheritdoc IHooks
|
95 |
| - function afterPropose( |
96 |
| - address, |
97 |
| - uint256, |
98 |
| - address[] memory, |
99 |
| - uint256[] memory, |
100 |
| - bytes[] memory, |
101 |
| - string memory |
102 |
| - ) external virtual returns (bytes4, uint256) { |
| 87 | + function afterPropose(address, uint256, address[] memory, uint256[] memory, bytes[] memory, string memory) |
| 88 | + external |
| 89 | + virtual |
| 90 | + returns (bytes4, uint256) |
| 91 | + { |
103 | 92 | revert HookNotImplemented();
|
104 | 93 | }
|
105 | 94 |
|
106 | 95 | /// @inheritdoc IHooks
|
107 |
| - function beforeCancel( |
108 |
| - address, |
109 |
| - address[] memory, |
110 |
| - uint256[] memory, |
111 |
| - bytes[] memory, |
112 |
| - bytes32 |
113 |
| - ) external virtual returns (bytes4, uint256) { |
| 96 | + function beforeCancel(address, address[] memory, uint256[] memory, bytes[] memory, bytes32) |
| 97 | + external |
| 98 | + virtual |
| 99 | + returns (bytes4, uint256) |
| 100 | + { |
114 | 101 | revert HookNotImplemented();
|
115 | 102 | }
|
116 | 103 |
|
117 | 104 | /// @inheritdoc IHooks
|
118 |
| - function afterCancel( |
119 |
| - address, |
120 |
| - uint256, |
121 |
| - address[] memory, |
122 |
| - uint256[] memory, |
123 |
| - bytes[] memory, |
124 |
| - bytes32 |
125 |
| - ) external virtual returns (bytes4, uint256) { |
| 105 | + function afterCancel(address, uint256, address[] memory, uint256[] memory, bytes[] memory, bytes32) |
| 106 | + external |
| 107 | + virtual |
| 108 | + returns (bytes4, uint256) |
| 109 | + { |
126 | 110 | revert HookNotImplemented();
|
127 | 111 | }
|
128 | 112 |
|
129 | 113 | /// @notice The hook called before a proposal is queued
|
130 |
| - function beforeQueue( |
131 |
| - address, |
132 |
| - address[] memory, |
133 |
| - uint256[] memory, |
134 |
| - bytes[] memory, |
135 |
| - bytes32 |
136 |
| - ) external virtual returns (bytes4, uint256) { |
| 114 | + function beforeQueue(address, address[] memory, uint256[] memory, bytes[] memory, bytes32) |
| 115 | + external |
| 116 | + virtual |
| 117 | + returns (bytes4, uint256) |
| 118 | + { |
137 | 119 | revert HookNotImplemented();
|
138 | 120 | }
|
139 | 121 |
|
140 | 122 | /// @inheritdoc IHooks
|
141 |
| - function afterQueue( |
142 |
| - address, |
143 |
| - uint256, |
144 |
| - address[] memory, |
145 |
| - uint256[] memory, |
146 |
| - bytes[] memory, |
147 |
| - bytes32 |
148 |
| - ) external virtual returns (bytes4, uint256) { |
| 123 | + function afterQueue(address, uint256, address[] memory, uint256[] memory, bytes[] memory, bytes32) |
| 124 | + external |
| 125 | + virtual |
| 126 | + returns (bytes4, uint256) |
| 127 | + { |
149 | 128 | revert HookNotImplemented();
|
150 | 129 | }
|
151 | 130 |
|
152 | 131 | /// @inheritdoc IHooks
|
153 |
| - function beforeExecute( |
154 |
| - address, |
155 |
| - address[] memory, |
156 |
| - uint256[] memory, |
157 |
| - bytes[] memory, |
158 |
| - bytes32 |
159 |
| - ) external virtual returns (bytes4, uint256) { |
| 132 | + function beforeExecute(address, address[] memory, uint256[] memory, bytes[] memory, bytes32) |
| 133 | + external |
| 134 | + virtual |
| 135 | + returns (bytes4, uint256) |
| 136 | + { |
160 | 137 | revert HookNotImplemented();
|
161 | 138 | }
|
162 | 139 |
|
163 | 140 | /// @inheritdoc IHooks
|
164 |
| - function afterExecute( |
165 |
| - address, |
166 |
| - uint256, |
167 |
| - address[] memory, |
168 |
| - uint256[] memory, |
169 |
| - bytes[] memory, |
170 |
| - bytes32 |
171 |
| - ) external virtual returns (bytes4, uint256) { |
| 141 | + function afterExecute(address, uint256, address[] memory, uint256[] memory, bytes[] memory, bytes32) |
| 142 | + external |
| 143 | + virtual |
| 144 | + returns (bytes4, uint256) |
| 145 | + { |
172 | 146 | revert HookNotImplemented();
|
173 | 147 | }
|
174 | 148 | }
|
0 commit comments