Skip to content

Conversation

@ith-harvey
Copy link
Contributor

@ith-harvey ith-harvey commented Nov 4, 2025

Added OZ timelock deployment script

  • added corresponding tests
  • deploys cleanly on Sepolia

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

LCOV of commit a104cad during Forge Coverage #151

Summary coverage rate:
  lines......: 93.7% (433 of 462 lines)
  functions..: 93.4% (141 of 151 functions)
  branches...: no data found

Files changed coverage rate: n/a

@ith-harvey ith-harvey marked this pull request as ready for review November 4, 2025 23:33
@ith-harvey ith-harvey changed the title added timelock and tests OZ timelock deployment Nov 4, 2025
@ith-harvey ith-harvey requested a review from Copilot November 4, 2025 23:40
Copy link

Copilot AI left a comment

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 deployment infrastructure for OpenZeppelin's TimelockController contract, including a deployment script, comprehensive test suite, and Makefile integration for Sepolia deployment.

Key changes:

  • Added DeployTimelock.sol script with parameter validation and deployment logic
  • Created comprehensive test suite with 11 test cases covering edge cases and role assignments
  • Extended Makefile with deploy-timelock target and environment variable configuration

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
script/deploy/DeployTimelock.sol Core deployment script with validation and TimelockController instantiation
test/DeployTimelock.t.sol Test suite validating deployment scenarios, role assignments, and parameter handling
Makefile Added deployment target with environment variable configuration
.env.example Added example configuration for timelock deployment parameters

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

@@ -0,0 +1,61 @@

Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

Remove the empty line at the beginning of the file. The file should start directly with the SPDX license identifier comment.

Suggested change

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

resolved -> a104cad

.env.example Outdated
# update with your mnemonic
MNEMONIC="test test test test test test test test test test test junk"

# .env
Copy link

Copilot AI Nov 4, 2025

Choose a reason for hiding this comment

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

[nitpick] The comment '# .env' is redundant since this is already the .env.example file. Consider removing it or replacing it with a more descriptive comment about the section below.

Suggested change
# .env

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

resolved -> a104cad

TIMELOCK_MIN_DELAY=259200 # 3 days in seconds
TIMELOCK_PROPOSERS=0x1234567890123456789012345678901234567890,0x0987654321098765432109876543210987654321
TIMELOCK_EXECUTORS=0x13cb6ae34a13a0977f4d7101ebc24b87bb23f0d5,0x14cb6ae34a13a0977f4d7101ebc24b87bb23f0d6
TIMELOCK_ADMIN=0x0000000000000000000000000000000000000000
Copy link
Collaborator

Choose a reason for hiding this comment

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

should be 0x0 address for the actual deployments

@toninorair
Copy link
Collaborator

looks great, I doubt common is the best repo for this script though
It can be placed in https://github.com/m0-foundation/m-core instead

@ith-harvey
Copy link
Contributor Author

looks great, I doubt common is the best repo for this script though It can be placed in https://github.com/m0-foundation/m-core instead

Cool, will submit a PR there and close this one then, thank you!

@ith-harvey
Copy link
Contributor Author

Closing, team decided better to add to m-core -> m0-foundation/m-core@f6f5e57

@ith-harvey ith-harvey closed this Nov 6, 2025
@ith-harvey ith-harvey deleted the timelock-deploy branch November 6, 2025 12:12
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