Documentation
¶
Index ¶
- Variables
- func CorrectTimelockDelays(ctx context.Context, lggr logger.Logger, blockChains chain.BlockChains, ...) error
- func CorrectTimelockDelaysWithLookup(ctx context.Context, lggr logger.Logger, proposals []mcms.TimelockProposal, ...) error
- func MaxMinDelay(chainDelays []ChainDelay) mcmstypes.Duration
- type ChainDelay
- type MinDelayLookup
Constants ¶
This section is empty.
Variables ¶
var ErrUnsetTimelockDelayUnverified = errors.New("timelock delay unset and unable to resolve from on-chain minDelay")
ErrUnsetTimelockDelayUnverified indicates a schedule proposal has no delay set and on-chain minDelay could not be read for every timelock chain.
Functions ¶
func CorrectTimelockDelays ¶
func CorrectTimelockDelays( ctx context.Context, lggr logger.Logger, blockChains chain.BlockChains, proposals []mcms.TimelockProposal, ) error
CorrectTimelockDelays updates schedule proposal delays using on-chain minDelay from blockChains. Unset or too-low delays are bumped to the max on-chain minDelay across timelock chains when minDelay can be read for every timelock chain. An unset delay fails the call if any chain cannot be read. If on-chain minDelay is verified as zero on every timelock chain, an unset proposal delay is left at zero so the proposal can be executed without waiting. An explicitly set delay is left unchanged when on-chain minDelay cannot be verified.
func CorrectTimelockDelaysWithLookup ¶
func CorrectTimelockDelaysWithLookup( ctx context.Context, lggr logger.Logger, proposals []mcms.TimelockProposal, lookup MinDelayLookup, ) error
CorrectTimelockDelaysWithLookup is like CorrectTimelockDelays but accepts a custom lookup (for tests).
func MaxMinDelay ¶
func MaxMinDelay(chainDelays []ChainDelay) mcmstypes.Duration
MaxMinDelay returns the largest minDelay across chains.
Types ¶
type ChainDelay ¶
ChainDelay captures on-chain minDelay for one timelock chain.
func ReadChainMinDelays ¶
func ReadChainMinDelays( ctx context.Context, blockChains chain.BlockChains, proposal *mcms.TimelockProposal, ) ([]ChainDelay, []string)
ReadChainMinDelays reads on-chain minDelay for each timelock address in the proposal. Returns per-chain delays and verify error messages for chains that could not be read.