feat: grant role timelock - changesets and EVM sequence#104
Conversation
Release impact (release-please)
PR title: Merging this PR as-is will contribute a minor 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 |
`opsutils.go` is only used by legacy code. The only usages in non-legacy mcms is currentlly in `grant-roles` pkg, which will be refactored in this PR #104
f128632 to
19d82f9
Compare
|
| families := make([]string, 0, len(byFamily)) | ||
| for family := range byFamily { | ||
| families = append(families, family) | ||
| } | ||
| slices.Sort(families) |
There was a problem hiding this comment.
could use map.Slice with map.Keys
| type Config struct { | ||
| GrantsByChain map[uint64][]RoleGrant `json:"grantsByChain"` | ||
| // GasBoostConfig optionally configures EVM retry gas boosting for direct sends. | ||
| GasBoostConfig *proposalutils.GasBoostConfig `json:"gasBoostConfig,omitempty"` |
There was a problem hiding this comment.
do you think we can use the new GasBoostConfig here? I think long term we want to replace all usage of proposalutils.GasBoostConfig with the newer one.
| ChainSelector uint64 `json:"chainSelector"` | ||
| Grants []RoleGrant `json:"grants"` | ||
| MCMS *cldf.MCMSTimelockProposalInput `json:"mcms,omitempty"` | ||
| GasBoostConfig *proposalutils.GasBoostConfig `json:"gasBoostConfig,omitempty"` |
| if in.NoSend { | ||
| opts = cldf.SimTransactOpts() | ||
| } else { | ||
| opts = gasboost.CloneTransactOptsWithGas(deps.DeployerKey, in.GasLimit, in.GasPrice) |
There was a problem hiding this comment.
Hmm maybe we should export this function since the logic is being duplicated here too? (not a blocker to this PR).
|
|
||
| if in.MCMS == nil { | ||
| return nil | ||
| } |
There was a problem hiding this comment.
should we move this check up to the first few lines of this method, then we no longer need to do line 41-43 nil check again?
| func parseTimelockAddress(raw string) (common.Address, error) { | ||
| return parseEVMAddress(raw) | ||
| } |
There was a problem hiding this comment.
any reason to keep this? It doesnt add any new logic?
| selector: cldfevm.Chain{Selector: selector}, | ||
| }), | ||
| DataStore: ds.Seal(), | ||
| GetContext: context.Background, |
There was a problem hiding this comment.
| GetContext: context.Background, | |
| GetContext: t.Context, |
| return cldf.Environment{ | ||
| Logger: logger.Nop(), | ||
| DataStore: ds, | ||
| GetContext: context.Background, |
There was a problem hiding this comment.
| GetContext: context.Background, | |
| GetContext: t.Context, |




Adds the refactored version of the grant role changeset, using the mcms lib on the operations and all the helpers and structure established by the new refactored changesets.