upf

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpfConvertProposal

func UpfConvertProposal(
	proposalCtx mcmsanalyzer.ProposalContext,
	proposal *mcms.Proposal,
	signers map[mcmstypes.ChainSelector][]common.Address,
) (string, error)

UpfConvertProposal converts a standard MCMS proposal to a UPF proposal format.

func UpfConvertTimelockProposal

func UpfConvertTimelockProposal(
	proposalCtx mcmsanalyzer.ProposalContext,
	timelockProposal *mcms.TimelockProposal,
	mcmProposal *mcms.Proposal,
	signers map[mcmstypes.ChainSelector][]common.Address,
) (string, error)

UpfConvertTimelockProposal converts a TimelockProposal to a UPF proposal format.

Types

type DecodedCallData

type DecodedCallData struct {
	FunctionName string                      `json:"functionName"`
	FunctionArgs DecodedCalldataFunctionArgs `json:"functionArgs"`
}

type DecodedCalldataFunctionArgs

type DecodedCalldataFunctionArgs map[string]any // TODO: use type that preserves insertion order

type DecodedInnerCall

type DecodedInnerCall struct {
	To    string           `json:"to"`
	Value int64            `json:"value"`
	Data  *DecodedCallData `json:"data,omitempty"`
}

type GnosisParams

type GnosisParams map[string]any

type McmsParams

type McmsParams struct {
	ValidUntil           uint32   `json:"validUntil"`
	MerkleRoot           string   `json:"merkleRoot"`
	ASCIIProposalHash    rawBytes `json:"asciiProposalHash,omitempty"`
	OverridePreviousRoot bool     `json:"overridePreviousRoot"`
}

type Metadata

type Metadata struct {
	ContractType    string           `json:"contractType,omitempty"`
	Comment         string           `json:"comment,omitempty" `
	DecodedCalldata *DecodedCallData `json:"decodedCalldata,omitempty"`
}

type Transaction

type Transaction struct {
	Index           int       `json:"index"`
	ChainFamily     string    `json:"chainFamily"`
	ChainID         string    `json:"chainId"`
	ChainName       string    `json:"chainName,omitempty"`
	ChainShortName  string    `json:"chainShortName,omitempty"`
	MsigAddress     string    `json:"msigAddress"`
	TimelockAddress string    `json:"timelockAddress,omitempty"`
	To              string    `json:"to"`
	Value           int64     `json:"value"`
	Data            string    `json:"data"`
	TxNonce         uint64    `json:"txNonce"`
	Metadata        *Metadata `json:"metadata,omitempty"`
}

type UPFProposal

type UPFProposal struct {
	MsigType     string                               `json:"msigType"`
	ProposalHash string                               `json:"proposalHash"`
	McmsParams   *McmsParams                          `json:"mcmsParams,omitempty"`
	GnosisParams *GnosisParams                        `json:"gnosisParams,omitempty"`
	Transactions []Transaction                        `json:"transactions"`
	Signers      map[mcmstypes.ChainSelector][]string `json:"signers,omitempty"`
}

Jump to

Keyboard shortcuts

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