mcmsrole

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package mcmsrole provides RBACTimelock role names and IDs used by MCMS changesets.

RBACTimelock defines five roles: ADMIN, PROPOSER, EXECUTOR, BYPASSER, and CANCELLER. Each role ID is the keccak256 hash of its name string, matching OpenZeppelin AccessControl. See RBACTimelock in ccip-owner-contracts: https://github.com/smartcontractkit/ccip-owner-contracts/blob/9d81692b324ce7ea2ef8a75e683889edbc7e2dd0/src/RBACTimelock.sol#L71

These constants are defined here instead of via generated Go bindings so changesets can reference role IDs without importing timelock contract wrappers.

The package lives under internal/ because both legacy and top-level changesets depend on it. Once MCMS changesets are consolidated, consider moving it into the mcms changesets tree or promoting it to the mcms library.

Index

Constants

This section is empty.

Variables

View Source
var (
	AdminRole     = NewRole(adminRoleStr)
	ProposerRole  = NewRole(proposerRoleStr)
	BypasserRole  = NewRole(bypasserRoleStr)
	CancellerRole = NewRole(cancellerRoleStr)
	ExecutorRole  = NewRole(executorRoleStr)
)

Functions

This section is empty.

Types

type Role

type Role struct {
	ID   common.Hash
	Name string
}

Role represents a role in the MCMS Timelock contracts.

func NewRole

func NewRole(name string) Role

NewRole creates a new role with the given name and calculates the ID.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL