Skip to content

Commit f650849

Browse files
maurelianclaude
andcommitted
feat: add placeholder functions for remaining TimelockGuard functionality
- Add scheduleTransaction placeholder (Function 4) - Add checkPendingTransactions placeholder (Function 6) - Add rejectTransaction placeholder (Function 7) - Add rejectTransactionWithSignature placeholder (Function 8) - Add cancelTransaction placeholder (Function 9) - Update checkTransaction placeholder (Function 5) - All placeholders have proper signatures and documentation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 1287045 commit f650849

File tree

1 file changed

+62
-1
lines changed

1 file changed

+62
-1
lines changed

packages/contracts-bedrock/src/safe/TimelockGuard.sol

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,67 @@ contract TimelockGuard is IGuard, ISemver {
143143
return abi.decode(safe.getStorageAt({ offset: uint256(guardSlot), length: 1 }), (address));
144144
}
145145

146+
/// @notice Schedule a transaction for execution after the timelock delay
147+
/// @dev Called by anyone using signatures from Safe owners
148+
/// @param safe The Safe address
149+
/// @param to Transaction target address
150+
/// @param value Transaction value
151+
/// @param data Transaction data
152+
/// @param operation Transaction operation type
153+
/// @param safeTxGas Safe transaction gas
154+
/// @param baseGas Base gas for transaction
155+
/// @param gasPrice Gas price
156+
/// @param gasToken Gas token address
157+
/// @param refundReceiver Refund receiver address
158+
/// @param signatures Transaction signatures
159+
function scheduleTransaction(
160+
address safe,
161+
address to,
162+
uint256 value,
163+
bytes memory data,
164+
Enum.Operation operation,
165+
uint256 safeTxGas,
166+
uint256 baseGas,
167+
uint256 gasPrice,
168+
address gasToken,
169+
address payable refundReceiver,
170+
bytes memory signatures
171+
)
172+
external
173+
{
174+
revert("Not implemented yet");
175+
}
176+
177+
/// @notice Returns the list of all scheduled but not cancelled transactions for a given safe
178+
/// @dev MUST NOT revert
179+
/// @param _safe The Safe address to query
180+
/// @return List of pending transaction hashes
181+
function checkPendingTransactions(address _safe) external view returns (bytes32[] memory) {
182+
return new bytes32[](0);
183+
}
184+
185+
/// @notice Signal rejection of a scheduled transaction by a Safe owner
186+
/// @param safe The Safe address that scheduled the transaction
187+
/// @param txHash The transaction hash to reject
188+
function rejectTransaction(address safe, bytes32 txHash) external {
189+
revert("Not implemented yet");
190+
}
191+
192+
/// @notice Signal rejection of a scheduled transaction using signatures
193+
/// @param safe The Safe address that scheduled the transaction
194+
/// @param txHash The transaction hash to reject
195+
/// @param signatures Owner signatures rejecting the transaction
196+
function rejectTransactionWithSignature(address safe, bytes32 txHash, bytes memory signatures) external {
197+
revert("Not implemented yet");
198+
}
199+
200+
/// @notice Cancel a scheduled transaction if cancellation threshold is met
201+
/// @param safe The Safe address that scheduled the transaction
202+
/// @param txHash The transaction hash to cancel
203+
function cancelTransaction(address safe, bytes32 txHash) external {
204+
revert("Not implemented yet");
205+
}
206+
146207
/// @notice Called by the Safe before executing a transaction
147208
/// @dev Implementation of IGuard interface
148209
function checkTransaction(
@@ -161,7 +222,7 @@ contract TimelockGuard is IGuard, ISemver {
161222
external
162223
override
163224
{
164-
// Empty implementation for now - will be filled in when implementing checkTransaction
225+
// Empty implementation for now
165226
}
166227

167228
/// @notice Called by the Safe after executing a transaction

0 commit comments

Comments
 (0)