Skip to content

Commit 2d3f746

Browse files
committed
fix: cleanup and remove ops utils test
1 parent 2a77d81 commit 2d3f746

2 files changed

Lines changed: 1 addition & 393 deletions

File tree

mcms/evm/grant-role/validate.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"github.com/ethereum/go-ethereum/common"
88
chainselectors "github.com/smartcontractkit/chain-selectors"
99
cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment"
10-
mcmssdk "github.com/smartcontractkit/mcms/sdk"
1110

1211
grantrole "github.com/smartcontractkit/cld-changesets/mcms/changesets/grant-role"
1312
evmreaders "github.com/smartcontractkit/cld-changesets/mcms/evm/readers"
@@ -67,18 +66,14 @@ func validateMCMSRefs(env cldf.Environment, in grantrole.SeqInput) error {
6766

6867
func validateRoles(in grantrole.SeqInput) error {
6968
for i, grant := range in.Grants {
70-
if !supportedRole(grant.Role) {
69+
if !grant.Role.Valid() {
7170
return fmt.Errorf("grants[%d]: unsupported timelock role %s", i, grant.Role.String())
7271
}
7372
}
7473

7574
return nil
7675
}
7776

78-
func supportedRole(role mcmssdk.TimelockRole) bool {
79-
return role.Valid()
80-
}
81-
8277
func parseEVMAddress(raw string, name string) (common.Address, error) {
8378
if !common.IsHexAddress(raw) {
8479
return common.Address{}, fmt.Errorf("%s address %q is not a valid EVM address", name, raw)

0 commit comments

Comments
 (0)