Precompile Address
The Upgrade precompile is available at the fixed address:Solidity Interface
Methods
All methods are read-onlyview queries and are non-payable; sending value reverts the call.
currentPlan
Plan is returned (empty name and info, height of 0).
The returned Plan contains:
name— the name of the scheduled upgrade.height— the block height at which the upgrade is scheduled to run.info— arbitrary metadata attached to the plan.
appliedPlan
name was applied. If the upgrade has not been applied, it returns 0.
upgradedConsensusState
lastHeight. If no consensus state is stored for that height, it returns empty bytes.
moduleVersions
moduleName returns every module; passing a specific moduleName returns a single entry for that module. Querying an unknown module name reverts.
Each ModuleVersion contains:
name— the module’s name.version— the module’s consensus version.