fix(mcms/transfer): change to datastore ref type#113
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the MCMS transfer-to-timelock changeset API to avoid EVM-specific address types by switching contract selection from common.Address to a generic datastore reference key (refkey.RefKey), and adds normalization/validation around those refs.
Changes:
- Replaced per-chain contract inputs from
[]common.Addressto[]refkey.RefKeyand normalized refs to the chain selector. - Added ref normalization helpers + tests, and updated documentation/examples to use ref keys.
- Updated EVM transfer-to-timelock implementation to resolve refs to EVM addresses at execution/validation time, and adjusted tests accordingly.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| mcms/evm/transfer-to-timelock/validate.go | Validates contract refs and resolves them to EVM addresses for ownership preconditions. |
| mcms/evm/transfer-to-timelock/validate_test.go | Updates validation tests to use refkey.RefKey and adds resolveEVMAddress coverage. |
| mcms/evm/transfer-to-timelock/sequence.go | Resolves contract refs to EVM addresses before building transfer operations. |
| mcms/evm/transfer-to-timelock/changeset_test.go | Updates EVM integration-style tests to pass contract refs instead of addresses. |
| mcms/evm/transfer-to-timelock/addresses.go | Introduces resolveEVMAddress helper for resolving datastore refs into EVM addresses. |
| mcms/changesets/transfer-to-timelock/types.go | Changes public config/input types to use refkey.RefKey (generic datastore refs). |
| mcms/changesets/transfer-to-timelock/refs.go | Adds normalizeContractRefs to enforce/fill chain selector on refs. |
| mcms/changesets/transfer-to-timelock/refs_test.go | Adds tests for normalizeContractRefs. |
| mcms/changesets/transfer-to-timelock/doc.go | Updates documentation example to use ref keys instead of EVM addresses. |
| mcms/changesets/transfer-to-timelock/changeset.go | Normalizes contract refs before executing per-chain sequences and during precondition grouping. |
| mcms/changesets/transfer-to-timelock/changeset_test.go | Updates changeset tests to use refkey.RefKey inputs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
30aaeb0 to
a42b225
Compare
a42b225 to
8c84fea
Compare
Release impact (release-please)
PR title: Merging this PR as-is will contribute a patch bump to the next release-please release PR. Conventional commit → bump
Update the PR title before merge if you need a different bump (squash commit message = PR title). Preview is based on this PR title only. The release-please release PR may include other unreleased commits already on |
For the transfer to timelock changeset, the input type contains evm specific type which should be avoided. This commit changes the type into a generic datastore type.
8c84fea to
fa0a066
Compare
|


For the transfer to timelock changeset, the input type contains evm specific type which should be avoided. This commit changes the type into a generic datastore type.
Before
After