Documentation
¶
Index ¶
- func AllowOperators(ctx context.Context, def app.Definition, cfg Config) error
- func CancelPlannedUpgrade(ctx context.Context, def app.Definition, cfg Config) error
- func EnsureBridgeSpec(ctx context.Context, def app.Definition, cfg Config, ...) error
- func EnsureGasAppSpec(ctx context.Context, def app.Definition, cfg Config, ...) error
- func EnsurePortalSpec(ctx context.Context, def app.Definition, cfg Config, ...) error
- func EnsureSolverNetSpec(ctx context.Context, def app.Definition, cfg Config, ...) error
- func PlanUpgrade(ctx context.Context, def app.Definition, cfg Config) error
- func SetPortalFeeOracleV2(ctx context.Context, def app.Definition, cfg Config) error
- func Test(ctx context.Context, def app.Definition) error
- func UpgradeBridgeL1(ctx context.Context, def app.Definition, cfg Config) error
- func UpgradeBridgeNative(ctx context.Context, def app.Definition, cfg Config) error
- func UpgradeDistribution(ctx context.Context, def app.Definition, cfg Config) error
- func UpgradeFeeOracleV1(ctx context.Context, def app.Definition, cfg Config) error
- func UpgradeGasPump(ctx context.Context, def app.Definition, cfg Config) error
- func UpgradeGasStation(ctx context.Context, def app.Definition, cfg Config) error
- func UpgradePortal(ctx context.Context, def app.Definition, cfg Config) error
- func UpgradePortalRegistry(ctx context.Context, def app.Definition, cfg Config) error
- func UpgradeRedenom(ctx context.Context, def app.Definition, cfg Config) error
- func UpgradeSlashing(ctx context.Context, def app.Definition, cfg Config) error
- func UpgradeSolverNetAll(ctx context.Context, def app.Definition, cfg Config) error
- func UpgradeSolverNetExecutor(ctx context.Context, def app.Definition, cfg Config) error
- func UpgradeSolverNetInbox(ctx context.Context, def app.Definition, cfg Config) error
- func UpgradeSolverNetOutbox(ctx context.Context, def app.Definition, cfg Config) error
- func UpgradeStaking(ctx context.Context, def app.Definition, cfg Config) error
- type BridgeCommon
- type BridgeDirectives
- type BridgeSpec
- type Config
- type GasAppDirectives
- type GasAppSpec
- type NetworkBridgeDirectives
- type NetworkBridgeSpec
- type NetworkGasAppSpec
- type NetworkPortalSpec
- type NetworkSolverNetSpec
- type PortalDirectives
- type PortalSpec
- type SolverNetDirectives
- type SolverNetSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowOperators ¶
AllowOperators ensures that all operators hard-coded in this package is allowed as validators. Note it only adds any of the operators that are missing, it doesn't remove any ever.
func CancelPlannedUpgrade ¶ added in v0.14.0
CancelPlannedUpgrade cancels the current planned upgrade.
func EnsureBridgeSpec ¶
func EnsureBridgeSpec(ctx context.Context, def app.Definition, cfg Config, specOverride *NetworkBridgeSpec) error
EnsureBridgeSpec ensures that live bridge contracts are configured as per the local spec.
func EnsureGasAppSpec ¶ added in v0.17.0
func EnsureGasAppSpec(ctx context.Context, def app.Definition, cfg Config, localSpecOverride *GasAppSpec) error
EnsureGasAppSpec ensures that live gas app contracts are configured as per the local spec.
func EnsurePortalSpec ¶
func EnsurePortalSpec(ctx context.Context, def app.Definition, cfg Config, localSpecOverride *PortalSpec) error
EnsurePortalSpec ensures that live portal contracts are configured as per the local spec.
func EnsureSolverNetSpec ¶ added in v0.14.0
func EnsureSolverNetSpec(ctx context.Context, def app.Definition, cfg Config, localSpecOverride *SolverNetSpec) error
EnsureSolverNetSpec ensures that live SolverNetInbox contracts are configured as per the local spec.
func PlanUpgrade ¶ added in v0.9.0
PlanUpgrade plans the above configured network upgrade.
func SetPortalFeeOracleV2 ¶ added in v0.12.0
SetPortalFeeOracleV2 upgrades the OmniPortal's FeeOracle to the FeeOracleV2 contract.
func Test ¶
func Test(ctx context.Context, def app.Definition) error
Test tests all admin commands against an ephemeral network.
func UpgradeBridgeL1 ¶
UpgradeBridgeL1 upgrades the OmniBridgeL1 contract.
func UpgradeBridgeNative ¶
UpgradeBridgeNative upgrades the OmniBridgeNative predeploy.
func UpgradeDistribution ¶ added in v0.15.0
UpgradeDistribution upgrades the Slashing predeploy.
func UpgradeFeeOracleV1 ¶
UpgradeFeeOracleV1 upgrades the FeeOracleV1 contracts on a network.
func UpgradeGasPump ¶
UpgradeGasPump upgrades the OmniGasPump contracts on a network.
func UpgradeGasStation ¶
UpgradeGasStation upgrades the GasStation contracts on a network.
func UpgradePortal ¶
UpgradePortal upgrades the portal contracts on a network.
func UpgradePortalRegistry ¶
UpgradePortalRegistry upgrades the PortalRegistry predeploy.
func UpgradeRedenom ¶ added in v0.17.0
UpgradeRedenom upgrades the Redenom predeploy.
func UpgradeSlashing ¶
UpgradeSlashing upgrades the Slashing predeploy.
func UpgradeSolverNetAll ¶ added in v0.15.0
UpgradeSolverNetAll upgrades all of the SolverNet contracts.
func UpgradeSolverNetExecutor ¶ added in v0.14.0
UpgradeSolverNetExecutor upgrades the SolverNetExecutor contract.
func UpgradeSolverNetInbox ¶ added in v0.14.0
UpgradeSolverNet upgrades the SolverNet contracts.
func UpgradeSolverNetOutbox ¶ added in v0.14.0
UpgradeSolverNetOutbox upgrades the SolverNetOutbox contract.
func UpgradeStaking ¶
UpgradeStaking upgrades the Staking predeploy.
Types ¶
type BridgeCommon ¶
type BridgeCommon interface {
// KeyPauseAll returns the key for pausing all actions (PauseableUpgradeable.KeyPauseAll)
KeyPauseAll(opts *bind.CallOpts) ([32]byte, error)
// ACTIONWITHDRAW returns the key for pausing withdraws (OmniBridgeCommon.ACTION_WITHDRAW)
ACTIONWITHDRAW(opts *bind.CallOpts) ([32]byte, error)
// ACTIONBRIDGE returns the key for pausing bridge actions (OmniBridgeCommon.ACTION_BRIDGE)
ACTIONBRIDGE(opts *bind.CallOpts) ([32]byte, error)
// IsPaused returns true if the action is paused
IsPaused(opts *bind.CallOpts, action [32]byte) (bool, error)
}
BridgeCommon is a common interface between native and L1 bridge contracts. It lists a subset of OmniBridgeCommon views.
type BridgeDirectives ¶
type BridgeDirectives struct {
PauseAll bool
UnpauseAll bool
PauseWithdraw bool
UnpauseWithdraw bool
PauseBridge bool
UnpauseBridge bool
}
BridgeDirectives define updates required for a bridge contract to match the spec.
type BridgeSpec ¶
BridgeSpec is the specification for a bridge contract (native or L1).
func (BridgeSpec) Verify ¶
func (s BridgeSpec) Verify() error
Verify checks that there are no conflicting specifications.
type Config ¶
type Config struct {
// Broadcast determines whether or not transactions.
Broadcast bool
// Chain is the name of chain to run on. Leave empty to run on all applicable chains.
Chain string
}
func DefaultConfig ¶
func DefaultConfig() Config
type GasAppDirectives ¶ added in v0.17.0
type GasAppDirectives struct {
// PauseGasPump indicates that the gas pump should be paused.
PauseGasPump bool
// UnpauseGasPump indicates that the gas pump should be unpaused.
UnpauseGasPump bool
// PauseGasStation indicates that the gas station should be paused.
PauseGasStation bool
// UnpauseGasStation indicates that the gas station should be unpaused.
UnpauseGasStation bool
}
GasAppDirectives defines updates required on the gas app to match a spec.
func (GasAppDirectives) Verify ¶ added in v0.17.0
func (d GasAppDirectives) Verify() error
Verify checks that there are no conflicting directives.
type GasAppSpec ¶ added in v0.17.0
type GasAppSpec struct {
// PauseGasPump indicates that the gas pump should be paused.
PauseGasPump bool
// PauseGasStation indicates that the gas station should be paused.
PauseGasStation bool
}
GasAppSpec is the specification for the gas app.
func DefaultGasAppSpec ¶ added in v0.17.0
func DefaultGasAppSpec() GasAppSpec
DefaultGasAppSpec returns a default gas app spec with nothing paused.
func (GasAppSpec) Verify ¶ added in v0.17.0
func (GasAppSpec) Verify() error
Verify checks that there are no conflicting specifications.
type NetworkBridgeDirectives ¶
type NetworkBridgeDirectives struct {
Native BridgeDirectives
L1 BridgeDirectives
}
NetworkBridgeDirectives defines the bridge directives for a network, both native and L1.
type NetworkBridgeSpec ¶
type NetworkBridgeSpec struct {
Native BridgeSpec
L1 BridgeSpec
}
NetworkBridgeSpec defines the bridge spec for a network, both native and L1.
func DefaultBridgeSpec ¶
func DefaultBridgeSpec() NetworkBridgeSpec
type NetworkGasAppSpec ¶ added in v0.17.0
type NetworkGasAppSpec struct {
// Global is the gas app spec, maintained on all chains.
Global GasAppSpec
// ChainOverrides overrides the global spec for specific chains. Must specify full spec, not just diff.
ChainOverrides map[uint64]*GasAppSpec
}
NetworkGasAppSpec defines the gas app spec for a network.
type NetworkPortalSpec ¶
type NetworkPortalSpec struct {
// Global is the portal spec, maintained on all chains.
Global PortalSpec
// ChainOverrides overrides the global spec for specific chains. Must specify full spec, not just diff.
ChainOverrides map[uint64]*PortalSpec
}
type NetworkSolverNetSpec ¶ added in v0.14.0
type NetworkSolverNetSpec struct {
// Global is the SolverNet spec maintained on all chains.
Global SolverNetSpec
// ChainOverrides overrides the global spec for specific chains. Must specify full spec, not just diff.
ChainOverrides map[uint64]*SolverNetSpec
}
NetworkSolverNetSpec defines the SolverNet spec for a network.
type PortalDirectives ¶
type PortalDirectives struct {
// PauseAll indicates that all actions on the portal should be paused.
PauseAll bool
// UnpauseAll indicates that all actions on the portal should be unpaused.
UnpauseAll bool
// PauseXCall indicates that all xcalls should be paused.
PauseXCall bool
// UnpauseXCall indicates that all xcalls should be unpaused.
UnpauseXCall bool
// PauseXCallTo indicates that xcalls to specific chains should be paused.
PauseXCallTo []uint64
// UnpauseXCallTo indicates that xcalls to specific chains should be unpaused.
UnpauseXCallTo []uint64
// PauseXSubmit indicates that all xsubmits should be paused.
PauseXSubmit bool
// UnpauseXSubmit indicates that all xsubmits should be unpaused.
UnpauseXSubmit bool
// PauseXSubmitFrom indicates that xsubmits from specific chains should be paused.
PauseXSubmitFrom []uint64
// UnpauseXSubmitFrom indicates that xsubmits from specific chains should be unpaused.
UnpauseXSubmitFrom []uint64
}
PortalDirectives defines updates required on a portal to match a spec.
func (PortalDirectives) Verify ¶
func (d PortalDirectives) Verify() error
Verify checks that there are no conflicting directives.
type PortalSpec ¶
type PortalSpec struct {
// PauseAll indicates that all actions on the portal should be paused.
PauseAll bool
// PauseXCall indicates that all xcalls should be paused.
PauseXCall bool
// PauseXCallTo indicates that xcalls to specific chains should be paused.
PauseXCallTo []uint64
// PauseXSubmit indicates that all xsubmits should be paused.
PauseXSubmit bool
// PauseXSubmitFrom indicates that xsubmits from specific chains should be paused.
PauseXSubmitFrom []uint64
}
PortalSpec is the specification for the OmniPortal contract.
func DefaultPortalSpec ¶
func DefaultPortalSpec() PortalSpec
func (PortalSpec) Verify ¶
func (s PortalSpec) Verify() error
Verify checks that there are no conflicting specifications.
type SolverNetDirectives ¶ added in v0.14.0
type SolverNetDirectives struct {
// PauseAll indicates that open and close actions on the SolverNetInbox should be paused.
PauseAll bool
// UnpauseAll indicates that open and close actions on the SolverNetInbox should be unpaused.
UnpauseAll bool
// PauseOpen indicates that opening new orders should be paused.
PauseOpen bool
// UnpauseOpen indicates that opening new orders should be unpaused.
UnpauseOpen bool
// PauseClose indicates that closing orders should be paused.
PauseClose bool
// UnpauseClose indicates that closing orders should be unpaused.
UnpauseClose bool
}
SolverNetDirectives defines updates required on a SolverNetInbox to match a spec.
func (SolverNetDirectives) Verify ¶ added in v0.14.0
func (d SolverNetDirectives) Verify() error
Verify checks that there are no conflicting directives.
type SolverNetSpec ¶ added in v0.14.0
type SolverNetSpec struct {
// PauseAll indicates that open and close actions on the SolverNetInbox should be paused.
PauseAll bool
// PauseOpen indicates that opening new orders should be paused.
PauseOpen bool
// PauseClose indicates that closing orders should be paused.
PauseClose bool
}
SolverNetSpec is the specification for the SolverNetInbox contract.
func DefaultSolverNetSpec ¶ added in v0.14.0
func DefaultSolverNetSpec() SolverNetSpec
DefaultSolverNetSpec returns a default SolverNet spec with nothing paused.
func (SolverNetSpec) Verify ¶ added in v0.14.0
func (s SolverNetSpec) Verify() error
Verify checks that there are no conflicting specifications.