Documentation
¶
Index ¶
- func AllowOperators(ctx context.Context, def app.Definition, cfg Config) error
- func EnsureBridgeSpec(ctx context.Context, def app.Definition, cfg Config, ...) error
- func EnsurePortalSpec(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 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 UpgradeSlashing(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 NetworkBridgeDirectives
- type NetworkBridgeSpec
- type NetworkPortalSpec
- type PortalDirectives
- type PortalSpec
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 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 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 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 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 UpgradeSlashing ¶
UpgradeSlashing upgrades the Slashing predeploy.
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 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 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 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.