grantrole

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Registry = familyregistry.New[Sequence, SeqInput]("mcms grant-role")

Registry holds per-family grant-role sequences.

Functions

func EnvFromDeps

func EnvFromDeps(deps Deps) cldf.Environment

EnvFromDeps reconstructs the environment fields sequences need for datastore resolution.

Types

type Changeset

type Changeset struct{}

Changeset grants RBACTimelock roles across configured chains.

func (Changeset) Apply

func (Changeset) Apply(env cldf.Environment, input Input) (cldf.ChangesetOutput, error)

func (Changeset) VerifyPreconditions

func (Changeset) VerifyPreconditions(env cldf.Environment, input Input) error

type Config

type Config struct {
	GrantsByChain map[uint64][]RoleGrant `json:"grantsByChain"`
	// GasBoostConfig optionally configures EVM retry gas boosting for direct sends.
	GasBoostConfig *opscontract.GasBoostConfig `json:"gasBoostConfig,omitempty"`
}

Config selects timelock role grants by chain selector.

type Deps

type Deps struct {
	BlockChains chain.BlockChains
	DataStore   cldfdatastore.DataStore
}

Deps is the read-only dependency bundle available to every family sequence.

type Input

type Input = sequenceutils.WithMCMS[Config]

Input is the grant-role changeset configuration with optional MCMS proposal settings.

type Registration

Registration describes one chain family's grant-role implementation.

type RoleGrant

type RoleGrant struct {
	Role      mcmssdk.TimelockRole `json:"role"`
	Addresses []string             `json:"addresses"`
}

RoleGrant grants one timelock role to multiple accounts.

type SeqInput

type SeqInput struct {
	ChainSelector  uint64                          `json:"chainSelector"`
	Grants         []RoleGrant                     `json:"grants"`
	MCMS           *cldf.MCMSTimelockProposalInput `json:"mcms,omitempty"`
	GasBoostConfig *opscontract.GasBoostConfig     `json:"gasBoostConfig,omitempty"`
}

SeqInput is the evm input for calling grant role on the timelock contract

type Sequence

Sequence is the required operations sequence type for all family implementations.

Directories

Path Synopsis
Package all blank-imports built-in MCMS grant-role families and readers.
Package all blank-imports built-in MCMS grant-role families and readers.

Jump to

Keyboard shortcuts

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