Skip to content

Conversation

@ecPablo
Copy link
Collaborator

@ecPablo ecPablo commented Aug 18, 2025

Adds support for get min delay on all supported mcms chains. This call is might be useful in fork testing contexts, where we need to know the time we need to wait or skip on the forked chain before we can execute a timelock operation.

AI Summary

This pull request adds support for retrieving the minimum delay (getMinDelay) from timelock contracts across all supported chain families (EVM, Aptos, Solana). It introduces the GetMinDelay method to the TimelockInspector interface and implements it for each chain, along with corresponding tests and mocks. The change ensures that users and tests can query the configured minimum delay for timelock operations in a unified way.

Cross-chain Timelock Inspector Enhancements

Interface and Implementation:

  • Added GetMinDelay(ctx, address) to the TimelockInspector interface in sdk/timelock_inspector.go, and implemented this method for EVM (sdk/evm/timelock_inspector.go), Aptos (sdk/aptos/timelock_inspector.go), and Solana (sdk/solana/timelock_inspector.go). This allows querying the minimum delay for timelock contracts on all supported chains. [1] [2] [3] [4]

End-to-End and Unit Testing:

  • Added new tests for GetMinDelay in EVM (sdk/evm/timelock_inspector_test.go), Aptos (e2e/tests/aptos/timelock_proposal.go), Solana (e2e/tests/solana/timelock_inspection.go), and EVM e2e suite (e2e/tests/evm/timelock_inspection.go). These verify correct functionality and error handling. [1] [2] [3] [4]

Mocks and Test Infrastructure:

  • Updated mocks for both TimelockInspector and TimelockExecutor to support the new GetMinDelay method, enabling robust unit testing and test isolation. [1] [2]

Refactoring and Code Quality:

  • Refactored variable declarations in Aptos timelock proposal tests to improve clarity and error handling, especially around transaction and proposal building steps. [1] [2] [3] [4] [5] [6]

Documentation and Release Note:

  • Added a changeset documenting the new feature for @smartcontractkit/mcms, indicating minor version bump and summarizing the addition of getMinDelay support. (.changeset/giant-plums-dress.md)

Signed-off-by: Pablo <pablo.estrada@smartcontract.com>
Signed-off-by: Pablo <pablo.estrada@smartcontract.com>
@changeset-bot
Copy link

changeset-bot bot commented Aug 18, 2025

🦋 Changeset detected

Latest commit: 08dcba8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@smartcontractkit/mcms Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

ecPablo and others added 3 commits August 18, 2025 10:04
Signed-off-by: Pablo <pablo.estrada@smartcontract.com>
Signed-off-by: Pablo <pablo.estrada@smartcontract.com>
@ecPablo ecPablo changed the title featL add support for get min delay [DX-1583] feat: add support for get min delay [DX-1583] Aug 18, 2025
Signed-off-by: Pablo <pablo.estrada@smartcontract.com>
Signed-off-by: Pablo <pablo.estrada@smartcontract.com>
Signed-off-by: Pablo <pablo.estrada@smartcontract.com>
@cl-sonarqube-production
Copy link

@ecPablo ecPablo marked this pull request as ready for review August 18, 2025 18:54
@ecPablo ecPablo requested a review from a team as a code owner August 18, 2025 18:54
Copy link
Contributor

Choose a reason for hiding this comment

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

what's wrong with using := for the variable initializations? Is the linter complaining?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah the linter was complaining about it, not super fan of the rule though

@ecPablo ecPablo added this pull request to the merge queue Aug 18, 2025
Merged via the queue into main with commit fdf66b3 Aug 18, 2025
16 checks passed
@ecPablo ecPablo deleted the ecpablo/support-get-min-delay branch August 18, 2025 22:22
github-merge-queue bot pushed a commit that referenced this pull request Aug 27, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @smartcontractkit/mcms@0.22.0

### Minor Changes

- [#441](#441)
[`fdf66b3`](fdf66b3)
Thanks [@ecPablo](https://github.com/ecPablo)! - Adds support for
getMinDelay to timelock inspectors on all supported chain families

- [#446](#446)
[`2e56b50`](2e56b50)
Thanks [@gustavogama-cll](https://github.com/gustavogama-cll)! - feat:
implement TimelockProposal.Merge()

- [#450](#450)
[`6e542cb`](6e542cb)
Thanks [@ecPablo](https://github.com/ecPablo)! - feat: add converted
operations count function

### Patch Changes

- [#449](#449)
[`8f14da3`](8f14da3)
Thanks [@ecPablo](https://github.com/ecPablo)! - fix: avoid requiring
all executors for converters generation

Co-authored-by: app-token-issuer-engops[bot] <144731339+app-token-issuer-engops[bot]@users.noreply.github.com>
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