Documentation
¶
Index ¶
- Constants
- func NewPrecompile(upgradeKeeper UpgradeKeeper, poaKeeper PoaKeeper) (*precompile.Contract, error)
- func NewPrecompileVersionMap(upgradeKeeper UpgradeKeeper, poaKeeper PoaKeeper) (*precompile.VersionMap, error)
- type CancelPlanMethod
- func (m *CancelPlanMethod) MethodName() string
- func (m *CancelPlanMethod) MethodType() precompile.MethodType
- func (m *CancelPlanMethod) Payable() bool
- func (m *CancelPlanMethod) RequiredGas(_ []byte) (uint64, bool)
- func (m *CancelPlanMethod) Run(context *precompile.RunContext, inputs precompile.MethodInputs) (precompile.MethodOutputs, error)
- type PlanCanceledEvent
- type PlanMethod
- func (m *PlanMethod) MethodName() string
- func (m *PlanMethod) MethodType() precompile.MethodType
- func (m *PlanMethod) Payable() bool
- func (m *PlanMethod) RequiredGas(_ []byte) (uint64, bool)
- func (m *PlanMethod) Run(context *precompile.RunContext, inputs precompile.MethodInputs) (precompile.MethodOutputs, error)
- type PlanSubmittedEvent
- type PoaKeeper
- type SubmitPlanMethod
- func (m *SubmitPlanMethod) MethodName() string
- func (m *SubmitPlanMethod) MethodType() precompile.MethodType
- func (m *SubmitPlanMethod) Payable() bool
- func (m *SubmitPlanMethod) RequiredGas(_ []byte) (uint64, bool)
- func (m *SubmitPlanMethod) Run(context *precompile.RunContext, inputs precompile.MethodInputs) (precompile.MethodOutputs, error)
- type UpgradeKeeper
Constants ¶
const CancelPlanMethodName = "cancelPlan"
CancelPlanMethodName is the name of the cancelPlan method. It matches the name of the method in the contract ABI.
const EvmAddress = evmtypes.UpgradePrecompileAddress
EvmAddress is the EVM address of the upgrade precompile. The address is prefixed with 0x7b7c which was used to derive Mezo chain ID. This prefix is used to avoid potential collisions with EVM native precompiles.
const EvmByteCode = "" /* 2570-byte string literal not displayed */
EvmByteCode is the EVM bytecode of the upgrade precompile. This code is returned by eth_getCode and ensures the precompile address is detected as a smart contract by external services. note: It should NOT contain a 0x prefix
WARNING! This value is used in the InitChain ABCI hook and affects the app state hash. DO NOT change this value on a live chain, instead, use `setPrecompileByteCode` provided by the `Maintenance` precompile
This bytecode was generated by compiling the UpgradeCaller contract found in the precompile/hardhat package. Then extracting `deployedBytecode` from the build artifacts
const PlanCanceledEventName = "PlanCanceled"
PlanCanceledName is the name of the PlanCanceled event. It matches the name of the event in the contract ABI.
const PlanMethodName = "plan"
PlanMethodName is the name of the plan method. It matches the name of the method in the contract ABI.
const PlanSubmittedEventName = "PlanSubmitted"
PlanSubmittedName is the name of the PlanSubmitted event. It matches the name of the event in the contract ABI.
const SubmitPlanMethodName = "submitPlan"
SubmitPlanMethodName is the name of the submitPlan method. It matches the name of the method in the contract ABI.
Variables ¶
This section is empty.
Functions ¶
func NewPrecompile ¶
func NewPrecompile(upgradeKeeper UpgradeKeeper, poaKeeper PoaKeeper) (*precompile.Contract, error)
NewPrecompile creates a new upgrade precompile.
func NewPrecompileVersionMap ¶
func NewPrecompileVersionMap( upgradeKeeper UpgradeKeeper, poaKeeper PoaKeeper, ) (*precompile.VersionMap, error)
NewPrecompileVersionMap creates a new version map for the upgrade precompile.
Types ¶
type CancelPlanMethod ¶
type CancelPlanMethod struct {
// contains filtered or unexported fields
}
func (*CancelPlanMethod) MethodName ¶
func (m *CancelPlanMethod) MethodName() string
func (*CancelPlanMethod) MethodType ¶
func (m *CancelPlanMethod) MethodType() precompile.MethodType
func (*CancelPlanMethod) Payable ¶
func (m *CancelPlanMethod) Payable() bool
func (*CancelPlanMethod) RequiredGas ¶
func (m *CancelPlanMethod) RequiredGas(_ []byte) (uint64, bool)
func (*CancelPlanMethod) Run ¶
func (m *CancelPlanMethod) Run(context *precompile.RunContext, inputs precompile.MethodInputs) (precompile.MethodOutputs, error)
type PlanCanceledEvent ¶
type PlanCanceledEvent struct {
// contains filtered or unexported fields
}
PlanCanceledEvent is the implementation of the PlanCanceled event that contains the following arguments: - name: is the name of the canceled upgrade plan - height: is the block height of the submitted upgrade plan
func NewPlanCanceledEvent ¶
func NewPlanCanceledEvent(name string, height int64) *PlanCanceledEvent
func (*PlanCanceledEvent) Arguments ¶
func (e *PlanCanceledEvent) Arguments() []*precompile.EventArgument
func (*PlanCanceledEvent) EventName ¶
func (e *PlanCanceledEvent) EventName() string
type PlanMethod ¶
type PlanMethod struct {
// contains filtered or unexported fields
}
PlanMethod is the implementation of the plan method that returns the current upgrade plan
func (*PlanMethod) MethodName ¶
func (m *PlanMethod) MethodName() string
func (*PlanMethod) MethodType ¶
func (m *PlanMethod) MethodType() precompile.MethodType
func (*PlanMethod) Payable ¶
func (m *PlanMethod) Payable() bool
func (*PlanMethod) RequiredGas ¶
func (m *PlanMethod) RequiredGas(_ []byte) (uint64, bool)
func (*PlanMethod) Run ¶
func (m *PlanMethod) Run(context *precompile.RunContext, inputs precompile.MethodInputs) (precompile.MethodOutputs, error)
type PlanSubmittedEvent ¶
type PlanSubmittedEvent struct {
// contains filtered or unexported fields
}
PlanSubmittedEvent is the implementation of the PlanSubmitted event that contains the following arguments: - name: is the name of the submitted upgrade plan - height: is the block height of the submitted upgrade plan
func NewPlanSubmittedEvent ¶
func NewPlanSubmittedEvent(name string, height int64) *PlanSubmittedEvent
func (*PlanSubmittedEvent) Arguments ¶
func (e *PlanSubmittedEvent) Arguments() []*precompile.EventArgument
func (*PlanSubmittedEvent) EventName ¶
func (e *PlanSubmittedEvent) EventName() string
type PoaKeeper ¶
type PoaKeeper interface {
CheckOwner(ctx sdk.Context, sender sdk.AccAddress) error
}
type SubmitPlanMethod ¶
type SubmitPlanMethod struct {
// contains filtered or unexported fields
}
func (*SubmitPlanMethod) MethodName ¶
func (m *SubmitPlanMethod) MethodName() string
func (*SubmitPlanMethod) MethodType ¶
func (m *SubmitPlanMethod) MethodType() precompile.MethodType
func (*SubmitPlanMethod) Payable ¶
func (m *SubmitPlanMethod) Payable() bool
func (*SubmitPlanMethod) RequiredGas ¶
func (m *SubmitPlanMethod) RequiredGas(_ []byte) (uint64, bool)
func (*SubmitPlanMethod) Run ¶
func (m *SubmitPlanMethod) Run(context *precompile.RunContext, inputs precompile.MethodInputs) (precompile.MethodOutputs, error)