Skip to content

Implement multisig timelock test#12

Merged
FuzzysTodd merged 1 commit into
SAfrom
FuzzysTodd-patch-2
Nov 12, 2025
Merged

Implement multisig timelock test#12
FuzzysTodd merged 1 commit into
SAfrom
FuzzysTodd-patch-2

Conversation

@FuzzysTodd

Copy link
Copy Markdown
Owner

Add a test for multisig timelock enforcement in transactions.

Add a test for multisig timelock enforcement in transactions.
Copilot AI review requested due to automatic review settings November 12, 2025 00:24
@FuzzysTodd FuzzysTodd merged commit ff87bac into SA Nov 12, 2025
1 of 3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a test to verify that multisig timelock enforcement works correctly for transactions. The test ensures that transactions cannot be executed before the timelock period expires, even when they have sufficient signatures.

Key Changes:

  • Adds a new test function test_multisig_timelock_enforced that validates timelock behavior
  • Tests both the blocking of premature execution and successful execution after the timelock expires

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread py.py
@@ -0,0 +1,19 @@
# tests/test_safe_core.py
import json, os, time

Copilot AI Nov 12, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The imports json and os are not used in this test. Remove unused imports to keep the code clean.

Suggested change
import json, os, time
import time

Copilot uses AI. Check for mistakes.
Comment thread py.py
except Exception as e:
assert "timelock" in str(e).lower()
# Wait then execute
time.sleep(4)

Copilot AI Nov 12, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test sleeps for 4 seconds when the timelock is set to 0.001 hours (3.6 seconds). This makes the test unnecessarily slow. Consider reducing the sleep duration to slightly more than 3.6 seconds (e.g., 4 seconds is reasonable but could be optimized) or make the timelock period configurable for testing to avoid long test execution times.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

@FuzzysTodd FuzzysTodd deleted the FuzzysTodd-patch-2 branch November 15, 2025 05:04
@FuzzysTodd FuzzysTodd restored the FuzzysTodd-patch-2 branch November 15, 2025 10:38
@FuzzysTodd FuzzysTodd deleted the FuzzysTodd-patch-2 branch November 15, 2025 10:39
@FuzzysTodd FuzzysTodd restored the FuzzysTodd-patch-2 branch November 15, 2025 10:39
@FuzzysTodd FuzzysTodd deleted the FuzzysTodd-patch-2 branch November 15, 2025 10:40
@FuzzysTodd FuzzysTodd restored the FuzzysTodd-patch-2 branch November 15, 2025 10:40
@FuzzysTodd FuzzysTodd deleted the FuzzysTodd-patch-2 branch November 15, 2025 10:41
@FuzzysTodd FuzzysTodd restored the FuzzysTodd-patch-2 branch November 15, 2025 10:41
@FuzzysTodd FuzzysTodd deleted the FuzzysTodd-patch-2 branch November 15, 2025 10:41
@FuzzysTodd FuzzysTodd restored the FuzzysTodd-patch-2 branch November 15, 2025 10:41
@FuzzysTodd FuzzysTodd deleted the FuzzysTodd-patch-2 branch November 15, 2025 10:41
@FuzzysTodd FuzzysTodd restored the FuzzysTodd-patch-2 branch November 15, 2025 10:41
@FuzzysTodd FuzzysTodd deleted the FuzzysTodd-patch-2 branch November 15, 2025 10:41
@FuzzysTodd FuzzysTodd restored the FuzzysTodd-patch-2 branch November 15, 2025 10:41
@FuzzysTodd FuzzysTodd deleted the FuzzysTodd-patch-2 branch November 15, 2025 10:41
@FuzzysTodd FuzzysTodd restored the FuzzysTodd-patch-2 branch November 15, 2025 10:41
@FuzzysTodd FuzzysTodd deleted the FuzzysTodd-patch-2 branch November 15, 2025 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants