multisig

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 19 Imported by: 0

README

Multisig Monitor

The multisig monitor reports the paused status of the OptimismPortal contract. If set, the latest nonce of the configued Safe address. And also if set, the latest presigned nonce stored in One Password. The latest presigned nonce is identifyed by looking for items in the configued vault that follow a ready-<nonce>.json name. The highest nonce of this item name format is reported.

  • NOTE: In order to read from one password, the OP_SERVICE_ACCOUNT_TOKEN environment variable must be set granting the process permission to access the specified vault.
OPTIONS:
   --l1.node.url value             [$MULTISIG_MON_L1_NODE_URL]       Node URL of L1 peer (default: "127.0.0.1:8545")
   --optimismportal.address value  [$MULTISIG_MON_OPTIMISM_PORTAL]   Address of the OptimismPortal contract
   --nickname value                [$MULTISIG_MON_NICKNAME]          Nickname of chain being monitored
   --safe.address value            [$MULTISIG_MON_SAFE]              Address of the Safe contract
   --op.vault value                [$MULTISIG_MON_1PASS_VAULT_NAME]  1Pass Vault name storing presigned safe txs following a 'ready-<nonce>.json' item name format

Documentation

Index

Constants

View Source
const (
	L1NodeURLFlagName = "l1.node.url"

	NicknameFlagName              = "nickname"
	OptimismPortalAddressFlagName = "optimismportal.address"
	SafeAddressFlagName           = "safe.address"
	OnePassVaultFlagName          = "op.vault"
)
View Source
const (
	MetricsNamespace = "multisig_mon"
	SafeNonceABI     = "nonce()"

	OPTokenEnvName = "OP_SERVICE_ACCOUNT_TOKEN"

	// Item names follow a `ready-<nonce>.json` format
	PresignedNonceTitlePrefix = "ready-"
	PresignedNonceTitleSuffix = ".json"
)

Variables

View Source
var (
	SafeNonceSelector = crypto.Keccak256([]byte(SafeNonceABI))[:4]
)

Functions

func CLIFlags

func CLIFlags(envVar string) []cli.Flag

Types

type CLIConfig

type CLIConfig struct {
	L1NodeURL             string
	Nickname              string
	OptimismPortalAddress common.Address

	// Optional
	SafeAddress  *common.Address
	OnePassVault *string
}

func ReadCLIFlags

func ReadCLIFlags(ctx *cli.Context) (CLIConfig, error)

type Monitor

type Monitor struct {
	// contains filtered or unexported fields
}

func NewMonitor

func NewMonitor(ctx context.Context, log log.Logger, m metrics.Factory, cfg CLIConfig) (*Monitor, error)

func (*Monitor) Close

func (m *Monitor) Close(_ context.Context) error

func (*Monitor) Run

func (m *Monitor) Run(ctx context.Context)

Jump to

Keyboard shortcuts

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